Commit 67fcef24 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Inline application metadata, no more need for static variables

parent 1847bafc
......@@ -32,16 +32,12 @@
// Own
#include "view.h"
static const char description[] = I18N_NOOP("Cuttlefish Icon Browser");
static const char version[] = PROJECT_VERSION;
static const char HOME_URL[] = "http://kde.org";
int main(int argc, char **argv)
{
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("cuttlefish");
app.setApplicationVersion(version);
app.setApplicationVersion(PROJECT_VERSION);
const static auto _category = QStringLiteral("category");
QCommandLineOption category = QCommandLineOption(QStringList() << QStringLiteral("c") << _category,
......@@ -57,7 +53,7 @@ int main(int argc, char **argv)
QCommandLineParser parser;
parser.addVersionOption();
parser.setApplicationDescription(description);
parser.setApplicationDescription("Cuttlefish Icon Browser");
parser.addHelpOption();
parser.addOption(category);
parser.addOption(fullscreen);
......
......@@ -29,9 +29,6 @@
#include "engineexplorer.h"
static const char description[] = I18N_NOOP("Explore the data published by Plasma DataEngines");
static const char version[] = PROJECT_VERSION;
void listEngines()
{
int maxLen = 0;
......@@ -71,7 +68,8 @@ int main(int argc, char **argv)
KLocalizedString::setApplicationDomain("plasmaengineexplorer");
KAboutData aboutData("plasmaengineexplorer", i18n("Plasma Engine Explorer"),
version, i18n(description), KAboutLicense::GPL,
PROJECT_VERSION, i18n("Explore the data published by Plasma DataEngines"),
KAboutLicense::GPL,
i18n("(c) 2006, The KDE Team"));
aboutData.addAuthor(i18n("Aaron J. Seigo"),
i18n( "Author and maintainer" ),
......
......@@ -41,13 +41,10 @@ int main(int argc, char **argv)
QCommandLineParser parser;
QApplication app(argc, argv);
const QString description = i18n("Plasma Look And Feel Explorer");
const char version[] = PROJECT_VERSION;
app.setApplicationVersion(version);
app.setApplicationVersion(PROJECT_VERSION);
parser.addVersionOption();
parser.addHelpOption();
parser.setApplicationDescription(description);
parser.setApplicationDescription(i18n("Plasma Look And Feel Explorer"));
QCommandLineOption themeOption(QCommandLineOption(QStringList() << "l" << "lookandfeel", i18n("Look And Feel to open"), "lookandfeel"));
......
......@@ -40,8 +40,6 @@
#include <Plasma/Theme>
static const char version[] = PROJECT_VERSION;
int main(int argc, char **argv)
{
QQmlDebuggingEnabler debugEnabler;
......@@ -51,7 +49,7 @@ int main(int argc, char **argv)
KDBusService service(KDBusService::Multiple);
app.setApplicationVersion(version);
app.setApplicationVersion(PROJECT_VERSION);
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("plasma"), app.windowIcon()));
QCommandLineParser parser;
......
......@@ -42,13 +42,10 @@ int main(int argc, char **argv)
QCommandLineParser parser;
QApplication app(argc, argv);
const QString description = i18n("Plasma Theme Explorer");
const char version[] = PROJECT_VERSION;
app.setApplicationVersion(version);
app.setApplicationVersion(PROJECT_VERSION);
parser.addVersionOption();
parser.addHelpOption();
parser.setApplicationDescription(description);
parser.setApplicationDescription(i18n("Plasma Theme Explorer"));
QCommandLineOption themeOption(QCommandLineOption(QStringList() << "t" << "theme", i18n("The theme to open"), "theme"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment