aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/configuration/configuration.cpp3
-rw-r--r--lib/configuration/configuration.h2
-rw-r--r--lib/web/urlfilter/adblockrule.h2
-rwxr-xr-xtools/cppcheck.sh4
4 files changed, 7 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);
};
diff --git a/tools/cppcheck.sh b/tools/cppcheck.sh
new file mode 100755
index 0000000..2b130ce
--- /dev/null
+++ b/tools/cppcheck.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cppcheck --enable=all --verbose src/ lib/ plugins/ 2> report.txt
+