From 8806ae3bdf6a6233b2c4620566fa0414aef6daf9 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 28 Apr 2020 10:15:45 +0200 Subject: [PATCH 01/26] AutoTest: Fix output handling Connect to the correct signal to explicitly react on output coming on stdout. Necessary as we are changing the read channel while processing output. Fixes: QTCREATORBUG-23939 Change-Id: Ibf62de62fb64bd9c2395f93643e39d11d5b4e0d5 Reviewed-by: David Schulz --- src/plugins/autotest/testoutputreader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotest/testoutputreader.cpp b/src/plugins/autotest/testoutputreader.cpp index d23b779fe51..3faa7282f35 100644 --- a/src/plugins/autotest/testoutputreader.cpp +++ b/src/plugins/autotest/testoutputreader.cpp @@ -50,7 +50,7 @@ TestOutputReader::TestOutputReader(const QFutureInterface &future }; if (m_testApplication) { - connect(m_testApplication, &QProcess::readyRead, + connect(m_testApplication, &QProcess::readyReadStandardOutput, this, [chopLineBreak, this] () { m_testApplication->setReadChannel(QProcess::StandardOutput); while (m_testApplication->canReadLine()) From 549b5719f6e560e68879850509f13ecbde1bf1f3 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 29 Apr 2020 15:06:32 +0200 Subject: [PATCH 02/26] QmlJS: Fix lexer handling of escape sequences (again) The lexer handled escape sequences already, but not fully correct. This effectively reverts 63db0f271fd2f and fixes the wrong offset. Task-number: QTCREATORBUG-23830 Change-Id: I2cc1e9df5c0218cf9ee80998adce69bbc2eb4dab Reviewed-by: Ulf Hermann --- src/libs/qmljs/parser/qmljslexer.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/libs/qmljs/parser/qmljslexer.cpp b/src/libs/qmljs/parser/qmljslexer.cpp index ef3718da028..a85280fbc2e 100644 --- a/src/libs/qmljs/parser/qmljslexer.cpp +++ b/src/libs/qmljs/parser/qmljslexer.cpp @@ -872,7 +872,6 @@ int Lexer::scanString(ScanStringMode mode) { QChar quote = (mode == TemplateContinuation) ? QChar(TemplateHead) : QChar(mode); bool multilineStringLiteral = false; - bool escaped = false; const QChar *startCode = _codePtr - 1; // in case we just parsed a \r, we need to reset this flag to get things working @@ -881,12 +880,6 @@ int Lexer::scanString(ScanStringMode mode) if (_engine) { while (_codePtr <= _endPtr) { - if (escaped) { // former char started an escape sequence - escaped = false; - _char = *_codePtr++; - ++_currentColumnNumber; - continue; - } if (isLineTerminator()) { if ((quote == QLatin1Char('`') || qmlMode())) break; @@ -894,10 +887,7 @@ int Lexer::scanString(ScanStringMode mode) _errorMessage = QCoreApplication::translate("QmlParser", "Stray newline in string literal"); return T_ERROR; } else if (_char == QLatin1Char('\\')) { - if (mode != DoubleQuote && mode != SingleQuote) - break; - else // otherwise we need to handle an escape sequence - escaped = true; + break; } else if (_char == '$' && quote == QLatin1Char('`')) { break; } else if (_char == quote) { @@ -923,6 +913,7 @@ int Lexer::scanString(ScanStringMode mode) // rewind by one char, so things gets scanned correctly --_codePtr; + --_currentColumnNumber; _validTokenText = true; _tokenText = QString(startCode, _codePtr - startCode); From 5feec21cbd19d81eb4be89a85760447b29610854 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 28 Apr 2020 10:51:47 +0200 Subject: [PATCH 03/26] Packaging: Install documentation Fixes: QTCREATORBUG-23912 Change-Id: I2e28c9f9000dca1216ec31bad307031937223e83 Reviewed-by: Cristian Adam --- scripts/build.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/build.py b/scripts/build.py index a58a688dcac..8102224cd8b 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -146,7 +146,19 @@ def build_qtcreator(args, paths): common.check_print_call(['cmake', '--install', '.', '--prefix', paths.dev_install, '--component', 'Devel'], paths.build) - + if not args.no_docs: + common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, + '--component', 'qtc_docs_qtcreator'], + paths.build) + common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, + '--component', 'html_docs_qtcreator'], + paths.build) + common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, + '--component', 'html_docs_qtcreator-dev'], + paths.build) + common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, + '--component', 'html_docs_qtcreator-dev'], + paths.build) def build_wininterrupt(args, paths): if not common.is_windows_platform(): return From 626807c94e3c1e3d947de2359f26e15dd82641f7 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 29 Apr 2020 15:38:02 +0200 Subject: [PATCH 04/26] QmlJS: Fix line number for string literals When a string value's first line ends with an EOL the line number for the next line got wrong which in turn confused the syntax highlighter. Fixes: QTCREATORBUG-23777 Change-Id: I37eed839a2e63cf470b9bc2ac0596ab8bc8d373c Reviewed-by: Ulf Hermann --- src/libs/qmljs/parser/qmljslexer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/qmljs/parser/qmljslexer.cpp b/src/libs/qmljs/parser/qmljslexer.cpp index a85280fbc2e..0ae581724d0 100644 --- a/src/libs/qmljs/parser/qmljslexer.cpp +++ b/src/libs/qmljs/parser/qmljslexer.cpp @@ -881,8 +881,10 @@ int Lexer::scanString(ScanStringMode mode) if (_engine) { while (_codePtr <= _endPtr) { if (isLineTerminator()) { - if ((quote == QLatin1Char('`') || qmlMode())) + if ((quote == QLatin1Char('`') || qmlMode())) { + --_currentLineNumber; break; + } _errorCode = IllegalCharacter; _errorMessage = QCoreApplication::translate("QmlParser", "Stray newline in string literal"); return T_ERROR; From 7d429c54e3c32e90cc2cd0e13df5288111bd4577 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 30 Apr 2020 07:53:38 +0200 Subject: [PATCH 05/26] Debugger: remove unused variable Change-Id: I7cddb9cd8ec3b058e04409e6a56490297660ed03 Reviewed-by: hjk --- src/plugins/debugger/debuggermainwindow.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index ed33870ed54..1c404a22b2d 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -69,8 +69,6 @@ static Q_LOGGING_CATEGORY(perspectivesLog, "qtc.utils.perspectives", QtWarningMs namespace Utils { -const int SettingsVersion = 3; - const char LAST_PERSPECTIVE_KEY[] = "LastPerspective"; const char MAINWINDOW_KEY[] = "Debugger.MainWindow"; const char AUTOHIDE_TITLEBARS_KEY[] = "AutoHideTitleBars"; From d7520dece5bb387102edc6eb0fff419866b2a70f Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 29 Apr 2020 13:40:05 +0200 Subject: [PATCH 06/26] CMake build/Linux: Install desktop and appstream files Fixes: QTCREATORBUG-23906 Change-Id: I9d796c8826dbb4beb980aa29b75526fe96093921 Reviewed-by: Cristian Adam --- qtcreator.pro | 4 ++-- share/CMakeLists.txt | 10 ++++++++++ .../applications}/org.qt-project.qtcreator.desktop | 0 .../metainfo}/org.qt-project.qtcreator.appdata.xml | 0 4 files changed, 12 insertions(+), 2 deletions(-) rename {dist => share/applications}/org.qt-project.qtcreator.desktop (100%) rename {dist => share/metainfo}/org.qt-project.qtcreator.appdata.xml (100%) diff --git a/qtcreator.pro b/qtcreator.pro index f59ec0a3320..b17bad660af 100644 --- a/qtcreator.pro +++ b/qtcreator.pro @@ -98,10 +98,10 @@ BASENAME = $$(INSTALL_BASENAME) isEmpty(BASENAME): BASENAME = qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX) linux { - appstream.files = dist/org.qt-project.qtcreator.appdata.xml + appstream.files = share/metainfo/org.qt-project.qtcreator.appdata.xml appstream.path = $$QTC_PREFIX/share/metainfo/ - desktop.files = dist/org.qt-project.qtcreator.desktop + desktop.files = share/applications/org.qt-project.qtcreator.desktop desktop.path = $$QTC_PREFIX/share/applications/ INSTALLS += appstream desktop diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index 471053adec9..eb3c779b400 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -1 +1,11 @@ add_subdirectory(qtcreator) + +if (NOT APPLE AND NOT WIN32) + install( + DIRECTORY + applications + metainfo + DESTINATION + share + ) +endif() diff --git a/dist/org.qt-project.qtcreator.desktop b/share/applications/org.qt-project.qtcreator.desktop similarity index 100% rename from dist/org.qt-project.qtcreator.desktop rename to share/applications/org.qt-project.qtcreator.desktop diff --git a/dist/org.qt-project.qtcreator.appdata.xml b/share/metainfo/org.qt-project.qtcreator.appdata.xml similarity index 100% rename from dist/org.qt-project.qtcreator.appdata.xml rename to share/metainfo/org.qt-project.qtcreator.appdata.xml From 96cd1bffaeeb6ab5e04ab4fde6e755edd842e35e Mon Sep 17 00:00:00 2001 From: Brook Cronin Date: Thu, 16 Apr 2020 17:09:59 +0200 Subject: [PATCH 07/26] Theme: add controls theme to creator themes and map to controls theme values Change-Id: Iec6f217e8d3ae6e7f72fdf86c282e1b11b225626 Reviewed-by: Alessandro Portale --- .../imports/StudioTheme/Values.qml | 80 ++++++++----------- share/qtcreator/themes/dark.creatortheme | 37 +++++++++ share/qtcreator/themes/default.creatortheme | 37 +++++++++ share/qtcreator/themes/flat-dark.creatortheme | 39 ++++++++- .../qtcreator/themes/flat-light.creatortheme | 37 +++++++++ share/qtcreator/themes/flat.creatortheme | 37 +++++++++ 6 files changed, 220 insertions(+), 47 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml index 3f432d40808..cc8c4b4f8f5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml @@ -80,54 +80,42 @@ QtObject { // Theme Colors - // Dark Theme Defaults - property string themeControlBackground: "#242424" - property string themeControlOutline: "#404040" - property string themeTextColor: "#ffffff" - property string themeDisabledTextColor: "#909090" - - property string themePanelBackground: "#2a2a2a" - property string themeHoverHighlight: "#313131" - property string themeColumnBackground: "#363636" - property string themeFocusEdit: "#444444" - property string themeFocusDrag: "#565656" - - property string themeControlBackgroundPressed: "#606060" - property string themeControlBackgroundChecked: "#565656" - - property string themeInteraction: "#029de0" - - property string themeSliderActiveTrack: "#606060" - property string themeSliderInactiveTrack: "#404040" - property string themeSliderHandle: "#505050" - - property string themeSliderActiveTrackHover: "#7f7f7f" - property string themeSliderInactiveTrackHover: "#505050" - property string themeSliderHandleHover: "#606060" - - property string themeSliderActiveTrackFocus: "#aaaaaa" - property string themeSliderInactiveTrackFocus: "#606060" - property string themeSliderHandleFocus: values.themeInteraction - - property string themeErrorColor: "#df3a3a" + // COLORS NOW COME FROM THE THEME FILES + property string themeControlBackground: Theme.color(Theme.DScontrolBackground) + property string themeControlOutline: Theme.color(Theme.DScontrolOutline) + property string themeTextColor: Theme.color(Theme.DStextColor) + property string themeDisabledTextColor: Theme.color(Theme.DSdisabledTextColor) + property string themePanelBackground: Theme.color(Theme.DSpanelBackground) + property string themeHoverHighlight: Theme.color(Theme.DShoverHighlight) + property string themeColumnBackground: Theme.color(Theme.DScolumnBackground) + property string themeFocusEdit: Theme.color(Theme.DSfocusEdit) + property string themeFocusDrag: Theme.color(Theme.DSfocusDrag) + property string themeControlBackgroundPressed: Theme.color(Theme.DScontrolBackgroundPressed) + property string themeControlBackgroundChecked: Theme.color(Theme.DScontrolBackgroundChecked) + property string themeInteraction: Theme.color(Theme.DSinteraction) + property string themeSliderActiveTrack: Theme.color(Theme.DSsliderActiveTrack) + property string themeSliderInactiveTrack: Theme.color(Theme.DSsliderInactiveTrack) + property string themeSliderHandle: Theme.color(Theme.DSsliderHandle) + property string themeSliderActiveTrackHover: Theme.color(Theme.DSactiveTrackHover) + property string themeSliderInactiveTrackHover: Theme.color(Theme.DSsliderInactiveTrackHover) + property string themeSliderHandleHover: Theme.color(Theme.DSsliderHandleHover) + property string themeSliderActiveTrackFocus: Theme.color(Theme.DSsliderActiveTrackFocus) + property string themeSliderInactiveTrackFocus:Theme.color(Theme.DSsliderInactiveTrackFocus) + property string themeSliderHandleFocus: Theme.color(Theme.DSsliderHandleFocus) + property string themeErrorColor: Theme.color(Theme.DSerrorColor) // NEW NEW NEW NEW NEW - property string themeControlBackgroundDisabled: "#363636" - property string themeControlOutlineDisabled: "#404040" - property string themeTextColorDisabled: "#606060" - - property string themeTextSelectionColor: "#029de0" - property string themeTextSelectedTextColor: "#ffffff" - - property string themeScrollBarTrack: "#404040" - property string themeScrollBarHandle: "#505050" - - property string themeControlBackgroundInteraction: "#404040" // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color! - - property string themeTranslationIndicatorBorder: "#7f7f7f" - - property string themeSectionHeadBackground: "#191919" + property string themeControlBackgroundDisabled: Theme.color(Theme.DScontrolBackgroundDisabled) + property string themeControlOutlineDisabled: Theme.color(Theme.DScontrolOutlineDisabled) + property string themeTextColorDisabled: Theme.color(Theme.DStextColorDisabled) + property string themeTextSelectionColor: Theme.color(Theme.DStextSelectionColor) + property string themeTextSelectedTextColor:Theme.color(Theme.DStextSelectedTextColor) + property string themeScrollBarTrack: Theme.color(Theme.DSscrollBarTrack) + property string themeScrollBarHandle: Theme.color(Theme.DSscrollBarHandle) + property string themeControlBackgroundInteraction: Theme.color(Theme.DScontrolBackgroundInteraction) // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color! + property string themeTranslationIndicatorBorder: Theme.color(Theme.DStranlsationIndicatorBorder) + property string themeSectionHeadBackground: Theme.color(Theme.DSsectionHeadBackground) // Taken out of Constants.js - property string themeChangedStateText: "#99ccff" + property string themeChangedStateText: Theme.color(Theme.DSchangedStateText) } diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 41439ff22a9..fa4a6ab330a 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -22,6 +22,43 @@ backgroundColorDisabled=ff444444 qmlDesignerButtonColor=ff3c3e40 [Colors] + +;DS controls theme START +DScontrolBackground=ff404040 +DScontrolOutline=ff595959 +DStextColor=ffffffff +DSdisabledTextColor=ff909090 +DSpanelBackground=ff454444 +DShoverHighlight=ff313131 +DScolumnBackground=ff363636 +DSfocusEdit=ff444444 +DSfocusDrag=ff565656 +DScontrolBackgroundPressed=ff7a7a7a +DScontrolBackgroundChecked=ff565656 +DSinteraction=ff3f91c4 +DSsliderActiveTrack=ff7a7a7a +DSsliderInactiveTrack=ff4d4d4d +DSsliderHandle=ff505050 +DSsliderActiveTrackHover=ff7f7f7f +DSsliderInactiveTrackHover=ff505050 +DSsliderHandleHover=ff7a7a7a +DSsliderActiveTrackFocus=ffaaaaaa +DSsliderInactiveTrackFocus=ff7a7a7a +DSsliderHandleFocus=ff3f91c4 +DSerrorColor=ffdf3a3a +DScontrolBackgroundDisabled=ff363636 +DScontrolOutlineDisabled=ff4d4d4d +DStextColorDisabled=ff7a7a7a +DStextSelectionColor=ff3f91c4 +DStextSelectedTextColor=ffffffff +DSscrollBarTrack=ff4d4d4d +DSscrollBarHandle=ff505050 +DScontrolBackgroundInteraction=ff4d4d4d +DStranslationIndicatorBorder=ff7f7f7f +DSsectionHeadBackground=ff424242 +DSchangedStateText=ff99ccff +;DS controls theme END + BackgroundColorAlternate=alternateBackground BackgroundColorDark=shadowBackground BackgroundColorHover=hoverBackground diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 08890a7c2fd..8686733ab4d 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -13,6 +13,43 @@ splitterColor=ff151515 qmlDesignerButtonColor=ff4c4e50 [Colors] + +;DS controls theme START +DScontrolBackground=ff404040 +DScontrolOutline=ff595959 +DStextColor=ffffffff +DSdisabledTextColor=ff909090 +DSpanelBackground=ff454444 +DShoverHighlight=ff313131 +DScolumnBackground=ff363636 +DSfocusEdit=ff444444 +DSfocusDrag=ff565656 +DScontrolBackgroundPressed=ff7a7a7a +DScontrolBackgroundChecked=ff565656 +DSinteraction=ff3f91c4 +DSsliderActiveTrack=ff7a7a7a +DSsliderInactiveTrack=ff4d4d4d +DSsliderHandle=ff505050 +DSsliderActiveTrackHover=ff7f7f7f +DSsliderInactiveTrackHover=ff505050 +DSsliderHandleHover=ff7a7a7a +DSsliderActiveTrackFocus=ffaaaaaa +DSsliderInactiveTrackFocus=ff7a7a7a +DSsliderHandleFocus=ff3f91c4 +DSerrorColor=ffdf3a3a +DScontrolBackgroundDisabled=ff363636 +DScontrolOutlineDisabled=ff4d4d4d +DStextColorDisabled=ff7a7a7a +DStextSelectionColor=ff3f91c4 +DStextSelectedTextColor=ffffffff +DSscrollBarTrack=ff4d4d4d +DSscrollBarHandle=ff505050 +DScontrolBackgroundInteraction=ff4d4d4d +DStranslationIndicatorBorder=ff7f7f7f +DSsectionHeadBackground=ff424242 +DSchangedStateText=ff99ccff +;DS controls theme END + BackgroundColorAlternate=ff3d3d3d BackgroundColorDark=shadowBackground BackgroundColorHover=ff515151 diff --git a/share/qtcreator/themes/flat-dark.creatortheme b/share/qtcreator/themes/flat-dark.creatortheme index e281f189aa0..1df02cd4631 100644 --- a/share/qtcreator/themes/flat-dark.creatortheme +++ b/share/qtcreator/themes/flat-dark.creatortheme @@ -26,6 +26,43 @@ backgroundColorDisabled=ff444444 qmlDesignerButtonColor=ff4c4e50 [Colors] + +;DS controls theme START +DScontrolBackground=ff404040 +DScontrolOutline=ff595959 +DStextColor=ffffffff +DSdisabledTextColor=ff909090 +DSpanelBackground=ff454444 +DShoverHighlight=ff313131 +DScolumnBackground=ff363636 +DSfocusEdit=ff444444 +DSfocusDrag=ff565656 +DScontrolBackgroundPressed=ff7a7a7a +DScontrolBackgroundChecked=ff565656 +DSinteraction=ff1d545c +DSsliderActiveTrack=ff7a7a7a +DSsliderInactiveTrack=ff4d4d4d +DSsliderHandle=ff505050 +DSsliderActiveTrackHover=ff7f7f7f +DSsliderInactiveTrackHover=ff505050 +DSsliderHandleHover=ff7a7a7a +DSsliderActiveTrackFocus=ffaaaaaa +DSsliderInactiveTrackFocus=ff7a7a7a +DSsliderHandleFocus=ff1d545c +DSerrorColor=ffdf3a3a +DScontrolBackgroundDisabled=ff363636 +DScontrolOutlineDisabled=ff4d4d4d +DStextColorDisabled=ff7a7a7a +DStextSelectionColor=ff1d545c +DStextSelectedTextColor=ffffffff +DSscrollBarTrack=ff4d4d4d +DSscrollBarHandle=ff505050 +DScontrolBackgroundInteraction=ff4d4d4d +DStranslationIndicatorBorder=ff7f7f7f +DSsectionHeadBackground=ff424242 +DSchangedStateText=ff99ccff +;DS controls theme END + BackgroundColorAlternate=alternateBackground BackgroundColorDark=shadowBackground BackgroundColorHover=hoverBackground @@ -202,7 +239,7 @@ CodeModel_Error_TextMarkColor=error CodeModel_Warning_TextMarkColor=warning QmlDesigner_BackgroundColor=qmlDesignerButtonColor -QmlDesigner_HighlightColor=ff3f91c4 +QmlDesigner_HighlightColor=ff1d545c QmlDesigner_FormEditorSelectionColor=ff4ba2ff QmlDesigner_FormEditorForegroundColor=ffffffff QmlDesigner_BackgroundColorDarkAlternate=qmlDesignerButtonColor diff --git a/share/qtcreator/themes/flat-light.creatortheme b/share/qtcreator/themes/flat-light.creatortheme index f6b726762ca..b8b4e7eabd8 100644 --- a/share/qtcreator/themes/flat-light.creatortheme +++ b/share/qtcreator/themes/flat-light.creatortheme @@ -22,6 +22,43 @@ warning=ffecbc1c qmlDesignerButtonColor=fff8f8f8 [Colors] + +;DS controls theme START +DScontrolBackground=ffffffff +DScontrolOutline=ff777777 +DStextColor=ff242424 +DSdisabledTextColor=ff505050 +DSpanelBackground=fff2f2f2 +DShoverHighlight=ffe6e6e6 +DScolumnBackground=ffaaaaaa +DSfocusEdit=ffeaeaea +DSfocusDrag=ffd1d1d1 +DScontrolBackgroundPressed=ff505050 +DScontrolBackgroundChecked=ff5e5e5e +DSinteraction=ff0492c9 +DSsliderActiveTrack=ff363636 +DSsliderInactiveTrack=ffe6e6e6 +DSsliderHandle=ff777777 +DSsliderActiveTrackHover=ff7f7f7f +DSsliderInactiveTrackHover=ff5e5e5e +DSsliderHandleHover=ff505050 +DSsliderActiveTrackFocus=ff363636 +DSsliderInactiveTrackFocus=ff505050 +DSsliderHandleFocus=ff0492c9 +DSerrorColor=ffdf3a3a +DScontrolBackgroundDisabled=ffaaaaaa +DScontrolOutlineDisabled=ff777777 +DStextColorDisabled=ff505050 +DStextSelectionColor=ff0492c9 +DStextSelectedTextColor=ffffffff +DSscrollBarTrack=ff777777 +DSscrollBarHandle=ff505050 +DScontrolBackgroundInteraction=ff777777 +DStranslationIndicatorBorder=ffebebeb +DSsectionHeadBackground=ffebebeb +DSchangedStateText=ff99ccff +;DS controls theme END + BackgroundColorAlternate=alternateBackground BackgroundColorDark=shadowBackground BackgroundColorHover=hoverBackground diff --git a/share/qtcreator/themes/flat.creatortheme b/share/qtcreator/themes/flat.creatortheme index 0f057d80c06..e80a8d85f1f 100644 --- a/share/qtcreator/themes/flat.creatortheme +++ b/share/qtcreator/themes/flat.creatortheme @@ -20,6 +20,43 @@ splitter=ff313131 qmlDesignerButtonColor=ff4c4e50 [Colors] + +;DS controls theme START +DScontrolBackground=ff404040 +DScontrolOutline=ff595959 +DStextColor=ffffffff +DSdisabledTextColor=ff909090 +DSpanelBackground=ff454444 +DShoverHighlight=ff313131 +DScolumnBackground=ff363636 +DSfocusEdit=ff444444 +DSfocusDrag=ff565656 +DScontrolBackgroundPressed=ff7a7a7a +DScontrolBackgroundChecked=ff565656 +DSinteraction=ff3f91c4 +DSsliderActiveTrack=ff7a7a7a +DSsliderInactiveTrack=ff4d4d4d +DSsliderHandle=ff505050 +DSsliderActiveTrackHover=ff7f7f7f +DSsliderInactiveTrackHover=ff505050 +DSsliderHandleHover=ff7a7a7a +DSsliderActiveTrackFocus=ffaaaaaa +DSsliderInactiveTrackFocus=ff7a7a7a +DSsliderHandleFocus=ff3f91c4 +DSerrorColor=ffdf3a3a +DScontrolBackgroundDisabled=ff363636 +DScontrolOutlineDisabled=ff4d4d4d +DStextColorDisabled=ff7a7a7a +DStextSelectionColor=ff3f91c4 +DStextSelectedTextColor=ffffffff +DSscrollBarTrack=ff4d4d4d +DSscrollBarHandle=ff505050 +DScontrolBackgroundInteraction=ff4d4d4d +DStranslationIndicatorBorder=ff7f7f7f +DSsectionHeadBackground=ff424242 +DSchangedStateText=ff99ccff +;DS controls theme END + BackgroundColorAlternate=alternateBackground BackgroundColorDark=shadowBackground BackgroundColorHover=hoverBackground From 0bd53651d46955555f2b2ca76685f93a393b7a6c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Apr 2020 10:56:19 -0700 Subject: [PATCH 08/26] Fix compatibility with Qt 6 QMutex's non-recursive QMutex in Qt 6 cannot be recursive. So don't call the constructor to pass the option that isn't needed. Change-Id: I9709abb1c3734e10a7defffd1607e76745b5cf0a Reviewed-by: hjk Reviewed-by: Orgad Shaneh --- src/plugins/debugger/uvsc/uvscclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/uvsc/uvscclient.cpp b/src/plugins/debugger/uvsc/uvscclient.cpp index 57de522689a..33889646ed6 100644 --- a/src/plugins/debugger/uvsc/uvscclient.cpp +++ b/src/plugins/debugger/uvsc/uvscclient.cpp @@ -61,7 +61,7 @@ public: Q_GLOBAL_STATIC(QLibrary, gUvscLibrary) Q_GLOBAL_STATIC(QVector, gUvscClients) -static QMutex gUvscsGuard(QMutex::NonRecursive); +static QMutex gUvscsGuard; static QStringList childrenINamesOf(const QString &parentIName, const QStringList &allINames) { From 09b69b274daa042911624f7a7d20344f516640fb Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 30 Apr 2020 08:23:12 +0200 Subject: [PATCH 09/26] Debugger: Fix crash after adjusting font size Change-Id: Ic3b415a3791968f972d2f69ec71c8012c572995d Fixes: QTCREATORBUG-14385 Reviewed-by: hjk --- src/plugins/debugger/debuggerengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 93bc013ae14..ff3bc707886 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -386,6 +386,10 @@ public: // This triggers activity in the EngineManager which // recognizes the rampdown by the m_perpective == nullptr above. perspective->destroy(); + + // disconnect the follow font size connection + TextEditorSettings::instance()->disconnect(this); + delete perspective; } From b18587742ff23c7f221af81da99ed72ba87a1cdd Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 28 Apr 2020 12:55:37 +0200 Subject: [PATCH 10/26] Doc: Describe downloading Qt Bridge from Qt Marketplace Adjust the info about exporting and importing assets. Change-Id: Ibc66fac68e14483fda050b7501fc7e091115ce89 Reviewed-by: Johanna Vanhatapio Reviewed-by: Mahmoud Badri Reviewed-by: Thomas Hartmann --- .../src/qtbridge/qtbridge-overview.qdoc | 10 +++++--- .../src/qtbridge/qtbridge-ps-setup.qdoc | 24 +++++++++---------- .../src/qtbridge/qtbridge-sketch-setup.qdoc | 10 ++++---- .../src/qtdesignstudio-importing-2d.qdoc | 13 ++++++---- .../src/qtdesignstudio-importing-designs.qdoc | 2 ++ .../qtdesignstudio-3d-importing.qdoc | 11 +++++---- 6 files changed, 39 insertions(+), 31 deletions(-) diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc index 9a912f573a3..d666763e557 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-overview.qdoc @@ -31,9 +31,13 @@ \title Exporting Artwork from Design Tools - You need to use \QB for exporting the 2D assets from design tools, - whereas you can directly import 3D assets saved in widely-used 3D - graphics formats. For best results when importing 3D assets, follow + You need to use \QB to first export 2D assets from design tools and then + import them. When working with 3D assets, you can use the export functions + provided by the 3D graphics tools to save the assets in widely-used 3D + graphics formats, and then use \QB to import them. You can download \QB + from the \l{https://marketplace.qt.io/}{Qt Marketplace}. + + For best results when importing 3D assets, follow the guidelines for creating and exporting them. \list diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc index 1261ee4d85f..6e3b8ef3cd3 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-setup.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Bridge documentation. @@ -32,10 +32,12 @@ \title Setting Up \QBPS - \QBPS is delivered as an Adobe extension (ZXP) package and requires Adobe - Photoshop version 20.0.0, or later to be installed. The \QBPS installation - process differs depending on whether you use ZXPInstaller and whether you - are installing on Windows or \macos. + You can download \QBPS from the \l{https://marketplace.qt.io/} + {Qt Marketplace}. It is delivered as an Adobe extension (ZXP) + package and requires Adobe Photoshop version 20.0.0, or later + to be installed. The \QBPS installation process differs depending + on whether you use ZXPInstaller and whether you are installing on + Windows or \macos. \section1 Installing with ZXPInstaller @@ -44,8 +46,7 @@ \list 1 \li Download and install \l{http://zxpinstaller.com/}{ZXPInstaller}. \li Start ZXPInstaller. - \li Drag and drop the \QBPS ZXP package from the \c photoshop_bridge - directory in the installation directory of \QDS to ZXPInstaller. + \li Drag and drop the \QBPS ZXP package to ZXPInstaller. \li Follow the instructions of the installation program. \endlist @@ -59,9 +60,8 @@ To install \QBPS on Windows without using ZXPInstaller: \list 1 - \li Copy the \QBPS ZXP package from the \c photoshop_bridge directory - in the installation directory of \QDS to the \c Documents directory - in your user directory. + \li Copy the \QBPS ZXP package to the \c Documents directory in your + user directory. \li Open Windows PowerShell. \li Enter the following commands: \badcode @@ -77,9 +77,7 @@ To install \QBPS on \macos without using ZXPInstaller: \list 1 - \li Copy the \QBPS ZXP package from the \c photoshop_bridge - directory in the installation directory of \QDS to your - \c Documents directory. + \li Copy the \QBPS ZXP package to your \c Documents directory. \li Open Terminal. \li Enter the following commands: \badcode diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc index 1f7a49d2e0d..46d611ad514 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-sketch-setup.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Bridge documentation. @@ -32,13 +32,13 @@ \title Setting Up \QBSK - \QBSK is delivered with \QDS as a Sketch plugin that you can install to - Sketch. + You can download \QBSK from the \l{https://marketplace.qt.io/} + {Qt Marketplace}. It is delivered as a Sketch plugin that you + can install to Sketch. \note Install the Sketch app before installing the plugin. - To install the \QBSK plugin to Sketch, double-click the \QBSK plugin in the - \c sketch_bridge directory in the installation directory of \QDS. + To install the \QBSK plugin to Sketch, double-click the executable file. The plugin is available at \uicontrol Plugins > \uicontrol {\QB}. */ diff --git a/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc index 9b9bd856044..65335c3a5c7 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-importing-2d.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Bridge documentation. @@ -31,12 +31,15 @@ \title Importing 2D Assets + You can download \QB from the \l{https://marketplace.qt.io/}{Qt Marketplace}. + \image studio-imported-assets.png "Artwork imported into Qt Design Studio" - You can import assets that you exported with \QB to a \QDS project as image - and QML files and edit them in the Design mode. If you make changes to your - design in the design tool, you can merge the changes into existing QML files - without overwriting the changes you have made in \QDS. + \QB enables you to export assets and then import them to a \QDS project + as image and QML files for editing in the \uicontrol {Form Editor}. If you + make changes to your design in the design tool, you can merge the changes + into existing QML files without overwriting the changes you have made in + \QDS. \note Attempting to import assets exported on another system might fail. diff --git a/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc index 8ad05eba811..887a148e817 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc @@ -35,6 +35,8 @@ exporting the 2D assets from design tools, whereas you can directly import 3D assets saved in widely-used 3D graphics formats. + You can download \QB from the \l{https://marketplace.qt.io/}{Qt Marketplace}. + \list \li \l{Importing 2D Assets} diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-importing.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-importing.qdoc index 17f7482233c..d8025677cf5 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-importing.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-importing.qdoc @@ -36,10 +36,11 @@ \title Importing 3D Assets - You can import files you created using 3D graphics applications and stored - in several widely-used formats, such as .blend, .dae, .fbx, .glb, .gltf, - .obj, .uia, or .uip. For a list of formats supported by each \l{Qt Quick 3D} - version, see the module documentation. + You can download \QB from the \l{https://marketplace.qt.io/}{Qt Marketplace}. + It enables you to import files you created using 3D graphics applications + and stored in several widely-used formats, such as .blend, .dae, .fbx, .glb, + .gltf, .obj, .uia, or .uip. For a list of formats supported by each + \l{Qt Quick 3D} version, see the module documentation. For more information about exporting 3D graphics from Maya, see \l{Exporting from Maya}. @@ -68,5 +69,5 @@ \endlist You can open the imported files in the Design mode for editing in the - \l{Editing 3D Scenes}{3D editor}. + \l{Editing 3D Scenes}{3D Editor}. */ From f11b00af7a28df2d84c2a513cc0abdc3a0367c8f Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 1 May 2020 08:23:30 +0200 Subject: [PATCH 11/26] CppCheck: Split QProcess::start command line manually Qt6 removed the convenience function taking the whole command line. Change-Id: I0b77eb15c6cd9cff25028dec4baf4a4a70eba83c Reviewed-by: Eike Ziller --- src/plugins/cppcheck/cppcheckrunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cppcheck/cppcheckrunner.cpp b/src/plugins/cppcheck/cppcheckrunner.cpp index 86b53f3007c..649e01a2471 100644 --- a/src/plugins/cppcheck/cppcheckrunner.cpp +++ b/src/plugins/cppcheck/cppcheckrunner.cpp @@ -43,7 +43,7 @@ CppcheckRunner::CppcheckRunner(CppcheckTool &tool) : { if (Utils::HostOsInfo::hostOs() == Utils::OsTypeLinux) { QProcess getConf; - getConf.start("getconf ARG_MAX"); + getConf.start("getconf", {"ARG_MAX"}); getConf.waitForFinished(2000); const QByteArray argMax = getConf.readAllStandardOutput().replace("\n", ""); m_maxArgumentsLength = std::max(argMax.toInt(), m_maxArgumentsLength); From f553e3d16a4e2c2f4953bdf1dbcfa355c393790f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 30 Apr 2020 11:41:31 +0200 Subject: [PATCH 12/26] qbs build: Fix sdktool autotest on Windows Make sure to fix the path separators for the macro that gets passed on the command line. Change-Id: I444883e6fc5a2b49d73a1fa52aa1ea26b207185c Reviewed-by: Christian Stenger --- tests/auto/sdktool/sdktool.qbs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/auto/sdktool/sdktool.qbs b/tests/auto/sdktool/sdktool.qbs index bd8b8d267a3..b7928c74875 100644 --- a/tests/auto/sdktool/sdktool.qbs +++ b/tests/auto/sdktool/sdktool.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs.FileInfo QtcAutotest { name: "sdktool autotest" @@ -8,5 +8,8 @@ QtcAutotest { files: "tst_sdktool.cpp" } - cpp.defines: base.concat(['SDKTOOL_DIR="' + qbs.installRoot + '/' + qtc.ide_libexec_path + '"']) + cpp.defines: base.concat([ + 'SDKTOOL_DIR="' + FileInfo.joinPaths(FileInfo.fromNativeSeparators(qbs.installRoot), + qtc.ide_libexec_path) + '"' + ]) } From d08e5c33ff7b1d14be5e679eae5c9e2641fcc020 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 4 May 2020 12:49:57 +0200 Subject: [PATCH 13/26] Qbs build: Suppress excessive warnings from Qt with clang 10 We get these thousands of times: /usr/include/qt/QtCore/qbytearray.h:586: warning: definition of implicit copy constructor for 'QByteRef' is deprecated because it has a user- declared copy assignment operator [-Wdeprecated-copy] inline QByteRef &operator=(const QByteRef &c) ^ /usr/include/qt/QtCore/5.14.2/QtCore/private/qmetatype_p.h:111: warning: use of logical '||' with constant operand [-Wconstant-logical-operand] Change-Id: I5f97f23d9b62ef1cd8d07495c46598d2a34a6d85 Reviewed-by: Christian Stenger --- qbs/imports/QtcProduct.qbs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index e54dc667f4a..862c8247433 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -36,6 +36,11 @@ Product { cpp.cxxFlags: { var flags = []; + if (qbs.toolchain.contains("clang") + && Utilities.versionCompare(cpp.compilerVersion, "10") >= 0) { + // Triggers a lot in Qt. + flags.push("-Wno-deprecated-copy", "-Wno-constant-logical-operand"); + } if (qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang")) { flags.push("-Wno-noexcept-type"); if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0) From 00200d8b905a30c68f62db40319a82120f408995 Mon Sep 17 00:00:00 2001 From: Johanna Vanhatapio Date: Wed, 29 Apr 2020 15:07:51 +0300 Subject: [PATCH 14/26] Doc: Describe 3D Editor local and global orientation mode Change-Id: Ibe281ba6d06c68a9c5f36a743563b6fc40fe7e0a Reviewed-by: Miikka Heikkinen Reviewed-by: Mahmoud Badri Reviewed-by: Leena Miettinen --- .../qtdesignstudio-3d-editor.qdoc | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc index 3892672a1d7..89a6b7742d9 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc @@ -45,25 +45,16 @@ scene did not contain them, you can add the corresponding Qt Quick 3D types from the \uicontrol Library. - You can use the manipulator mode toolbar buttons (2) to show the move, rotate, - or scale manipulator in the rendered scene when an item is selected and - to determine what happens when you drag the selected item. Select the - \uicontrol {Toggle Local/Global Orientation} button (3) to determine whether - the manipulators affect only the local transforms of the item or whether - they transform with respect to the global space. + You can use the toolbar buttons (2) to show the \e transformation + gizmo in the \uicontrol {3D Editor} when an item is selected + and to determine what happens when you drag the selected item. + Transformation refers to moving, rotating, or scaling of an object. + Select the \uicontrol {Toggle Local/Global Orientation} button (3) to + determine whether the gizmos affect only the local transformations of the + item or whether they transform with respect to the global space. \image studio-3d-editor.png "3D Editor" - For example, in local orientation mode, selecting an unrotated cube inside - a rotated group in the move mode shows rotated axes. Dragging on the red - arrow of the move manipulator affects only the x position of the item. - - In global mode, the manipulators always transform with respect to the global - space. In the example above, switching to global mode will show the red - arrow for the move manipulator aligned with the screen (assuming an - unrotated camera). Dragging on the red arrow may affect two or three of the - position values for the selected item in order to move it in global space. - The \e pivot of the component is used as the origin for position, scale, and rotation operations. You can set a \l{Setting Transform Properties} {local pivot offset} for an item in the \uicontrol Properties view to @@ -153,6 +144,23 @@ To freely rotate the item, select the gray circle. + \section1 Using Global and Local Orientation + + To switch between global and local orientation, select \uicontrol + {Toggle Local/Global Orientation}. + + In global orientation mode, transformation of a selected object is presented + with respect to the global space. For example, while the move tool is + selected, selecting a cube will show its move gizmo aligned with the axes + of global space. Dragging on the red arrow of the gizmo moves the object in + the global x direction. + + In local orientation mode, the position of a selected object is shown + according to local axes specific to the selected object. For example, + selecting a rotated cube will show its axes rotated, and not aligned with + the axes of global space. Dragging on the red arrow of the gizmo + moves the object in the local x direction in relation to the object. + \section1 Scaling Items \image studio-3d-editor-scale.png "3D editor in scale mode" From d10f6a031a564cb640309bf1fe5180f1d6d3f03f Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 30 Apr 2020 16:41:39 +0200 Subject: [PATCH 15/26] Android: Guard against kits without Qt version ... in AndroidConfigurations::updateAutomaticKitList. Also, simplify code a bit. Task-number: QTCREATORBUG-23963 Change-Id: I6835721ec8b89dec57d668393178427ffa03ff6d Reviewed-by: Eike Ziller Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidconfigurations.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index a574c4c1239..f5ce84007ed 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -1324,15 +1324,14 @@ static QVariant findOrRegisterDebugger(ToolChain *tc, void AndroidConfigurations::updateAutomaticKitList() { - const QList androidKits = Utils::filtered(KitManager::kits(), [](Kit *k) { - Core::Id deviceTypeId = DeviceTypeKitAspect::deviceTypeId(k); - return deviceTypeId == Core::Id(Constants::ANDROID_DEVICE_TYPE); - }); - - for (auto k: androidKits) { - if (k->value(Constants::ANDROID_KIT_NDK).isNull() || k->value(Constants::ANDROID_KIT_SDK).isNull()) { - k->setValueSilently(Constants::ANDROID_KIT_NDK, currentConfig().ndkLocation(QtSupport::QtKitAspect::qtVersion(k)).toString()); - k->setValue(Constants::ANDROID_KIT_SDK, currentConfig().sdkLocation().toString()); + for (Kit *k : KitManager::kits()) { + if (DeviceTypeKitAspect::deviceTypeId(k) == Constants::ANDROID_DEVICE_TYPE) { + if (k->value(Constants::ANDROID_KIT_NDK).isNull() || k->value(Constants::ANDROID_KIT_SDK).isNull()) { + if (BaseQtVersion *qt = QtKitAspect::qtVersion(k)) { + k->setValueSilently(Constants::ANDROID_KIT_NDK, currentConfig().ndkLocation(qt).toString()); + k->setValue(Constants::ANDROID_KIT_SDK, currentConfig().sdkLocation().toString()); + } + } } } From 67828b4fe5bf0b2e548b5641b28473f64744ea9b Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 5 May 2020 08:30:08 +0200 Subject: [PATCH 16/26] QmlDesigner: Add a missing import to the PropertyEditor Theme Change-Id: I4b6151b1e12311334a0c32e2fa6f7c30db150c92 Reviewed-by: Brook Cronin Reviewed-by: Thomas Hartmann --- .../propertyEditorQmlSources/imports/StudioTheme/Values.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml index cc8c4b4f8f5..9f04812af91 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml @@ -25,6 +25,7 @@ pragma Singleton import QtQuick 2.12 +import QtQuickDesignerTheme 1.0 QtObject { id: values From ff925d85e9bb1cfc2018d28ed738b015d7a96c55 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 4 May 2020 16:34:38 +0200 Subject: [PATCH 17/26] McuSupport: Remove outdated kits on KitManager::kitsLoaded ... instead while creating other kits. Task-number: QTCREATORBUG-23891 Change-Id: I7ef3a6c92d94d8e6dd7499490a694be1d91ed35e Reviewed-by: Eike Ziller --- src/plugins/mcusupport/mcusupportoptionspage.cpp | 1 - src/plugins/mcusupport/mcusupportplugin.cpp | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/mcusupport/mcusupportoptionspage.cpp b/src/plugins/mcusupport/mcusupportoptionspage.cpp index e4506b902d4..b06a97f174c 100644 --- a/src/plugins/mcusupport/mcusupportoptionspage.cpp +++ b/src/plugins/mcusupport/mcusupportoptionspage.cpp @@ -231,7 +231,6 @@ void McuSupportOptionsWidget::apply() return; McuSupportOptions::registerQchFiles(); - McuSupportOptions::removeOutdatedKits(); const McuTarget *mcuTarget = currentMcuTarget(); if (!mcuTarget) diff --git a/src/plugins/mcusupport/mcusupportplugin.cpp b/src/plugins/mcusupport/mcusupportplugin.cpp index 3028c7e80e2..0be99d8c05b 100644 --- a/src/plugins/mcusupport/mcusupportplugin.cpp +++ b/src/plugins/mcusupport/mcusupportplugin.cpp @@ -36,6 +36,7 @@ #include #include +#include using namespace ProjectExplorer; @@ -86,6 +87,10 @@ bool McuSupportPlugin::initialize(const QStringList& arguments, QString* errorSt void McuSupportPlugin::extensionsInitialized() { ProjectExplorer::DeviceManager::instance()->addDevice(McuSupportDevice::create()); + + connect(KitManager::instance(), &KitManager::kitsLoaded, [](){ + McuSupportOptions::removeOutdatedKits(); + }); } } // namespace Internal From f574f478ebc1d78dc496356a6c45c33189de1cc7 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 30 Apr 2020 10:30:36 +0200 Subject: [PATCH 18/26] build_plugin.py: Add option to pass additional arguments to CMake Change-Id: Ifab717fdca9b8c5d4585146e552a60fc66c08d74 Reviewed-by: Eike Ziller --- scripts/build_plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py index 45c16765d3d..97c4829745e 100755 --- a/scripts/build_plugin.py +++ b/scripts/build_plugin.py @@ -48,6 +48,9 @@ def get_arguments(): parser.add_argument('--output-path', help='Output path for resulting 7zip files') parser.add_argument('--add-path', help='Adds a CMAKE_PREFIX_PATH to the build', action='append', dest='prefix_paths', default=[]) + parser.add_argument('--add-config', help=('Adds the argument to the CMake configuration call. ' + 'Use "--add-config=-DSOMEVAR=SOMEVALUE" if the argument begins with a dash.'), + action='append', dest='config_args', default=[]) parser.add_argument('--deploy', help='Installs the "Dependencies" component of the plugin.', action='store_true', default=False) parser.add_argument('--debug', help='Enable debug builds', action='store_true', default=False) @@ -82,6 +85,7 @@ def build(args, paths): with open(os.path.join(paths.result, args.name + '.7z.git_sha'), 'w') as f: f.write(ide_revision) + cmake_args += args.config_args common.check_print_call(cmake_args + [paths.src], paths.build) common.check_print_call(['cmake', '--build', '.'], paths.build) common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--strip'], From 8b16daf0ed5323f23ac675a34863d5109e7f4e31 Mon Sep 17 00:00:00 2001 From: Brook Cronin Date: Thu, 16 Apr 2020 17:03:08 +0200 Subject: [PATCH 19/26] Theme: add design studio controls theming to theme color list I've chosen to add the controls themes colors to the main color list for couple of reasons. 1.) Adding the colors to the main color list allows them to be used from the QML constants file that defines the controls color theme, in turn allowing us to customize the look and feel of all controls on a per theme basis. 2.) I have added new colors instead of using the existing ones because of the ripple effects of modifying existing colors in the themes, i.e that often when you want to change one particular color in the UI modifying the value of existing colors in the theme has the unintended consequence of changing other parts of the UI. Thus adding a specific set for the controls allows us to have a fine grained approach to modifying the controls in any theme without disturbing the other elements of the existing UI theme. Change-Id: I16fb0458c870d01f68ed626676a665117628c917 Reviewed-by: Alessandro Portale --- src/libs/utils/theme/theme.h | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index 2bd1bd68459..e0f6e9cdb97 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -306,7 +306,43 @@ public: QmlDesigner_BorderColor, QmlDesigner_FormeditorBackgroundColor, QmlDesigner_AlternateBackgroundColor, - QmlDesigner_ScrollBarHandleColor + QmlDesigner_ScrollBarHandleColor, + + /* Palette for DS Controls */ + + DScontrolBackground, + DScontrolOutline, + DStextColor, + DSdisabledTextColor, + DSpanelBackground, + DShoverHighlight, + DScolumnBackground, + DSfocusEdit, + DSfocusDrag, + DScontrolBackgroundPressed, + DScontrolBackgroundChecked, + DSinteraction, + DSsliderActiveTrack, + DSsliderInactiveTrack, + DSsliderHandle, + DSsliderActiveTrackHover, + DSsliderInactiveTrackHover, + DSsliderHandleHover, + DSsliderActiveTrackFocus, + DSsliderInactiveTrackFocus, + DSsliderHandleFocus, + DSerrorColor, + DScontrolBackgroundDisabled, + DScontrolOutlineDisabled, + DStextColorDisabled, + DStextSelectionColor, + DStextSelectedTextColor, + DSscrollBarTrack, + DSscrollBarHandle, + DScontrolBackgroundInteraction, + DStranslationIndicatorBorder, + DSsectionHeadBackground, + DSchangedStateText }; enum Gradient { From cc04c8d8e42b8187e8289c8e2e4fdcf5fce8c11a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 29 Apr 2020 15:08:17 +0200 Subject: [PATCH 20/26] CMake build: Make translation function available to external plugins And fix that the "ts_all" target did not get the custom target prefix. Change-Id: Iff6a5e328456f3d949c31f2e41b48c400fad773c Reviewed-by: Tobias Hunger --- CMakeLists.txt | 1 + cmake/QtCreatorTranslations.cmake | 167 ++++++++++++++++++++ share/qtcreator/translations/CMakeLists.txt | 162 ------------------- src/CMakeLists.txt | 6 + 4 files changed, 174 insertions(+), 162 deletions(-) create mode 100644 cmake/QtCreatorTranslations.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cf66c74aa7..926cd34165c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(FeatureSummary) include(QtCreatorIDEBranding) +include(QtCreatorTranslations) set(IDE_REVISION FALSE CACHE BOOL "Marks the presence of IDE revision string.") set(IDE_REVISION_STR "" CACHE STRING "The IDE revision string.") diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake new file mode 100644 index 00000000000..dd0dae68758 --- /dev/null +++ b/cmake/QtCreatorTranslations.cmake @@ -0,0 +1,167 @@ +# Defines function add_translation_targets + +function(_extract_ts_data_from_targets outprefix) + set(_sources "") + set(_includes "") + + set(_targets "${ARGN}") + list(REMOVE_DUPLICATES _targets) + + foreach(t IN ITEMS ${_targets}) + if (TARGET "${t}") + get_target_property(_skip_translation "${t}" QT_SKIP_TRANSLATION) + get_target_property(_source_dir "${t}" SOURCE_DIR) + get_target_property(_interface_include_dirs "${t}" INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(_include_dirs "${t}" INCLUDE_DIRECTORIES) + get_target_property(_source_files "${t}" SOURCES) + get_target_property(_extra_translations "${t}" QT_EXTRA_TRANSLATIONS) + + if (NOT _skip_translation) + if(_include_dirs) + list(APPEND _includes ${_include_dirs}) + endif() + + if(_interface_include_dirs) + list(APPEND _interface_includes ${_include_dirs}) + endif() + + set(_target_sources "") + if(_source_files) + list(APPEND _target_sources ${_source_files}) + endif() + if(_extra_translations) + list(APPEND _target_sources ${_extra_translations}) + endif() + foreach(s IN ITEMS ${_target_sources}) + get_filename_component(_abs_source "${s}" ABSOLUTE BASE_DIR "${_source_dir}") + list(APPEND _sources "${_abs_source}") + endforeach() + endif() + endif() + endforeach() + + set("${outprefix}_sources" "${_sources}" PARENT_SCOPE) + set("${outprefix}_includes" "${_includes}" PARENT_SCOPE) +endfunction() + +function(_create_ts_custom_target name) + cmake_parse_arguments(_arg "" "FILE_PREFIX;TS_TARGET_PREFIX" "LANGUAGES;SOURCES;INCLUDES" ${ARGN}) + if (_arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.") + endif() + + if (NOT _arg_TS_TARGET_PREFIX) + set(_arg_TS_TARGET_PREFIX "ts_") + endif() + + set(ts_languages ${_arg_LANGUAGES}) + if (NOT ts_languages) + set(ts_languages "${name}") + endif() + + foreach(l IN ITEMS ${ts_languages}) + list(APPEND ts_files "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts") + endforeach() + + set(_sources "${_arg_SOURCES}") + list(SORT _sources) + + set(_includes "${_arg_INCLUDES}") + + list(REMOVE_DUPLICATES _sources) + list(REMOVE_DUPLICATES _includes) + + list(REMOVE_ITEM _sources "") + list(REMOVE_ITEM _includes "") + + set(_prepended_includes) + foreach(include IN LISTS _includes) + list(APPEND _prepended_includes "-I${include}") + endforeach() + set(_includes "${_prepended_includes}") + + string(REPLACE ";" "\n" _sources_str "${_sources}") + string(REPLACE ";" "\n" _includes_str "${_includes}") + + set(ts_file_list "${CMAKE_CURRENT_BINARY_DIR}/ts_${name}.lst") + file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n") + + add_custom_target("${_arg_TS_TARGET_PREFIX}${name}" + COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generate .ts files" + DEPENDS ${_sources} + VERBATIM) +endfunction() + +function(add_translation_targets file_prefix) + if (NOT TARGET Qt5::lrelease) + # No Qt translation tools were found: Skip this directory + message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.") + return() + endif() + + cmake_parse_arguments(_arg "" + "OUTPUT_DIRECTORY;INSTALL_DESTINATION;TS_TARGET_PREFIX;QM_TARGET_PREFIX;ALL_QM_TARGET" + "LANGUAGES;TARGETS;SOURCES;INCLUDES" ${ARGN}) + if (_arg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Invalid parameters to add_translation_targets: ${_arg_UNPARSED_ARGUMENTS}.") + endif() + + if (NOT _arg_TS_TARGET_PREFIX) + set(_arg_TS_TARGET_PREFIX "ts_") + endif() + + if (NOT _arg_QM_TARGET_PREFIX) + set(_arg_QM_TARGET_PREFIX "generate_qm_file_") + endif() + + if (NOT _arg_ALL_QM_TARGET) + set(_arg_ALL_QM_TARGET "generate_qm_files") + endif() + + if (NOT _arg_OUTPUT_DIRECTORY) + set(_arg_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + endif() + + if (NOT _arg_INSTALL_DESTINATION) + message(FATAL_ERROR "Please provide a INSTALL_DESTINATION to add_translation_targets") + endif() + + _extract_ts_data_from_targets(_to_process "${_arg_TARGETS}") + + _create_ts_custom_target(untranslated + FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" + SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) + + if (NOT TARGET "${_arg_ALL_QM_TARGET}") + add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files") + endif() + + foreach(l IN ITEMS ${_arg_LANGUAGES}) + set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts") + set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm") + + _create_ts_custom_target("${l}" FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" + SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) + + add_custom_command(OUTPUT "${_qm_file}" + COMMAND Qt5::lrelease "${_ts_file}" -qm "${_qm_file}" + MAIN_DEPENDENCY "${_ts_file}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generate .qm file" + VERBATIM) + add_custom_target("${_arg_QM_TARGET_PREFIX}${l}" DEPENDS "${_qm_file}") + install(FILES "${_qm_file}" DESTINATION ${_arg_INSTALL_DESTINATION}) + + add_dependencies("${_arg_ALL_QM_TARGET}" "${_arg_QM_TARGET_PREFIX}${l}") + endforeach() + + _create_ts_custom_target(all + LANGUAGES ${_arg_LANGUAGES} + TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" + FILE_PREFIX "${file_prefix}" + SOURCES ${_to_process_sources} ${_arg_SOURCES} + INCLUDES ${_to_process_includes} ${_arg_INCLUDES} + ) +endfunction() diff --git a/share/qtcreator/translations/CMakeLists.txt b/share/qtcreator/translations/CMakeLists.txt index 7b4d29bd77c..d8ade110bc1 100644 --- a/share/qtcreator/translations/CMakeLists.txt +++ b/share/qtcreator/translations/CMakeLists.txt @@ -44,168 +44,6 @@ else() VERBATIM) endif() -function(_extract_ts_data_from_targets outprefix) - set(_sources "") - set(_includes "") - - set(_targets "${ARGN}") - list(REMOVE_DUPLICATES _targets) - - foreach(t IN ITEMS ${_targets}) - if (TARGET "${t}") - get_target_property(_skip_translation "${t}" QT_SKIP_TRANSLATION) - get_target_property(_source_dir "${t}" SOURCE_DIR) - get_target_property(_interface_include_dirs "${t}" INTERFACE_INCLUDE_DIRECTORIES) - get_target_property(_include_dirs "${t}" INCLUDE_DIRECTORIES) - get_target_property(_source_files "${t}" SOURCES) - get_target_property(_extra_translations "${t}" QT_EXTRA_TRANSLATIONS) - - if (NOT _skip_translation) - if(_include_dirs) - list(APPEND _includes ${_include_dirs}) - endif() - - if(_interface_include_dirs) - list(APPEND _interface_includes ${_include_dirs}) - endif() - - set(_target_sources "") - if(_source_files) - list(APPEND _target_sources ${_source_files}) - endif() - if(_extra_translations) - list(APPEND _target_sources ${_extra_translations}) - endif() - foreach(s IN ITEMS ${_target_sources}) - get_filename_component(_abs_source "${s}" ABSOLUTE BASE_DIR "${_source_dir}") - list(APPEND _sources "${_abs_source}") - endforeach() - endif() - endif() - endforeach() - - set("${outprefix}_sources" "${_sources}" PARENT_SCOPE) - set("${outprefix}_includes" "${_includes}" PARENT_SCOPE) -endfunction() - -function(_create_ts_custom_target name) - cmake_parse_arguments(_arg "" "FILE_PREFIX;TS_TARGET_PREFIX" "LANGUAGES;SOURCES;INCLUDES" ${ARGN}) - if (_arg_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.") - endif() - - if (NOT _arg_TS_TARGET_PREFIX) - set(_arg_TS_TARGET_PREFIX "ts_") - endif() - - set(ts_languages ${_arg_LANGUAGES}) - if (NOT ts_languages) - set(ts_languages "${name}") - endif() - - foreach(l IN ITEMS ${ts_languages}) - list(APPEND ts_files "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts") - endforeach() - - set(_sources "${_arg_SOURCES}") - list(SORT _sources) - - set(_includes "${_arg_INCLUDES}") - - list(REMOVE_DUPLICATES _sources) - list(REMOVE_DUPLICATES _includes) - - list(REMOVE_ITEM _sources "") - list(REMOVE_ITEM _includes "") - - set(_prepended_includes) - foreach(include IN LISTS _includes) - list(APPEND _prepended_includes "-I${include}") - endforeach() - set(_includes "${_prepended_includes}") - - string(REPLACE ";" "\n" _sources_str "${_sources}") - string(REPLACE ";" "\n" _includes_str "${_includes}") - - set(ts_file_list "${CMAKE_CURRENT_BINARY_DIR}/ts_${name}.lst") - file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n") - - add_custom_target("${_arg_TS_TARGET_PREFIX}${name}" - COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generate .ts files" - DEPENDS ${_sources} - VERBATIM) -endfunction() - -function(add_translation_targets file_prefix) - if (NOT TARGET Qt5::lrelease) - # No Qt translation tools were found: Skip this directory - message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.") - return() - endif() - - cmake_parse_arguments(_arg "" - "OUTPUT_DIRECTORY;INSTALL_DESTINATION;TS_TARGET_PREFIX;QM_TARGET_PREFIX;ALL_QM_TARGET" - "LANGUAGES;TARGETS;SOURCES;INCLUDES" ${ARGN}) - if (_arg_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Invalid parameters to add_translation_targets: ${_arg_UNPARSED_ARGUMENTS}.") - endif() - - if (NOT _arg_TS_TARGET_PREFIX) - set(_arg_TS_TARGET_PREFIX "ts_") - endif() - - if (NOT _arg_QM_TARGET_PREFIX) - set(_arg_QM_TARGET_PREFIX "generate_qm_file_") - endif() - - if (NOT _arg_ALL_QM_TARGET) - set(_arg_ALL_QM_TARGET "generate_qm_files") - endif() - - if (NOT _arg_OUTPUT_DIRECTORY) - set(_arg_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endif() - - if (NOT _arg_INSTALL_DESTINATION) - message(FATAL_ERROR "Please provide a INSTALL_DESTINATION to add_translation_targets") - endif() - - _extract_ts_data_from_targets(_to_process "${_arg_TARGETS}") - - _create_ts_custom_target(untranslated - FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" - SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) - - if (NOT TARGET "${_arg_ALL_QM_TARGET}") - add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files") - endif() - - foreach(l IN ITEMS ${_arg_LANGUAGES}) - set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts") - set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm") - - _create_ts_custom_target("${l}" FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" - SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) - - add_custom_command(OUTPUT "${_qm_file}" - COMMAND Qt5::lrelease "${_ts_file}" -qm "${_qm_file}" - MAIN_DEPENDENCY "${_ts_file}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generate .qm file" - VERBATIM) - add_custom_target("${_arg_QM_TARGET_PREFIX}${l}" DEPENDS "${_qm_file}") - install(FILES "${_qm_file}" DESTINATION ${_arg_INSTALL_DESTINATION}) - - add_dependencies("${_arg_ALL_QM_TARGET}" "${_arg_QM_TARGET_PREFIX}${l}") - endforeach() - - _create_ts_custom_target(all LANGUAGES ${_arg_LANGUAGES} FILE_PREFIX "${file_prefix}" - SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) -endfunction() - -### collect targets to include in documentation: add_translation_targets(qtcreator LANGUAGES ${languages} OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/translations" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a04ed8a959b..25276f1de1e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,6 +49,10 @@ if (NOT DEFINED add_qtc_plugin) include(\${CMAKE_CURRENT_LIST_DIR}/QtCreatorAPI.cmake) endif() +if (NOT DEFINED add_translation_targets) + include(\${CMAKE_CURRENT_LIST_DIR}/QtCreatorTranslations.cmake) +endif() + if (NOT TARGET QtCreator::Core) include(\${CMAKE_CURRENT_LIST_DIR}/QtCreatorTargets.cmake) endif() @@ -61,6 +65,7 @@ export(EXPORT QtCreator file(COPY ${PROJECT_SOURCE_DIR}/cmake/QtCreatorIDEBranding.cmake + ${PROJECT_SOURCE_DIR}/cmake/QtCreatorTranslations.cmake ${PROJECT_SOURCE_DIR}/cmake/QtCreatorAPI.cmake DESTINATION ${CMAKE_BINARY_DIR}/cmake ) @@ -69,6 +74,7 @@ file(COPY install( FILES ${PROJECT_SOURCE_DIR}/cmake/QtCreatorIDEBranding.cmake + ${PROJECT_SOURCE_DIR}/cmake/QtCreatorTranslations.cmake ${PROJECT_SOURCE_DIR}/cmake/QtCreatorAPI.cmake ${CMAKE_BINARY_DIR}/cmake/QtCreatorConfig.cmake DESTINATION lib/cmake/QtCreator From ae5466f3b1e52163a5fa12fd533acdb2db6a687d Mon Sep 17 00:00:00 2001 From: Brook Cronin Date: Thu, 16 Apr 2020 17:26:30 +0200 Subject: [PATCH 21/26] Theme: fix css to use theme colors Change-Id: I82c278696e72d0a1ed08afef0e161fd83be0206f Reviewed-by: Alessandro Portale --- .../components/connectioneditor/stylesheet.css | 4 ++-- .../qmldesigner/components/resources/stylesheet.css | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmldesigner/components/connectioneditor/stylesheet.css b/src/plugins/qmldesigner/components/connectioneditor/stylesheet.css index aeacc637330..5155ac3efac 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/stylesheet.css +++ b/src/plugins/qmldesigner/components/connectioneditor/stylesheet.css @@ -40,7 +40,7 @@ QHeaderView::section { background-color: #494949; padding: 4px; border: 1px solid black; - color: #cacaca; + color: creatorTheme.DStextColor; margin: 2px } @@ -54,7 +54,7 @@ QWidget#widgetSpacer { QStackedWidget { border: 0px; - background-color: #4f4f4f; + background-color: creatorTheme.QmlDesigner_TabLight; } QTabBar::tab:selected { diff --git a/src/plugins/qmldesigner/components/resources/stylesheet.css b/src/plugins/qmldesigner/components/resources/stylesheet.css index 841540f1c87..cc72eae062d 100644 --- a/src/plugins/qmldesigner/components/resources/stylesheet.css +++ b/src/plugins/qmldesigner/components/resources/stylesheet.css @@ -51,12 +51,12 @@ QLineEdit#itemLibrarySearchInput QComboBox QAbstractItemView { show-decoration-selected: 1; /* make the selection span the entire width of the view */ - background-color: #494949; /* sets background of the menu */ + background-color: creatorTheme.DSpanelBackground; /* sets background of the menu */ border: 1px solid black; margin: 0px; /* some spacing around the menu */ - color: #cacaca; - selection-background-color: #d2d2d2; - selection-color: #404040; + color: creatorTheme.DStextColor; + selection-background-color: creatorTheme.DSinteraction; + selection-color: creatorTheme.DStextSelectedTextColor; } QTabWidget { From 20dc69c45dddf1672b0a2beca27d8dbc3ba2ad00 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 22 Apr 2020 14:27:00 +0200 Subject: [PATCH 22/26] Squish: Try stabilizing CLI output Change-Id: I0ff6aaaa62b9596487a279cdf5e597a3b7c83679 Reviewed-by: Christian Stenger --- tests/system/suite_debugger/tst_cli_output_console/test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/system/suite_debugger/tst_cli_output_console/test.py b/tests/system/suite_debugger/tst_cli_output_console/test.py index 9774ea59b23..3f996241af1 100644 --- a/tests/system/suite_debugger/tst_cli_output_console/test.py +++ b/tests/system/suite_debugger/tst_cli_output_console/test.py @@ -39,12 +39,15 @@ def main(): mainEditor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") replaceEditorContent(mainEditor, "") typeLines(mainEditor, ["#include ", + "#include ", "#include ", + "struct Waiter:public QThread{Waiter(){QThread::sleep(2);}};", "int main(int, char *argv[])", "{", 'std::cout << \"' + outputStdOut + '\" << std::endl;', 'std::cerr << \"' + outputStdErr + '\" << std::endl;', - 'qDebug() << \"' + outputQDebug + '\";']) + 'qDebug() << \"' + outputQDebug + '\";', + 'Waiter();']) # Rely on code completion for closing bracket invokeMenuItem("File", "Save All") openDocument(project + "." + project + "\\.pro") From bab97bf9b6e2060af8d56918e709a09fb0aeebef Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 5 May 2020 10:39:41 +0200 Subject: [PATCH 23/26] qbs build: Disable clang tooling plugins for llvm >= 10 They won't build with the new version. Change-Id: I77c94817290418b0a97222465f0f8a8660053fae Reviewed-by: Christian Stenger --- qbs/modules/libclang/functions.js | 3 +++ qbs/modules/libclang/libclang.qbs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qbs/modules/libclang/functions.js b/qbs/modules/libclang/functions.js index d1bd2dd2ea8..0c15a2a6283 100644 --- a/qbs/modules/libclang/functions.js +++ b/qbs/modules/libclang/functions.js @@ -3,6 +3,7 @@ var File = require("qbs.File") var FileInfo = require("qbs.FileInfo") var MinimumLLVMVersion = "8.0.0" // CLANG-UPGRADE-CHECK: Adapt minimum version numbers. var Process = require("qbs.Process") +var Utilities = require("qbs.Utilities") function readOutput(executable, args) { @@ -108,6 +109,8 @@ function formattingLibs(llvmConfig, qtcFunctions, targetOS) return []; var clangVersion = version(llvmConfig) + if (Utilities.versionCompare(clangVersion, "10") >= 0) + return []; var libs = [] if (qtcFunctions.versionIsAtLeast(clangVersion, MinimumLLVMVersion)) { if (qtcFunctions.versionIsAtLeast(clangVersion, "8.0.0")) { diff --git a/qbs/modules/libclang/libclang.qbs b/qbs/modules/libclang/libclang.qbs index 9c2cfae23d1..bb2878f1980 100644 --- a/qbs/modules/libclang/libclang.qbs +++ b/qbs/modules/libclang/libclang.qbs @@ -64,7 +64,8 @@ Module { return incl != llvmIncludeDir; }) property stringList llvmToolingCxxFlags: clangProbe.llvmToolingCxxFlags - property bool toolingEnabled: !Environment.getEnv("QTC_DISABLE_CLANG_REFACTORING") + property bool toolingEnabled: Utilities.versionCompare(llvmVersion, "10") < 0 + && !Environment.getEnv("QTC_DISABLE_CLANG_REFACTORING") validate: { if (!clangProbe.found) { From a18c59faca243015a1c06f82a6e52eb64c205568 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Sat, 2 May 2020 14:23:24 +0300 Subject: [PATCH 24/26] Andriod: fix "always use this device" button not working Fixes: QTCREATORBUG-23918 Change-Id: Ib9fa5bf0417f7fe028ec357b06d71577fa44c971 Reviewed-by: Alessandro Portale --- src/plugins/android/androiddevicedialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/android/androiddevicedialog.cpp b/src/plugins/android/androiddevicedialog.cpp index a2783d4d514..35da26b24cd 100644 --- a/src/plugins/android/androiddevicedialog.cpp +++ b/src/plugins/android/androiddevicedialog.cpp @@ -483,8 +483,12 @@ AndroidDeviceDialog::~AndroidDeviceDialog() AndroidDeviceInfo AndroidDeviceDialog::device() { + refreshDeviceList(); + if (!m_defaultDevice.isEmpty()) { - auto device = std::find_if(m_connectedDevices.begin(), m_connectedDevices.end(), [this](const AndroidDeviceInfo& info) { + auto device = std::find_if(m_connectedDevices.begin(), + m_connectedDevices.end(), + [this](const AndroidDeviceInfo &info) { return info.serialNumber == m_defaultDevice || info.avdname == m_defaultDevice; }); @@ -494,8 +498,6 @@ AndroidDeviceInfo AndroidDeviceDialog::device() m_defaultDevice.clear(); } - refreshDeviceList(); - if (exec() == QDialog::Accepted) return m_model->device(m_ui->deviceView->currentIndex()); return AndroidDeviceInfo(); From cd634594466f122dc7404a57298c2ea9e07412c9 Mon Sep 17 00:00:00 2001 From: Brook Cronin Date: Thu, 16 Apr 2020 17:30:34 +0200 Subject: [PATCH 25/26] Theme: fix file navigation breadcrumb bar to use theme color Change-Id: Ice727823e6081c02e492c7469ed2f305e81bcb5a Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/designmodewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 7769fb43a91..d9db2ea0067 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -287,7 +287,7 @@ void DesignModeWidget::setup() // Apply stylesheet to QWidget QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css"); sheet += Utils::FileReader::fetchQrc(":/qmldesigner/scrollbar.css"); - sheet += "QLabel { background-color: #4f4f4f; }"; + sheet += "QLabel { background-color: creatorTheme.DSsectionHeadBackground; }"; navigationView.widget->setStyleSheet(Theme::replaceCssColors(QString::fromUtf8(sheet))); // Create DockWidget From b3f3deccb0e4541a4c6d047e67738a6a44ec302d Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 5 May 2020 19:48:05 +0200 Subject: [PATCH 26/26] QmlDesigner: Fix crash Calling m_rewriterView->clearErrorAndWarnings() has side effects that can call back to the model and meta info system. As a consequence meta info data based on the old document is created. This can lead to a crash when the new document is set and the old document is released. Change-Id: I47de904914c1daa8d4a76aa1889f90bd86a07af7 Reviewed-by: Tim Jenssen --- .../qmldesigner/designercore/model/texttomodelmerger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index b7426c7a43c..41bc1944ca6 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -977,9 +977,6 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH if (rewriterBenchmark().isInfoEnabled()) time.start(); - // maybe the project environment (kit, ...) changed, so we need to clean old caches - NodeMetaInfo::clearCache(); - const QUrl url = m_rewriterView->model()->fileUrl(); m_qrcMapping.clear(); @@ -989,6 +986,9 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH setActive(true); m_rewriterView->setIncompleteTypeInformation(false); + // maybe the project environment (kit, ...) changed, so we need to clean old caches + NodeMetaInfo::clearCache(); + try { Snapshot snapshot = m_rewriterView->textModifier()->qmljsSnapshot();