forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.15'
Change-Id: Ic839ab43a723ab22cc83e5b0d823ec6121cb6701
This commit is contained in:
@@ -66,15 +66,24 @@ static bool isCatchMacro(const QString ¯oName)
|
||||
static bool includesCatchHeader(const CPlusPlus::Document::Ptr &doc,
|
||||
const CPlusPlus::Snapshot &snapshot)
|
||||
{
|
||||
static const QString catchHeader("catch.hpp");
|
||||
static const QStringList catchHeaders{"catch.hpp", // v2
|
||||
"catch_all.hpp", // v3 - new approach
|
||||
"catch_amalgamated.hpp",
|
||||
"catch_test_macros.hpp",
|
||||
"catch_template_test_macros.hpp"
|
||||
};
|
||||
for (const CPlusPlus::Document::Include &inc : doc->resolvedIncludes()) {
|
||||
if (inc.resolvedFileName().endsWith(catchHeader))
|
||||
return true;
|
||||
for (const QString &catchHeader : catchHeaders) {
|
||||
if (inc.resolvedFileName().endsWith(catchHeader))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (const QString &include : snapshot.allIncludesForDocument(doc->fileName())) {
|
||||
if (include.endsWith(catchHeader))
|
||||
return true;
|
||||
for (const QString &catchHeader : catchHeaders) {
|
||||
if (include.endsWith(catchHeader))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -623,10 +623,6 @@ static Qt::CheckState computeCheckStateByChildren(ITestTreeItem *item)
|
||||
bool foundPartiallyChecked = false;
|
||||
|
||||
item->forFirstLevelChildren([&](ITestTreeItem *child) {
|
||||
if (foundPartiallyChecked || (foundChecked && foundUnchecked)) {
|
||||
newState = Qt::PartiallyChecked;
|
||||
return;
|
||||
}
|
||||
switch (child->type()) {
|
||||
case TestTreeItem::TestDataFunction:
|
||||
case TestTreeItem::TestSpecialFunction:
|
||||
@@ -638,6 +634,11 @@ static Qt::CheckState computeCheckStateByChildren(ITestTreeItem *item)
|
||||
foundChecked |= (child->checked() == Qt::Checked);
|
||||
foundUnchecked |= (child->checked() == Qt::Unchecked);
|
||||
foundPartiallyChecked |= (child->checked() == Qt::PartiallyChecked);
|
||||
|
||||
if (foundPartiallyChecked || (foundChecked && foundUnchecked)) {
|
||||
newState = Qt::PartiallyChecked;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
if (newState != Qt::PartiallyChecked)
|
||||
|
||||
Reference in New Issue
Block a user