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_GLOBAL_INCLUDE_PATHS "Global include paths"
|
||||
#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_INCONCLUSIVE_ERRORS "Inconclusive errors"
|
||||
#define SETTINGS_MRU_PROJECTS "MRU Projects"
|
||||
|
|
|
@ -444,12 +444,8 @@ void MainWindow::doAnalyzeProject(ImportProject p)
|
|||
//mThread->SetanalyzeProject(true);
|
||||
if (mProjectFile) {
|
||||
mThread->setAddons(mProjectFile->getAddons());
|
||||
QString clangHeaders = mSettings->value(SETTINGS_CLANG_HEADERS).toString();
|
||||
QStringList includePaths;
|
||||
if (!clangHeaders.isEmpty()) {
|
||||
includePaths << clangHeaders << (clangHeaders+"/ATLMFC") << (clangHeaders+"/c++") << (clangHeaders+"/c++/i686-w64-mingw32");
|
||||
}
|
||||
mThread->setClangIncludePaths(includePaths);
|
||||
QString clangHeaders = mSettings->value(SETTINGS_VS_INCLUDE_PATHS).toString();
|
||||
mThread->setClangIncludePaths(clangHeaders.split(";"));
|
||||
#ifdef Q_OS_WIN
|
||||
QString clangPath = mSettings->value(SETTINGS_CLANG_PATH,QString()).toString();
|
||||
if (clangPath.isEmpty()) {
|
||||
|
|
|
@ -313,14 +313,13 @@
|
|||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Clang headers</string>
|
||||
<string>Visual Studio headers</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="mLabelVsIncludePaths">
|
||||
<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>
|
||||
<p>Path:</p></body></html></string>
|
||||
<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>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -328,22 +327,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<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>
|
||||
<widget class="QLineEdit" name="mEditVsIncludePaths"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
|
@ -57,9 +57,8 @@ SettingsDialog::SettingsDialog(ApplicationList *list,
|
|||
#ifdef Q_OS_WIN
|
||||
//mUI.mTabClang->setVisible(true);
|
||||
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.mButtonBrowseClangHeaders, &QPushButton::released, this, &SettingsDialog::browseClangHeaders);
|
||||
#else
|
||||
mUI.mTabClang->setVisible(false);
|
||||
#endif
|
||||
|
@ -306,16 +305,3 @@ void SettingsDialog::browseClangPath()
|
|||
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 */
|
||||
void browseClangPath();
|
||||
|
||||
/** @brief Slot for browsing for the clang headers */
|
||||
void browseClangHeaders();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Clear all applications from the list and re insert them from mTempApplications
|
||||
|
|
Loading…
Reference in New Issue