forked from qt-creator/qt-creator
Merge remote-tracking branch 'gerrit/3.2'
Change-Id: I8e200637585eeea739840868d8450cba955df058
This commit is contained in:
@@ -2281,6 +2281,20 @@ void CppToolsPlugin::test_completion_data()
|
||||
<< QLatin1String("Derived")
|
||||
<< QLatin1String("foo")
|
||||
<< QLatin1String("Foo"));
|
||||
|
||||
QTest::newRow("default_arguments_for_class_templates_and_template_base_class_QTCREATORBUG-12606") << _(
|
||||
"struct Foo { int foo; };\n"
|
||||
"template <typename T>\n"
|
||||
"struct Base { T t; };\n"
|
||||
"template <typename T = Foo>\n"
|
||||
"struct Derived : Base<T> {};\n"
|
||||
"void fun() {\n"
|
||||
" Derived<> derived;\n"
|
||||
" @\n"
|
||||
"}\n"
|
||||
) << _("derived.t.") << (QStringList()
|
||||
<< QLatin1String("foo")
|
||||
<< QLatin1String("Foo"));
|
||||
}
|
||||
|
||||
void CppToolsPlugin::test_completion_member_access_operator()
|
||||
|
||||
@@ -526,7 +526,8 @@ SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::So
|
||||
const QSharedPointer<SnapshotUpdater> snapshotUpdater = snapshotUpdater_internal();
|
||||
QTC_ASSERT(snapshotUpdater, return newSemanticInfo);
|
||||
newSemanticInfo.snapshot = snapshotUpdater->snapshot();
|
||||
QTC_ASSERT(newSemanticInfo.snapshot.contains(source.fileName), return newSemanticInfo);
|
||||
if (!newSemanticInfo.snapshot.contains(source.fileName))
|
||||
return newSemanticInfo; // SnapshotUpdater::update() not yet started.
|
||||
Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code,
|
||||
source.fileName);
|
||||
if (processor)
|
||||
|
||||
Reference in New Issue
Block a user