diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index d7a05ebe2..c70d0c522 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -461,7 +461,7 @@ void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, cons mThread->setAddonsAndTools(mProjectFile->getAddonsAndTools(), mSettings->value(SETTINGS_MISRA_FILE).toString()); QString clangHeaders = mSettings->value(SETTINGS_VS_INCLUDE_PATHS).toString(); mThread->setClangIncludePaths(clangHeaders.split(";")); - mThread->setSuppressions(mProjectFile->getCheckSuppressions()); + mThread->setSuppressions(mProjectFile->getSuppressions()); } mThread->setProject(p); mThread->check(checkSettings); @@ -860,7 +860,7 @@ Settings MainWindow::getCppcheckSettings() tryLoadLibrary(&result.library, filename); } - foreach (const Suppressions::Suppression &suppression, mProjectFile->getCheckSuppressions()) { + foreach (const Suppressions::Suppression &suppression, mProjectFile->getSuppressions()) { result.nomsg.addSuppression(suppression); } diff --git a/gui/projectfile.cpp b/gui/projectfile.cpp index 7ec3dcfee..1666c7132 100644 --- a/gui/projectfile.cpp +++ b/gui/projectfile.cpp @@ -574,19 +574,6 @@ void ProjectFile::readStringList(QStringList &stringlist, QXmlStreamReader &read } while (!allRead); } -QList ProjectFile::getCheckSuppressions() const -{ - QList ret; - const std::string projectFilePath = Path::getPathFromFilename(mFilename.toStdString()); - foreach (Suppressions::Suppression suppression, getSuppressions()) { - if (!suppression.fileName.empty() && suppression.fileName[0]!='*' && !Path::isAbsolute(suppression.fileName)) - suppression.fileName = Path::simplifyPath(projectFilePath) + suppression.fileName; - - ret.append(suppression); - } - return ret; -} - void ProjectFile::setIncludes(const QStringList &includes) { mIncludeDirs = includes; diff --git a/gui/projectfile.h b/gui/projectfile.h index 4fb0b98fb..63f2be3fb 100644 --- a/gui/projectfile.h +++ b/gui/projectfile.h @@ -148,12 +148,6 @@ public: return mSuppressions; } - /** - * @brief Get "check" suppressions. - * @return list of suppressions. - */ - QList getCheckSuppressions() const; - /** * @brief Get list addons. * @return list of addons.