aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-03 14:47:12 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-03 14:47:12 +0200
commita97b2e1ba96b26113c3e7848808df49961c71c39 (patch)
tree1c687b22cef78f5f37552568091ad0506a8e28b7 /lib
parentClean up ProfileManager (diff)
downloadsmolbote-a97b2e1ba96b26113c3e7848808df49961c71c39.tar.xz
Some cppcheck fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/configuration/configuration.cpp3
-rw-r--r--lib/configuration/configuration.h2
-rw-r--r--lib/web/urlfilter/adblockrule.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/configuration/configuration.cpp b/lib/configuration/configuration.cpp
index 4447202..9931ec5 100644
--- a/lib/configuration/configuration.cpp
+++ b/lib/configuration/configuration.cpp
@@ -34,9 +34,8 @@ inline std::string defaultUserConfigLocation()
Configuration::Configuration(QObject *parent)
: QObject(parent)
+ , m_homePath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation).toStdString())
{
- m_homePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation).toStdString();
-
commandLine_desc.add_options()
("help,h", "Display this help.")
("version,v", "Display version information.")
diff --git a/lib/configuration/configuration.h b/lib/configuration/configuration.h
index ec834ae..f4560f8 100644
--- a/lib/configuration/configuration.h
+++ b/lib/configuration/configuration.h
@@ -121,7 +121,7 @@ private:
boost::program_options::positional_options_description arguments_desc;
boost::program_options::variables_map vm;
- std::string m_homePath;
+ const std::string m_homePath;
};
#endif // SMOLBOTE_CONFIGURATION_H
diff --git a/lib/web/urlfilter/adblockrule.h b/lib/web/urlfilter/adblockrule.h
index 5c03f91..7b6f683 100644
--- a/lib/web/urlfilter/adblockrule.h
+++ b/lib/web/urlfilter/adblockrule.h
@@ -19,7 +19,7 @@
class AdBlockRule : public FilterRule
{
public:
- AdBlockRule(const QString &filter);
+ explicit AdBlockRule(const QString &filter);
};