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/configuration/configuration.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'lib/configuration') 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