diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index bf4c29f..960c11c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,7 @@ int main(int argc, char *argv[]) { + // Browser app(argc, argv); if(app.isRunning()) { qDebug("Another instance is running, returning..."); @@ -35,14 +36,30 @@ int main(int argc, char *argv[]) parser.setApplicationDescription("yet another Qt browser"); parser.addHelpOption(); parser.addVersionOption(); - parser.addPositionalArgument("URL", "URL(s) to open"); + QCommandLineOption configOption(QStringList() << "c" << "config", "Set configuration file.", "PATH"); parser.addOption(configOption); + + QCommandLineOption defaultConfigOption(QStringList() << "default-config", "Print default configuration"); + parser.addOption(defaultConfigOption); + QCommandLineOption profileOption(QStringList() << "p" << "profile", "Use this profile.", "PROFILE"); parser.addOption(profileOption); - QCommandLineOption nopluginsOption(QStringList() << "n" << "noplugins", "Don't load plugins"); + + QCommandLineOption nopluginsOption(QStringList() << "n" << "no-plugins", "Don't load plugins"); parser.addOption(nopluginsOption); + QCommandLineOption newInstanceOption(QStringList() << "new-instance", "Skip instance check at startup"); + parser.addOption(newInstanceOption); + + QCommandLineOption newWindowOption(QStringList() << "in-new-window", "Open URL in new window"); + parser.addOption(newWindowOption); + + QCommandLineOption newTabOption(QStringList() << "in-new-tab", "Open URL in new tab"); + parser.addOption(newTabOption); + + parser.addPositionalArgument("URL", "URL(s) to open"); + parser.process(app); app.setWindowIcon(QIcon(QLatin1String(":/icon.svg"))); |