GUI: VS headers for clang-tidy
This commit is contained in:
parent
83ae7ce270
commit
928e053efc
|
@ -81,7 +81,7 @@
|
||||||
#define SETTINGS_LANGUAGE "Application language"
|
#define SETTINGS_LANGUAGE "Application language"
|
||||||
#define SETTINGS_GLOBAL_INCLUDE_PATHS "Global include paths"
|
#define SETTINGS_GLOBAL_INCLUDE_PATHS "Global include paths"
|
||||||
#define SETTINGS_CLANG_PATH "Clang path"
|
#define SETTINGS_CLANG_PATH "Clang path"
|
||||||
#define SETTINGS_CLANG_HEADERS "Clang headers"
|
#define SETTINGS_VS_INCLUDE_PATHS "VS include paths"
|
||||||
#define SETTINGS_INLINE_SUPPRESSIONS "Inline suppressions"
|
#define SETTINGS_INLINE_SUPPRESSIONS "Inline suppressions"
|
||||||
#define SETTINGS_INCONCLUSIVE_ERRORS "Inconclusive errors"
|
#define SETTINGS_INCONCLUSIVE_ERRORS "Inconclusive errors"
|
||||||
#define SETTINGS_MRU_PROJECTS "MRU Projects"
|
#define SETTINGS_MRU_PROJECTS "MRU Projects"
|
||||||
|
|
|
@ -444,12 +444,8 @@ void MainWindow::doAnalyzeProject(ImportProject p)
|
||||||
//mThread->SetanalyzeProject(true);
|
//mThread->SetanalyzeProject(true);
|
||||||
if (mProjectFile) {
|
if (mProjectFile) {
|
||||||
mThread->setAddons(mProjectFile->getAddons());
|
mThread->setAddons(mProjectFile->getAddons());
|
||||||
QString clangHeaders = mSettings->value(SETTINGS_CLANG_HEADERS).toString();
|
QString clangHeaders = mSettings->value(SETTINGS_VS_INCLUDE_PATHS).toString();
|
||||||
QStringList includePaths;
|
mThread->setClangIncludePaths(clangHeaders.split(";"));
|
||||||
if (!clangHeaders.isEmpty()) {
|
|
||||||
includePaths << clangHeaders << (clangHeaders+"/ATLMFC") << (clangHeaders+"/c++") << (clangHeaders+"/c++/i686-w64-mingw32");
|
|
||||||
}
|
|
||||||
mThread->setClangIncludePaths(includePaths);
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString clangPath = mSettings->value(SETTINGS_CLANG_PATH,QString()).toString();
|
QString clangPath = mSettings->value(SETTINGS_CLANG_PATH,QString()).toString();
|
||||||
if (clangPath.isEmpty()) {
|
if (clangPath.isEmpty()) {
|
||||||
|
|
|
@ -313,14 +313,13 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Clang headers</string>
|
<string>Visual Studio headers</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="mLabelVsIncludePaths">
|
<widget class="QLabel" name="mLabelVsIncludePaths">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>Download the "clang headers" archive and unpack it. You can get it here: <a href="http://sourceforge.net/projects/cppcheck/files/other/">http://sourceforge.net/projects/cppcheck/files/other</a></p>
|
<string><html><head/><body><p>Paths to Visual Studio headers, separated by semicolon ';'.</p><p>You can open a Visual Studio command prompt, write &quot;SET INCLUDE&quot;. Then copy/paste the paths.</p></body></html></string>
|
||||||
<p>Path:</p></body></html></string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -328,22 +327,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<widget class="QLineEdit" name="mEditVsIncludePaths"/>
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="mEditClangHeaders">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="mButtonBrowseClangHeaders">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -57,9 +57,8 @@ SettingsDialog::SettingsDialog(ApplicationList *list,
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
//mUI.mTabClang->setVisible(true);
|
//mUI.mTabClang->setVisible(true);
|
||||||
mUI.mEditClangPath->setText(settings.value(SETTINGS_CLANG_PATH, QString()).toString());
|
mUI.mEditClangPath->setText(settings.value(SETTINGS_CLANG_PATH, QString()).toString());
|
||||||
mUI.mEditClangHeaders->setText(settings.value(SETTINGS_CLANG_HEADERS, QString()).toString());
|
mUI.mEditVsIncludePaths->setText(settings.value(SETTINGS_VS_INCLUDE_PATHS, QString()).toString());
|
||||||
connect(mUI.mBtnBrowseClangPath, &QPushButton::released, this, &SettingsDialog::browseClangPath);
|
connect(mUI.mBtnBrowseClangPath, &QPushButton::released, this, &SettingsDialog::browseClangPath);
|
||||||
connect(mUI.mButtonBrowseClangHeaders, &QPushButton::released, this, &SettingsDialog::browseClangHeaders);
|
|
||||||
#else
|
#else
|
||||||
mUI.mTabClang->setVisible(false);
|
mUI.mTabClang->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
|
@ -306,16 +305,3 @@ void SettingsDialog::browseClangPath()
|
||||||
mUI.mEditClangPath->setText(selectedDir);
|
mUI.mEditClangPath->setText(selectedDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::browseClangHeaders()
|
|
||||||
{
|
|
||||||
QString selectedDir = QFileDialog::getExistingDirectory(this,
|
|
||||||
tr("Select path for clang headers"),
|
|
||||||
QDir::homePath());
|
|
||||||
|
|
||||||
if (!selectedDir.isEmpty()) {
|
|
||||||
mUI.mEditClangHeaders->setText(selectedDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -126,10 +126,6 @@ protected slots:
|
||||||
|
|
||||||
/** @brief Slot for browsing for the clang binary */
|
/** @brief Slot for browsing for the clang binary */
|
||||||
void browseClangPath();
|
void browseClangPath();
|
||||||
|
|
||||||
/** @brief Slot for browsing for the clang headers */
|
|
||||||
void browseClangHeaders();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Clear all applications from the list and re insert them from mTempApplications
|
* @brief Clear all applications from the list and re insert them from mTempApplications
|
||||||
|
|
Loading…
Reference in New Issue