File: helpers.h

package info (click to toggle)
kpmcore 24.12.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,696 kB
  • sloc: cpp: 20,700; sh: 22; makefile: 7
file content (32 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
    SPDX-FileCopyrightText: 2017 by Adriaan de Groot <groot@kde.org>
    SPDX-FileCopyrightText: 2018 Andrius Štikonas <andrius@stikonas.eu>

    SPDX-License-Identifier: GPL-3.0-or-later
*/

#ifndef TEST_KPMHELPERS_H
#define TEST_KPMHELPERS_H

class QString;

/**
 * Use RAII to initialize the KPMcore library. Just instantiate one
 * object of this class to do "normal" initialization.
 */
class KPMCoreInitializer
{
public:
    KPMCoreInitializer(); /// Default backend
    KPMCoreInitializer( const QString& backend );  /// Use named backend
    KPMCoreInitializer( const char* backend );  /// Use named backend

    bool isValid() const
    {
        return m_isValid;
    }
private:
    bool m_isValid;
} ;

#endif