From 143b51c5636f909db93a294c4194bcb1f3d9eae0 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 15 Apr 2014 12:25:02 +0200 Subject: [PATCH 01/38] Version bump Change-Id: I499d35c45344c21eb4b8aae9e3bab4eb59e13544 --- qtcreator.pri | 2 +- qtcreator.qbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qtcreator.pri b/qtcreator.pri index 65073ea6332..2d985c60e04 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -1,7 +1,7 @@ !isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included") QTCREATOR_PRI_INCLUDED = 1 -QTCREATOR_VERSION = 3.1.0 +QTCREATOR_VERSION = 3.1.1 QTCREATOR_COMPAT_VERSION = 3.1.0 BINARY_ARTIFACTS_BRANCH = 3.1 diff --git a/qtcreator.qbs b/qtcreator.qbs index d1d2c55e7a4..2ae730193af 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -4,7 +4,7 @@ Project { property bool withAutotests: qbs.buildVariant === "debug" property string ide_version_major: '3' property string ide_version_minor: '1' - property string ide_version_release: '0' + property string ide_version_release: '1' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '3' property string ide_compat_version_minor: '1' From e2745ba28df60cb9f9d8de93fb23d2c334cc71c5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 14 Apr 2014 12:40:30 +0200 Subject: [PATCH 02/38] Debugger: Do not list folder as debugger Change-Id: I32ce5ee2cfd30c786af2d8ae6297c2708fcfd632 Reviewed-by: hjk --- src/plugins/debugger/debuggeritemmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index c1f2cc74b53..9fa40c2fa02 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -249,7 +249,7 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers() } foreach (const QFileInfo &fi, suspects) { - if (fi.exists() && fi.isExecutable()) { + if (fi.exists() && fi.isExecutable() && !fi.isDir()) { FileName command = FileName::fromString(fi.absoluteFilePath()); if (findByCommand(command)) continue; From 94eda40a957a05620b3713a1da2d1eef87010a5d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 14 Apr 2014 16:56:29 +0200 Subject: [PATCH 03/38] QmlDesigner: Fix compile instructions message Change-Id: I04460df00072280a899bde1667831b98fe68f4b4 Reviewed-by: Thomas Hartmann --- .../designercore/instances/nodeinstanceserverproxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp index b274c4c2cfc..77d9eb8e173 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp @@ -445,7 +445,7 @@ QString NodeInstanceServerProxy::copyAndPasterMessage(const QString &pathToQt) c messageStream << QStringLiteral(""); if (hasQtQuick2(m_nodeInstanceView.data())) - messageStream << generatePuppetCompilingHelp(QStringLiteral("qmlpuppet2"), pathToQt); + messageStream << generatePuppetCompilingHelp(QStringLiteral("qml2puppet"), pathToQt); else if (hasQtQuick1(m_nodeInstanceView.data())) messageStream << generatePuppetCompilingHelp(QStringLiteral("qmlpuppet"), pathToQt); From 490942822060320f28f26a7136b8b644b75ffdde Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 15 Apr 2014 16:31:27 +0200 Subject: [PATCH 04/38] qbs build: Adapt to function renaming. Change-Id: Ia4cc4447e59aaa4f283a7818847633bb7cf9a8aa Reviewed-by: Joerg Bornemann --- qtcreator.qbs | 2 +- src/libs/ssh/ssh.qbs | 2 +- src/plugins/clangcodemodel/clangcodemodel.qbs | 4 ++-- src/src.qbs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qtcreator.qbs b/qtcreator.qbs index 2ae730193af..52fa9feb855 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -45,7 +45,7 @@ Project { property string ide_bin_path: qbs.targetOS.contains("osx") ? ide_app_target + ".app/Contents/MacOS" : ide_app_path - property bool testsEnabled: qbs.getenv("TEST") || qbs.buildVariant === "debug" + property bool testsEnabled: qbs.getEnv("TEST") || qbs.buildVariant === "debug" property stringList generalDefines: [ "QT_CREATOR", 'IDE_LIBRARY_BASENAME="' + libDirName + '"', diff --git a/src/libs/ssh/ssh.qbs b/src/libs/ssh/ssh.qbs index e044ba16b6a..6c22cabfec7 100644 --- a/src/libs/ssh/ssh.qbs +++ b/src/libs/ssh/ssh.qbs @@ -44,7 +44,7 @@ QtcLibrary { "sshsendfacility.cpp", "sshsendfacility_p.h", ].concat(botanFiles) - property var useSystemBotan: qbs.getenv("USE_SYSTEM_BOTAN") === "1" + property var useSystemBotan: qbs.getEnv("USE_SYSTEM_BOTAN") === "1" property var botanIncludes: { var result = ["../3rdparty"]; if (useSystemBotan) diff --git a/src/plugins/clangcodemodel/clangcodemodel.qbs b/src/plugins/clangcodemodel/clangcodemodel.qbs index 170b720c4b8..c2c8ed7034b 100644 --- a/src/plugins/clangcodemodel/clangcodemodel.qbs +++ b/src/plugins/clangcodemodel/clangcodemodel.qbs @@ -11,7 +11,7 @@ QtcPlugin { Depends { name: "TextEditor" } Depends { name: "Utils" } - property string llvmInstallDir: qbs.getenv("LLVM_INSTALL_DIR") + property string llvmInstallDir: qbs.getEnv("LLVM_INSTALL_DIR") condition: llvmInstallDir && !llvmInstallDir.isEmpty property bool clangCompletion: true @@ -33,7 +33,7 @@ QtcPlugin { } // Find llvm-config* in PATH - var pathListString = qbs.getenv("PATH"); + var pathListString = qbs.getEnv("PATH"); var separator = qbs.hostOS.contains("windows") ? ";" : ":"; var pathList = pathListString.split(separator); for (var i = 0; i < llvmConfigVariants.length; ++i) { diff --git a/src/src.qbs b/src/src.qbs index bca1658abf6..71f1632d11b 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -12,7 +12,7 @@ Project { ] property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs") - property path qbs_install_dir: qbs.getenv("QBS_INSTALL_DIR") + property path qbs_install_dir: qbs.getEnv("QBS_INSTALL_DIR") property bool useExternalQbs: qbs_install_dir property bool buildQbsProjectManager: useExternalQbs || qbsSubModuleExists Project { From 18fc5e3f9186b38d952e21d03706a49b25e39c67 Mon Sep 17 00:00:00 2001 From: jkobus Date: Tue, 15 Apr 2014 16:12:10 +0200 Subject: [PATCH 05/38] DiffEditor: replace carriage return chars with spaces. Make sure text block is valid before using its layout. Task-number: QTCREATORBUG-12056 Change-Id: I618edfcf549b675282587aed577810b806692bd4 Reviewed-by: Christian Stenger Reviewed-by: Friedemann Kleint --- src/plugins/diffeditor/sidebysidediffeditorwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp index 6da541b0ecc..f33f9bb813c 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp @@ -287,6 +287,9 @@ void MultiHighlighter::highlightBlock(const QString &text) QTextBlock documentBlock = currentDocument->findBlockByNumber( block.blockNumber() - m_editor->blockNumberForFileIndex(fileIndex)); + if (!documentBlock.isValid()) + return; + QList formats = documentBlock.layout()->additionalFormats(); setExtraAdditionalFormats(block, formats); } @@ -960,6 +963,8 @@ void SideBySideDiffEditorWidget::showDiff() blockNumber++; } } + leftText.replace(QChar::CarriageReturn, QChar::Space); + rightText.replace(QChar::CarriageReturn, QChar::Space); leftTexts += leftText; rightTexts += rightText; leftDocs.append(qMakePair(contextFileData.leftFileInfo, leftText)); From 70e47527bc8f23fe41f32eeadbdec75cf90d50a2 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 16 Apr 2014 14:26:07 +0200 Subject: [PATCH 06/38] Compile fix for Qt4 Change-Id: I16cc2f6f9cc7ace7aa7fb34a340ea714b6ac9c3f Reviewed-by: Jarek Kobus --- src/plugins/diffeditor/sidebysidediffeditorwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp index f33f9bb813c..47fd559d2dd 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp @@ -963,8 +963,8 @@ void SideBySideDiffEditorWidget::showDiff() blockNumber++; } } - leftText.replace(QChar::CarriageReturn, QChar::Space); - rightText.replace(QChar::CarriageReturn, QChar::Space); + leftText.replace(QLatin1Char('\r'), QLatin1Char(' ')); + rightText.replace(QLatin1Char('\r'), QLatin1Char(' ')); leftTexts += leftText; rightTexts += rightText; leftDocs.append(qMakePair(contextFileData.leftFileInfo, leftText)); From 6827072facb8c20d2437191ac9847fa30523ad67 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 16 Apr 2014 15:22:18 +0200 Subject: [PATCH 07/38] Squish: Stabilize tst_external_sort Change-Id: I4c580c160f1035ed04ec2b1d1fc9e0c79f8813fa Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_external_sort/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_tools/tst_external_sort/test.py b/tests/system/suite_tools/tst_external_sort/test.py index d858ab7f369..b9506398eab 100644 --- a/tests/system/suite_tools/tst_external_sort/test.py +++ b/tests/system/suite_tools/tst_external_sort/test.py @@ -37,10 +37,11 @@ def main(): unsortedFile = os.path.join(os.getcwd(), "testdata", "unsorted.txt") sorted = getOutputFromCmdline("sort %s" % unsortedFile).replace("\r", "") selectFromFileDialog(unsortedFile) - invokeMenuItem("Edit", "Select All") - invokeMenuItem("Tools", "External", "Text", "Sort Selection") editor = waitForObject("{type='TextEditor::PlainTextEditorWidget' unnamed='1' " "visible='1' window=':Qt Creator_Core::Internal::MainWindow'}", 3000) + placeCursorToLine(editor, "bbb") + invokeMenuItem("Edit", "Select All") + invokeMenuItem("Tools", "External", "Text", "Sort Selection") test.verify(waitFor("str(editor.plainText) == sorted", 2000), "Verify that sorted text\n%s\nmatches the expected text\n%s" % (editor.plainText, sorted)) invokeMenuItem('File', 'Revert "unsorted.txt" to Saved') From c92288731535c9e3983480427a36e1d6867b1d5a Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Thu, 17 Apr 2014 18:44:01 +0800 Subject: [PATCH 08/38] qbs: Fix link warning for targeting xp 64bit, it's should be 5.2 (5.02) LINK : warning LNK4010: invalid subsystem version number 5.01; default subsystem version assumed Change-Id: I8683a70148208ff399c6dfe3bd299b6b81206e32 Reviewed-by: Joerg Bornemann Reviewed-by: Jake Petroules --- qbs/imports/QtcLibrary.qbs | 2 +- qbs/imports/QtcPlugin.qbs | 2 +- qbs/imports/QtcTool.qbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qbs/imports/QtcLibrary.qbs b/qbs/imports/QtcLibrary.qbs index bde1ea2812d..54f79a36180 100644 --- a/qbs/imports/QtcLibrary.qbs +++ b/qbs/imports/QtcLibrary.qbs @@ -24,7 +24,7 @@ DynamicLibrary { : ["$ORIGIN", "$ORIGIN/.."] property string libIncludeBase: ".." // #include cpp.includePaths: [libIncludeBase] - cpp.minimumWindowsVersion: "5.1" + cpp.minimumWindowsVersion: qbs.architecture === "x86" ? "5.1" : "5.2" Export { Depends { name: "cpp" } diff --git a/qbs/imports/QtcPlugin.qbs b/qbs/imports/QtcPlugin.qbs index cde595bbcb0..33e0c633f44 100644 --- a/qbs/imports/QtcPlugin.qbs +++ b/qbs/imports/QtcPlugin.qbs @@ -36,7 +36,7 @@ Product { property string pluginIncludeBase: ".." // #include cpp.includePaths: [pluginIncludeBase] - cpp.minimumWindowsVersion: "5.1" + cpp.minimumWindowsVersion: qbs.architecture === "x86" ? "5.1" : "5.2" Group { name: "PluginSpec" diff --git a/qbs/imports/QtcTool.qbs b/qbs/imports/QtcTool.qbs index f5d4d95e0a5..12f30f89509 100644 --- a/qbs/imports/QtcTool.qbs +++ b/qbs/imports/QtcTool.qbs @@ -14,7 +14,7 @@ Application { cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/../" + project.ide_library_path] : ["$ORIGIN/../" + project.ide_library_path] - cpp.minimumWindowsVersion: "5.1" + cpp.minimumWindowsVersion: qbs.architecture === "x86" ? "5.1" : "5.2" Group { fileTagsFilter: product.type From 3cb00e1afec33843105179cd289bb2178cd735a4 Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Fri, 18 Apr 2014 10:00:52 +0800 Subject: [PATCH 09/38] Add /FS to cpp.platformC(xx)Flags for MSVC2013 Task-number: QTCREATORBUG-11025 Change-Id: Ibdfebc601a38535aae353a0ed2aedac920d5b192 Reviewed-by: Joerg Bornemann --- src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp | 5 +++++ src/plugins/qbsprojectmanager/qbsconstants.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp index 28b0ad3158a..af81b1aa4f2 100644 --- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp @@ -118,6 +118,11 @@ QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k, c Utils::FileName cxx = tc->compilerCommand(); data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxx.toFileInfo().absolutePath()); data.insert(QLatin1String(CPP_COMPILERNAME), cxx.toFileInfo().fileName()); + if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor) { + const QLatin1String flags("/FS"); + data.insert(QLatin1String(CPP_PLATFORMCFLAGS), flags); + data.insert(QLatin1String(CPP_PLATFORMCXXFLAGS), flags); + } } return data; } diff --git a/src/plugins/qbsprojectmanager/qbsconstants.h b/src/plugins/qbsprojectmanager/qbsconstants.h index 40f8f4767d3..878b95d98a1 100644 --- a/src/plugins/qbsprojectmanager/qbsconstants.h +++ b/src/plugins/qbsprojectmanager/qbsconstants.h @@ -41,6 +41,8 @@ const char QBS_ENDIANNESS[] = "qbs.endianness"; const char QBS_TOOLCHAIN[] = "qbs.toolchain"; const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath"; const char CPP_COMPILERNAME[] = "cpp.compilerName"; +const char CPP_PLATFORMCFLAGS[] = "cpp.platformCFlags"; +const char CPP_PLATFORMCXXFLAGS[] = "cpp.platformCxxFlags"; } // namespace Constants } // namespace QbsProjectManager From d01be9da1d03ddddaec8f6e6766dc0a91124a07e Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 15 Apr 2014 14:54:53 +0200 Subject: [PATCH 10/38] QmlDesigner.PropertyEditor: Adjust size of TabView The size of a TabView does not adjust to its contents. We have to do this manually. The minimum size is defined by the LayoutSection. Task-number: QTCREATORBUG-12040 Change-Id: Icdf42cbc3788b3ce38b9cffdb0dc9afd15d32815 Reviewed-by: Marco Bubke --- .../QtQuick/ItemPane.qml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index d8dfdbe26d8..0c1fd68bd4e 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -158,6 +158,15 @@ Rectangle { anchors.right: parent.right frameVisible: false + id: tabView + height: Math.max(layoutSectionHeight, specficsHeight) + + property int layoutSectionHeight + property int specficsOneHeight: 0 + property int specficsTwoHeight: 0 + + property int specficsHeight: Math.max(specficsOneHeight, specficsTwoHeight) + Tab { title: backendValues.className.value @@ -178,6 +187,10 @@ Rectangle { active = false active = true } + + onLoaded: { + tabView.specficsTwoHeight = specificsTwo.item.height + 40 + } } Loader { @@ -186,6 +199,10 @@ Rectangle { id: specificsOne; source: specificsUrl; + + onLoaded: { + tabView.specficsOneHeight = specificsOne.item.height + 40 + } } } } @@ -197,6 +214,10 @@ Rectangle { anchors.right: parent.right LayoutSection { + + Component.onCompleted: { + tabView.layoutSectionHeight = childrenRect.height + } } } } From 6db907f935313760c402deb9f56fab3a53b6b53c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 16 Apr 2014 09:50:16 +0200 Subject: [PATCH 11/38] QmlDesigner.PropertyEditor: Adding tooltip to ButtonRowButton Change-Id: Ia5117b9831d8ccf8c01774a247bc3c68642bc8e4 Reviewed-by: Marco Bubke --- .../HelperWidgets/ButtonRowButton.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml index 5fe40b880d3..78575d9f438 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml @@ -30,6 +30,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 as Controls import QtQuick.Layouts 1.0 +import QtQuick.Controls.Private 1.0 Item { id: buttonRowButton @@ -41,6 +42,8 @@ Item { signal clicked() + property string tooltip: "" + width: 24 + leftPadding height: 24 @@ -94,6 +97,7 @@ Item { } MouseArea { + id: mouseArea anchors.fill: parent anchors.leftMargin: leftPadding onClicked: { @@ -104,5 +108,16 @@ Item { } buttonRowButton.clicked() } + + onExited: Tooltip.hideText() + onCanceled: Tooltip.hideText() + + hoverEnabled: true + + Timer { + interval: 1000 + running: mouseArea.containsMouse && tooltip.length + onTriggered: Tooltip.showText(mouseArea, Qt.point(mouseArea.mouseX, mouseArea.mouseY), tooltip) + } } } From 68b1886de8472464bb1c99c5a4c9d4b300e89d7e Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 16 Apr 2014 09:59:28 +0200 Subject: [PATCH 12/38] QmlDesigner.PropertyEditor: Hide TextInput specifics properties for TextEdit Task-number: QTCREATORBUG-12035 Change-Id: I39fef53ce9203a58ba3ce2a0e09e8b4d69a14fa7 Reviewed-by: Marco Bubke --- .../QtQuick/TextEditSpecifics.qml | 1 - .../QtQuick/TextInputSection.qml | 10 +++++++--- .../QtQuick/TextInputSpecifics.qml | 3 +-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml index bd9c40aade8..1437b56a56f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml @@ -84,6 +84,5 @@ Column { } TextInputSection { - showEchoMode: false } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml index 57f34ed6658..b32d6d1bd51 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSection.qml @@ -37,7 +37,7 @@ Section { anchors.right: parent.right caption: qsTr("Text Input") - property bool showEchoMode: false + property bool isTextInput: false id: textInputSection SectionLayout { @@ -46,21 +46,23 @@ Section { Label { + visible: textInputSection.isTextInput text: qsTr("Input mask") } LineEdit { + visible: textInputSection.isTextInput backendValue: backendValues.inputMask Layout.fillWidth: true } Label { - visible: textInputSection.showEchoMode + visible: textInputSection.isTextInput text: qsTr("Echo mode") } ComboBox { - visible: textInputSection.showEchoMode + visible: textInputSection.isTextInput Layout.fillWidth: true backendValue: backendValues.echoMode scope: "TextInput" @@ -68,11 +70,13 @@ Section { } Label { + visible: textInputSection.isTextInput text: qsTr("Pass. char") toolTip: qsTr("Character displayed when users enter passwords.") } LineEdit { + visible: textInputSection.isTextInput backendValue: backendValues.passwordCharacter Layout.fillWidth: true } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml index 79ec6e59088..5270bc9618e 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml @@ -70,7 +70,6 @@ Column { } TextInputSection { - showEchoMode: true - + isTextInput: true } } From 63efa8ba452dd964c1a8bfa870528be6bc45bcf7 Mon Sep 17 00:00:00 2001 From: Takumi ASAKI Date: Sat, 19 Apr 2014 18:04:38 +0900 Subject: [PATCH 13/38] Fix Japanese translation Change-Id: Ic9554c1c172360eb413a80c817a62d414e84c265 Reviewed-by: Tasuku Suzuki Reviewed-by: Oswald Buddenhagen --- share/qtcreator/translations/qtcreator_ja.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index 760d9395010..cc043ece8e8 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -14902,7 +14902,7 @@ Would you like to overwrite them? Find in This Directory... - このディレクトを検索... + このディレクトリを検索... Show in Explorer From 65cd8ea4c28e7584b24b5dd58a816cc9e292d87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Tue, 22 Apr 2014 08:41:12 +0300 Subject: [PATCH 14/38] Git: Fix config encoding on Windows This fixes commit d72b4851b45ace311f8813fd4854a2a8e36ab8af which has removed the conversion from Utf-8 on Windows. Task-number: QTCREATORBUG-12092 Change-Id: I83c4d2d5eacb79ca99ef0b6f385344689582079e Reviewed-by: Orgad Shaneh --- src/plugins/git/gitclient.cpp | 15 ++++++++++----- src/plugins/git/gitclient.h | 3 +-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index a1f8bf86c17..8121bf5dac2 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2401,8 +2401,7 @@ SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory) if (cachedSubmoduleData.contains(workingDirectory)) return cachedSubmoduleData.value(workingDirectory); - QStringList allConfigs = - commandOutputFromLocal8Bit(readConfig(workingDirectory, QLatin1String("-l"))) + QStringList allConfigs = readConfigValue(workingDirectory, QLatin1String("-l")) .split(QLatin1Char('\n')); const QString submoduleLineStart = QLatin1String("submodule."); foreach (const QString &configLine, allConfigs) { @@ -3004,7 +3003,7 @@ QString GitClient::gitBinaryPath(bool *ok, QString *errorMessage) const QTextCodec *GitClient::encoding(const QString &workingDirectory, const QByteArray &configVar) const { - QByteArray codecName = readConfig(workingDirectory, QLatin1String(configVar)).trimmed(); + QByteArray codecName = readConfigBytes(workingDirectory, QLatin1String(configVar)).trimmed(); // Set default commit encoding to 'UTF-8', when it's not set, // to solve displaying error of commit log with non-latin characters. if (codecName.isEmpty()) @@ -3728,7 +3727,7 @@ bool GitClient::synchronousStashList(const QString &workingDirectory, return true; } -QByteArray GitClient::readConfig(const QString &workingDirectory, const QString &configVar) const +QByteArray GitClient::readConfigBytes(const QString &workingDirectory, const QString &configVar) const { QStringList arguments; arguments << QLatin1String("config") << configVar; @@ -3746,7 +3745,13 @@ QByteArray GitClient::readConfig(const QString &workingDirectory, const QString // Read a single-line config value, return trimmed QString GitClient::readConfigValue(const QString &workingDirectory, const QString &configVar) const { - return commandOutputFromLocal8Bit(readConfig(workingDirectory, configVar).trimmed()); + // msysGit always uses UTF-8 for configuration: + // https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#convert-config-files + static QTextCodec *codec = Utils::HostOsInfo::isWindowsHost() + ? QTextCodec::codecForName("UTF-8") + : QTextCodec::codecForLocale(); + const QByteArray value = readConfigBytes(workingDirectory, configVar).trimmed(); + return Utils::SynchronousProcess::normalizeNewlines(codec->toUnicode(value)); } bool GitClient::cloneRepository(const QString &directory,const QByteArray &url) diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index b5dd5fd4744..b9471a0bb91 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -281,8 +281,6 @@ public: const QString &messge, QString *name, QString *errorMessage = 0); - QByteArray readConfig(const QString &workingDirectory, const QString &configVar) const; - QString readConfigValue(const QString &workingDirectory, const QString &configVar) const; QTextCodec *encoding(const QString &workingDirectory, const QByteArray &configVar) const; @@ -347,6 +345,7 @@ private slots: void fetchFinished(const QVariant &cookie); private: + QByteArray readConfigBytes(const QString &workingDirectory, const QString &configVar) const; QTextCodec *getSourceCodec(const QString &file) const; VcsBase::VcsBaseEditorWidget *findExistingVCSEditor(const char *registerDynamicProperty, const QString &dynamicPropertyValue) const; From b45f3ae43d1bfbcd1edf291c6f1b3374a0557052 Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Fri, 18 Apr 2014 17:32:14 +0800 Subject: [PATCH 15/38] Fix minimum windows version detection Change-Id: Idba2e5ec81bae1572e6ed8f89055e8bf1ab41ba1 Reviewed-by: Joerg Bornemann --- src/plugins/qbsprojectmanager/qbsprojectmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp index 7f7845da893..e35cdbe1cd7 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp @@ -150,6 +150,12 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx return; qbs::QtEnvironment qtEnv; + const QList abi = qt->qtAbis(); + if (!abi.empty()) { + qtEnv.architecture = ProjectExplorer::Abi::toString(abi.first().architecture()); + if (abi.first().wordWidth() == 64) + qtEnv.architecture.append(QLatin1String("_64")); + } qtEnv.binaryPath = qt->binPath().toString(); if (qt->hasDebugBuild()) qtEnv.buildVariant << QLatin1String("debug"); From 95ddc795a5cf39739b8d56520d51cfb9acc7bf14 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 23 Apr 2014 17:43:22 +0200 Subject: [PATCH 16/38] Doc: Load QML Stack function Change-Id: I80a376527d5c147e18f5afa6701b810354066df0 Reviewed-by: Friedemann Kleint --- doc/src/debugger/creator-debugger.qdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc index 1a78a060064..86a77f9808e 100644 --- a/doc/src/debugger/creator-debugger.qdoc +++ b/doc/src/debugger/creator-debugger.qdoc @@ -614,6 +614,12 @@ view, making it seem like the program was interrupted before entering the function. + To find out which QML file is causing a Qt Quick 2 application to crash, + select \gui {Load QML Stack} in the context menu in the \gui{Stack} view. + The debugger tries to retrieve the JavaScript stack from the stopped + executable and prepends the frames to the C++ frames, should it find any. + You can click a frame in the QML stack to open the QML file in the editor. + \section1 Locals and Expressions Whenever a program stops under the control of the debugger, it retrieves From 8bb50b1b1e40dc038f4a57a7b565e117f6f99ad6 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 8 Apr 2014 12:28:47 +0200 Subject: [PATCH 17/38] Doc: update Accelbubble example The app could not recover from receiving a NaN value from the Accelerometer, so NaN values are ignored. Change-Id: Ia33d800f7fe080e07dcf327c26b3772e994793bf Reviewed-by: Fawzi Mohamed --- doc/examples/accelbubble/main.qml | 3 +++ doc/src/qtquick/creator-mobile-app-tutorial.qdoc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/doc/examples/accelbubble/main.qml b/doc/examples/accelbubble/main.qml index 80c961f78bf..0f3d1989413 100644 --- a/doc/examples/accelbubble/main.qml +++ b/doc/examples/accelbubble/main.qml @@ -79,6 +79,9 @@ ApplicationWindow { var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * 0.1) var newY = (bubble.y - calcPitch(accel.reading.x, accel.reading.y, accel.reading.z) * 0.1) + if (isNaN(newX) || isNaN(newY)) + return; + if (newX < 0) newX = 0 diff --git a/doc/src/qtquick/creator-mobile-app-tutorial.qdoc b/doc/src/qtquick/creator-mobile-app-tutorial.qdoc index 483f9cd6651..09713b4d838 100644 --- a/doc/src/qtquick/creator-mobile-app-tutorial.qdoc +++ b/doc/src/qtquick/creator-mobile-app-tutorial.qdoc @@ -196,6 +196,9 @@ \skipto onReadingChanged \printuntil } + We want to ensure that the position of the bubble is always within + the bounds of the screen. If the Accelerometer returns not a number + (NaN), the value is ignored and the bubble position is not updated. \li Add SmoothedAnimation behavior on the \a x and \a y properties of the bubble to make its movement look smoother. From 0909d7c5f88d89092f57efdeb842e19c44cd1cea Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 24 Apr 2014 16:31:50 +0200 Subject: [PATCH 18/38] QmlDesigner.SubComponentManager: Do not show items without import This feature is not working reliable, because we cannot add the import and have proper metainfo for the item in the same transaction. This is why we added the import manager. Change-Id: Ifc6c34ae699f574989cfba8e07ec0d8c8d528101 Reviewed-by: Marco Bubke --- .../qmldesigner/designercore/metainfo/subcomponentmanager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp index ece9ad259a5..2b1723f164e 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp @@ -395,7 +395,6 @@ void SubComponentManager::registerQmlFile(const QFileInfo &fileInfo, const QStri itemLibraryEntry.setName(baseComponentName); itemLibraryEntry.setCategory("QML Components"); if (!qualifier.isEmpty()) { - itemLibraryEntry.setForceImport(true); itemLibraryEntry.setRequiredImport(fixedQualifier); } From d57d24068c2ef112aaf73a7eedf29956e800a772 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 24 Apr 2014 16:28:35 +0200 Subject: [PATCH 19/38] Valgrind: Prevent invalid assertion. Change-Id: I91748fd4ac43e9e00c0859209dbf39d10746b958 Reviewed-by: hjk --- src/plugins/valgrind/memcheckerrorview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/valgrind/memcheckerrorview.cpp b/src/plugins/valgrind/memcheckerrorview.cpp index db305eaea34..6f3318b1a62 100644 --- a/src/plugins/valgrind/memcheckerrorview.cpp +++ b/src/plugins/valgrind/memcheckerrorview.cpp @@ -198,6 +198,8 @@ static QString relativeToPath() static QString errorLocation(const QModelIndex &index, const Error &error, bool link = false, const QString &linkAttr = QString()) { + if (!index.isValid()) + return QString(); const ErrorListModel *model = 0; const QAbstractProxyModel *proxy = qobject_cast(index.model()); while (!model && proxy) { From 6a33fb329340dee59269ca7516bb7f8b911b2847 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 24 Apr 2014 16:27:06 +0200 Subject: [PATCH 20/38] Valgrind: Fix typo in signal-slot connection. Change-Id: I2e206db3329c61ec2e46d37a93d1a542fe139759 Reviewed-by: hjk --- src/plugins/valgrind/valgrindprocess.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/valgrind/valgrindprocess.cpp b/src/plugins/valgrind/valgrindprocess.cpp index de746324415..a5d62a64deb 100644 --- a/src/plugins/valgrind/valgrindprocess.cpp +++ b/src/plugins/valgrind/valgrindprocess.cpp @@ -142,7 +142,7 @@ void ValgrindProcess::run(const QString &valgrindExecutable, const QStringList & if (m_remote.m_connection->state() != QSsh::SshConnection::Connected) { connect(m_remote.m_connection, SIGNAL(connected()), this, SLOT(connected())); connect(m_remote.m_connection, SIGNAL(error(QSsh::SshError)), - this, SLOT(handelError(QSsh::SshError))); + this, SLOT(handleError(QSsh::SshError))); if (m_remote.m_connection->state() == QSsh::SshConnection::Unconnected) m_remote.m_connection->connectToHost(); } else { From 90bd5ce6b0893fb4c819c85837aba58e10d0a4eb Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 24 Apr 2014 16:32:00 +0200 Subject: [PATCH 21/38] Valgrind: Return correct row count from ErrorListModel. Inexplicably, the current implementation returns 1 if the error list is empty, which results in a bogus entry in the view and is sure to confuse people to the point that they might think the analyzer is not working at all (I know I did). Change-Id: I9f5999f859347993b012c408129f18260a8c2bea Reviewed-by: hjk --- src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp b/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp index 280b2aec49f..f5ac682c78d 100644 --- a/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp +++ b/src/plugins/valgrind/xmlprotocol/errorlistmodel.cpp @@ -239,7 +239,7 @@ int ErrorListModel::rowCount(const QModelIndex &parent) const { if (parent.isValid()) return 0; - return qMax(1, d->errors.count()); + return d->errors.count(); } int ErrorListModel::columnCount(const QModelIndex &parent) const From 93f529aea3a43ed27532117a580f048fea8af2a4 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 24 Apr 2014 16:57:27 +0200 Subject: [PATCH 22/38] QmlDesigner.PropertyEditor: Keep left/right anchors for vertical anchoring Task-number: QTCREATORBUG-12006 Change-Id: I4926fe462698fb4ae6b8e00bf7f53948a96db79c Reviewed-by: Marco Bubke --- .../propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml index c73f9e9e4d5..5e93a588195 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml @@ -156,8 +156,6 @@ ButtonRow { onClicked: { if (checked) { - anchorBackend.leftAnchored = false; - anchorBackend.rightAnchored = false; anchorBackend.topAnchored = false; anchorBackend.bottomAnchored = false; anchorBackend.verticalCentered = true; From eb32e5713c059973ab1451e3d0a1b0d9775e52f9 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 25 Apr 2014 12:30:18 +0200 Subject: [PATCH 23/38] QmlDesigner.PropertyEditor: Fixing color chooser Task-number: QTCREATORBUG-11904 Change-Id: I94d073cae9a162ff2dc6567cb7805ba4df66365f Reviewed-by: Christian Stenger --- .../propertyEditorQmlSources/HelperWidgets/ColorEditor.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml index 37f9b63266d..067e42a2737 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml @@ -142,7 +142,7 @@ Column { } ColorCheckButton { id: checkButton - color: colorButton.color + color: backendendValue.value } ButtonRow { From 79b89a55d4883bb28bdda465da45740d4ebf7e60 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Fri, 25 Apr 2014 11:16:22 +0200 Subject: [PATCH 24/38] TaskModel: Remove updateMapping calls that lead to bad performance Those were missed in 48255c92293c336d77ad4072a8dd41f7a250dfd9 Task-number: QTCREATORBUG-12109 Change-Id: Ie0cf9026038dd6627593c8dd14ab52d6c1ff19cf Reviewed-by: Tobias Hunger Reviewed-by: Orgad Shaneh --- src/plugins/projectexplorer/taskmodel.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp index 5c8a67cf475..75fb54eb345 100644 --- a/src/plugins/projectexplorer/taskmodel.cpp +++ b/src/plugins/projectexplorer/taskmodel.cpp @@ -362,7 +362,6 @@ int TaskFilterModel::rowCount(const QModelIndex &parent) const if (parent.isValid()) return 0; - updateMapping(); return m_mapping.count(); } @@ -455,7 +454,6 @@ void TaskFilterModel::handleReset() QModelIndex TaskFilterModel::mapFromSource(const QModelIndex &idx) const { - updateMapping(); QList::const_iterator it = qBinaryFind(m_mapping.constBegin(), m_mapping.constEnd(), idx.row()); if (it == m_mapping.constEnd()) return QModelIndex(); @@ -464,7 +462,6 @@ QModelIndex TaskFilterModel::mapFromSource(const QModelIndex &idx) const QModelIndex TaskFilterModel::mapToSource(const QModelIndex &index) const { - updateMapping(); int row = index.row(); if (row >= m_mapping.count()) return QModelIndex(); From 39ae35cd819775f02f01ed738de0c788cd2ede37 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 25 Apr 2014 15:21:18 +0200 Subject: [PATCH 25/38] Qbs: write toolchainPrefix to qbs profile Task-number: QTCREATORBUG-12133 Change-Id: I9d68c9900b7f701b788953fae334b581d7127386 Reviewed-by: Jake Petroules Reviewed-by: Christian Kandeler --- .../defaultpropertyprovider.cpp | 21 +++++++++++++++++-- src/plugins/qbsprojectmanager/qbsconstants.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp index af81b1aa4f2..735ce897f7d 100644 --- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp @@ -42,6 +42,18 @@ namespace QbsProjectManager { using namespace Constants; +static QString extractToolchainPrefix(QString *compilerName) +{ + QString prefix; + if (compilerName->endsWith(QLatin1String("-g++")) + || compilerName->endsWith(QLatin1String("-clang++"))) { + const int idx = compilerName->lastIndexOf(QLatin1Char('-')) + 1; + prefix = compilerName->left(idx); + compilerName->remove(0, idx); + } + return prefix; +} + QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k, const QVariantMap &defaultData) const { QTC_ASSERT(k, return defaultData); @@ -116,8 +128,13 @@ QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k, c } } Utils::FileName cxx = tc->compilerCommand(); - data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxx.toFileInfo().absolutePath()); - data.insert(QLatin1String(CPP_COMPILERNAME), cxx.toFileInfo().fileName()); + const QFileInfo cxxFileInfo = cxx.toFileInfo(); + QString compilerName = cxxFileInfo.fileName(); + const QString toolchainPrefix = extractToolchainPrefix(&compilerName); + if (!toolchainPrefix.isEmpty()) + data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix); + data.insert(QLatin1String(CPP_COMPILERNAME), compilerName); + data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath()); if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor) { const QLatin1String flags("/FS"); data.insert(QLatin1String(CPP_PLATFORMCFLAGS), flags); diff --git a/src/plugins/qbsprojectmanager/qbsconstants.h b/src/plugins/qbsprojectmanager/qbsconstants.h index 878b95d98a1..82d070abd5a 100644 --- a/src/plugins/qbsprojectmanager/qbsconstants.h +++ b/src/plugins/qbsprojectmanager/qbsconstants.h @@ -40,6 +40,7 @@ const char QBS_ARCHITECTURE[] = "qbs.architecture"; const char QBS_ENDIANNESS[] = "qbs.endianness"; const char QBS_TOOLCHAIN[] = "qbs.toolchain"; const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath"; +const char CPP_TOOLCHAINPREFIX[] = "cpp.toolchainPrefix"; const char CPP_COMPILERNAME[] = "cpp.compilerName"; const char CPP_PLATFORMCFLAGS[] = "cpp.platformCFlags"; const char CPP_PLATFORMCXXFLAGS[] = "cpp.platformCxxFlags"; From 69258bc5bc8490cbc44a02e4269044d3e5ff9ae3 Mon Sep 17 00:00:00 2001 From: hluk Date: Wed, 23 Apr 2014 17:14:21 +0200 Subject: [PATCH 26/38] FakeVim: Don't handle command mapping further if editor was closed Task-number: QTCREATORBUG-12073 Change-Id: I99b49b15a588e5fbcec4218df250a981644914ec Reviewed-by: hjk --- src/plugins/fakevim/fakevimhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 50d6b1eccb1..f709bbe5fdc 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -6102,7 +6102,7 @@ bool FakeVimHandler::Private::handleExPluginCommand(const ExCommand &cmd) commitCursor(); emit q->handleExCommandRequested(&handled, cmd); //qDebug() << "HANDLER REQUEST: " << cmd.cmd << handled; - if (handled) { + if (handled && (m_textedit || m_plaintextedit)) { pullCursor(); if (m_cursor.position() != pos) recordJump(pos); From 575259c3c135ea8882705a6da7168b1f5b5a4ac3 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 24 Apr 2014 16:35:07 +0200 Subject: [PATCH 27/38] Valgrind: Fix "alien binary" filtering for remote analyzing. The current implementation thinks an executed binary does not belong to the project if it is not located in the build directory. However, for remote analyzing, that file is never started from the build directory, but from the place it was deployed to. Change-Id: Iaaf473aac1cf90aa2300ab7c36b92008e269690a Reviewed-by: hjk --- src/plugins/valgrind/memchecktool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 292157a1292..e1173a6b99b 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -48,6 +48,7 @@ #include #include +#include #include #include #include @@ -144,6 +145,11 @@ bool MemcheckErrorFilterProxyModel::filterAcceptsRow(int sourceRow, const QModel foreach (Project *project, SessionManager::projects()) { validFolders << project->projectDirectory(); foreach (Target *target, project->targets()) { + foreach (const ProjectExplorer::DeployableFile &file, + target->deploymentData().allFiles()) { + if (file.isExecutable()) + validFolders << file.remoteDirectory(); + } foreach (BuildConfiguration *config, target->buildConfigurations()) validFolders << config->buildDirectory().toString(); } From 954245c645e8a3e362668a89008996b9e004a905 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 22 Apr 2014 09:22:47 +0300 Subject: [PATCH 28/38] Git: Fix author encoding on amend commit on Windows... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... when i18n.commitEncoding is not UTF-8 and the author has non-ASCII characters. Change-Id: Ieec0a78f4d31b18f9ebda9c4a1fce4a0d5ecbb9b Reviewed-by: Peter Kümmel Reviewed-by: André Hartmann Reviewed-by: Tobias Hunger --- src/plugins/git/gitclient.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 8121bf5dac2..467854c4866 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -3011,6 +3011,15 @@ QTextCodec *GitClient::encoding(const QString &workingDirectory, const QByteArra return QTextCodec::codecForName(codecName); } +// returns first line from log and removes it +static QByteArray shiftLogLine(QByteArray &logText) +{ + const int index = logText.indexOf('\n'); + const QByteArray res = logText.left(index); + logText.remove(0, index + 1); + return res; +} + bool GitClient::getCommitData(const QString &workingDirectory, QString *commitTemplate, CommitData &commitData, @@ -3097,19 +3106,20 @@ bool GitClient::getCommitData(const QString &workingDirectory, case AmendCommit: { // Amend: get last commit data as "SHA1authoremailmessage". QStringList args(QLatin1String("log")); - args << QLatin1String("--max-count=1") << QLatin1String("--pretty=format:%h\t%an\t%ae\t%B"); - const Utils::SynchronousProcessResponse sp = synchronousGit(repoDirectory, args, 0, - commitData.commitEncoding); - if (sp.result != Utils::SynchronousProcessResponse::Finished) { + args << QLatin1String("--max-count=1") << QLatin1String("--pretty=format:%h\n%an\n%ae\n%B"); + QByteArray outputText; + if (!fullySynchronousGit(repoDirectory, args, &outputText, 0, + VcsBasePlugin::SuppressCommandLogging)) { *errorMessage = tr("Cannot retrieve last commit data of repository \"%1\".").arg(repoDirectory); return false; } - QStringList values = sp.stdOut.split(QLatin1Char('\t')); - QTC_ASSERT(values.size() >= 4, return false); - commitData.amendSHA1 = values.takeFirst(); - commitData.panelData.author = values.takeFirst(); - commitData.panelData.email = values.takeFirst(); - *commitTemplate = values.join(QLatin1String("\t")); + QTextCodec *authorCodec = Utils::HostOsInfo::isWindowsHost() + ? QTextCodec::codecForName("UTF-8") + : commitData.commitEncoding; + commitData.amendSHA1 = QString::fromLatin1(shiftLogLine(outputText)); + commitData.panelData.author = authorCodec->toUnicode(shiftLogLine(outputText)); + commitData.panelData.email = authorCodec->toUnicode(shiftLogLine(outputText)); + *commitTemplate = commitData.commitEncoding->toUnicode(outputText); break; } case SimpleCommit: { From c2d177f8cbd2fcb771050e0763138e4761fc5573 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 29 Apr 2014 13:24:51 +0200 Subject: [PATCH 29/38] QmakeProject: Use build_pass evaluator for INSTALLS Task-number: QTCREATORBUG-12151 Change-Id: I1ef91a7ecf784a98930f7a505b091910a4a2fe38 Reviewed-by: Oliver Wolff --- .../qmakeprojectmanager/qmakenodes.cpp | 80 ++++++++++--------- src/plugins/qmakeprojectmanager/qmakenodes.h | 2 +- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 8316e4b3622..58762fbb7f2 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -1989,13 +1989,46 @@ void QmakeProFileNode::applyEvaluate(EvalResult evalResult, bool async) m_validParse = (evalResult == EvalOk); if (m_validParse) { + // create build_pass reader + QtSupport::ProFileReader *readerBuildPass = 0; + QStringList builds = m_readerExact->values(QLatin1String("BUILDS")); + if (builds.isEmpty()) { + readerBuildPass = m_readerExact; + } else { + QString build = builds.first(); + QHash basevars; + QStringList basecfgs = m_readerExact->values(build + QLatin1String(".CONFIG")); + basecfgs += build; + basecfgs += QLatin1String("build_pass"); + basevars[QLatin1String("BUILD_PASS")] = QStringList(build); + QStringList buildname = m_readerExact->values(build + QLatin1String(".name")); + basevars[QLatin1String("BUILD_NAME")] = (buildname.isEmpty() ? QStringList(build) : buildname); + + readerBuildPass = m_project->createProFileReader(this); + readerBuildPass->setExtraVars(basevars); + readerBuildPass->setExtraConfigs(basecfgs); + + EvalResult evalResult = EvalOk; + if (ProFile *pro = readerBuildPass->parsedProFile(m_projectFilePath)) { + if (!readerBuildPass->accept(pro, QMakeEvaluator::LoadAll)) + evalResult = EvalPartial; + pro->deref(); + } else { + evalResult = EvalFail; + } + + if (evalResult != EvalOk) { + m_project->destroyProFileReader(readerBuildPass); + readerBuildPass = 0; + } + } // update TargetInformation - m_qmakeTargetInformation = targetInformation(m_readerExact); + m_qmakeTargetInformation = targetInformation(m_readerExact, readerBuildPass); m_resolvedMkspecPath = m_readerExact->resolvedMkSpec(); m_subProjectsNotToDeploy = subProjectsNotToDeploy; - setupInstallsList(m_readerExact); + setupInstallsList(readerBuildPass); QString buildDirectory = buildDir(); // update other variables @@ -2055,6 +2088,9 @@ void QmakeProFileNode::applyEvaluate(EvalResult evalResult, bool async) } } + if (readerBuildPass && readerBuildPass != m_readerExact) + m_project->destroyProFileReader(readerBuildPass); + if (m_varValues != newVarValues) { QmakeVariablesHash oldValues = m_varValues; m_varValues = newVarValues; @@ -2199,61 +2235,31 @@ QStringList QmakeProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QSt return subProjectPaths; } -TargetInformation QmakeProFileNode::targetInformation(QtSupport::ProFileReader *reader) const +TargetInformation QmakeProFileNode::targetInformation(QtSupport::ProFileReader *reader, QtSupport::ProFileReader *readerBuildPass) const { TargetInformation result; - if (!reader) + if (!reader || !readerBuildPass) return result; - QtSupport::ProFileReader *readerBP = 0; QStringList builds = reader->values(QLatin1String("BUILDS")); if (!builds.isEmpty()) { QString build = builds.first(); result.buildTarget = reader->value(build + QLatin1String(".target")); - - QHash basevars; - QStringList basecfgs = reader->values(build + QLatin1String(".CONFIG")); - basecfgs += build; - basecfgs += QLatin1String("build_pass"); - basevars[QLatin1String("BUILD_PASS")] = QStringList(build); - QStringList buildname = reader->values(build + QLatin1String(".name")); - basevars[QLatin1String("BUILD_NAME")] = (buildname.isEmpty() ? QStringList(build) : buildname); - - readerBP = m_project->createProFileReader(this); - readerBP->setExtraVars(basevars); - readerBP->setExtraConfigs(basecfgs); - - EvalResult evalResult = EvalOk; - if (ProFile *pro = readerBP->parsedProFile(m_projectFilePath)) { - if (!readerBP->accept(pro, QMakeEvaluator::LoadAll)) - evalResult = EvalPartial; - pro->deref(); - } else { - evalResult = EvalFail; - } - - if (evalResult != EvalOk) - return result; - - reader = readerBP; } // BUILD DIR result.buildDir = buildDir(); - if (reader->contains(QLatin1String("DESTDIR"))) - result.destDir = reader->value(QLatin1String("DESTDIR")); + if (readerBuildPass->contains(QLatin1String("DESTDIR"))) + result.destDir = readerBuildPass->value(QLatin1String("DESTDIR")); // Target - result.target = reader->value(QLatin1String("TARGET")); + result.target = readerBuildPass->value(QLatin1String("TARGET")); if (result.target.isEmpty()) result.target = QFileInfo(m_projectFilePath).baseName(); result.valid = true; - if (readerBP) - m_project->destroyProFileReader(readerBP); - return result; } diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h index ff1342508e7..add14842aef 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.h +++ b/src/plugins/qmakeprojectmanager/qmakenodes.h @@ -442,7 +442,7 @@ private: QStringList libDirectories(QtSupport::ProFileReader *reader) const; QStringList subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy, bool silent) const; - TargetInformation targetInformation(QtSupport::ProFileReader *reader) const; + TargetInformation targetInformation(QtSupport::ProFileReader *reader, QtSupport::ProFileReader *readerBuildPass) const; void setupInstallsList(const QtSupport::ProFileReader *reader); bool m_isDeployable; From 7b6da4b7f2888ec66b75688c5c21732b8bd448b4 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 24 Apr 2014 14:15:27 +0200 Subject: [PATCH 30/38] Squish: Fix verifyEnabled() If verifyEnabled() was used with an object's real name it failed due to using invalid syntax. Change-Id: Ie88ffbda3ab1601fbd781955146b6600ba5104a3 Reviewed-by: Robert Loehning --- tests/system/shared/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index b9bdd116308..1a7b4eb3099 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -81,7 +81,7 @@ def ensureChecked(objectName, shouldBeChecked = True, timeout=20000): # param expectedState is the expected enable state of the object def verifyEnabled(objectSpec, expectedState = True): if isinstance(objectSpec, (str, unicode)): - waitFor("object.exists('" + objectSpec + "')", 20000) + waitFor("object.exists('" + str(objectSpec).replace("'", "\\'") + "')", 20000) foundObject = findObject(objectSpec) else: foundObject = objectSpec From a966e33308b24267727d56c8d6d3f08ba20fb4a3 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 23 Apr 2014 12:24:03 +0200 Subject: [PATCH 31/38] Squish: Remove unnecessary imports Change-Id: Ia902e0a797fea947f83505f6b09e3efed24f65b1 Reviewed-by: Robert Loehning --- tests/system/suite_APTW/tst_APTW01/test.py | 1 - tests/system/suite_APTW/tst_APTW02/test.py | 1 - tests/system/suite_CCOM/tst_CCOM01/test.py | 1 - tests/system/suite_CSUP/tst_CSUP02/test.py | 1 - tests/system/suite_CSUP/tst_CSUP04/test.py | 1 - tests/system/suite_CSUP/tst_CSUP05/test.py | 1 - tests/system/suite_HELP/tst_HELP02/test.py | 1 - tests/system/suite_HELP/tst_HELP04/test.py | 1 - tests/system/suite_HELP/tst_HELP05/test.py | 1 - tests/system/suite_HELP/tst_HELP06/test.py | 1 - tests/system/suite_QMLS/shared/qmls.py | 1 - tests/system/suite_QMLS/tst_QMLS01/test.py | 1 + tests/system/suite_QMLS/tst_QMLS02/test.py | 1 + tests/system/suite_QMLS/tst_QMLS03/test.py | 1 - tests/system/suite_SCOM/tst_SCOM01/test.py | 1 - tests/system/suite_SCOM/tst_SCOM05/test.py | 1 - tests/system/suite_editors/tst_delete_externally/test.py | 1 - 17 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tests/system/suite_APTW/tst_APTW01/test.py b/tests/system/suite_APTW/tst_APTW01/test.py index f626f442742..4eca2b29834 100644 --- a/tests/system/suite_APTW/tst_APTW01/test.py +++ b/tests/system/suite_APTW/tst_APTW01/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") # test New Qt Gui Application build and run for release and debug option def main(): diff --git a/tests/system/suite_APTW/tst_APTW02/test.py b/tests/system/suite_APTW/tst_APTW02/test.py index b1ced390a2b..7569e64551d 100644 --- a/tests/system/suite_APTW/tst_APTW02/test.py +++ b/tests/system/suite_APTW/tst_APTW02/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") # test New Qt Quick Application build and run for release and debug option def main(): diff --git a/tests/system/suite_CCOM/tst_CCOM01/test.py b/tests/system/suite_CCOM/tst_CCOM01/test.py index afdedb65242..e0b9016fefa 100755 --- a/tests/system/suite_CCOM/tst_CCOM01/test.py +++ b/tests/system/suite_CCOM/tst_CCOM01/test.py @@ -27,7 +27,6 @@ ## ############################################################################# -source("../../shared/suites_qtta.py") source("../../shared/qtcreator.py") # entry of test diff --git a/tests/system/suite_CSUP/tst_CSUP02/test.py b/tests/system/suite_CSUP/tst_CSUP02/test.py index ee31b844cdf..075eb156312 100644 --- a/tests/system/suite_CSUP/tst_CSUP02/test.py +++ b/tests/system/suite_CSUP/tst_CSUP02/test.py @@ -27,7 +27,6 @@ ## ############################################################################# -source("../../shared/suites_qtta.py") source("../../shared/qtcreator.py") # entry of test diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py index 10a7a07bba5..16217a52970 100644 --- a/tests/system/suite_CSUP/tst_CSUP04/test.py +++ b/tests/system/suite_CSUP/tst_CSUP04/test.py @@ -27,7 +27,6 @@ ## ############################################################################# -source("../../shared/suites_qtta.py") source("../../shared/qtcreator.py") # entry of test diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py index ccedda6d462..c853e37e52f 100644 --- a/tests/system/suite_CSUP/tst_CSUP05/test.py +++ b/tests/system/suite_CSUP/tst_CSUP05/test.py @@ -27,7 +27,6 @@ ## ############################################################################# -source("../../shared/suites_qtta.py") source("../../shared/qtcreator.py") # entry of test diff --git a/tests/system/suite_HELP/tst_HELP02/test.py b/tests/system/suite_HELP/tst_HELP02/test.py index fa3ce0f0f42..951a32557c0 100755 --- a/tests/system/suite_HELP/tst_HELP02/test.py +++ b/tests/system/suite_HELP/tst_HELP02/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") # test Qt Creator version information from file and dialog def getQtCreatorVersionFromDialog(): diff --git a/tests/system/suite_HELP/tst_HELP04/test.py b/tests/system/suite_HELP/tst_HELP04/test.py index caebc12b5ab..69e8e0e9568 100755 --- a/tests/system/suite_HELP/tst_HELP04/test.py +++ b/tests/system/suite_HELP/tst_HELP04/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") import re # test search in help mode and advanced search diff --git a/tests/system/suite_HELP/tst_HELP05/test.py b/tests/system/suite_HELP/tst_HELP05/test.py index 611742733b1..1b5d43bed7d 100755 --- a/tests/system/suite_HELP/tst_HELP05/test.py +++ b/tests/system/suite_HELP/tst_HELP05/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") # test context sensitive help in edit mode # place cursor to keyword, in , and verify help to contain diff --git a/tests/system/suite_HELP/tst_HELP06/test.py b/tests/system/suite_HELP/tst_HELP06/test.py index cda0c7e33ab..a42c0fe995e 100755 --- a/tests/system/suite_HELP/tst_HELP06/test.py +++ b/tests/system/suite_HELP/tst_HELP06/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") # test bookmark functionality def renameBookmarkFolder(view, item, newName): diff --git a/tests/system/suite_QMLS/shared/qmls.py b/tests/system/suite_QMLS/shared/qmls.py index f4842f457d9..e5a51404068 100644 --- a/tests/system/suite_QMLS/shared/qmls.py +++ b/tests/system/suite_QMLS/shared/qmls.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") def startQtCreatorWithNewAppAtQMLEditor(projectDir, projectName, line = None): startApplication("qtcreator" + SettingsPath) diff --git a/tests/system/suite_QMLS/tst_QMLS01/test.py b/tests/system/suite_QMLS/tst_QMLS01/test.py index ba01e09fa85..3e1c8d26b95 100644 --- a/tests/system/suite_QMLS/tst_QMLS01/test.py +++ b/tests/system/suite_QMLS/tst_QMLS01/test.py @@ -28,6 +28,7 @@ ############################################################################# source("../shared/qmls.py") +source("../../shared/suites_qtta.py") # go to proper line, make backup, type needed text def __beginTestSuggestions__(editorArea, lineText, textToType): diff --git a/tests/system/suite_QMLS/tst_QMLS02/test.py b/tests/system/suite_QMLS/tst_QMLS02/test.py index b0d2780275b..21abe1edfa9 100644 --- a/tests/system/suite_QMLS/tst_QMLS02/test.py +++ b/tests/system/suite_QMLS/tst_QMLS02/test.py @@ -28,6 +28,7 @@ ############################################################################# source("../shared/qmls.py") +source("../../shared/suites_qtta.py") def main(): editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Text {") diff --git a/tests/system/suite_QMLS/tst_QMLS03/test.py b/tests/system/suite_QMLS/tst_QMLS03/test.py index a46a13999cf..65fb9c6eded 100644 --- a/tests/system/suite_QMLS/tst_QMLS03/test.py +++ b/tests/system/suite_QMLS/tst_QMLS03/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") class ExpectedResult: def __init__(self, file, lineNumber, lineContent): diff --git a/tests/system/suite_SCOM/tst_SCOM01/test.py b/tests/system/suite_SCOM/tst_SCOM01/test.py index caf82c42e44..f5f359d9888 100644 --- a/tests/system/suite_SCOM/tst_SCOM01/test.py +++ b/tests/system/suite_SCOM/tst_SCOM01/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") # entry of test def main(): diff --git a/tests/system/suite_SCOM/tst_SCOM05/test.py b/tests/system/suite_SCOM/tst_SCOM05/test.py index 4161697a7aa..8431404aedb 100644 --- a/tests/system/suite_SCOM/tst_SCOM05/test.py +++ b/tests/system/suite_SCOM/tst_SCOM05/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") def verifyChangeProject(projectName): projItem = invokeContextMenuOnProject(projectName, 'Set "%s" as Active Project' % projectName) diff --git a/tests/system/suite_editors/tst_delete_externally/test.py b/tests/system/suite_editors/tst_delete_externally/test.py index 9b08012ba81..5e9393ee9d1 100644 --- a/tests/system/suite_editors/tst_delete_externally/test.py +++ b/tests/system/suite_editors/tst_delete_externally/test.py @@ -28,7 +28,6 @@ ############################################################################# source("../../shared/qtcreator.py") -source("../../shared/suites_qtta.py") global templateDir From ac6ea613e10fad8e29a9af2f18f4ce8e224aa220 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 28 Apr 2014 17:22:30 +0200 Subject: [PATCH 32/38] Doc: Inspect C++ Code Model function Change-Id: I710cb8e1944378c214d2b81ec4d1c1d1990f7d43 Reviewed-by: Nikolai Kosjar --- doc/src/editors/creator-coding-edit-mode.qdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/src/editors/creator-coding-edit-mode.qdoc b/doc/src/editors/creator-coding-edit-mode.qdoc index 4d7458abcdb..15c4ac71d0e 100644 --- a/doc/src/editors/creator-coding-edit-mode.qdoc +++ b/doc/src/editors/creator-coding-edit-mode.qdoc @@ -176,4 +176,18 @@ reparsed automatically. For all other files, you can use \gui{Tools} > \gui{C++} > \gui{Reparse Externally Changed Files} to update the code model. + + \section1 Inspecting the Code Model + + When you report a bug that is related to the C++ code model, the \QC + developers might ask you to write information about the internal state of + the code model into a log file and to deliver the file to them for + inspection. + + To view information about the C++ code model in the + \gui {C++ Code Model Inspector} dialog and write it to a log file, select + \gui Tools > \gui C++ > \gui {Inspect C++ Code Model} or press + \key {Ctrl+Shift+F12}. + + \QC generates the code model inspection log file in a temporary folder. */ From 76086123c8e1e53bfb30acca09b6e094e37d8b28 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 29 Apr 2014 17:37:00 +0200 Subject: [PATCH 33/38] Squish: Stabilize tst_git_clone Change-Id: I144d2a528e1a8cb4a75d16814a022dac8c36dfce Reviewed-by: Christian Stenger --- .../system/suite_tools/tst_git_clone/test.py | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/tests/system/suite_tools/tst_git_clone/test.py b/tests/system/suite_tools/tst_git_clone/test.py index 0783165e7b3..f526714b6a9 100644 --- a/tests/system/suite_tools/tst_git_clone/test.py +++ b/tests/system/suite_tools/tst_git_clone/test.py @@ -33,14 +33,14 @@ cloneUrl = "https://codereview.qt-project.org/p/qt-labs/jom" cloneDir = "myCloneOfJom" def verifyCloneLog(targetDir, canceled): - finish = findObject(":Git Repository Clone.Finish_QPushButton") - waitFor("canceled or finish.enabled", 30000) if canceled: summary = "Failed." else: + finish = findObject(":Git Repository Clone.Finish_QPushButton") + waitFor("finish.enabled", 30000) cloneLog = str(waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit").plainText) - if "fatal: The remote end hung up unexpectedly" in cloneLog: - test.warning("Remote end hung up unexpectedly.") + if "fatal: " in cloneLog: + test.warning("Cloning failed outside Creator.") return False # test for QTCREATORBUG-10112 test.compare(cloneLog.count("remote: Counting objects:"), 1) @@ -52,9 +52,17 @@ def verifyCloneLog(targetDir, canceled): test.verify(("'" + cloneDir + "'..." in cloneLog), "Searching for clone directory in clone log") summary = "Succeeded." - resultLabel = findObject(":Git Repository Clone.Result._QLabel") - test.verify(waitFor('str(resultLabel.text) == summary', 3000), - "Verifying expected result (%s)" % summary) + try: + resultLabel = findObject(":Git Repository Clone.Result._QLabel") + test.verify(waitFor('str(resultLabel.text) == summary', 3000), + "Verifying expected result (%s)" % summary) + except: + if canceled: + test.warning("Could not find resultLabel", + "Cloning might have failed before clicking 'Cancel'") + return object.exists(":Git Repository Clone_VcsBase::Internal::CheckoutWizardDialog") + else: + test.fail("Could not find resultLabel") return True def verifyVersionControlView(targetDir, canceled): @@ -101,7 +109,8 @@ def main(): # wait for cloning to have started waitFor('len(str(cloneLog.plainText)) > 20 + len(cloneDir)') clickButton(":Git Repository Clone.Cancel_QPushButton") - verifyCloneLog(targetDir, True) + if not verifyCloneLog(targetDir, True): + continue clickButton(":Git Repository Clone.Cancel_QPushButton") else: if not verifyCloneLog(targetDir, False): From 3f835d392574b074c8f497c6845aca710adcf99e Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 3 Apr 2014 11:23:21 -0400 Subject: [PATCH 34/38] CppTools: Fix race conditions in CppEditorSupport ...when accessing m_lastSemanticInfo by introducing semanticInfo() and setSemanticInfo(), which lock the appropriate mutex. Task-number: QTCREATORBUG-11367 Change-Id: If8ac6b8e6d576dfd1869c98a7ff7952ec97f530e Reviewed-by: Orgad Shaneh Reviewed-by: Erik Verbruggen Reviewed-by: Eike Ziller --- .../cpptools/cpptoolseditorsupport.cpp | 171 ++++++++---------- src/plugins/cpptools/cpptoolseditorsupport.h | 11 +- 2 files changed, 86 insertions(+), 96 deletions(-) diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index 01d05e143c7..1f18b1db31d 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -224,17 +224,12 @@ bool CppEditorSupport::initialized() SemanticInfo CppEditorSupport::recalculateSemanticInfo() { m_futureSemanticInfo.cancel(); - - SemanticInfo::Source source = currentSource(false); - recalculateSemanticInfoNow(source, /*emitSignalWhenFinished=*/ false); - return m_lastSemanticInfo; + return recalculateSemanticInfoNow(currentSource(false), /*emitSignalWhenFinished=*/ false); } Document::Ptr CppEditorSupport::lastSemanticInfoDocument() const { - QMutexLocker locker(&m_lastSemanticInfoLock); - - return m_lastSemanticInfo.doc; + return semanticInfo().doc; } void CppEditorSupport::recalculateSemanticInfoDetached(ForceReason forceReason) @@ -348,17 +343,13 @@ void CppEditorSupport::onDocumentUpdated(Document::Ptr doc) setExtraDiagnostics(key, doc->diagnosticMessages()); } - // update semantic info in a future - if (!m_initialized || - (m_textEditor->widget()->isVisible() - && (m_lastSemanticInfo.doc.isNull() - || m_lastSemanticInfo.doc->translationUnit()->ast() == 0 - || m_lastSemanticInfo.doc->fileName() != fileName()))) { + // Update semantic info if necessary + if (!m_initialized || (m_textEditor->widget()->isVisible() && !isSemanticInfoValid())) { m_initialized = true; - recalculateSemanticInfoDetached(ForceDueToMissingSemanticInfo); + recalculateSemanticInfoDetached(ForceDueToInvalidSemanticInfo); } - // notify the editor that the document is updated + // Notify the editor that the document is updated emit documentUpdated(); } @@ -368,34 +359,18 @@ void CppEditorSupport::startHighlighting(ForceReason forceReason) return; if (m_highlightingSupport->requiresSemanticInfo()) { - Snapshot snapshot; - Document::Ptr doc; - unsigned revision; - bool forced; - bool complete; - - { - QMutexLocker locker(&m_lastSemanticInfoLock); - snapshot = m_lastSemanticInfo.snapshot; - doc = m_lastSemanticInfo.doc; - revision = m_lastSemanticInfo.revision; - forced = m_lastSemanticInfo.forced; - complete = m_lastSemanticInfo.complete; - } - - if (doc.isNull()) + const SemanticInfo info = semanticInfo(); + if (info.doc.isNull()) return; - if (!m_lastHighlightOnCompleteSemanticInfo) - forced = true; - - if (!forced && m_lastHighlightRevision == revision) + const bool forced = info.forced || !m_lastHighlightOnCompleteSemanticInfo; + if (!forced && m_lastHighlightRevision == info.revision) return; m_highlighter.cancel(); - m_highlighter = m_highlightingSupport->highlightingFuture(doc, snapshot); - m_lastHighlightRevision = revision; - m_lastHighlightOnCompleteSemanticInfo = complete; + m_highlighter = m_highlightingSupport->highlightingFuture(info.doc, info.snapshot); + m_lastHighlightRevision = info.revision; + m_lastHighlightOnCompleteSemanticInfo = info.complete; emit highlighterStarted(&m_highlighter, m_lastHighlightRevision); } else { const unsigned revision = editorRevision(); @@ -496,8 +471,7 @@ void CppEditorSupport::onCurrentEditorChanged() m_editorVisible = editorVisible; if (editorVisible) { m_editorGCTimer->stop(); - QMutexLocker locker(&m_lastSemanticInfoLock); - if (!m_lastSemanticInfo.doc) + if (!lastSemanticInfoDocument()) updateDocumentNow(); } else { m_editorGCTimer->start(EditorHiddenGCTimeout); @@ -510,8 +484,7 @@ void CppEditorSupport::releaseResources() m_highlighter.cancel(); m_highlighter = QFuture(); snapshotUpdater()->releaseSnapshot(); - QMutexLocker semanticLocker(&m_lastSemanticInfoLock); - m_lastSemanticInfo = SemanticInfo(); + setSemanticInfo(SemanticInfo(), /*emitSignal=*/ false); m_lastHighlightOnCompleteSemanticInfo = true; } @@ -524,66 +497,54 @@ SemanticInfo::Source CppEditorSupport::currentSource(bool force) force); } -void CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::Source &source, - bool emitSignalWhenFinished, - FuturizedTopLevelDeclarationProcessor *processor) +SemanticInfo CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::Source &source, + bool emitSignalWhenFinished, + FuturizedTopLevelDeclarationProcessor *processor) { - SemanticInfo semanticInfo; + const SemanticInfo lastSemanticInfo = semanticInfo(); + SemanticInfo newSemanticInfo; - { - QMutexLocker locker(&m_lastSemanticInfoLock); - semanticInfo.revision = m_lastSemanticInfo.revision; - semanticInfo.forced = source.force; + newSemanticInfo.forced = source.force; + newSemanticInfo.revision = source.revision; - if (!source.force - && m_lastSemanticInfo.complete - && m_lastSemanticInfo.revision == source.revision - && m_lastSemanticInfo.doc - && m_lastSemanticInfo.doc->translationUnit()->ast() - && m_lastSemanticInfo.doc->fileName() == source.fileName) { - semanticInfo.snapshot = m_lastSemanticInfo.snapshot; // ### TODO: use the new snapshot. - semanticInfo.doc = m_lastSemanticInfo.doc; - } - } + // Try to reuse as much as possible from the last semantic info + if (!source.force + && lastSemanticInfo.complete + && lastSemanticInfo.revision == source.revision + && lastSemanticInfo.doc + && lastSemanticInfo.doc->translationUnit()->ast() + && lastSemanticInfo.doc->fileName() == source.fileName) { + newSemanticInfo.snapshot = lastSemanticInfo.snapshot; // ### TODO: use the new snapshot. + newSemanticInfo.doc = lastSemanticInfo.doc; - if (semanticInfo.doc.isNull()) { + // Otherwise reprocess document + } else { const QSharedPointer snapshotUpdater = snapshotUpdater_internal(); - QTC_ASSERT(snapshotUpdater, return); - semanticInfo.snapshot = snapshotUpdater->snapshot(); - - if (semanticInfo.snapshot.contains(source.fileName)) { - Document::Ptr doc = semanticInfo.snapshot.preprocessedDocument(source.code, - source.fileName); - if (processor) - doc->control()->setTopLevelDeclarationProcessor(processor); - doc->check(); - if (processor && processor->isCanceled()) - semanticInfo.complete = false; - semanticInfo.doc = doc; - } else { - return; - } + QTC_ASSERT(snapshotUpdater, return newSemanticInfo); + newSemanticInfo.snapshot = snapshotUpdater->snapshot(); + QTC_ASSERT(newSemanticInfo.snapshot.contains(source.fileName), return newSemanticInfo); + Document::Ptr doc = newSemanticInfo.snapshot.preprocessedDocument(source.code, + source.fileName); + if (processor) + doc->control()->setTopLevelDeclarationProcessor(processor); + doc->check(); + if (processor && processor->isCanceled()) + newSemanticInfo.complete = false; + newSemanticInfo.doc = doc; } - if (semanticInfo.doc) { - TranslationUnit *translationUnit = semanticInfo.doc->translationUnit(); - AST * ast = translationUnit->ast(); + // Update local uses for the document + TranslationUnit *translationUnit = newSemanticInfo.doc->translationUnit(); + AST *ast = translationUnit->ast(); + FunctionDefinitionUnderCursor functionDefinitionUnderCursor(newSemanticInfo.doc->translationUnit()); + const LocalSymbols useTable(newSemanticInfo.doc, + functionDefinitionUnderCursor(ast, source.line, source.column)); + newSemanticInfo.localUses = useTable.uses; - FunctionDefinitionUnderCursor functionDefinitionUnderCursor(semanticInfo.doc->translationUnit()); - DeclarationAST *currentFunctionDefinition = functionDefinitionUnderCursor(ast, source.line, source.column); + // Update semantic info + setSemanticInfo(newSemanticInfo, emitSignalWhenFinished); - const LocalSymbols useTable(semanticInfo.doc, currentFunctionDefinition); - semanticInfo.revision = source.revision; - semanticInfo.localUses = useTable.uses; - } - - { - QMutexLocker locker(&m_lastSemanticInfoLock); - m_lastSemanticInfo = semanticInfo; - } - - if (emitSignalWhenFinished) - emit semanticInfoUpdated(semanticInfo); + return newSemanticInfo; } void CppEditorSupport::recalculateSemanticInfoDetached_helper(QFutureInterface &future, SemanticInfo::Source source) @@ -592,6 +553,30 @@ void CppEditorSupport::recalculateSemanticInfoDetached_helper(QFutureInterfacetranslationUnit()->ast() + && document->fileName() == fileName(); +} + +SemanticInfo CppEditorSupport::semanticInfo() const +{ + QMutexLocker locker(&m_lastSemanticInfoLock); + return m_lastSemanticInfo; +} + +void CppEditorSupport::setSemanticInfo(const SemanticInfo &semanticInfo, bool emitSignal) +{ + { + QMutexLocker locker(&m_lastSemanticInfoLock); + m_lastSemanticInfo = semanticInfo; + } + if (emitSignal) + emit semanticInfoUpdated(semanticInfo); +} + QSharedPointer CppEditorSupport::snapshotUpdater_internal() const { QMutexLocker locker(&m_snapshotUpdaterLock); diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h index f452304bfb1..e0b6f9dddc3 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.h +++ b/src/plugins/cpptools/cpptoolseditorsupport.h @@ -121,7 +121,7 @@ public: enum ForceReason { NoForce, - ForceDueToMissingSemanticInfo, + ForceDueToInvalidSemanticInfo, ForceDueEditorRequest }; @@ -192,11 +192,16 @@ private: }; SemanticInfo::Source currentSource(bool force); - void recalculateSemanticInfoNow(const SemanticInfo::Source &source, bool emitSignalWhenFinished, - FuturizedTopLevelDeclarationProcessor *processor = 0); + SemanticInfo recalculateSemanticInfoNow(const SemanticInfo::Source &source, + bool emitSignalWhenFinished, + FuturizedTopLevelDeclarationProcessor *processor = 0); void recalculateSemanticInfoDetached_helper(QFutureInterface &future, SemanticInfo::Source source); + bool isSemanticInfoValid() const; + SemanticInfo semanticInfo() const; + void setSemanticInfo(const SemanticInfo &semanticInfo, bool emitSignal = true); + QSharedPointer snapshotUpdater_internal() const; void setSnapshotUpdater_internal(const QSharedPointer &updater); From 0e43633183ad9bbf90424faef51dc7af952687d8 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 30 Apr 2014 14:53:12 +0200 Subject: [PATCH 35/38] QmlDesigner.ItemLibrary: Give ListView delegates a width This ensures the view also works if orientation is set to horizontal. Task-number: QTCREATORBUG-12155 Change-Id: I3f558bb023850442fae7e8e50d5f09524f12108c Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/qtquickplugin/source/listview.qml | 1 + src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/qmldesigner/qtquickplugin/source/listview.qml b/src/plugins/qmldesigner/qtquickplugin/source/listview.qml index 6c70227a7d7..b270c047ab5 100644 --- a/src/plugins/qmldesigner/qtquickplugin/source/listview.qml +++ b/src/plugins/qmldesigner/qtquickplugin/source/listview.qml @@ -52,6 +52,7 @@ ListView { } delegate: Item { + width: 80 height: 40 x: 5 Row { diff --git a/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml index b3e8c93d2d3..013bfa69833 100644 --- a/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml +++ b/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml @@ -52,6 +52,7 @@ ListView { } delegate: Item { + width: 80 height: 40 x: 5 Row { From de594fdee0974f6566ed1afec757abf8ff2b0873 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Tue, 8 Apr 2014 11:36:03 +0200 Subject: [PATCH 36/38] qmljs: split scan function allows to more easily scan the various qml dialects Change-Id: I9f8c44459e05e4658d3814c624e0f07762c83279 Reviewed-by: Thomas Hartmann --- src/libs/qmljs/qmljsmodelmanagerinterface.cpp | 66 ++++++++++--------- src/libs/qmljs/qmljsmodelmanagerinterface.h | 1 + 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index c7acf47495f..84ad6ad0ced 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -963,6 +963,41 @@ QmlLanguageBundles ModelManagerInterface::extendedBundles() const return m_extendedBundles; } +void ModelManagerInterface::maybeScan(const QStringList &importPaths, + Language::Enum defaultLanguage) +{ + QStringList pathToScan; + { + QMutexLocker l(&m_mutex); + foreach (QString importPath, importPaths) + if (!m_scannedPaths.contains(importPath)) { + pathToScan.append(importPath); + } + } + + if (pathToScan.count() > 1) { + QFuture result = QtConcurrent::run(&ModelManagerInterface::importScan, + workingCopyInternal(), pathToScan, + this, defaultLanguage, + true); + + if (m_synchronizer.futures().size() > 10) { + QList > futures = m_synchronizer.futures(); + + m_synchronizer.clearFutures(); + + foreach (const QFuture &future, futures) { + if (! (future.isFinished() || future.isCanceled())) + m_synchronizer.addFuture(future); + } + } + + m_synchronizer.addFuture(result); + + addTaskInternal(result, tr("QML import scan"), Constants::TASK_IMPORT_SCAN); + } +} + void ModelManagerInterface::updateImportPaths() { QStringList allImportPaths; @@ -1026,36 +1061,7 @@ void ModelManagerInterface::updateImportPaths() if (!m_shouldScanImports) return; - QStringList pathToScan; - { - QMutexLocker l(&m_mutex); - foreach (QString importPath, allImportPaths) - if (!m_scannedPaths.contains(importPath)) { - pathToScan.append(importPath); - } - } - - if (pathToScan.count() > 1) { - QFuture result = QtConcurrent::run(&ModelManagerInterface::importScan, - workingCopyInternal(), pathToScan, - this, Language::Qml, - true); - - if (m_synchronizer.futures().size() > 10) { - QList > futures = m_synchronizer.futures(); - - m_synchronizer.clearFutures(); - - foreach (const QFuture &future, futures) { - if (! (future.isFinished() || future.isCanceled())) - m_synchronizer.addFuture(future); - } - } - - m_synchronizer.addFuture(result); - - addTaskInternal(result, tr("QML import scan"), Constants::TASK_IMPORT_SCAN); - } + maybeScan(allImportPaths, Language::Qml); } ModelManagerInterface::ProjectInfo ModelManagerInterface::defaultProjectInfo() const diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h index 7b018ab9ff8..0dc2cb7142b 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.h +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h @@ -244,6 +244,7 @@ protected: CPlusPlus::Snapshot snapshot, QHash > documents); + void maybeScan(const QStringList &importPaths, Language::Enum defaultLanguage); void updateImportPaths(); void loadQmlTypeDescriptionsInternal(const QString &path); From ca9a316cfdf053d776134acc80b10542ddd8baab Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 30 Apr 2014 09:39:30 +0200 Subject: [PATCH 37/38] Squish: Test automatic saving of files before build Task-number: QTCREATORBUG-12014 Change-Id: I20080ac89d63c1d0a00cb18b31f5539bf2b4a554 Reviewed-by: Christian Stenger --- tests/system/objects.map | 4 + tests/system/suite_general/suite.conf | 2 +- .../tst_save_before_build/test.py | 73 +++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 tests/system/suite_general/tst_save_before_build/test.py diff --git a/tests/system/objects.map b/tests/system/objects.map index 05e82c4f07c..227d63ddf8e 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -35,6 +35,7 @@ :Behavior.Autocomplete common prefix_QCheckBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='partiallyComplete' text='Autocomplete common prefix' type='QCheckBox' visible='1'} :Behavior.completionTrigger_QComboBox {container=':CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox' name='completionTrigger' type='QComboBox' visible='1'} :Breakpoints_Debugger::Internal::BreakTreeView {container=':DebugModeWidget.Breakpoints_QDockWidget' type='Debugger::Internal::BreakTreeView' unnamed='1' visible='1'} +:Build and Run.Save all files before build_QCheckBox {name='saveAllFilesCheckBox' type='QCheckBox' visible='1'} :BuildAndRun_QTreeView {container=':qt_tabwidget_stackedwidget_QWidget' type='QTreeView' unnamed='1' visible='1'} :CMake Wizard.Cancel_QPushButton {text='Cancel' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'} :CMake Wizard.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'} @@ -189,6 +190,9 @@ :Revert to Saved_QMessageBox {text?='You will lose your current changes if you proceed reverting*' type='QMessageBox' unnamed='1' visible='1'} :RunSettingsEnvironmentDetails_Utils::DetailsButton {leftWidget=':RunSettingsUseBuildEnvironment_QLabel' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :RunSettingsUseBuildEnvironment_QLabel {text~='Us(e|ing) Build Environment' type='QLabel' unnamed='1' visible='1'} +:Save Changes.Always save files before build_QCheckBox {name='saveBeforeBuildCheckBox' text='Always save files before build' type='QCheckBox' visible='1' window=':Save Changes_Core::Internal::SaveItemsDialog'} +:Save Changes.Save All_QPushButton {text='Save All' type='QPushButton' unnamed='1' visible='1' window=':Save Changes_Core::Internal::SaveItemsDialog'} +:Save Changes_Core::Internal::SaveItemsDialog {name='Core__Internal__SaveItemsDialog' type='Core::Internal::SaveItemsDialog' visible='1' windowTitle='Save Changes'} :Select signal.signalList_QTreeWidget {container=':Go to slot.Select signal_QGroupBox' name='signalList' type='QTreeWidget' visible='1'} :Send to Codepaster.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Send to Codepaster_CodePaster::PasteView'} :Send to Codepaster.Description:_QLabel {name='descriptionLabel' text='Description:' type='QLabel' visible='1' window=':Send to Codepaster_CodePaster::PasteView'} diff --git a/tests/system/suite_general/suite.conf b/tests/system/suite_general/suite.conf index 412a7bcdded..e5e8f93c064 100644 --- a/tests/system/suite_general/suite.conf +++ b/tests/system/suite_general/suite.conf @@ -7,6 +7,6 @@ HOOK_SUB_PROCESSES=false IMPLICITAUTSTART=0 LANGUAGE=Python OBJECTMAP=../objects.map -TEST_CASES=tst_build_speedcrunch tst_cmake_speedcrunch tst_create_proj_wizard tst_default_settings tst_installed_languages tst_openqt_creator tst_rename_file tst_session_handling +TEST_CASES=tst_build_speedcrunch tst_cmake_speedcrunch tst_create_proj_wizard tst_default_settings tst_installed_languages tst_openqt_creator tst_rename_file tst_save_before_build tst_session_handling VERSION=2 WRAPPERS=Qt diff --git a/tests/system/suite_general/tst_save_before_build/test.py b/tests/system/suite_general/tst_save_before_build/test.py new file mode 100644 index 00000000000..71c78390171 --- /dev/null +++ b/tests/system/suite_general/tst_save_before_build/test.py @@ -0,0 +1,73 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## Contact: http://www.qt-project.org/legal +## +## This file is part of Qt Creator. +## +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and Digia. For licensing terms and +## conditions see http://qt.digia.com/licensing. For further information +## use the contact form at http://qt.digia.com/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Digia gives you certain additional +## rights. These rights are described in the Digia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +############################################################################# + +source("../../shared/qtcreator.py") + +def ensureSaveBeforeBuildChecked(shouldBeChecked): + invokeMenuItem("Tools", "Options...") + waitForObjectItem(":Options_QListView", "Build & Run") + clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton) + clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "General") + if test.compare(waitForObject(":Build and Run.Save all files before build_QCheckBox").checked, + shouldBeChecked, "'Save all files before build' should be %s" % str(shouldBeChecked)): + clickButton(waitForObject(":Options.Cancel_QPushButton")) + else: + ensureChecked(":Build and Run.Save all files before build_QCheckBox", shouldBeChecked) + clickButton(waitForObject(":Options.OK_QPushButton")) + +def main(): + startApplication("qtcreator" + SettingsPath) + if not startedWithoutPluginError(): + return + ensureSaveBeforeBuildChecked(False) + # create qt quick application + createNewQtQuickApplication(tempDir(), "SampleApp", qtQuickVersion="2.2") + for expectDialog in [True, False]: + files = ["SampleApp.SampleApp\\.pro", + "SampleApp.deployment.deployment\\.pri", + "SampleApp.Sources.main\\.cpp", + "SampleApp.Resources.qml\.qrc./.main\\.qml"] + for i, file in enumerate(files): + if not openDocument(file): + test.fatal("Could not open file '%s'" % simpleFileName(file)) + continue + test.log("Changing file '%s'" % simpleFileName(file)) + typeLines(getEditorForFileSuffix(file), "") + # try to compile + clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")) + try: + ensureChecked(":Save Changes.Always save files before build_QCheckBox", + i == len(files) - 1, 5000) # At the last iteration, check the box + clickButton(waitForObject(":Save Changes.Save All_QPushButton")) + test.verify(expectDialog, "The 'Save Changes' dialog was shown.") + except: + test.verify(not expectDialog, "The 'Save Changes' dialog was not shown.") + waitForCompile() + ensureSaveBeforeBuildChecked(True) + invokeMenuItem("File", "Exit") From 4b2cc015f867941a7ae35a38d81ec9daa5616711 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 17 Apr 2014 13:26:27 +0200 Subject: [PATCH 38/38] Squish: Make sure correct output panes are used We expect the first five toggle buttons for output panes to be visible by default. Additionally added buttons will have the property 'occurrences' with a value depending on their position - not their label. Using the menubar for these additional output panes is safer. Change-Id: Ie58f8dd56ec35bfa9f6bba871aa807e4b1507c75 Reviewed-by: Robert Loehning --- tests/system/objects.map | 2 -- tests/system/shared/utils.py | 18 +++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/system/objects.map b/tests/system/objects.map index 227d63ddf8e..4dc2c30b096 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -149,7 +149,6 @@ :Qt Creator_Core::Internal::CommandComboBox {type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' visible='1' windowTitle?='*Qt Creator'} :Qt Creator_Core::Internal::NavComboBox {type='Core::Internal::NavComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_Core::Internal::OutputPaneManageButton {type='Core::Internal::OutputPaneManageButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Core::Internal::ProgressBar {type='Core::Internal::ProgressBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} @@ -174,7 +173,6 @@ :Qt Creator_TextEditor::PlainTextEditorWidget {type='TextEditor::PlainTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit {container=':Qt Creator_Utils::NavigationTreeView' type='QExpandingLineEdit' unnamed='1' visible='1'} -:Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton {occurrence='6' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Gui Application.Form file:_QLabel {name='formLabel' text='Form file:' type='QLabel' visible='1' window=':Qt Gui Application_QmakeProjectManager::Internal::GuiAppWizardDialog'} :Qt Gui Application.Header file:_QLabel {name='headerLabel' text='Header file:' type='QLabel' visible='1' window=':Qt Gui Application_QmakeProjectManager::Internal::GuiAppWizardDialog'} :Qt Gui Application.Source file:_QLabel {name='sourceLabel' text='Source file:' type='QLabel' visible='1' window=':Qt Gui Application_QmakeProjectManager::Internal::GuiAppWizardDialog'} diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 1a7b4eb3099..03efc084cbb 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -633,13 +633,17 @@ def verifyItemOrder(items, text): lastIndex = index def openVcsLog(): - if not object.exists(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"): - clickButton(waitForObject(":Qt Creator_Core::Internal::OutputPaneManageButton")) - if platform.system() == 'Darwin': - waitFor('macHackActivateContextMenuItem("Version Control")', 6000) - else: - activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Version Control")) - ensureChecked(waitForObject(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton")) + try: + foundObj = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}", 2000) + if className(foundObj) != 'QPlainTextEdit': + raise Exception("Found derived class, but not a pure QPlainTextEdit.") + except: + invokeMenuItem("Window", "Output Panes", "Version Control") + +def openGeneralMessages(): + if not object.exists(":Qt Creator_Core::OutputWindow"): + invokeMenuItem("Window", "Output Panes", "General Messages") # function that retrieves a specific child object by its class # this is sometimes the best way to avoid using waitForObject() on objects that