File indexing completed on 2024-04-28 03:53:52
0001 /* 0002 This file is part of the KDE Libraries 0003 0004 SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef KCOREADDONS_H 0010 #define KCOREADDONS_H 0011 0012 #include <QString> 0013 #include <kcoreaddons_export.h> 0014 0015 /** 0016 * @namespace KCoreAddons 0017 * Provides utility functions for metadata about the KCoreAddons library. 0018 */ 0019 namespace KCoreAddons 0020 { 0021 /** 0022 * Returns the version number of KCoreAddons at run-time as a string (for example, "5.19.0"). 0023 * This may be a different version than the version the application was compiled against. 0024 * @since 5.20 0025 */ 0026 KCOREADDONS_EXPORT QString versionString(); 0027 0028 /** 0029 * Returns a numerical version number of KCoreAddons at run-time in the form 0xMMNNPP 0030 * (MM = major, NN = minor, PP = patch) 0031 * This can be compared using the macro QT_VERSION_CHECK. 0032 * 0033 * For example: 0034 * \code 0035 * if (KCoreAddons::version() < QT_VERSION_CHECK(5,19,0)) 0036 * \endcode 0037 * 0038 * This may be a different version than the version the application was compiled against. 0039 * @since 5.20 0040 */ 0041 KCOREADDONS_EXPORT unsigned int version(); 0042 } 0043 0044 #endif