From a7bbcb8e398aaeafca72a3646ed4f20574f856af Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 18 Jan 2019 18:30:38 +0100 Subject: [PATCH 1/3] Squish: Stabilize tst_simple_analyze The total time may be more than 1s when the CPU is busy. Ignoring this column. Change-Id: I9c80fecb618bcad1bc3e7922c5a573964cd019a4 Reviewed-by: Christian Stenger --- tests/system/suite_debugger/tst_simple_analyze/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 202c5053b25..111336e33a9 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -103,7 +103,7 @@ def performTest(workingDir, projectName, availableConfigs): compareEventsTab(model, "events_qt%s.tsv" % qtVersion) test.compare(dumpItems(model, column=colPercent)[0], '100 %') # cannot run following test on colShortest (unstable) - for i in [colTotal, colMean, colMedian, colLongest]: + for i in [colMean, colMedian, colLongest]: for item in dumpItems(model, column=i)[2:5]: test.verify(item.endswith('ms'), "Verify that '%s' ends with 'ms'" % item) for i in [colTotal, colMean, colMedian, colLongest, colShortest]: From dd0156d1facc5422464dc1b430696a0b63db605f Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 30 Jan 2019 14:46:16 +0100 Subject: [PATCH 2/3] macOS 10.14: Allow user applications to request access to services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In macOS Mojave applications have to provide information about the reason they want to access certain services (Camera, Microphone, etc). If they do not provide this information in their Info.plist, they possibly are even killed by the system. For direct child processes, like user applications are when started from Qt Creator, this information is taken from the parent application, i.e. Qt Creator, even if the child process provides the information in it's own Info.plist. Fixes: QTCREATORBUG-21887 Change-Id: I1bc149fea928a26d59d126f6b1be71649a4369ed Reviewed-by: Morten Johan Sørvig Reviewed-by: Leena Miettinen Reviewed-by: Vikas Pachdha --- src/app/app-Info.plist | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/app/app-Info.plist b/src/app/app-Info.plist index 91104f163d5..d87130d5e49 100644 --- a/src/app/app-Info.plist +++ b/src/app/app-Info.plist @@ -254,5 +254,23 @@ @SHORT_VERSION@ LSMinimumSystemVersion @MACOSX_DEPLOYMENT_TARGET@ - - + NSAppleEventsUsageDescription + This application wants to run AppleScript. + NSBluetoothPeripheralUsageDescription + A user application wants to access bluetooth. + NSCalendarsUsageDescription + A user application wants to access calendars. + NSCameraUsageDescription + A user application wants to access the camera. + NSContactsUsageDescription + A user application wants to access contacts. + NSLocationWhenInUseUsageDescription + A user application wants to access location information. + NSMicrophoneUsageDescription + A user application wants to access the microphone. + NSPhotoLibraryAddUsageDescription + A user application wants write access to the photo library. + NSPhotoLibraryUsageDescription + A user application wants to access the photo library. + NSRemindersUsageDescription + A user application wants to access the reminders. From 14f66e0eb52da61cca253adb8168e012944f1c92 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 5 Feb 2019 15:17:35 +0100 Subject: [PATCH 3/3] Fix highlighting of regexp search results in editor The highlighting in the editor was still done with QRegExp, so if you used Perl regular expression features, highlighting in the editor was incorrect. Fixes: QTCREATORBUG-21940 Change-Id: I785f0b2413a291d9f06de5877b18067a30d58588 Reviewed-by: Marco Bubke --- src/plugins/texteditor/texteditor.cpp | 33 +++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 8b03581a403..e8190a60856 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -692,7 +692,8 @@ public: QTextCursor m_pendingLinkUpdate; QTextCursor m_lastLinkUpdate; - QRegExp m_searchExpr; + QRegularExpression m_searchExpr; + QString m_findText; FindFlags m_findFlags; void highlightSearchResults(const QTextBlock &block, const PaintEventData &data) const; QTimer m_delayedUpdateTimer; @@ -3663,7 +3664,7 @@ QTextBlock TextEditorWidgetPrivate::foldedBlockAt(const QPoint &pos, QRect *box) void TextEditorWidgetPrivate::highlightSearchResults(const QTextBlock &block, const PaintEventData &data) const { - if (m_searchExpr.isEmpty()) + if (m_searchExpr.pattern().isEmpty()) return; int blockPosition = block.position(); @@ -3682,10 +3683,11 @@ void TextEditorWidgetPrivate::highlightSearchResults(const QTextBlock &block, co .toTextCharFormat(C_SEARCH_RESULT).background().color().darker(120); while (idx < text.length()) { - idx = m_searchExpr.indexIn(text, idx + l); - if (idx < 0) + const QRegularExpressionMatch match = m_searchExpr.match(text, idx + 1); + if (!match.hasMatch()) break; - l = m_searchExpr.matchedLength(); + idx = match.capturedStart(); + l = match.capturedLength(); if (l == 0) break; if ((m_findFlags & FindWholeWords) @@ -4280,7 +4282,7 @@ void TextEditorWidgetPrivate::paintSearchResultOverlay(const PaintEventData &dat QPainter &painter) const { m_searchResultOverlay->clear(); - if (m_searchExpr.isEmpty()) + if (m_searchExpr.pattern().isEmpty()) return; const int margin = 5; @@ -5283,7 +5285,7 @@ void TextEditorWidgetPrivate::slotUpdateRequest(const QRect &r, int dy) m_extraArea->scroll(0, dy); } else if (r.width() > 4) { // wider than cursor width, not just cursor blinking m_extraArea->update(0, r.y(), m_extraArea->width(), r.height()); - if (!m_searchExpr.isEmpty()) { + if (!m_searchExpr.pattern().isEmpty()) { const int m = m_searchResultOverlay->dropShadowWidth(); q->viewport()->update(r.adjusted(-m, -m, m, m)); } @@ -6303,13 +6305,16 @@ void TextEditorWidgetPrivate::clearLink() void TextEditorWidgetPrivate::highlightSearchResultsSlot(const QString &txt, FindFlags findFlags) { - if (m_searchExpr.pattern() == txt) + const QString pattern = (findFlags & FindRegularExpression) ? txt + : QRegularExpression::escape(txt); + const QRegularExpression::PatternOptions options + = (findFlags & FindCaseSensitively) ? QRegularExpression::NoPatternOption + : QRegularExpression::CaseInsensitiveOption; + if (m_searchExpr.pattern() == pattern && m_searchExpr.patternOptions() == options) return; - m_searchExpr.setPattern(txt); - m_searchExpr.setPatternSyntax((findFlags & FindRegularExpression) ? - QRegExp::RegExp : QRegExp::FixedString); - m_searchExpr.setCaseSensitivity((findFlags & FindCaseSensitively) ? - Qt::CaseSensitive : Qt::CaseInsensitive); + m_searchExpr.setPattern(pattern); + m_searchExpr.setPatternOptions(options); + m_findText = txt; m_findFlags = findFlags; m_delayedUpdateTimer.start(50); @@ -6367,7 +6372,7 @@ void TextEditorWidgetPrivate::highlightSearchResultsInScrollBar() m_searchWatcher = nullptr; } - const QString &txt = m_searchExpr.pattern(); + const QString &txt = m_findText; if (txt.isEmpty()) return;