Deprecate plasma/version.h header & contained methods
This is obsolete with KPluginLoader::pluginVersion being deprecated. For the other methods the generated plasma_version.h header can be used. Task: https://phabricator.kde.org/T14724
This commit is contained in:
parent
882442bce3
commit
75c31c08d5
@ -83,7 +83,7 @@ ecm_generate_export_header(KF5Plasma
|
|||||||
VERSION ${KF_VERSION}
|
VERSION ${KF_VERSION}
|
||||||
DEPRECATED_BASE_VERSION 0
|
DEPRECATED_BASE_VERSION 0
|
||||||
EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
|
EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
|
||||||
DEPRECATION_VERSIONS 5.6 5.19 5.28 5.30 5.36 5.46 5.67 5.77 5.78 5.81 5.83
|
DEPRECATION_VERSIONS 5.6 5.19 5.28 5.30 5.36 5.46 5.67 5.77 5.78 5.81 5.83 5.85
|
||||||
)
|
)
|
||||||
|
|
||||||
if(HAVE_X11)
|
if(HAVE_X11)
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <plasma/version.h>
|
#include <plasma/version.h>
|
||||||
|
|
||||||
|
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 85)
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
unsigned int version()
|
unsigned int version()
|
||||||
@ -60,3 +62,4 @@ bool isPluginVersionCompatible(unsigned int version)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // Plasma namespace
|
} // Plasma namespace
|
||||||
|
#endif
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
/** @file plasma/version.h <Plasma/Version> */
|
/** @file plasma/version.h <Plasma/Version> */
|
||||||
|
|
||||||
#include <plasma/plasma_export.h>
|
#include <plasma/plasma_export.h>
|
||||||
|
|
||||||
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 85)
|
||||||
|
|
||||||
#include <plasma_version.h>
|
#include <plasma_version.h>
|
||||||
|
|
||||||
#define PLASMA_MAKE_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
|
#define PLASMA_MAKE_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
|
||||||
@ -17,6 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Compile-time macro for checking the plasma version. Not useful for
|
* Compile-time macro for checking the plasma version. Not useful for
|
||||||
* detecting the version of libplasma at runtime.
|
* detecting the version of libplasma at runtime.
|
||||||
|
* @deprecated Since 5.85, use plasma_version.h header instead
|
||||||
*/
|
*/
|
||||||
#define PLASMA_IS_VERSION(a, b, c) (PLASMA_VERSION >= PLASMA_MAKE_VERSION(a, b, c))
|
#define PLASMA_IS_VERSION(a, b, c) (PLASMA_VERSION >= PLASMA_MAKE_VERSION(a, b, c))
|
||||||
|
|
||||||
@ -27,34 +31,48 @@ namespace Plasma
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The runtime version of libplasma
|
* The runtime version of libplasma
|
||||||
|
* @deprecated Since 5.85, use plasma_version.h header instead
|
||||||
*/
|
*/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
|
||||||
PLASMA_EXPORT unsigned int version();
|
PLASMA_EXPORT unsigned int version();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The runtime major version of libplasma
|
* The runtime major version of libplasma
|
||||||
|
* @deprecated Since 5.85, use plasma_version.h header instead
|
||||||
*/
|
*/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
|
||||||
PLASMA_EXPORT unsigned int versionMajor();
|
PLASMA_EXPORT unsigned int versionMajor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The runtime major version of libplasma
|
* The runtime major version of libplasma
|
||||||
|
* @deprecated Since 5.85, use plasma_version.h header instead
|
||||||
*/
|
*/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
|
||||||
PLASMA_EXPORT unsigned int versionMinor();
|
PLASMA_EXPORT unsigned int versionMinor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The runtime major version of libplasma
|
* The runtime major version of libplasma
|
||||||
|
* @deprecated Since 5.85, use plasma_version.h header instead
|
||||||
*/
|
*/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
|
||||||
PLASMA_EXPORT unsigned int versionRelease();
|
PLASMA_EXPORT unsigned int versionRelease();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The runtime version string of libplasma
|
* The runtime version string of libplasma
|
||||||
|
* @deprecated Since 5.85, use plasma_version.h header instead
|
||||||
*/
|
*/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
|
||||||
PLASMA_EXPORT const char *versionString();
|
PLASMA_EXPORT const char *versionString();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies that a plugin is compatible with plasma
|
* Verifies that a plugin is compatible with plasma
|
||||||
|
* @deprecated Since 5.85, method is obsolete with the deprecation of KPluginLoader::pluginVersion.
|
||||||
|
* Consider using a versioned namespace or KPluginMetaData::version instead.
|
||||||
*/
|
*/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 85, "See API docs")
|
||||||
PLASMA_EXPORT bool isPluginVersionCompatible(unsigned int version);
|
PLASMA_EXPORT bool isPluginVersionCompatible(unsigned int version);
|
||||||
|
|
||||||
} // Plasma namespace
|
} // Plasma namespace
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif // multiple inclusion guard
|
#endif // multiple inclusion guard
|
||||||
|
Loading…
Reference in New Issue
Block a user