diff --git a/app/main.cpp b/app/main.cpp --- a/app/main.cpp +++ b/app/main.cpp @@ -211,7 +211,7 @@ QDBusMessage makeVisible = QDBusMessage::createMethodCall( service, "/kdevelop/MainWindow", "org.kdevelop.MainWindow", "ensureVisible" ); QDBusConnection::sessionBus().asyncCall( makeVisible ); - return errors_occured ? 1 : 0; + return errors_occured; } /// Gets the PID of a running KDevelop instance, eventually asking the user if there is more than one. @@ -387,13 +387,11 @@ for (int i=0; i < c; ++i) { if (debugFound) { debugArgs << argv[i]; - } else if (qstrcmp(argv[i], "--debug") == 0 || qstrcmp(argv[i], "-d") == 0) { - if (argc <= i+1) { - argc = i + 1; - } else { + } else if ((qstrcmp(argv[i], "--debug") == 0) || (qstrcmp(argv[i], "-d") == 0)) { + if (argc > (i + 1)) { i++; - argc = i + 1; } + argc = i + 1; debugFound = true; } else if (QString(argv[i]).startsWith("--debug=")) { argc = i + 1; diff --git a/documentation/qthelp/tests/test_qthelpplugin.cpp b/documentation/qthelp/tests/test_qthelpplugin.cpp --- a/documentation/qthelp/tests/test_qthelpplugin.cpp +++ b/documentation/qthelp/tests/test_qthelpplugin.cpp @@ -42,6 +42,8 @@ using namespace KDevelop; TestQtHelpPlugin::TestQtHelpPlugin() + : m_testCore(nullptr) + , m_plugin(nullptr) { } diff --git a/formatters/astyle/lib/ASLocalizer.cpp b/formatters/astyle/lib/ASLocalizer.cpp --- a/formatters/astyle/lib/ASLocalizer.cpp +++ b/formatters/astyle/lib/ASLocalizer.cpp @@ -78,15 +78,15 @@ //---------------------------------------------------------------------------- ASLocalizer::ASLocalizer() -// Set the locale information. + // Set the locale information. + // set language default values to english (ascii) + // this will be used if a locale or a language cannot be found + : m_localeName("UNKNOWN") + , m_langID("en") + , m_lcid(0) + , m_translation(nullptr) { - // set language default values to english (ascii) - // this will be used if a locale or a language cannot be found - m_localeName = "UNKNOWN"; - m_langID = "en"; - m_lcid = 0; m_subLangID.clear(); - m_translation = NULL; // Not all compilers support the C++ function locale::global(locale("")); // For testing on Windows change the "Region and Language" settings or use AppLocale. diff --git a/languages/qmljs/libs/qmljs/qmljstypedescriptionreader.cpp b/languages/qmljs/libs/qmljs/qmljstypedescriptionreader.cpp --- a/languages/qmljs/libs/qmljs/qmljstypedescriptionreader.cpp +++ b/languages/qmljs/libs/qmljs/qmljstypedescriptionreader.cpp @@ -47,7 +47,10 @@ using namespace LanguageUtils; TypeDescriptionReader::TypeDescriptionReader(const QString &fileName, const QString &data) - : _fileName (fileName), _source(data), _objects(0) + : _fileName (fileName) + , _source(data) + , _objects(0) + , _moduleApis(nullptr) { } diff --git a/languages/qmljs/libs/utils/fileutils.cpp b/languages/qmljs/libs/utils/fileutils.cpp --- a/languages/qmljs/libs/utils/fileutils.cpp +++ b/languages/qmljs/libs/utils/fileutils.cpp @@ -383,12 +383,12 @@ FileSaverBase::FileSaverBase() : m_hasError(false) + , m_file(nullptr) { } FileSaverBase::~FileSaverBase() { - delete m_file; } bool FileSaverBase::finalize() diff --git a/projectbuilders/qmakebuilder/qmakejob.cpp b/projectbuilders/qmakebuilder/qmakejob.cpp --- a/projectbuilders/qmakebuilder/qmakejob.cpp +++ b/projectbuilders/qmakebuilder/qmakejob.cpp @@ -40,6 +40,8 @@ QMakeJob::QMakeJob(QObject* parent) : OutputExecuteJob(parent) , m_killed(false) + , m_project(nullptr) + , m_cmd(nullptr) { setCapabilities(Killable); setFilteringStrategy(OutputModel::CompilerFilter); diff --git a/utils/okteta/oktetadocument.cpp b/utils/okteta/oktetadocument.cpp --- a/utils/okteta/oktetadocument.cpp +++ b/utils/okteta/oktetadocument.cpp @@ -59,9 +59,10 @@ { OktetaDocument::OktetaDocument( const QUrl &url , ICore* core ) - : Sublime::UrlDocument( core->uiController()->controller(), url ), - IDocument( core ), - mByteArrayDocument( nullptr ) + : Sublime::UrlDocument( core->uiController()->controller(), url ) + , IDocument( core ) + , mPlugin( nullptr ) + , mByteArrayDocument( nullptr ) { } @@ -210,7 +211,7 @@ Kasten::AbstractLoadJob* loadJob = synchronizer->startLoad( url() ); connect( loadJob, &Kasten::AbstractLoadJob::documentLoaded, this, &OktetaDocument::onByteArrayDocumentLoaded ); - const bool syncSucceeded = Kasten::JobManager::executeJob( loadJob ); + Kasten::JobManager::executeJob( loadJob ); delete synchronizerFactory; }