forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.9'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/debugger/debuggerkitinformation.cpp src/plugins/languageclient/languageclientmanager.cpp src/plugins/plugins.pro src/plugins/projectexplorer/kit.cpp src/plugins/projectexplorer/kitmanager.cpp Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
This commit is contained in:
@@ -860,11 +860,11 @@ void ClangDiagnosticConfigsWidget::syncClazyChecksGroupBox()
|
||||
return !m_clazySortFilterProxyModel->filterAcceptsRow(index.row(), index.parent());
|
||||
};
|
||||
const bool hasEnabledButHidden = m_clazyTreeModel->hasEnabledButNotVisibleChecks(isHidden);
|
||||
const QString title = hasEnabledButHidden ? tr("Checks (%1 enabled, some are filtered out)")
|
||||
: tr("Checks (%1 enabled)");
|
||||
|
||||
const QStringList checks = m_clazyTreeModel->enabledChecks();
|
||||
m_clazyChecks->checksGroupBox->setTitle(title.arg(checks.count()));
|
||||
const int checksCount = m_clazyTreeModel->enabledChecks().count();
|
||||
const QString title = hasEnabledButHidden ? tr("Checks (%n enabled, some are filtered out)",
|
||||
nullptr, checksCount)
|
||||
: tr("Checks (%n enabled)", nullptr, checksCount);
|
||||
m_clazyChecks->checksGroupBox->setTitle(title);
|
||||
}
|
||||
|
||||
void ClangDiagnosticConfigsWidget::updateConfig(const ClangDiagnosticConfig &config)
|
||||
|
||||
@@ -172,7 +172,7 @@ void CompilerOptionsBuilder::addSyntaxOnly()
|
||||
isClStyle() ? add("/Zs") : add("-fsyntax-only");
|
||||
}
|
||||
|
||||
static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt)
|
||||
QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt)
|
||||
{
|
||||
QStringList options;
|
||||
|
||||
@@ -741,6 +741,15 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (option.startsWith("/Y", Qt::CaseSensitive)
|
||||
|| (option.startsWith("/F", Qt::CaseSensitive) && option != "/F")) {
|
||||
// Precompiled header flags.
|
||||
// Skip also the next option if it's not glued to the current one.
|
||||
if (option.size() > 3)
|
||||
skipNext = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check whether a language version is already used.
|
||||
QString theOption = option;
|
||||
if (theOption.startsWith("-std=")) {
|
||||
|
||||
@@ -40,6 +40,7 @@ enum class UseBuildSystemWarnings : char { Yes, No };
|
||||
|
||||
CPPTOOLS_EXPORT QStringList XclangArgs(const QStringList &args);
|
||||
CPPTOOLS_EXPORT QStringList clangArgsForCl(const QStringList &args);
|
||||
CPPTOOLS_EXPORT QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt);
|
||||
|
||||
class CPPTOOLS_EXPORT CompilerOptionsBuilder
|
||||
{
|
||||
|
||||
@@ -99,10 +99,10 @@ These prefixes are used in addition to current file name on Switch Header/Source
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="headerPragmaOnceCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Uses #pragma once instead of #ifndef include guards.</string>
|
||||
<string>Uses "#pragma once" instead of "#ifndef" include guards.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use '#pragma once' instead of '#ifndef' guards</string>
|
||||
<string>Use "#pragma once" instead of "#ifndef" guards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -211,7 +211,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
|
||||
expander->registerVariable(
|
||||
"Cpp:PragmaOnce",
|
||||
tr("Insert #pragma once instead of #ifndef include guards into header file"),
|
||||
tr("Insert \"#pragma once\" instead of \"#ifndef\" include guards into header file"),
|
||||
[] { return usePragmaOnce() ? QString("true") : QString(); });
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user