mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kdecore: remove now unused KPluginLoader::pluginVersion() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
263c5d48da
commit
623cc24741
3 changed files with 2 additions and 54 deletions
|
@ -24,34 +24,6 @@
|
||||||
#include <QtCore/QPluginLoader>
|
#include <QtCore/QPluginLoader>
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
|
||||||
/**
|
|
||||||
* \internal
|
|
||||||
* Stores KDE version information in a plugin library.
|
|
||||||
* \see K_PLUGIN_VERIFICATION_DATA
|
|
||||||
*/
|
|
||||||
struct KDEPluginVerificationData
|
|
||||||
{
|
|
||||||
enum { PluginVerificationDataVersion = 1 };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \internal
|
|
||||||
* The version of this structure. Do not ever delete or change a field.
|
|
||||||
* append a field to this structure.
|
|
||||||
*/
|
|
||||||
quint8 dataVersion;
|
|
||||||
quint32 KDEVersion;
|
|
||||||
const char *KDEVersionString;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \internal
|
|
||||||
* Used to export the KDE version a plugin was compiled against.
|
|
||||||
* \see KDEPluginVerificationData
|
|
||||||
*/
|
|
||||||
#define K_PLUGIN_VERIFICATION_DATA \
|
|
||||||
extern "C" Q_DECL_EXPORT const KDEPluginVerificationData kde_plugin_verification_data = \
|
|
||||||
{ KDEPluginVerificationData::PluginVerificationDataVersion, KDE_VERSION, KDE_VERSION_STRING };
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \relates KPluginLoader
|
* \relates KPluginLoader
|
||||||
* This macro exports the main object of the plugin. Most times, this will be a KPluginFactory
|
* This macro exports the main object of the plugin. Most times, this will be a KPluginFactory
|
||||||
|
@ -59,8 +31,7 @@ extern "C" Q_DECL_EXPORT const KDEPluginVerificationData kde_plugin_verification
|
||||||
* Take a look at the documentation of Q_EXPORT_PLUGIN2 for some details.
|
* Take a look at the documentation of Q_EXPORT_PLUGIN2 for some details.
|
||||||
*/
|
*/
|
||||||
#define K_EXPORT_PLUGIN(factory) \
|
#define K_EXPORT_PLUGIN(factory) \
|
||||||
Q_EXPORT_PLUGIN(factory) \
|
Q_EXPORT_PLUGIN(factory)
|
||||||
K_PLUGIN_VERIFICATION_DATA
|
|
||||||
|
|
||||||
#endif // KDECORE_KEXPORTPLUGIN_H
|
#endif // KDECORE_KEXPORTPLUGIN_H
|
||||||
|
|
||||||
|
|
|
@ -34,14 +34,13 @@ class KPluginLoaderPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KPluginLoaderPrivate(const QString &libname)
|
KPluginLoaderPrivate(const QString &libname)
|
||||||
: name(libname), pluginVersion(0)
|
: name(libname)
|
||||||
{}
|
{}
|
||||||
~KPluginLoaderPrivate()
|
~KPluginLoaderPrivate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString name;
|
const QString name;
|
||||||
mutable quint32 pluginVersion;
|
|
||||||
QString errorString;
|
QString errorString;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -177,22 +176,6 @@ QString KPluginLoader::errorString() const
|
||||||
return QPluginLoader::errorString();
|
return QPluginLoader::errorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 KPluginLoader::pluginVersion() const
|
|
||||||
{
|
|
||||||
Q_D(const KPluginLoader);
|
|
||||||
|
|
||||||
if (!d->pluginVersion && !fileName().isEmpty()) {
|
|
||||||
QLibrary lib(fileName());
|
|
||||||
|
|
||||||
KDEPluginVerificationData *verificationData = (KDEPluginVerificationData *) lib.resolve("kde_plugin_verification_data");
|
|
||||||
if (verificationData) {
|
|
||||||
d->pluginVersion = (verificationData->KDEVersion & 0xFFFF00);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return d->pluginVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString KPluginLoader::pluginName() const
|
QString KPluginLoader::pluginName() const
|
||||||
{
|
{
|
||||||
Q_D(const KPluginLoader);
|
Q_D(const KPluginLoader);
|
||||||
|
|
|
@ -122,12 +122,6 @@ public:
|
||||||
*/
|
*/
|
||||||
QString pluginName() const;
|
QString pluginName() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Queries the plugin version.
|
|
||||||
* \returns The version defined as KDE_VERSION or (quint32) 0 if plugin is not valid KDE plugin.
|
|
||||||
*/
|
|
||||||
quint32 pluginVersion() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queries the last error.
|
* Queries the last error.
|
||||||
* \returns The description of the last error.
|
* \returns The description of the last error.
|
||||||
|
|
Loading…
Add table
Reference in a new issue