From 500bc64f7671cfa9dbcfe1c2d808ea67eb0c3a42 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 2 Jul 2018 12:54:32 +0200 Subject: Add --no-remote option --- lib/about/aboutdialog.cpp | 2 +- lib/configuration/configuration.cpp | 21 +++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) (limited to 'lib') diff --git a/lib/about/aboutdialog.cpp b/lib/about/aboutdialog.cpp index 9136d4a..1b427fb 100644 --- a/lib/about/aboutdialog.cpp +++ b/lib/about/aboutdialog.cpp @@ -51,7 +51,7 @@ AboutDialog::AboutDialog(QWidget *parent) "

This program is distributed in the hope that it will be useful, but without any warranty.

")); ui->detailsLabel->setText(tr("

Version " SMOLBOTE_DESCRIBE "

" - "

Build " SMOLBOTE_BRANCH ":" SMOLBOTE_COMMIT "

" + "

Build " SMOLBOTE_BUILD "

" "

Compiled with " compiler "

")); } diff --git a/lib/configuration/configuration.cpp b/lib/configuration/configuration.cpp index 648eec8..c7209e3 100644 --- a/lib/configuration/configuration.cpp +++ b/lib/configuration/configuration.cpp @@ -27,17 +27,6 @@ inline std::string defaultUserConfigLocation() return path.toStdString(); } -constexpr const char *defaultSocketPath() -{ -#if defined(Q_OS_UNIX) - // could be a path such as "/tmp/foo" - return "/tmp/smolbote.socket"; -#elif defined(Q_OS_WIN32) - // could be a pipe path such as "\\.\pipe\foo" - return "\\\\.\\pipe\\smolbote_socket"; -#endif -} - Configuration::Configuration(QObject *parent) : QObject(parent) { @@ -49,18 +38,18 @@ Configuration::Configuration(QObject *parent) ("build", "Display build branch and commit.") ("config,c", po::value()->default_value(defaultUserConfigLocation()), "Set the configuration file.") - ("socket,s", po::value()->default_value(defaultSocketPath()), "Local server socket") + ("no-remote", "Do not accept or send remote commands.") - ("args", po::value>(), "arguments") + ("args", po::value>(), "Command(s) and/or URL(s).") ; arguments_desc.add("args", -1); configuration_desc.add_options() ("browser.stylesheet", po::value()) - ("browser.session", po::value(), "Load session data from the specified path.") - ("browser.locale", po::value()) - ("browser.translation", po::value()) + ("browser.session", po::value(), "Load session data from specified arg.") + ("browser.locale", po::value(), "Set Qt localization.") + ("browser.translation", po::value(), "Set application localization.") // main window ui ("mainwindow.height", po::value()->default_value(720)) -- cgit v1.2.1