aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-07-30 14:12:24 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-07-30 14:12:24 +0200
commitca94e0cfc558f8667a1196f5e4c4c5ee6034684b (patch)
tree4259993e74e3a917fb07024f3b2a6fee2b66c0b1 /src
parentAdded homepage and newtab to profile widget (diff)
downloadsmolbote-ca94e0cfc558f8667a1196f5e4c4c5ee6034684b.tar.xz
Updated documentation
Diffstat (limited to 'src')
-rw-r--r--src/browser.cpp2
-rw-r--r--src/main.cpp21
2 files changed, 21 insertions, 2 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 0ea36d8..0c4191f 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -193,6 +193,7 @@ void Browser::setConfigPath(const QString &path)
m_settings = new Settings(configLocation, defaultsLocation);
+#ifdef QT_DEBUG
if(m_settings->isEmpty()) {
// There are no keys in the settings
QMessageBox::information(0,
@@ -200,6 +201,7 @@ void Browser::setConfigPath(const QString &path)
tr("The configuration file <i>%1</i> is empty.<br>"
"Using default values from <i>%2</i>.").arg(configLocation, defaultsLocation));
}
+#endif
}
MainWindow *Browser::mainWindow()
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")));