23 #include "versiondump.h" 26 #include "plugins/engineplugin.h" 27 #include "plugins/pluginloader.h" 31 #include <wadseeker/wadseekerversioninfo.h> 33 class VersionDump::Module
36 Module(
const QString &displayName,
const QString &revision,
37 const QString &displayVersion = QString())
39 _displayName = displayName;
41 _displayVersion = displayVersion;
44 QVariantMap toVariantMap()
47 result[
"display-name"] = _displayName;
48 result[
"revision"] = _revision;
50 if (!_displayVersion.isNull())
52 result[
"display-version"] = _displayVersion;
60 QString _displayVersion;
63 void VersionDump::dumpJsonToIO(QIODevice &io)
66 Module doomseeker(Version::name(), QString::number(Version::revisionNumber()),
69 root[
"doomseeker"] = Module(
"Doomseeker",
"1496802976",
"1.1-170607-0236").toVariantMap();
70 root[
"doomseeker-core"] = doomseeker.toVariantMap();
71 root[
"wadseeker"] = Module(
"Wadseeker", WadseekerVersionInfo::version(),
72 WadseekerVersionInfo::version()).toVariantMap();
73 root[
"qt"] = Module(
"Qt", Version::qtPackageVersion()).toVariantMap();
74 for (
unsigned int i = 0; i < gPlugins->numPlugins(); ++i)
77 QString name = plugin->
info()->data()->name;
78 QString keyword =
"p-" + name.toLower().replace(
" ",
"");
79 root[keyword] = Module(name, QString::number(plugin->
info()->data()->version)).toVariantMap();
static QString versionRevision()
Combines version and revision strings.
static QByteArray serialize(const QVariant &data)
EnginePlugin * info() const
Main plugin interface.