compile fix

This commit is contained in:
Patrick von Reth 2015-02-03 15:05:48 +01:00
parent b506f3486b
commit c966c0b12e
1 changed files with 10 additions and 10 deletions

View File

@ -9,8 +9,8 @@
#include <iostream>
using namespace Snore;
using namespace Snore;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
@ -30,8 +30,8 @@ int main(int argc, char *argv[])
parser.addOption(message);
QCommandLineOption applicationName(QStringList() << "a" << "application", "Set the notification applicattion.", "application", app.applicationName());
parser.addOption(applicationName);
parser.addOption(applicationName);
QCommandLineOption alertName(QStringList() << "c" << "alert", "Set the notification alert class.", "alert", "Default");
parser.addOption(alertName);
@ -42,15 +42,15 @@ int main(int argc, char *argv[])
parser.addOption(backend);
QCommandLineOption silent(QStringList() << "silent", "Don't print to stdout.");
parser.addOption(silent);
parser.addOption(silent);
parser.process(app);
if (parser.isSet(title) && parser.isSet(message)) {
SnoreCore core;
core.loadPlugins(SnorePlugin::BACKEND);
core.loadPlugins(SnorePlugin::BACKEND | SnorePlugin::SECONDARY_BACKEND);
if (parser.isSet(backend) ? !core.setPrimaryNotificationBackend(parser.value(backend)) : !core.setPrimaryNotificationBackend()) {
std::cerr << "Failed to set backend: " << qPrintable(parser.value(backend)) << " avalible backends: " << qPrintable(core.notificationBackends().join(", ")) << std::endl;
std::cerr << "Failed to set backend: " << qPrintable(parser.value(backend)) << " avalible backends: " << qPrintable(core.pluginNames(SnorePlugin::BACKEND).join(", ")) << std::endl;
return 1;
}
Icon icon(parser.value(iconPath));
@ -78,5 +78,5 @@ int main(int argc, char *argv[])
return returnCode;
}
parser.showHelp(1);
}
}