diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index ff2b63d3a75..a08d1eb738e 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1863,30 +1863,6 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const QStringLis QFileInfo inf(projectFile->getFilename()); const QString& rootpath = projectFile->getRootPath(); - if (isCppcheckPremium() && !projectFile->getLicenseFile().isEmpty()) { - if (rootpath.isEmpty() || rootpath == ".") - QDir::setCurrent(inf.absolutePath()); - else if (QDir(rootpath).isAbsolute()) - QDir::setCurrent(rootpath); - else - QDir::setCurrent(inf.absolutePath() + "/" + rootpath); - - QString licenseFile = projectFile->getLicenseFile(); - if (!QFileInfo(licenseFile).isAbsolute() && !rootpath.isEmpty()) - licenseFile = inf.absolutePath() + "/" + licenseFile; - -#ifdef Q_OS_WIN - const QString premiumaddon = QCoreApplication::applicationDirPath() + "/premiumaddon.exe"; -#else - const QString premiumaddon = QCoreApplication::applicationDirPath() + "/premiumaddon"; -#endif - const std::vector args{"--check-loc-license", licenseFile.toStdString()}; - std::string output; - CheckThread::executeCommand(premiumaddon.toStdString(), args, "", output); - std::ofstream fout(inf.absolutePath().toStdString() + "/cppcheck-premium-loc"); - fout << output; - } - QDir::setCurrent(inf.absolutePath()); mThread->setAddonsAndTools(projectFile->getAddonsAndTools()); diff --git a/gui/projectfile.cpp b/gui/projectfile.cpp index a77c1a0fc94..9144f5a6117 100644 --- a/gui/projectfile.cpp +++ b/gui/projectfile.cpp @@ -88,7 +88,6 @@ void ProjectFile::clear() mBughunting = false; mCertIntPrecision = 0; mCodingStandards.clear(); - mPremiumLicenseFile.clear(); } bool ProjectFile::read(const QString &filename) @@ -233,8 +232,6 @@ bool ProjectFile::read(const QString &filename) readStringList(mCodingStandards, xmlReader, CppcheckXml::CodingStandardElementName); if (xmlReader.name() == QString(CppcheckXml::CertIntPrecisionElementName)) mCertIntPrecision = readInt(xmlReader, 0); - if (xmlReader.name() == QString(CppcheckXml::LicenseFileElementName)) - mPremiumLicenseFile = readString(xmlReader); if (xmlReader.name() == QString(CppcheckXml::ProjectNameElementName)) mProjectName = readString(xmlReader); @@ -1053,12 +1050,6 @@ bool ProjectFile::write(const QString &filename) xmlWriter.writeEndElement(); } - if (!mPremiumLicenseFile.isEmpty()) { - xmlWriter.writeStartElement(CppcheckXml::LicenseFileElementName); - xmlWriter.writeCharacters(mPremiumLicenseFile); - xmlWriter.writeEndElement(); - } - xmlWriter.writeEndDocument(); file.close(); return true; diff --git a/gui/projectfile.h b/gui/projectfile.h index 0dd68b58453..5a5e0ccb89b 100644 --- a/gui/projectfile.h +++ b/gui/projectfile.h @@ -404,14 +404,6 @@ class ProjectFile : public QObject { return mCertIntPrecision; } - /** Cppcheck Premium: License file */ - void setLicenseFile(const QString& licenseFile) { - mPremiumLicenseFile = licenseFile; - } - const QString& getLicenseFile() const { - return mPremiumLicenseFile; - } - /** * @brief Write project file (to disk). * @param filename Filename to use. @@ -653,9 +645,6 @@ class ProjectFile : public QObject { */ QStringList mCodingStandards; - /** @brief Cppcheck Premium: license file */ - QString mPremiumLicenseFile; - /** @brief Project name, used when generating compliance report */ QString mProjectName; diff --git a/gui/projectfile.ui b/gui/projectfile.ui index 5543e67910c..84a1d6e40ec 100644 --- a/gui/projectfile.ui +++ b/gui/projectfile.ui @@ -629,25 +629,6 @@ - - - - Premium License - - - - - - - - - Browse... - - - - - - diff --git a/gui/projectfiledialog.cpp b/gui/projectfiledialog.cpp index 82fc0aac7c4..4e75696484b 100644 --- a/gui/projectfiledialog.cpp +++ b/gui/projectfiledialog.cpp @@ -139,8 +139,6 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, bool premium, QWi setWindowTitle(title); loadSettings(); - mUI->premiumLicense->setVisible(false); - QStringList libs; // Search the std.cfg first since other libraries could depend on it QString stdLibraryFilename; @@ -464,7 +462,6 @@ void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile) mUI->mToolClangTidy->setEnabled(false); } mUI->mEditTags->setText(projectFile->getTags().join(';')); - mUI->mEditLicenseFile->setText(projectFile->getLicenseFile()); updatePathsAndDefines(); } @@ -552,7 +549,6 @@ void ProjectFileDialog::saveToProjectFile(ProjectFile *projectFile) const projectFile->setBughunting(mUI->mBughunting->isChecked()); projectFile->setClangAnalyzer(mUI->mToolClangAnalyzer->isChecked()); projectFile->setClangTidy(mUI->mToolClangTidy->isChecked()); - projectFile->setLicenseFile(mUI->mEditLicenseFile->text()); projectFile->setTags(mUI->mEditTags->text().split(";", Qt::SkipEmptyParts)); } diff --git a/lib/importproject.h b/lib/importproject.h index fb724b5b454..608af552408 100644 --- a/lib/importproject.h +++ b/lib/importproject.h @@ -198,7 +198,6 @@ namespace CppcheckXml { static constexpr char CodingStandardsElementName[] = "coding-standards"; static constexpr char CodingStandardElementName[] = "coding-standard"; static constexpr char CertIntPrecisionElementName[] = "cert-c-int-precision"; - static constexpr char LicenseFileElementName[] = "license-file"; static constexpr char ProjectNameElementName[] = "project-name"; }