aboutsummaryrefslogtreecommitdiff
path: root/lib/configuration
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-22 16:15:31 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-22 16:15:31 +0200
commit9d004e3d18312bea2259bc30064999f9f2db14a6 (patch)
tree55d02ccb4775bd8a327c431cd40aed6c3edd918b /lib/configuration
parentFix various warnings (diff)
downloadsmolbote-9d004e3d18312bea2259bc30064999f9f2db14a6.tar.xz
Plugin commands no longer require --command
Diffstat (limited to 'lib/configuration')
-rw-r--r--lib/configuration/configuration.cpp7
-rw-r--r--lib/configuration/configuration.h12
2 files changed, 2 insertions, 17 deletions
diff --git a/lib/configuration/configuration.cpp b/lib/configuration/configuration.cpp
index 6d8d1ba..e767c65 100644
--- a/lib/configuration/configuration.cpp
+++ b/lib/configuration/configuration.cpp
@@ -50,10 +50,7 @@ Configuration::Configuration()
("config,c", po::value<std::string>()->default_value(defaultUserConfigLocation()), "Set the configuration file.")
("socket,s", po::value<std::string>()->default_value(defaultSocketPath()), "Local server socket")
- ("command", po::value<std::string>(), "Run a plugin command.")
- ("commands", "List all plugin commands.")
-
- ("url", po::value<std::vector<std::string>>(), "URLs")
+ ("args", po::value<std::vector<std::string>>(), "arguments")
;
configuration_desc.add_options()
@@ -123,7 +120,7 @@ Configuration::Configuration()
("downloads.shortcut", po::value<std::string>()->default_value("Ctrl+D"))
;
- arguments_desc.add("url", -1);
+ arguments_desc.add("args", -1);
}
Configuration::~Configuration() = default;
diff --git a/lib/configuration/configuration.h b/lib/configuration/configuration.h
index 59c837c..bb1b271 100644
--- a/lib/configuration/configuration.h
+++ b/lib/configuration/configuration.h
@@ -75,18 +75,6 @@ public:
return std::optional<T>(vm[path].as<T>());
}
- QStringList positionalArguments() const
- {
- QStringList l;
- if(vm.count("url")) {
- std::vector<std::string> urls = vm["url"].as<std::vector<std::string>>();
- for(const std::string &s : urls) {
- l.append(QString::fromStdString(s));
- }
- }
- return l;
- }
-
QHash<QString, QString> section(const std::string &prefix) const;
const boost::program_options::options_description commandlineOptions() const
{