From d886285ff0f9931b39a6069bc5260cf2148757eb Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 31 Jan 2019 15:45:28 +0100 Subject: [PATCH 01/13] AutoTest: Fix handling of empty tests If an item of type MessageCaseStart is going to be updated it might end up in still getting no icon if none of its children is enforcing a change. Change-Id: I7ec6d114c547189a02744f064d4c04cdf31a03d7 Reviewed-by: David Schulz --- src/plugins/autotest/testresultmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotest/testresultmodel.cpp b/src/plugins/autotest/testresultmodel.cpp index a694ba8c228..cbd9d5db9af 100644 --- a/src/plugins/autotest/testresultmodel.cpp +++ b/src/plugins/autotest/testresultmodel.cpp @@ -141,7 +141,7 @@ void TestResultItem::updateResult(bool &changed, Result::Type addedChildType) ? Result::MessageTestCaseSuccess : old; break; default: - return; + break; } changed = old != newResult; if (changed) From 59de3fcb6416dc0387e85a1852d1226ae507b7fe Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Thu, 20 Dec 2018 18:40:34 +0100 Subject: [PATCH 02/13] Android: Fix gdbserver upload for Windows when using Armv8 arch The gdbserver is not uploaded to device for armv7 as lib symlink is available and we can use the gdbserver packaged with the apk Task-number: QTCREATORBUG-21317 Change-Id: I263eb48bbf3cf05b969db934a928185dba10373b Reviewed-by: Eike Ziller Reviewed-by: hjk --- src/plugins/android/androidrunnerworker.cpp | 90 +++++++++++++++------ src/plugins/android/androidrunnerworker.h | 6 +- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index a4b6772f610..37191848fdc 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -53,6 +53,7 @@ namespace { Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker", QtWarningMsg) +static const int GdbTempFileMaxCounter = 20; } using namespace std; @@ -274,17 +275,58 @@ bool AndroidRunnerWorker::runAdb(const QStringList &args, int timeoutS, const QB return success; } -bool AndroidRunnerWorker::uploadFile(const QString &from, const QString &to, const QString &flags) +bool AndroidRunnerWorker::uploadGdbServer() { - QFile f(from); - if (!f.open(QIODevice::ReadOnly)) + // Push the gdbserver to temp location and then to package dir. + // the files can't be pushed directly to package because of permissions. + qCDebug(androidRunWorkerLog) << "Uploading GdbServer"; + + bool foundUnique = true; + auto cleanUp = [this, &foundUnique] (QString *p) { + if (foundUnique && !runAdb({"shell", "rm", "-f", *p})) + qCDebug(androidRunWorkerLog) << "Gdbserver cleanup failed."; + delete p; + }; + std::unique_ptr + tempGdbServerPath(new QString("/data/local/tmp/%1"), cleanUp); + + // Get a unique temp file name for gdbserver copy + int count = 0; + while (deviceFileExists(tempGdbServerPath->arg(++count))) { + if (count > GdbTempFileMaxCounter) { + qCDebug(androidRunWorkerLog) << "Can not get temporary file name"; + foundUnique = false; + return false; + } + } + *tempGdbServerPath = tempGdbServerPath->arg(count); + + // Copy gdbserver to temp location + if (!runAdb({"push", m_gdbserverPath , *tempGdbServerPath})) { + qCDebug(androidRunWorkerLog) << "Gdbserver upload to temp directory failed"; return false; - runAdb({"shell", "run-as", m_packageName, "rm", to}); - const QByteArray data = f.readAll(); - const bool res = runAdb({"shell", "run-as", m_packageName, QString("sh -c 'base64 -d > %1'").arg(to)}, 60, data.toBase64()); - if (!res || m_lastRunAdbRawOutput.contains("base64: not found")) + } + + // Copy gdbserver from temp location to app directory + if (!runAdb({"shell", "run-as", m_packageName, "cp" , *tempGdbServerPath, "./gdbserver"})) { + qCDebug(androidRunWorkerLog) << "Gdbserver copy from temp directory failed"; return false; - return runAdb({"shell", "run-as", m_packageName, "chmod", flags, to}); + } + QTC_ASSERT(runAdb({"shell", "run-as", m_packageName, "chmod", "+x", "./gdbserver"}), + qCDebug(androidRunWorkerLog) << "Gdbserver chmod +x failed."); + return true; +} + +bool AndroidRunnerWorker::deviceFileExists(const QString &filePath) +{ + return runAdb({"shell", "ls", filePath, "2>/dev/null"}) + && !m_lastRunAdbRawOutput.trimmed().isEmpty(); +} + +bool AndroidRunnerWorker::packageFileExists(const QString &filePath) +{ + return runAdb({"shell", "run-as", m_packageName, "ls", filePath, "2>/dev/null"}) + && !m_lastRunAdbRawOutput.trimmed().isEmpty(); } void AndroidRunnerWorker::adbKill(qint64 pid) @@ -428,29 +470,31 @@ void AndroidRunnerWorker::asyncStartHelper() // e.g. on Android 8 with NDK 10e runAdb({"shell", "run-as", m_packageName, "chmod", "a+x", packageDir}); - QString gdbServerExecutable; + QString gdbServerExecutable = "gdbserver"; QString gdbServerPrefix = "./lib/"; - if (m_gdbserverPath.isEmpty() || !uploadFile(m_gdbserverPath, "gdbserver")) { - // upload failed - check for old devices - if (runAdb({"shell", "run-as", m_packageName, "ls", "lib/"})) { - for (const auto &line: m_lastRunAdbRawOutput.split('\n')) { - if (line.indexOf("gdbserver") != -1/* || line.indexOf("lldb-server") != -1*/) { - gdbServerExecutable = QString::fromUtf8(line.trimmed()); - break; - } - } - } - if (gdbServerExecutable.isEmpty()) { + auto findGdbServer = [this, &gdbServerExecutable, gdbServerPrefix](const QString& gdbEx) { + if (!packageFileExists(gdbServerPrefix + gdbEx)) + return false; + gdbServerExecutable = gdbEx; + return true; + }; + + if (!findGdbServer("gdbserver") && !findGdbServer("libgdbserver.so")) { + // Armv8. symlink lib is not available. + // Kill the previous instances of gdbserver. Do this before copying the gdbserver. + runAdb({"shell", "run-as", m_packageName, "killall", gdbServerExecutable}); + if (!m_gdbserverPath.isEmpty() && uploadGdbServer()) { + gdbServerPrefix = "./"; + } else { emit remoteProcessFinished(tr("Cannot find/copy C++ debug server.")); return; } } else { - gdbServerPrefix = "./"; - gdbServerExecutable = "gdbserver"; + qCDebug(androidRunWorkerLog) << "Found GDB server under ./lib"; + runAdb({"shell", "run-as", m_packageName, "killall", gdbServerExecutable}); } QString gdbServerSocket = packageDir + "/debug-socket"; - runAdb({"shell", "run-as", m_packageName, "killall", gdbServerExecutable}); runAdb({"shell", "run-as", m_packageName, "rm", gdbServerSocket}); std::unique_ptr gdbServerProcess(new QProcess, deleter); diff --git a/src/plugins/android/androidrunnerworker.h b/src/plugins/android/androidrunnerworker.h index 18639683ae5..39b25a1a292 100644 --- a/src/plugins/android/androidrunnerworker.h +++ b/src/plugins/android/androidrunnerworker.h @@ -48,7 +48,6 @@ public: ~AndroidRunnerWorker() override; bool adbShellAmNeedsQuotes(); bool runAdb(const QStringList &args, int timeoutS = 10, const QByteArray &writeData = {}); - bool uploadFile(const QString &from, const QString &to, const QString &flags = QString("+x")); void adbKill(qint64 pid); QStringList selector() const; void forceStop(); @@ -71,8 +70,11 @@ signals: void remoteOutput(const QString &output); void remoteErrorOutput(const QString &output); -protected: +private: void asyncStartHelper(); + bool deviceFileExists(const QString &filePath); + bool packageFileExists(const QString& filePath); + bool uploadGdbServer(); enum class JDBState { Idle, From 5e054115ec61ad1ed7c70479323a38ad9e2af93b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 1 Feb 2019 09:25:15 +0100 Subject: [PATCH 03/13] QML: Fix auto-insertion of single quote After inserting a matching single quote it should not add yet another single quote when typing one explicitly. Change-Id: I568f02e4edbb78ef11665bb7f4a9f3b91cf9b887 Reviewed-by: Ulf Hermann Reviewed-by: David Schulz --- src/plugins/qmljseditor/qmljsautocompleter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmljseditor/qmljsautocompleter.cpp b/src/plugins/qmljseditor/qmljsautocompleter.cpp index e50c268d2ca..ac39e98f900 100644 --- a/src/plugins/qmljseditor/qmljsautocompleter.cpp +++ b/src/plugins/qmljseditor/qmljsautocompleter.cpp @@ -232,7 +232,7 @@ bool AutoCompleter::contextAllowsAutoQuotes(const QTextCursor &cursor, } // never insert ' into string literals, it adds spurious ' when writing contractions - if (textToInsert.at(0) == QLatin1Char('\'')) + if (textToInsert.at(0) == QLatin1Char('\'') && quote != '\'') return false; if (textToInsert.at(0) != quote || isCompleteStringLiteral(tokenText)) From 0aa8a98afa964d9ebf819d157ed9d600bff3633f Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 22 Jan 2019 15:54:09 +0100 Subject: [PATCH 04/13] Help: Disable middle-mouse click outside of help mode Since only help mode supports it. Fixes: QTCREATORBUG-20554 Change-Id: Ida8cee01c0ab0c8fc5ffacf3c4521feeadf65995 Reviewed-by: David Schulz --- src/plugins/help/textbrowserhelpviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/help/textbrowserhelpviewer.cpp b/src/plugins/help/textbrowserhelpviewer.cpp index 930df58207b..6f47f000cbc 100644 --- a/src/plugins/help/textbrowserhelpviewer.cpp +++ b/src/plugins/help/textbrowserhelpviewer.cpp @@ -432,7 +432,8 @@ void TextBrowserHelpWidget::mouseReleaseEvent(QMouseEvent *e) bool controlPressed = e->modifiers() & Qt::ControlModifier; const QString link = linkAt(e->pos()); - if ((controlPressed || e->button() == Qt::MidButton) && !link.isEmpty()) { + if (m_parent->isActionVisible(HelpViewer::Action::NewPage) + && (controlPressed || e->button() == Qt::MidButton) && !link.isEmpty()) { emit m_parent->newPageRequested(QUrl(link)); return; } From 18f1a8d759073e4d8cddfaa99a77c72f21efa5c3 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 31 Jan 2019 12:31:08 +0100 Subject: [PATCH 05/13] Debugger: Fix gdb detaching Too much cleverness in python command detection: "attach" is parsed as possible Python command. Make it explicit that it is not. Task-number: QTCREATORBUG-21908 Change-Id: I68444bccfb485ef1befe81b4b6b13243c2c8a500 Reviewed-by: Eike Ziller Reviewed-by: Christian Stenger --- src/plugins/debugger/gdb/gdbengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 2ecbf285349..283850d2397 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1736,7 +1736,7 @@ void GdbEngine::detachDebugger() { CHECK_STATE(InferiorStopOk); QTC_CHECK(runParameters().startMode != AttachCore); - DebuggerCommand cmd("detach", ExitRequest); + DebuggerCommand cmd("detach", NativeCommand | ExitRequest); cmd.callback = [this](const DebuggerResponse &) { CHECK_STATE(InferiorStopOk); notifyInferiorExited(); From 85696d7018d90b49e1d3229e6f32ace037b5b070 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 3 Feb 2019 22:51:04 +0200 Subject: [PATCH 06/13] LSP: Fix compiler warnings Change-Id: I33733cbce809d6e66c46d2eed7b20ff0eb4badae Reviewed-by: David Schulz --- src/plugins/languageclient/baseclient.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/languageclient/baseclient.cpp b/src/plugins/languageclient/baseclient.cpp index 2852fa1b432..02f2448521d 100644 --- a/src/plugins/languageclient/baseclient.cpp +++ b/src/plugins/languageclient/baseclient.cpp @@ -562,8 +562,9 @@ void BaseClient::handleCodeActionResponse(const CodeActionRequest::Response &res for (const Utils::variant &item : *list) { if (auto action = Utils::get_if(&item)) updateCodeActionRefactoringMarker(this, *action, uri); - else if (auto command = Utils::get_if(&item)) - ; // todo + else if (auto command = Utils::get_if(&item)) { + Q_UNUSED(command); // todo + } } } } From d07e5b2a466484511aec42dc1b7e6a52afb99a55 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 31 Jan 2019 12:14:52 +0100 Subject: [PATCH 07/13] HelpItem: Remove senseless constructor If we are already passing a URL, we do not need to pass a map of URLs in addition. We already know exactly which URL we want. Change-Id: I955e03a611667733e9734e7996725d51857c71b1 Reviewed-by: David Schulz --- src/plugins/coreplugin/helpitem.cpp | 10 ---------- src/plugins/coreplugin/helpitem.h | 2 -- src/plugins/qmljseditor/qmljshoverhandler.cpp | 3 +-- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/plugins/coreplugin/helpitem.cpp b/src/plugins/coreplugin/helpitem.cpp index a4181b8beb9..130c1905125 100644 --- a/src/plugins/coreplugin/helpitem.cpp +++ b/src/plugins/coreplugin/helpitem.cpp @@ -51,16 +51,6 @@ HelpItem::HelpItem(const QUrl &url, const QString &docMark, HelpItem::Category c , m_category(category) {} -HelpItem::HelpItem(const QUrl &url, - const QString &docMark, - HelpItem::Category category, - const QMap &helpLinks) - : m_helpUrl(url) - , m_docMark(docMark) - , m_category(category) - , m_helpLinks(helpLinks) -{} - HelpItem::HelpItem(const QString &helpId, const QString &docMark, Category category) : HelpItem(QStringList(helpId), docMark, category) {} diff --git a/src/plugins/coreplugin/helpitem.h b/src/plugins/coreplugin/helpitem.h index 9ac0fd0c353..8b727439d5c 100644 --- a/src/plugins/coreplugin/helpitem.h +++ b/src/plugins/coreplugin/helpitem.h @@ -59,8 +59,6 @@ public: HelpItem(const QStringList &helpIds, const QString &docMark, Category category); explicit HelpItem(const QUrl &url); HelpItem(const QUrl &url, const QString &docMark, Category category); - HelpItem(const QUrl &url, const QString &docMark, Category category, - const QMap &helpLinks); void setHelpUrl(const QUrl &url); const QUrl &helpUrl() const; diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp index d7d4892b9a8..53b3422c80e 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.cpp +++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp @@ -185,8 +185,7 @@ bool QmlJSHoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Docum // Use the URL, to disambiguate different versions const HelpItem helpItem(filteredUrlMap.first(), qName.join(QLatin1Char('.')), - HelpItem::QmlComponent, - filteredUrlMap); + HelpItem::QmlComponent); setLastHelpItemIdentified(helpItem); return true; } From 92ddaea43edc761aad32648de61187186a665711 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 1 Feb 2019 12:11:57 +0100 Subject: [PATCH 08/13] Help: Make a difference between "empty" and "valid" Context help should take the HelpItem from the tool tip if it was set, even if it isn't valid. Similarly, if the help item was set on the text editor, it should not ask the hover handlers (again), even if that is invalid Change-Id: I481f8ad73c3cf8fdbb90f737ab36b4e380467026 Reviewed-by: David Schulz --- src/plugins/coreplugin/helpitem.cpp | 5 +++++ src/plugins/coreplugin/helpitem.h | 1 + src/plugins/help/helpplugin.cpp | 2 +- src/plugins/texteditor/texteditor.cpp | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/helpitem.cpp b/src/plugins/coreplugin/helpitem.cpp index 130c1905125..ec5ead12e07 100644 --- a/src/plugins/coreplugin/helpitem.cpp +++ b/src/plugins/coreplugin/helpitem.cpp @@ -95,6 +95,11 @@ void HelpItem::setCategory(Category cat) HelpItem::Category HelpItem::category() const { return m_category; } +bool HelpItem::isEmpty() const +{ + return m_helpUrl.isEmpty() && m_helpIds.isEmpty(); +} + bool HelpItem::isValid() const { if (m_helpUrl.isEmpty() && m_helpIds.isEmpty()) diff --git a/src/plugins/coreplugin/helpitem.h b/src/plugins/coreplugin/helpitem.h index 8b727439d5c..794eaca8f31 100644 --- a/src/plugins/coreplugin/helpitem.h +++ b/src/plugins/coreplugin/helpitem.h @@ -72,6 +72,7 @@ public: void setCategory(Category cat); Category category() const; + bool isEmpty() const; bool isValid() const; QString extractContent(bool extended) const; diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index cfaec938e71..df16af3101c 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -652,7 +652,7 @@ void HelpPluginPrivate::requestContextHelp() ? tipHelpValue.value() : HelpItem(tipHelpValue.toString()); IContext *context = ICore::currentContextObject(); - if (!tipHelp.isValid() && context) + if (tipHelp.isEmpty() && context) context->contextHelp([this](const HelpItem &item) { showContextHelp(item); }); else showContextHelp(tipHelp); diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 7f9ad3b5f33..aeefcb39cf6 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -8008,7 +8008,7 @@ void BaseTextEditor::setContextHelp(const HelpItem &item) void TextEditorWidget::contextHelpItem(const IContext::HelpCallback &callback) { - if (!d->m_contextHelpItem.isValid() && !d->m_hoverHandlers.isEmpty()) { + if (d->m_contextHelpItem.isEmpty() && !d->m_hoverHandlers.isEmpty()) { d->m_hoverHandlers.first()->contextHelpId(this, Text::wordStartCursor(textCursor()).position(), callback); From ffa14187a1a6876cabe14a19513462117de68594 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 4 Feb 2019 09:29:22 +0100 Subject: [PATCH 09/13] qbs build: Fix regression with qbs 1.13 Don't fall back to pkg-config for non-existing dev headers products, as that becomes expensive. Change-Id: Ibf51a93950e04ee061ca16444fbc18349389d74a Reviewed-by: Christian Stenger --- qbs/imports/QtcProduct.qbs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index 0dc1e9b3b1f..1caf073e988 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -19,7 +19,14 @@ Product { Depends { name: "cpp" } Depends { name: "qtc" } - Depends { name: product.name + " dev headers"; required: false } + Depends { + name: product.name + " dev headers"; + required: false + Properties { + condition: Utilities.versionCompare(qbs.version, "1.13") >= 0 + enableFallback: false + } + } Depends { name: "Qt.core"; versionAtLeast: "5.9.0" } // TODO: Should fall back to what came from Qt.core for Qt < 5.7, but we cannot express that From 522a90913a2228f3146133baa44c65484562ed8f Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 4 Feb 2019 13:54:54 +0100 Subject: [PATCH 10/13] Squish: Add name of FancyTabBar object Change-Id: I1cbd1af800731e2c9908604ecaa5c0513410e55c Reviewed-by: Christian Stenger --- tests/system/shared/project_explorer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py index 3c7ed2535d5..60b3af9f206 100644 --- a/tests/system/shared/project_explorer.py +++ b/tests/system/shared/project_explorer.py @@ -30,7 +30,7 @@ def switchViewTo(view): waitFor("not QToolTip.isVisible()", 15000) if view < ViewConstants.FIRST_AVAILABLE or view > ViewConstants.LAST_AVAILABLE: return - tabBar = waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' " + tabBar = waitForObject("{name='ModeSelector' type='Core::Internal::FancyTabBar' visible='1' " "window=':Qt Creator_Core::Internal::MainWindow'}") mouseMove(tabBar, 20, 20 + 52 * view) if waitFor("QToolTip.isVisible()", 10000): @@ -43,7 +43,7 @@ def switchViewTo(view): test.passes("ToolTip verified") else: test.warning("ToolTip does not match", "Expected pattern: %s\nGot: %s" % (pattern, text)) - mouseClick(waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' " + mouseClick(waitForObject("{name='ModeSelector' type='Core::Internal::FancyTabBar' visible='1' " "window=':Qt Creator_Core::Internal::MainWindow'}"), 20, 20 + 52 * view, 0, Qt.LeftButton) def __kitIsActivated__(kit): From 99a883527b6f817688d6e974a265c1c96784d638 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 4 Feb 2019 13:45:52 +0100 Subject: [PATCH 11/13] Utils::FileNameValidatingLineEdit: Allow '+' character Amends d008e8f2b6. Fixes: QTCREATORBUG-15493 Change-Id: I97b51bb95ebe5988864397bbce1ce4e9243b5d0a Reviewed-by: Eike Ziller --- src/libs/utils/filenamevalidatinglineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/filenamevalidatinglineedit.cpp b/src/libs/utils/filenamevalidatinglineedit.cpp index 344ab99cc3a..271f325a219 100644 --- a/src/libs/utils/filenamevalidatinglineedit.cpp +++ b/src/libs/utils/filenamevalidatinglineedit.cpp @@ -97,7 +97,7 @@ void FileNameValidatingLineEdit::setForceFirstCapitalLetter(bool b) #define SLASHES "/\\" -static const char notAllowedCharsSubDir[] = ",^@=+{}[]~!?:&*\"|#%<>$\"'();`' "; +static const char notAllowedCharsSubDir[] = ",^@={}[]~!?:&*\"|#%<>$\"'();`' "; static const char notAllowedCharsNoSubDir[] = ",^@={}[]~!?:&*\"|#%<>$\"'();`' " SLASHES; static const char *notAllowedSubStrings[] = {".."}; From 2cb872a19295339334a30849ddb8d1ba56f63189 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 4 Feb 2019 13:49:14 +0100 Subject: [PATCH 12/13] Squish: Close "Take a tour" popup after startup Change-Id: Ie5edf4a3a9a90b52e3a5e74e7e17e2bd66c38841 Reviewed-by: Christian Stenger --- tests/system/objects.map | 2 ++ tests/system/shared/qtcreator.py | 7 +++++-- tests/system/suite_general/tst_installed_languages/test.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/system/objects.map b/tests/system/objects.map index c5f1ac43733..b3852a89eab 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -196,6 +196,8 @@ :Send to Codepaster_CodePaster::PasteView {name='CodePaster__Internal__ViewDialog' type='CodePaster::PasteView' visible='1' windowTitle='Send to Codepaster'} :Session Manager_ProjectExplorer::Internal::SessionDialog {name='ProjectExplorer__Internal__SessionDialog' type='ProjectExplorer::Internal::SessionDialog' visible='1' windowTitle='Session Manager'} :Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'} +:Take a UI Tour.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Take a UI Tour_Utils::CheckableMessageBox'} +:Take a UI Tour_Utils::CheckableMessageBox {type='Utils::CheckableMessageBox' unnamed='1' visible='1' windowTitle='Take a UI Tour'} :User Interface.languageBox_QComboBox {container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'} :Widget Box_qdesigner_internal::WidgetBoxTreeWidget {container=':*Qt Creator.Widget Box_QDockWidget' type='qdesigner_internal::WidgetBoxTreeWidget' unnamed='1' visible='1'} :Working Copy_Utils::BaseValidatingLineEdit {type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index cd572a4a794..4b909c6e441 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -55,7 +55,7 @@ source("../../shared/welcome.py") source("../../shared/workarounds.py") # include this at last # additionalParameters must be a list or tuple of strings or None -def startQC(additionalParameters=None, withPreparedSettingsPath=True): +def startQC(additionalParameters=None, withPreparedSettingsPath=True, cancelTour=True): global SettingsPath appWithOptions = ['"Qt Creator"' if platform.system() == 'Darwin' else "qtcreator"] if withPreparedSettingsPath: @@ -65,7 +65,10 @@ def startQC(additionalParameters=None, withPreparedSettingsPath=True): if platform.system() in ('Microsoft', 'Windows'): # for hooking into native file dialog appWithOptions.extend(('-platform', 'windows:dialogs=none')) test.log("Starting now: %s" % ' '.join(appWithOptions)) - return startApplication(' '.join(appWithOptions)) + appContext = startApplication(' '.join(appWithOptions)) + if cancelTour: + clickButton(waitForObject(":Take a UI Tour.Cancel_QPushButton")) + return appContext; def startedWithoutPluginError(): try: diff --git a/tests/system/suite_general/tst_installed_languages/test.py b/tests/system/suite_general/tst_installed_languages/test.py index 4685ef2083d..a6e104ceb31 100644 --- a/tests/system/suite_general/tst_installed_languages/test.py +++ b/tests/system/suite_general/tst_installed_languages/test.py @@ -46,7 +46,7 @@ def main(): invokeMenuItem("File", "Exit") waitForCleanShutdown() snooze(4) # wait for complete unloading of Creator - startQC() + startQC(cancelTour=False) try: # Use Locator for menu items which wouldn't work on macOS exitCommand = testData.field(lang, "Exit") From 9561fd9f45e534c30eccf92a47cccd7e3598dacc Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 4 Feb 2019 15:31:52 +0100 Subject: [PATCH 13/13] sdktool: Make debugger engine data type consistent with Qt Creator Change-Id: Ifc21e26b139b65c2cc9af6540227e66cc666eb10 Fixes: QTCREATORBUG-21695 Reviewed-by: hjk --- src/tools/sdktool/adddebuggeroperation.cpp | 2 +- src/tools/sdktool/adddebuggeroperation.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/sdktool/adddebuggeroperation.cpp b/src/tools/sdktool/adddebuggeroperation.cpp index 6ec0716491a..e6871cb8b65 100644 --- a/src/tools/sdktool/adddebuggeroperation.cpp +++ b/src/tools/sdktool/adddebuggeroperation.cpp @@ -173,7 +173,7 @@ bool AddDebuggerOperation::test() const QVariantMap AddDebuggerOperation::addDebugger(const QVariantMap &map, const QString &id, const QString &displayName, - const quint32 &engine, const QString &binary, + int engine, const QString &binary, const QStringList &abis, const KeyValuePairList &extra) { // Sanity check: Make sure autodetection source is not in use already: diff --git a/src/tools/sdktool/adddebuggeroperation.h b/src/tools/sdktool/adddebuggeroperation.h index 754ff7210e4..5c7731d780a 100644 --- a/src/tools/sdktool/adddebuggeroperation.h +++ b/src/tools/sdktool/adddebuggeroperation.h @@ -46,7 +46,7 @@ public: static QVariantMap addDebugger(const QVariantMap &map, const QString &id, const QString &displayName, - const quint32 &engine, const QString &binary, + int engine, const QString &binary, const QStringList &abis, const KeyValuePairList &extra); static QVariantMap initializeDebuggers(); @@ -54,7 +54,7 @@ public: private: QString m_id; QString m_displayName; - quint32 m_engine = 0; + int m_engine = 0; QString m_binary; QStringList m_abis; KeyValuePairList m_extra;