Merge remote-tracking branch 'origin/4.0' into 4.1

Conflicts:
	src/plugins/projectexplorer/runconfiguration.h
	tests/unit/unittest/unittest.pro

Change-Id: I3d327b1198df2a7e9268916af9624ce5d21195df
This commit is contained in:
Eike Ziller
2016-06-28 11:42:03 +02:00
15 changed files with 150 additions and 54 deletions

View File

@@ -932,18 +932,28 @@ void ClangCodeCompletionTest::testCompleteConstructorAndFallbackToGlobalCompleti
QVERIFY(!hasSnippet(t.proposal, "class"));
}
// Explicitly Inserting The Dot
// ----------------------------
// Inserting the dot for is important since it will send the editor
// content to the backend and thus generate an unsaved file on the backend
// side. The unsaved file enables us to do the dot to arrow correction.
void ClangCodeCompletionTest::testCompleteWithDotToArrowCorrection()
{
// Inserting the dot for this test is important since it will send the editor
// content to the backend and thus generate an unsaved file on the backend
// side. The unsaved file enables us to do the dot to arrow correction.
ProjectLessCompletionTest t("dotToArrowCorrection.cpp",
QStringLiteral("."));
QStringLiteral(".")); // See above "Explicitly Inserting The Dot"
QVERIFY(hasItem(t.proposal, "member"));
}
void ClangCodeCompletionTest::testDontCompleteWithDotToArrowCorrectionForFloats()
{
ProjectLessCompletionTest t("noDotToArrowCorrectionForFloats.cpp",
QStringLiteral(".")); // See above "Explicitly Inserting The Dot"
QCOMPARE(t.proposal->size(), 0);
}
void ClangCodeCompletionTest::testCompleteProjectDependingCode()
{
const TestDocument testDocument("completionWithProject.cpp");

View File

@@ -48,6 +48,7 @@ private slots:
void testCompleteConstructorAndFallbackToGlobalCompletion();
void testCompleteWithDotToArrowCorrection();
void testDontCompleteWithDotToArrowCorrectionForFloats();
void testCompleteProjectDependingCode();
void testCompleteProjectDependingCodeAfterChangingProject();

View File

@@ -22,5 +22,6 @@
<file>objc_messages_3.mm</file>
<file>preprocessorKeywordsCompletion.cpp</file>
<file>dotToArrowCorrection.cpp</file>
<file>noDotToArrowCorrectionForFloats.cpp</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,4 @@
void f()
{
0 /* COMPLETE HERE */
}