File indexing completed on 2024-12-01 05:14:52

0001 /*
0002     SPDX-FileCopyrightText: 2017 by Adriaan de Groot <groot@kde.org>
0003     SPDX-FileCopyrightText: 2018 Andrius Štikonas <andrius@stikonas.eu>
0004 
0005     SPDX-License-Identifier: GPL-3.0-or-later
0006 */
0007 
0008 #ifndef TEST_KPMHELPERS_H
0009 #define TEST_KPMHELPERS_H
0010 
0011 class QString;
0012 
0013 /**
0014  * Use RAII to initialize the KPMcore library. Just instantiate one
0015  * object of this class to do "normal" initialization.
0016  */
0017 class KPMCoreInitializer
0018 {
0019 public:
0020     KPMCoreInitializer(); /// Default backend
0021     KPMCoreInitializer( const QString& backend );  /// Use named backend
0022     KPMCoreInitializer( const char* backend );  /// Use named backend
0023 
0024     bool isValid() const
0025     {
0026         return m_isValid;
0027     }
0028 private:
0029     bool m_isValid;
0030 } ;
0031 
0032 #endif