31 #include "ui_projectfile.h"
40 #include <QCoreApplication>
41 #include <QDialogButtonBox>
43 #include <QFileDialog>
48 #include <QListWidget>
49 #include <QListWidgetItem>
51 #include <QPushButton>
52 #include <QRadioButton>
53 #include <QRegularExpression>
54 #include <QRegularExpressionValidator>
68 static QStringList
getPaths(
const QListWidget *list)
70 const int count = list->count();
72 for (
int i = 0; i < count; i++) {
73 QListWidgetItem *item = list->item(i);
74 paths << QDir::fromNativeSeparators(item->text());
81 Platform::Type::Native,
82 Platform::Type::Win32A,
83 Platform::Type::Win32W,
84 Platform::Type::Win64,
85 Platform::Type::Unix32,
86 Platform::Type::Unix64
93 if (!fileName.endsWith(
".sln") && !fileName.endsWith(
".vcxproj"))
98 importer.
import(fileName.toStdString(), &projSettings);
100 ret << QString::fromStdString(
cfg);
107 , mProjectFile(projectFile)
112 mUI->mToolClangAnalyzer->hide();
115 QString filename = inf.fileName();
116 QString title = tr(
"Project file: %1").arg(filename);
117 setWindowTitle(title);
121 const QString applicationFilePath = QCoreApplication::applicationFilePath();
122 const QString appPath = QFileInfo(applicationFilePath).canonicalPath();
124 QStringList searchPaths;
125 searchPaths << appPath << appPath +
"/cfg" << inf.canonicalPath();
128 searchPaths << FILESDIR << FILESDIR
"/cfg";
130 if (!datadir.isEmpty())
131 searchPaths << datadir << datadir +
"/cfg";
134 QString stdLibraryFilename;
135 for (
const QString &sp : searchPaths) {
138 dir.setNameFilters(QStringList(
"*.cfg"));
139 dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
140 for (
const QFileInfo& item : dir.entryInfoList()) {
141 QString library = item.fileName();
142 if (library.compare(
"std.cfg", Qt::CaseInsensitive) != 0)
145 const QString fullfilename = sp +
"/" + library;
150 stdLibraryFilename = fullfilename;
153 if (!stdLibraryFilename.isEmpty())
157 for (
const QString &sp : searchPaths) {
160 dir.setNameFilters(QStringList(
"*.cfg"));
161 dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
162 for (
const QFileInfo& item : dir.entryInfoList()) {
163 QString library = item.fileName();
166 const QString fullfilename = sp +
"/" + library;
170 lib.
load(
nullptr, stdLibraryFilename.toLatin1());
171 err = lib.
load(
nullptr, fullfilename.toLatin1());
177 if (library.compare(
"std", Qt::CaseInsensitive) == 0)
179 if (libs.indexOf(library) == -1)
184 mUI->mLibraries->clear();
185 for (
const QString &lib : libs) {
186 auto* item =
new QListWidgetItem(lib,
mUI->mLibraries);
187 item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
188 item->setCheckState(Qt::Unchecked);
194 mUI->mComboBoxPlatform->addItem(platforms.
get(builtinPlatform).
mTitle);
195 QStringList platformFiles;
196 for (QString sp : searchPaths) {
197 if (sp.endsWith(
"/cfg"))
198 sp = sp.mid(0,sp.length()-3) +
"platforms";
201 dir.setNameFilters(QStringList(
"*.xml"));
202 dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
203 for (
const QFileInfo& item : dir.entryInfoList()) {
204 const QString platformFile = item.fileName();
207 if (!plat2.
loadFromFile(applicationFilePath.toStdString().c_str(), platformFile.toStdString()))
210 if (platformFiles.indexOf(platformFile) == -1)
211 platformFiles << platformFile;
214 platformFiles.sort();
215 mUI->mComboBoxPlatform->addItems(platformFiles);
218 mUI->mEditCertIntPrecision->setValidator(
new QRegularExpressionValidator(QRegularExpression(
"[0-9]*"),
this));
220 mUI->mEditTags->setValidator(
new QRegularExpressionValidator(QRegularExpression(
"[a-zA-Z0-9 ;]*"),
this));
222 const QRegularExpression undefRegExp(
"\\s*([a-zA-Z_][a-zA-Z0-9_]*[; ]*)*");
223 mUI->mEditUndefines->setValidator(
new QRegularExpressionValidator(undefRegExp,
this));
229 connect(
mUI->mBtnAddCheckPath, SIGNAL(clicked()),
this, SLOT(
addCheckPath()));
232 connect(
mUI->mBtnAddInclude, SIGNAL(clicked()),
this, SLOT(
addIncludeDir()));
235 connect(
mUI->mBtnAddIgnorePath, SIGNAL(clicked()),
this, SLOT(
addExcludePath()));
236 connect(
mUI->mBtnAddIgnoreFile, SIGNAL(clicked()),
this, SLOT(
addExcludeFile()));
272 cb->setChecked(projectFile->
getAddons().contains(addon));
274 cb->setEnabled(
false);
275 cb->setText(cb->text() + QObject::tr(
" (Not found)"));
281 if (
mUI->mChkAllVsConfigs->isChecked()) {
282 for (
int row = 0; row <
mUI->mListVsConfigs->count(); ++row) {
283 QListWidgetItem *item =
mUI->mListVsConfigs->item(row);
284 item->setCheckState(Qt::Checked);
287 mUI->mListVsConfigs->setEnabled(!
mUI->mChkAllVsConfigs->isChecked());
301 for (
int row = 0; row <
mUI->mListVsConfigs->count(); ++row) {
302 QListWidgetItem *item =
mUI->mListVsConfigs->item(row);
304 item->setCheckState(Qt::Checked);
306 item->setCheckState(Qt::Unchecked);
309 mUI->mCheckLevelExhaustive->setChecked(
true);
311 mUI->mCheckLevelNormal->setChecked(
true);
317 mUI->mBtnClangParser->setChecked(
true);
319 mUI->mBtnCppcheckParser->setChecked(
true);
323 const QString platform = projectFile->
getPlatform();
324 if (platform.endsWith(
".xml")) {
327 if (
mUI->mComboBoxPlatform->itemText(i) == platform)
330 if (i < mUI->mComboBoxPlatform->count())
331 mUI->mComboBoxPlatform->setCurrentIndex(i);
333 mUI->mComboBoxPlatform->addItem(platform);
334 mUI->mComboBoxPlatform->setCurrentIndex(i);
344 mUI->mComboBoxPlatform->setCurrentIndex(i);
346 mUI->mComboBoxPlatform->setCurrentIndex(-1);
349 mUI->mComboBoxPlatform->setCurrentText(projectFile->
getPlatform());
376 mUI->mMisraC->setText(
mPremium ?
"Misra C" :
"Misra C 2012");
378 mUI->mMisraVersion->setEnabled(
mUI->mMisraC->isChecked());
379 connect(
mUI->mMisraC, &QCheckBox::toggled,
mUI->mMisraVersion, &QComboBox::setEnabled);
382 mUI->mEditMisraFile->setText(misraFile);
386 mUI->mLabelMisraFile->setVisible(
false);
387 mUI->mEditMisraFile->setVisible(
false);
388 mUI->mBtnBrowseMisraFile->setVisible(
false);
389 }
else if (!
mUI->mMisraC->isEnabled()) {
390 mUI->mEditMisraFile->setEnabled(
false);
391 mUI->mBtnBrowseMisraFile->setEnabled(
false);
400 mUI->mEditCertIntPrecision->setText(QString());
416 mUI->mToolClangTidy->setText(tr(
"Clang-tidy (not found)"));
417 mUI->mToolClangTidy->setEnabled(
false);
419 mUI->mEditTags->setText(projectFile->
getTags().join(
';'));
443 if (
mUI->mComboBoxPlatform->currentText().endsWith(
".xml"))
446 const int i =
mUI->mComboBoxPlatform->currentIndex();
471 if (
mUI->mAddonThreadSafety->isChecked())
472 addons <<
"threadsafety";
473 if (
mUI->mAddonY2038->isChecked())
475 if (
mUI->mMisraC->isChecked())
478 QStringList codingStandards;
479 if (
mUI->mCertC2016->isChecked())
481 if (
mUI->mCertCpp2016->isChecked())
483 if (
mPremium &&
mUI->mMisraVersion->currentIndex() == 1)
485 if (
mUI->mMisraCpp2008->isChecked())
487 if (
mUI->mAutosar->isChecked())
494 #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
495 projectFile->
setTags(
mUI->mEditTags->text().split(
";", Qt::SkipEmptyParts));
497 projectFile->
setTags(
mUI->mEditTags->text().split(
";", QString::SkipEmptyParts));
511 const QString rootpath = inf.absolutePath();
512 QString selectedDir = QFileDialog::getExistingDirectory(
this,
516 if (selectedDir.isEmpty())
521 const QDir dir(rootpath);
522 const QString relpath(dir.relativeFilePath(selectedDir));
523 if (!relpath.startsWith(
"../.."))
524 selectedDir = relpath;
527 if (trailingSlash && !selectedDir.endsWith(
'/'))
537 mUI->mEditBuildDir->setText(dir);
542 const QString &fileName =
mUI->mEditImportProject->text();
543 const bool importProject = !fileName.isEmpty();
544 const bool hasConfigs = fileName.endsWith(
".sln") || fileName.endsWith(
".vcxproj");
545 mUI->mBtnClearImportProject->setEnabled(importProject);
546 mUI->mListCheckPaths->setEnabled(!importProject);
547 mUI->mListIncludeDirs->setEnabled(!importProject);
548 mUI->mBtnAddCheckPath->setEnabled(!importProject);
549 mUI->mBtnEditCheckPath->setEnabled(!importProject);
550 mUI->mBtnRemoveCheckPath->setEnabled(!importProject);
551 mUI->mEditDefines->setEnabled(!importProject);
552 mUI->mEditUndefines->setEnabled(!importProject);
553 mUI->mBtnAddInclude->setEnabled(!importProject);
554 mUI->mBtnEditInclude->setEnabled(!importProject);
555 mUI->mBtnRemoveInclude->setEnabled(!importProject);
556 mUI->mBtnIncludeUp->setEnabled(!importProject);
557 mUI->mBtnIncludeDown->setEnabled(!importProject);
558 mUI->mChkAllVsConfigs->setEnabled(hasConfigs);
559 mUI->mListVsConfigs->setEnabled(hasConfigs && !
mUI->mChkAllVsConfigs->isChecked());
561 mUI->mListVsConfigs->clear();
566 mUI->mEditImportProject->clear();
573 const QDir &dir = inf.absoluteDir();
574 QMap<QString,QString> filters;
575 filters[tr(
"Visual Studio")] =
"*.sln *.vcxproj";
576 filters[tr(
"Compile database")] =
"compile_commands.json";
577 filters[tr(
"Borland C++ Builder 6")] =
"*.bpr";
578 QString fileName = QFileDialog::getOpenFileName(
this, tr(
"Import Project"),
581 if (!fileName.isEmpty()) {
582 mUI->mEditImportProject->setText(dir.relativeFilePath(fileName));
585 for (
int row = 0; row <
mUI->mListVsConfigs->count(); ++row) {
586 QListWidgetItem *item =
mUI->mListVsConfigs->item(row);
587 item->setCheckState(Qt::Checked);
595 for (
int row = 0; row <
mUI->mListVsConfigs->count(); ++row) {
596 QListWidgetItem *item =
mUI->mListVsConfigs->item(row);
597 if (item->checkState() == Qt::Checked)
598 configs << item->text();
605 mUI->mListVsConfigs->clear();
606 mUI->mListVsConfigs->setEnabled(!configs.isEmpty() && !
mUI->mChkAllVsConfigs->isChecked());
607 for (
const QString &
cfg : configs) {
608 auto* item =
new QListWidgetItem(
cfg,
mUI->mListVsConfigs);
609 item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
610 item->setCheckState(Qt::Unchecked);
616 return mUI->mEditImportProject->text();
624 const QString newdir = QDir::toNativeSeparators(dir);
625 auto *item =
new QListWidgetItem(newdir);
626 item->setFlags(item->flags() | Qt::ItemIsEditable);
627 mUI->mListIncludeDirs->addItem(item);
635 const QString newpath = QDir::toNativeSeparators(path);
636 auto *item =
new QListWidgetItem(newpath);
637 item->setFlags(item->flags() | Qt::ItemIsEditable);
638 mUI->mListCheckPaths->addItem(item);
646 const QString newpath = QDir::toNativeSeparators(path);
647 auto *item =
new QListWidgetItem(newpath);
648 item->setFlags(item->flags() | Qt::ItemIsEditable);
649 mUI->mListExcludedPaths->addItem(item);
654 QString root =
mUI->mEditProjectRoot->text();
655 root = root.trimmed();
656 root = QDir::fromNativeSeparators(root);
662 return mUI->mEditBuildDir->text();
672 #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
673 return mUI->mEditDefines->text().trimmed().split(QRegularExpression(
"\\s*;\\s*"), Qt::SkipEmptyParts);
675 return mUI->mEditDefines->text().trimmed().split(QRegularExpression(
"\\s*;\\s*"), QString::SkipEmptyParts);
681 const QString undefine =
mUI->mEditUndefines->text().trimmed();
682 #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
683 QStringList undefines = undefine.split(QRegularExpression(
"\\s*;\\s*"), Qt::SkipEmptyParts);
685 QStringList undefines = undefine.split(QRegularExpression(
"\\s*;\\s*"), QString::SkipEmptyParts);
687 undefines.removeDuplicates();
703 QStringList libraries;
704 for (
int row = 0; row <
mUI->mLibraries->count(); ++row) {
705 QListWidgetItem *item =
mUI->mLibraries->item(row);
706 if (item->checkState() == Qt::Checked)
707 libraries << item->text();
714 mUI->mEditProjectRoot->setText(QDir::toNativeSeparators(root));
719 mUI->mEditBuildDir->setText(buildDir);
724 mUI->mEditImportProject->setText(importProject);
729 for (
const QString& dir : includes) {
736 mUI->mEditDefines->setText(defines.join(
";"));
741 mUI->mEditUndefines->setText(undefines.join(
";"));
746 for (
const QString& path : paths) {
753 for (
const QString& path : paths) {
760 for (
int row = 0; row <
mUI->mLibraries->count(); ++row) {
761 QListWidgetItem *item =
mUI->mLibraries->item(row);
762 item->setCheckState(libraries.contains(item->text()) ? Qt::Checked : Qt::Unchecked);
769 mUI->mListSuppressions->addItem(QString::fromStdString(suppression.
getText()));
774 mUI->mListSuppressions->clear();
775 QList<SuppressionList::Suppression> new_suppressions = suppressions;
780 mUI->mListSuppressions->sortItems();
792 QListWidgetItem *item =
mUI->mListCheckPaths->currentItem();
793 mUI->mListCheckPaths->editItem(item);
798 const int row =
mUI->mListCheckPaths->currentRow();
799 QListWidgetItem *item =
mUI->mListCheckPaths->takeItem(row);
812 const int row =
mUI->mListIncludeDirs->currentRow();
813 QListWidgetItem *item =
mUI->mListIncludeDirs->takeItem(row);
819 QListWidgetItem *item =
mUI->mListIncludeDirs->currentItem();
820 mUI->mListIncludeDirs->editItem(item);
831 const QDir &dir = inf.absoluteDir();
832 QMap<QString,QString> filters;
833 filters[tr(
"Source files")] =
"*.c *.cpp";
834 filters[tr(
"All files")] =
"*.*";
840 QListWidgetItem *item =
mUI->mListExcludedPaths->currentItem();
841 mUI->mListExcludedPaths->editItem(item);
846 const int row =
mUI->mListExcludedPaths->currentRow();
847 QListWidgetItem *item =
mUI->mListExcludedPaths->takeItem(row);
853 int row =
mUI->mListIncludeDirs->currentRow();
854 QListWidgetItem *item =
mUI->mListIncludeDirs->takeItem(row);
855 row = row > 0 ? row - 1 : 0;
856 mUI->mListIncludeDirs->insertItem(row, item);
857 mUI->mListIncludeDirs->setCurrentItem(item);
862 int row =
mUI->mListIncludeDirs->currentRow();
863 QListWidgetItem *item =
mUI->mListIncludeDirs->takeItem(row);
864 const int count =
mUI->mListIncludeDirs->count();
865 row = row < count ? row + 1 : count;
866 mUI->mListIncludeDirs->insertItem(row, item);
867 mUI->mListIncludeDirs->setCurrentItem(item);
873 if (dlg.exec() == QDialog::Accepted) {
880 const int row =
mUI->mListSuppressions->currentRow();
881 QListWidgetItem *item =
mUI->mListSuppressions->takeItem(row);
886 if (suppressionIndex >= 0)
893 const int row =
mUI->mListSuppressions->currentRow();
894 QListWidgetItem *item =
mUI->mListSuppressions->item(row);
896 if (suppressionIndex >= 0) {
899 if (dlg.exec() == QDialog::Accepted) {
908 const std::string s = shortText.toStdString();
918 const QString fileName = QFileDialog::getOpenFileName(
this,
919 tr(
"Select MISRA rule texts file"),
921 tr(
"MISRA rule texts file (%1)").arg(
"*.txt"));
922 if (!fileName.isEmpty()) {
924 mUI->mEditMisraFile->setText(fileName);
927 mUI->mMisraC->setText(
"MISRA C 2012");
928 mUI->mMisraC->setEnabled(
true);
static QString clangTidyCmd()
Determine command to run clang-tidy.
Importing project settings.
std::list< std::string > getVSConfigs()
Type import(const std::string &filename, Settings *settings=nullptr)
Library definitions handling.
Error load(const char exename[], const char path[])
SuppressionList::Suppression getSuppression() const
Translate the user input in the GUI into a suppression.
void setSuppression(const SuppressionList::Suppression &suppression)
Update the GUI so it corresponds with the given Cppcheck suppression.
int getSuppressionIndex(const QString &shortText) const
Get mSuppressions index that match the given short text.
void updatePathsAndDefines()
Enable and disable widgets in the 'Paths and Defines' tab.
ProjectFileDialog(ProjectFile *projectFile, bool premium, QWidget *parent=nullptr)
bool mPremium
Is this Cppcheck Premium?
void ok()
ok button pressed, save changes and accept
void browseBuildDir()
Browse for build dir.
void setExcludedPaths(const QStringList &paths)
Set excluded paths to dialog control.
QStringList getLibraries() const
Return selected libraries from the dialog control.
QString getExistingDirectory(const QString &caption, bool trailingSlash)
QString getBuildDir() const
Get Cppcheck build dir.
void setCheckPaths(const QStringList &paths)
Set check paths to dialog control.
void moveIncludePathUp()
Move include path up in the list.
void addExcludePath()
Add new path to exclude list.
void editSuppression(const QModelIndex &index)
Edit suppression (double clicking on suppression)
void saveSettings() const
Load dialog settings.
void removeExcludePath()
Remove excluded path from the list.
QString getImportProject() const
void setBuildDir(const QString &buildDir)
Set build dir.
QStringList getExcludedPaths() const
Return excluded paths from the dialog control.
void addExcludeFile()
Add new file to exclude list.
static QStringList getProjectConfigs(const QString &fileName)
void clearImportProject()
Clear 'import project'.
void moveIncludePathDown()
Move include path down in the list.
void loadFromProjectFile(const ProjectFile *projectFile)
void addCheckPath()
Add new path to check.
void addSuppression()
Add suppression to the list.
void setImportProject(const QString &importProject)
void editExcludePath()
Edit excluded path in the list.
void loadSettings()
Save dialog settings.
void setProjectConfigurations(const QStringList &configs)
void browseImportProject()
Browse for solution / project / compile database.
QStringList getCheckPaths() const
Return check paths from the dialog control.
void removeIncludeDir()
Remove include directory from the list.
void setIncludepaths(const QStringList &includes)
Set include paths to dialog control.
const QList< SuppressionList::Suppression > & getSuppressions() const
Return suppressions from the dialog control.
void setRootPath(const QString &root)
Set project root path to dialog control.
QStringList getProjectConfigurations() const
void addIncludeDir()
Browse for include directory.
void addSingleSuppression(const SuppressionList::Suppression &suppression)
Add a single suppression to dialog control.
QStringList getDefines() const
Return define names from the dialog control.
void browseMisraFile()
Browse for misra file.
void checkAllVSConfigs()
Check for all VS configurations.
~ProjectFileDialog() override
void saveToProjectFile(ProjectFile *projectFile) const
QString getRootPath() const
Return project root path from the dialog control.
QStringList getIncludePaths() const
Return include paths from the dialog control.
void removeSuppression()
Remove selected suppression from the list.
void editIncludeDir()
Edit include directory in the list.
void setUndefines(const QStringList &undefines)
Set undefine names to dialog control.
void removeCheckPath()
Remove path from the list.
void setLibraries(const QStringList &libraries)
Set libraries to dialog control.
void setSuppressions(const QList< SuppressionList::Suppression > &suppressions)
Set suppressions to dialog control.
QStringList getUndefines() const
Return undefine names from the dialog control.
QList< SuppressionList::Suppression > mSuppressions
void setDefines(const QStringList &defines)
Set define names to dialog control.
void editCheckPath()
Edit path in the list.
ProjectFile * mProjectFile
Projectfile path.
A class that reads and writes project files.
void setMaxCtuDepth(int maxCtuDepth)
const QStringList & getCodingStandards() const
Get list of coding standards (checked by Cppcheck Premium).
bool clangParser
Use Clang parser.
void setAnalyzeAllVsConfigs(bool b)
int getMaxCtuDepth() const
const QStringList & getAddons() const
Get list addons.
const QString & getPlatform() const
Get platform.
void setCheckPaths(const QStringList &paths)
Set list of paths to check.
void setCheckLevel(CheckLevel checkLevel)
CheckLevel: normal/exhaustive.
bool isCheckLevelExhaustive() const
const QString & getFilename() const
Get filename for the project file.
const QString & getRootPath() const
Get project root path.
void setCodingStandards(QStringList codingStandards)
Set list of coding standards (checked by Cppcheck Premium).
bool getBughunting() const
bool getClangAnalyzer() const
void setBuildDir(const QString &buildDir)
void setCheckHeaders(bool b)
const QList< SuppressionList::Suppression > & getSuppressions() const
Get "raw" suppressions.
void setTags(const QStringList &tags)
Set tags.
void setExcludedPaths(const QStringList &paths)
Set list of paths to exclude from the check.
const QStringList & getDefines() const
Get list of defines.
void setClangTidy(bool c)
void setVSConfigurations(const QStringList &vsConfigs)
Set list of Visual Studio configurations to be checked.
QStringList getCheckPaths() const
Get list of paths to check.
void setDefines(const QStringList &defines)
Set list of defines.
void setCertIntPrecision(int p)
Cert C: int precision.
void setUndefines(const QStringList &undefines)
Set list of undefines.
void setIncludes(const QStringList &includes)
Set list of includes.
bool getClangTidy() const
bool getAnalyzeAllVsConfigs() const
int getCertIntPrecision() const
int getMaxTemplateRecursion() const
const QStringList & getUndefines() const
Get list of undefines.
void setImportProject(const QString &importProject)
void setLibraries(const QStringList &libraries)
Set list of libraries.
const QStringList & getVsConfigurations() const
Get list of paths to exclude from the check.
static QString getAddonFilePath(QString filesDir, const QString &addon)
Get path to addon python script.
const QStringList & getTags() const
void setMaxTemplateRecursion(int maxTemplateRecursion)
void setAddons(const QStringList &addons)
Set list of addons.
bool getCheckUnusedTemplates() const
void setPlatform(const QString &platform)
Set platform.
QStringList getExcludedPaths() const
Get list of paths to exclude from the check.
void setBughunting(bool bughunting)
Bughunting (Cppcheck Premium)
void setRootPath(const QString &rootpath)
Set project root path.
QStringList getIncludeDirs() const
Get list of include directories.
bool getCheckHeaders() const
void setCheckUnusedTemplates(bool b)
const QStringList & getLibraries() const
Get list libraries.
const QString & getBuildDir() const
void setClangAnalyzer(bool c)
bool write(const QString &filename=QString())
Write project file (to disk).
void setSuppressions(const QList< SuppressionList::Suppression > &suppressions)
Set list of suppressions.
const QString & getImportProject() const
This is just a container for general settings so that we don't need to pass individual values to func...
#define SETTINGS_PROJECT_DIALOG_HEIGHT
QString getDataDir()
Get configured data dir.
QString toFilterString(const QMap< QString, QString > &filters, bool addAllSupported, bool addAll)
Creates a string suitable for passing as the filter argument to methods like QFileDialog::getOpenFile...
#define SETTINGS_PROJECT_DIALOG_WIDTH
#define SETTINGS_MISRA_FILE
static constexpr char Name[]
static std::string cfg(const std::vector< std::string > &configs, const std::string &userDefines)
static constexpr int numberOfBuiltinPlatforms
static constexpr Platform::Type builtinPlatforms[]
Platforms shown in the platform combobox.
static constexpr char ADDON_MISRA[]
static constexpr char CODING_STANDARD_CERT_CPP[]
static QStringList getPaths(const QListWidget *list)
Return paths from QListWidget.
static constexpr char CODING_STANDARD_CERT_C[]
static constexpr char CODING_STANDARD_MISRA_C_2023[]
static void updateAddonCheckBox(QCheckBox *cb, const ProjectFile *projectFile, const QString &dataDir, const QString &addon)
static constexpr char CODING_STANDARD_MISRA_CPP_2008[]
static constexpr char CODING_STANDARD_AUTOSAR[]
bool classes
Public interface of classes.
std::string getText() const