summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2016-02-01 16:15:48 +0100
committerEike Ziller <eike.ziller@theqtcompany.com>2016-02-01 16:15:48 +0100
commit5952165cf9d2a8d9294ee7b652d1bdcb2066fc9f (patch)
tree807647fb7464d61910f87c706e61e3aeaa6ae036
parentbb3b7307ef0bc1f70b3db823829a0569f49c2cda (diff)
parentf38d29133956c4196fbfd66895f3a31fad5f9948 (diff)
downloadqt-creator-5952165cf9d2a8d9294ee7b652d1bdcb2066fc9f.tar.gz
Merge remote-tracking branch 'origin/3.6'
Change-Id: Ic4d3d94feaaa588c6244509bb3dd14c5cb646fe7
-rw-r--r--.gitignore4
-rw-r--r--share/qtcreator/translations/qtcreator_ru.ts72
-rw-r--r--src/plugins/coreplugin/coreplugin.pro2
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp41
-rw-r--r--src/plugins/texteditor/texteditor.cpp13
-rw-r--r--src/tools/clangbackend/clangbackendmain.cpp24
-rwxr-xr-xtests/system/shared/suites_qtta.py9
-rw-r--r--tests/system/suite_CSUP/tst_CSUP01/test.py89
8 files changed, 141 insertions, 113 deletions
diff --git a/.gitignore b/.gitignore
index c1e0548149..067d81b872 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,10 @@ Thumbs.db
*.embed.manifest
/.qmake.cache
/.qmake.stash
+*_wrapper.sh
+*_wrapper.bat
+wrapper.sh
+wrapper.bat
# qtcreator generated files
*.pro.user*
diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts
index 0154b6c420..ddd6ece543 100644
--- a/share/qtcreator/translations/qtcreator_ru.ts
+++ b/share/qtcreator/translations/qtcreator_ru.ts
@@ -3753,40 +3753,6 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
</message>
</context>
<context>
- <name>ClangCodeModel::Internal::ClangProjectSettingsPropertiesPage</name>
- <message>
- <source>Pre-compiled headers:</source>
- <translation>Предкомпиляция:</translation>
- </message>
- <message>
- <source>None</source>
- <translation>Нет</translation>
- </message>
- <message>
- <source>Build system (exact)</source>
- <translation>Система сборки (точно)</translation>
- </message>
- <message>
- <source>Build system (fuzzy)</source>
- <translation>Система сборки (приближённо)</translation>
- </message>
- <message>
- <source>Custom</source>
- <translation>Особая</translation>
- </message>
- <message>
- <source>Choose...</source>
- <translation>Выбрать...</translation>
- </message>
-</context>
-<context>
- <name>ClangCodeModel::Internal::ClangProjectSettingsWidget</name>
- <message>
- <source>Clang Settings</source>
- <translation>Настройки Clang</translation>
- </message>
-</context>
-<context>
<name>ClangCodeModel::Internal::ModelManagerSupport</name>
<message>
<source>Clang</source>
@@ -13231,10 +13197,6 @@ Do you want to retry?</source>
<translation>Начинать наблюдение</translation>
</message>
<message>
- <source>Close</source>
- <translation>Закрыть</translation>
- </message>
- <message>
<source>Kit: </source>
<translation>Комплект:</translation>
</message>
@@ -24083,6 +24045,10 @@ Preselects a desktop Qt for building the application if available.</source>
<translation>Приложение Qt Canvas 3D</translation>
</message>
<message>
+ <source>Qt 5.6</source>
+ <translation>Qt 5.6</translation>
+ </message>
+ <message>
<source>Qt 5.5</source>
<translation>Qt 5.5</translation>
</message>
@@ -28820,10 +28786,6 @@ This is independent of the visibility property in QML.</source>
<context>
<name>QmlDesigner::QmlDesignerPlugin</name>
<message>
- <source>Cannot create OpenGL context.</source>
- <translation>Не удалось создать контекст OpenGL.</translation>
- </message>
- <message>
<source>Switch Text/Design</source>
<translation>Переключить текст/дизайн</translation>
</message>
@@ -29785,10 +29747,6 @@ Please build the qmldump application on the Qt version options page.</source>
<translation>Версия с основным номером отличным от 1 не поддерживается.</translation>
</message>
<message>
- <source>Reading only version 1.1 parts.</source>
- <translation>Чтение разделов версии 1.1.</translation>
- </message>
- <message>
<source>Expected document to contain a single object definition.</source>
<translation>Требуется определение в документе ровно одного объекта.</translation>
</message>
@@ -29797,10 +29755,6 @@ Please build the qmldump application on the Qt version options page.</source>
<translation>В документе требуется наличие члена Module {}.</translation>
</message>
<message>
- <source>Expected only Component and ModuleApi object definitions.</source>
- <translation>Допустимы только определения объектов Component и ModuleApi.</translation>
- </message>
- <message>
<source>Expected only Property, Method, Signal and Enum object definitions, not &quot;%1&quot;.</source>
<translation>Допустимы только определения объектов Property, Method, Signal и Enum, а не «%1».</translation>
</message>
@@ -30596,10 +30550,6 @@ references to elements in other files, loops, and so on.)</source>
<context>
<name>QmlProfiler::Internal::QmlProfilerPlugin</name>
<message>
- <source>Cannot create OpenGL context.</source>
- <translation>Не удалось создать контекст OpenGL.</translation>
- </message>
- <message>
<source>QML Profiler</source>
<translation>Профайлер QML</translation>
</message>
@@ -31826,6 +31776,13 @@ cannot be found in the path.</source>
</message>
</context>
<context>
+ <name>QtSupport::ProMessageHandler</name>
+ <message>
+ <source>[Inexact] </source>
+ <translation>[Примерно] </translation>
+ </message>
+</context>
+<context>
<name>QtSupport::QtKitInformation</name>
<message>
<source>The version string of the current Qt version.</source>
@@ -38686,13 +38643,6 @@ should a repository require SSH-authentication (see documentation on SSH and the
</message>
</context>
<context>
- <name>Welcome::Internal::WelcomePlugin</name>
- <message>
- <source>Cannot create OpenGL context.</source>
- <translation>Не удалось создать контекст OpenGL.</translation>
- </message>
-</context>
-<context>
<name>WidgetPluginManager</name>
<message>
<source>Failed to create instance.</source>
diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro
index 2628f5d44d..bc9f76d109 100644
--- a/src/plugins/coreplugin/coreplugin.pro
+++ b/src/plugins/coreplugin/coreplugin.pro
@@ -1,5 +1,5 @@
DEFINES += CORE_LIBRARY
-QT += gui-private \
+QT += \
help \
network \
printsupport \
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 92bc5de99e..8b7ecee5ab 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -540,6 +540,45 @@ static ToolChain *findOrCreateToolChain(const QList<ToolChain *> &alreadyKnown,
return tc;
}
+// Detect build tools introduced with MSVC2015
+static void detectCppBuildTools(QList<ToolChain *> *list)
+{
+ struct Entry {
+ const char *postFix;
+ const char *varsBatArg;
+ Abi::Architecture architecture;
+ Abi::BinaryFormat format;
+ unsigned char wordSize;
+ };
+
+ const Entry entries[] = {
+ {" (x86)", "x86", Abi::X86Architecture, Abi::PEFormat, 32},
+ {" (x64)", "amd64", Abi::X86Architecture, Abi::PEFormat, 64},
+ {" (x86_arm)", "x86_arm", Abi::ArmArchitecture, Abi::PEFormat, 32},
+ {" (x64_arm)", "amd64_arm", Abi::ArmArchitecture, Abi::PEFormat, 64}
+ };
+
+#ifdef Q_OS_WIN64
+ const char programFilesC[] = "ProgramFiles(x86)";
+#else
+ const char programFilesC[] = "ProgramFiles";
+#endif
+ const QString name = QStringLiteral("Microsoft Visual C++ Build Tools");
+ const QString vcVarsBat = QFile::decodeName(qgetenv(programFilesC))
+ + QLatin1Char('/') + name + QStringLiteral("/vcbuildtools.bat");
+ if (!QFileInfo(vcVarsBat).isFile())
+ return;
+ const size_t count = sizeof(entries) / sizeof(entries[0]);
+ for (size_t i = 0; i < count; ++i) {
+ const Entry &e = entries[i];
+ const Abi abi(e.architecture, Abi::WindowsOS, Abi::WindowsMsvc2015Flavor,
+ e.format, e.wordSize);
+ list->append(new MsvcToolChain(name + QLatin1String(e.postFix), abi,
+ vcVarsBat, QLatin1String(e.varsBatArg),
+ ToolChain::AutoDetection));
+ }
+}
+
QList<ToolChain *> MsvcToolChainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown)
{
QList<ToolChain *> results;
@@ -630,6 +669,8 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect(const QList<ToolChain *> &al
}
}
+ detectCppBuildTools(&results);
+
return results;
}
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index bd5b4a058d..8ba13de3d3 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -5488,6 +5488,14 @@ void TextEditorWidget::wheelEvent(QWheelEvent *e)
QPlainTextEdit::wheelEvent(e);
}
+static void showZoomIndicator(QWidget *editor, const int newZoom)
+{
+ Utils::FadingIndicator::showText(editor,
+ QCoreApplication::translate("TextEditor::TextEditorWidget",
+ "Zoom: %1%").arg(newZoom),
+ Utils::FadingIndicator::SmallText);
+}
+
void TextEditorWidget::zoomF(float delta)
{
d->clearVisibleFoldedBlock();
@@ -5499,14 +5507,13 @@ void TextEditorWidget::zoomF(float delta)
step = -1;
const int newZoom = TextEditorSettings::instance()->increaseFontZoom(int(step));
- Utils::FadingIndicator::showText(this,
- tr("Zoom: %1%").arg(newZoom),
- Utils::FadingIndicator::SmallText);
+ showZoomIndicator(this, newZoom);
}
void TextEditorWidget::zoomReset()
{
TextEditorSettings::instance()->resetFontZoom();
+ showZoomIndicator(this, 100);
}
TextEditorWidget::Link TextEditorWidget::findLinkAt(const QTextCursor &, bool, bool)
diff --git a/src/tools/clangbackend/clangbackendmain.cpp b/src/tools/clangbackend/clangbackendmain.cpp
index 641ec78f94..2a7e4e1804 100644
--- a/src/tools/clangbackend/clangbackendmain.cpp
+++ b/src/tools/clangbackend/clangbackendmain.cpp
@@ -23,6 +23,7 @@
**
****************************************************************************/
+#include <QCommandLineParser>
#include <QCoreApplication>
#include <QLoggingCategory>
@@ -30,6 +31,22 @@
#include <cmbmessages.h>
#include <clangipcserver.h>
+QString processArguments(QCoreApplication &application)
+{
+ QCommandLineParser parser;
+ parser.setApplicationDescription(QStringLiteral("Qt Creator Clang backend process."));
+ parser.addHelpOption();
+ parser.addVersionOption();
+ parser.addPositionalArgument(QStringLiteral("connection"), QStringLiteral("Connection"));
+
+ parser.process(application);
+
+ if (parser.positionalArguments().isEmpty())
+ parser.showHelp(1);
+
+ return parser.positionalArguments().first();
+}
+
int main(int argc, char *argv[])
{
QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
@@ -41,10 +58,7 @@ int main(int argc, char *argv[])
QCoreApplication application(argc, argv);
- if (application.arguments().count() != 2) {
- qWarning() << "wrong argument count";
- return 1;
- }
+ const QString connection = processArguments(application);
ClangBackEnd::Messages::registerMessages();
@@ -52,7 +66,7 @@ int main(int argc, char *argv[])
clang_enableStackTraces();
ClangBackEnd::ClangIpcServer clangIpcServer;
- ClangBackEnd::ConnectionServer connectionServer(application.arguments()[1]);
+ ClangBackEnd::ConnectionServer connectionServer(connection);
connectionServer.start();
connectionServer.setIpcServer(&clangIpcServer);
diff --git a/tests/system/shared/suites_qtta.py b/tests/system/shared/suites_qtta.py
index e58d1b11ef..d465ea6aa4 100755
--- a/tests/system/shared/suites_qtta.py
+++ b/tests/system/shared/suites_qtta.py
@@ -59,12 +59,15 @@ def checkSyntaxError(issuesView, expectedTextsArray, warnIfMoreIssues = True):
return False
# change autocomplete options to manual
-def changeAutocompleteToManual():
+def changeAutocompleteToManual(toManual=True):
invokeMenuItem("Tools", "Options...")
mouseClick(waitForObjectItem(":Options_QListView", "Text Editor"), 5, 5, 0, Qt.LeftButton)
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Completion")
- ensureChecked(waitForObject(":Behavior.Autocomplete common prefix_QCheckBox"), False)
- selectFromCombo(":Behavior.completionTrigger_QComboBox", "Manually")
+ ensureChecked(waitForObject(":Behavior.Autocomplete common prefix_QCheckBox"), not toManual)
+ activateCompletion = "Always"
+ if toManual:
+ activateCompletion = "Manually"
+ selectFromCombo(":Behavior.completionTrigger_QComboBox", activateCompletion)
verifyEnabled(":Options.OK_QPushButton")
clickButton(waitForObject(":Options.OK_QPushButton"))
diff --git a/tests/system/suite_CSUP/tst_CSUP01/test.py b/tests/system/suite_CSUP/tst_CSUP01/test.py
index 1c710b6e89..a75292833f 100644
--- a/tests/system/suite_CSUP/tst_CSUP01/test.py
+++ b/tests/system/suite_CSUP/tst_CSUP01/test.py
@@ -43,57 +43,66 @@ def triggerCompletion(editorWidget):
# entry of test
def main():
- startApplication("qtcreator" + SettingsPath)
+ clangLoaded = startCreatorTryingClang()
if not startedWithoutPluginError():
return
# create qt quick application
# Step 1: Open test .pro project.
createNewQtQuickApplication(tempDir(), "SampleApp")
+ for useClang in set([False, clangLoaded]):
+ selectClangCodeModel(clangLoaded, useClang)
+ changeAutocompleteToManual(False)
# Step 2: Open .cpp file in Edit mode.
- if not openDocument("SampleApp.Sources.main\\.cpp"):
- test.fatal("Could not open main.cpp")
- invokeMenuItem("File", "Exit")
- return
- test.verify(checkIfObjectExists(":Qt Creator_CppEditor::Internal::CPPEditorWidget"),
- "Step 2: Verifying if: .cpp file is opened in Edit mode.")
+ if not openDocument("SampleApp.Sources.main\\.cpp"):
+ test.fatal("Could not open main.cpp")
+ invokeMenuItem("File", "Exit")
+ return
+ test.verify(checkIfObjectExists(":Qt Creator_CppEditor::Internal::CPPEditorWidget"),
+ "Step 2: Verifying if: .cpp file is opened in Edit mode.")
# Step 3: Insert text "re" to new line in Editor mode and press Ctrl+Space.
- editorWidget = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
- if not placeCursorToLine(editorWidget, "QGuiApplication app(argc, argv);"):
- earlyExit("Did not find first line in function block.")
- return
- type(editorWidget, "<Return>")
- type(editorWidget, "re")
- triggerCompletion(editorWidget)
- waitForObjectItem(":popupFrame_Proposal_QListView", "register")
- doubleClickItem(":popupFrame_Proposal_QListView", "register", 5, 5, 0, Qt.LeftButton)
- test.compare(str(lineUnderCursor(editorWidget)).strip(), "register",
- "Step 3: Verifying if: The list of suggestions is opened. It is "
- "possible to select one of the suggestions.")
+ editorWidget = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
+ if not placeCursorToLine(editorWidget, "QGuiApplication app(argc, argv);"):
+ earlyExit("Did not find first line in function block.")
+ return
+ type(editorWidget, "<Return>")
+ type(editorWidget, "re")
+ triggerCompletion(editorWidget)
+ waitForObjectItem(":popupFrame_Proposal_QListView", "realloc")
+ doubleClickItem(":popupFrame_Proposal_QListView", "realloc", 5, 5, 0, Qt.LeftButton)
+ test.compare(str(lineUnderCursor(editorWidget)).strip(), "realloc()",
+ "Step 3: Verifying if: The list of suggestions is opened. It is "
+ "possible to select one of the suggestions.")
# Step 4: Insert text "voi" to new line and press Tab.
- resetLine(editorWidget)
- type(editorWidget, "voi")
- waitForObjectItem(":popupFrame_Proposal_QListView", "void")
- type(waitForObject(":popupFrame_Proposal_QListView"), "<Tab>")
- test.compare(str(lineUnderCursor(editorWidget)).strip(), "void",
- "Step 4: Verifying if: Word 'void' is completed because only one option is available.")
+ resetLine(editorWidget)
+ type(editorWidget, "voi")
+ waitForObjectItem(":popupFrame_Proposal_QListView", "void")
+ type(waitForObject(":popupFrame_Proposal_QListView"), "<Tab>")
+ test.compare(str(lineUnderCursor(editorWidget)).strip(), "void",
+ "Step 4: Verifying if: Word 'void' is completed because only one option is available.")
# Step 5: From "Tools -> Options -> Text Editor -> Completion" select Activate completion Manually,
# uncheck Autocomplete common prefix and press Apply and then Ok . Return to Edit mode.
- test.log("Step 5: Change Code Completion settings")
- changeAutocompleteToManual()
+ test.log("Step 5: Change Code Completion settings")
+ changeAutocompleteToManual()
# Step 6: Insert text "ret" and press Ctrl+Space.
- editorWidget = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
- resetLine(editorWidget)
- type(editorWidget, "ret")
- triggerCompletion(editorWidget)
- try:
- waitForObjectItem(":popupFrame_Proposal_QListView", "return")
- except:
- test.fail("Could not find proposal popup.")
- type(editorWidget, "<Right>")
- type(editorWidget, "<Backspace>")
- test.compare(str(lineUnderCursor(editorWidget)).strip(), "ret",
- "Step 6: Verifying if: Suggestion is displayed but text is not "
- "completed automatically even there is only one suggestion.")
+ editorWidget = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
+ resetLine(editorWidget)
+ type(editorWidget, "retu")
+ triggerCompletion(editorWidget)
+ try:
+ proposal = "return"
+ if useClang:
+ # clang adds a whitespace because the function needs to return a value
+ proposal += " "
+ waitForObjectItem(":popupFrame_Proposal_QListView", proposal)
+ except:
+ test.fail("Could not find proposal popup.")
+ type(editorWidget, "<Right>")
+ type(editorWidget, "<Backspace>")
+ test.compare(str(lineUnderCursor(editorWidget)).strip(), "retu",
+ "Step 6: Verifying if: Suggestion is displayed but text is not "
+ "completed automatically even there is only one suggestion.")
+ invokeMenuItem('File', 'Revert "main.cpp" to Saved')
+ clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))
# exit qt creator
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")