Description: Set configuration directory and python version
Author: Joachim Reichel <reichel@debian.org>

Index: cppcheck-1.90/gui/main.cpp
===================================================================
--- cppcheck-1.90.orig/gui/main.cpp
+++ cppcheck-1.90/gui/main.cpp
@@ -62,6 +62,12 @@ int main(int argc, char *argv[])
 
     QSettings* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app);
 
+    // Set some default settings
+    if( settings->value("DATADIR", QString()).toString().isEmpty())
+        settings->setValue("DATADIR", FILESDIR);
+    if( settings->value(SETTINGS_PYTHON_PATH, QString()).toString().isEmpty())
+        settings->setValue(SETTINGS_PYTHON_PATH, QString("/usr/bin/python3"));
+
     // Set data dir..
     foreach (const QString arg, app.arguments()) {
         if (arg.startsWith("--data-dir=")) {
Index: cppcheck-1.90/lib/cppcheck.cpp
===================================================================
--- cppcheck-1.90.orig/lib/cppcheck.cpp
+++ cppcheck-1.90/lib/cppcheck.cpp
@@ -139,7 +139,7 @@ static std::string executeAddon(const Ad
 {
     // Can python be executed?
     {
-        const std::string cmd = "python --version 2>&1";
+        const std::string cmd = "python3 --version 2>&1";
 
 #ifdef _WIN32
         std::unique_ptr<FILE, decltype(&_pclose)> pipe(_popen(cmd.c_str(), "r"), _pclose);
@@ -156,7 +156,7 @@ static std::string executeAddon(const Ad
             throw InternalError(nullptr, "Failed to execute '" + cmd + "' (" + result + ")");
     }
 
-    const std::string cmd = "python \"" + addonInfo.scriptFile + "\" --cli" + addonInfo.args + " \"" + dumpFile + "\" 2>&1";
+    const std::string cmd = "python3 \"" + addonInfo.scriptFile + "\" --cli" + addonInfo.args + " \"" + dumpFile + "\" 2>&1";
 
 #ifdef _WIN32
     std::unique_ptr<FILE, decltype(&_pclose)> pipe(_popen(cmd.c_str(), "r"), _pclose);
