From 45c580b91a9fed6b547750f8577012ac28637f66 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 9 Aug 2019 10:55:21 +0200 Subject: [PATCH 01/17] QmlDesigner: Add icon for curve editor Change-Id: I36990c6a5a7b8fda8e8d7b99244dddafe8319665 Reviewed-by: Thomas Hartmann --- .../timelineeditor/images/remove_timeline.png | Bin 190 -> 150 bytes .../images/remove_timeline@2x.png | Bin 179 -> 139 bytes .../components/timelineeditor/timeline.qrc | 2 ++ .../components/timelineeditor/timelineicons.h | 2 ++ .../timelineeditor/timelinetoolbar.cpp | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/images/remove_timeline.png b/src/plugins/qmldesigner/components/timelineeditor/images/remove_timeline.png index 0589f982a7b3e0d9769ba3af8b734a056dcd409d..bb5e3e846e2f52e5984f3c4990bb6d3e17cb7ca6 100644 GIT binary patch delta 9 QcmdnTIE`^a)Wjwm01^rVkN^Mx delta 47 zcmbQnxQ}r{lqzR|M`SSr1Gg{;GcwGYBf-GHz+U3%>&pI!gPEJva`vwDRTIPQ0RXBC Ao&W#< diff --git a/src/plugins/qmldesigner/components/timelineeditor/images/remove_timeline@2x.png b/src/plugins/qmldesigner/components/timelineeditor/images/remove_timeline@2x.png index 9eed9ce3c35d069f3e144c38a1b6143c72023ac0..838a46a7a67e5115f3bec04a1980a2c79adeb05c 100644 GIT binary patch delta 9 QcmdnY*v&X0aAKtu01+YsW&i*H delta 47 zcmeBX+{`#3P?fX5BeIx*fm;}a85w5Hkzin8U@!6Xb!C6V!OYF3aOKaOl@tAJ0seXn A3jhEB diff --git a/src/plugins/qmldesigner/components/timelineeditor/timeline.qrc b/src/plugins/qmldesigner/components/timelineeditor/timeline.qrc index b793c1f8dac..158b982e85f 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timeline.qrc +++ b/src/plugins/qmldesigner/components/timelineeditor/timeline.qrc @@ -73,5 +73,7 @@ images/timeline-16px.png images/remove_timeline.png images/remove_timeline@2x.png + images/curveGraphIcon.png + images/curveGraphIcon@2x.png diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h b/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h index 641d4e77b67..c03adde2cd4 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineicons.h @@ -83,6 +83,8 @@ const Utils::Icon REMOVE_TIMELINE({ // Icons on the toolbars const Utils::Icon ANIMATION({ {":/timelineplugin/images/animation.png", Utils::Theme::IconsBaseColor}}); +const Utils::Icon CURVE_EDITORDIALOG({ + {":/timelineplugin/images/curveGraphIcon.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon TO_FIRST_FRAME({ {":/timelineplugin/images/to_first_frame.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon BACK_ONE_FRAME({ diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp index 2b3560795d1..7a085700bb1 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp @@ -251,7 +251,7 @@ void TimelineToolBar::createLeftControls() addActionToGroup(settingsAction); auto *curveEditorAction = createAction(TimelineConstants::C_CURVE_EDITOR, - TimelineIcons::ANIMATION.icon(), + TimelineIcons::CURVE_EDITORDIALOG.icon(), tr("Curve Editor"), QKeySequence(Qt::Key_C)); From bc5e7639614c6abc7c1c439a6e71ceaa4d40e938 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 9 Aug 2019 08:54:45 +0200 Subject: [PATCH 02/17] Python: Remove unneeded dependency to QtSupport Change-Id: I080c9316068eb1ac4738aaffae57c913ea63176f Reviewed-by: Cristian Maureira-Fredes Reviewed-by: hjk --- src/plugins/pythoneditor/CMakeLists.txt | 2 +- src/plugins/pythoneditor/pythoneditor.qbs | 1 - src/plugins/pythoneditor/pythoneditor_dependencies.pri | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/pythoneditor/CMakeLists.txt b/src/plugins/pythoneditor/CMakeLists.txt index 1f0022ca156..2cd855ce7e0 100644 --- a/src/plugins/pythoneditor/CMakeLists.txt +++ b/src/plugins/pythoneditor/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(PythonEditor - PLUGIN_DEPENDS Core QtSupport ProjectExplorer TextEditor + PLUGIN_DEPENDS Core ProjectExplorer TextEditor SOURCES pythoneditor.cpp pythoneditor.h pythoneditorconstants.h diff --git a/src/plugins/pythoneditor/pythoneditor.qbs b/src/plugins/pythoneditor/pythoneditor.qbs index e6b36ae262c..c3cc572a7d4 100644 --- a/src/plugins/pythoneditor/pythoneditor.qbs +++ b/src/plugins/pythoneditor/pythoneditor.qbs @@ -8,7 +8,6 @@ QtcPlugin { Depends { name: "Core" } Depends { name: "TextEditor" } - Depends { name: "QtSupport" } Depends { name: "ProjectExplorer" } Group { diff --git a/src/plugins/pythoneditor/pythoneditor_dependencies.pri b/src/plugins/pythoneditor/pythoneditor_dependencies.pri index 81fbcab5818..b9502f09975 100644 --- a/src/plugins/pythoneditor/pythoneditor_dependencies.pri +++ b/src/plugins/pythoneditor/pythoneditor_dependencies.pri @@ -5,5 +5,4 @@ QTC_LIB_DEPENDS += \ QTC_PLUGIN_DEPENDS += \ coreplugin \ texteditor \ - qtsupport \ projectexplorer From babbb0a9dbae053b50493b4ed18c3134f291c675 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 9 Aug 2019 11:04:51 +0200 Subject: [PATCH 03/17] iOS: Fix simulator listing with Xcode 11 Xcode 11 changes the output of simctl slightly. At some point it introduced a bool "isAvailable" in addition to the string "availability". Now the latter has been removed. To avoid listing all devices as available, we need to adapt our simctl output parsing. This already takes effect when installing Xcode 11 Beta, even when not actually using it, since all Xcode versions share the simulator infrastructure. Fixes: QTCREATORBUG-22757 Change-Id: I1ef416f6c544db53d9ee99ccc3b0a2e97dfcc870 Reviewed-by: Christian Stenger --- src/plugins/ios/simulatorcontrol.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp index baecf63a9ca..1e22e3a2181 100644 --- a/src/plugins/ios/simulatorcontrol.cpp +++ b/src/plugins/ios/simulatorcontrol.cpp @@ -60,6 +60,7 @@ const char deviceTypeTag[] = "devicetypes"; const char devicesTag[] = "devices"; const char availabilityTag[] = "availability"; const char unavailabilityToken[] = "unavailable"; +const char availabilityTagNew[] = "isAvailable"; // at least since Xcode 10 const char identifierTag[] = "identifier"; const char runtimesTag[] = "runtimes"; const char nameTag[] = "name"; @@ -116,6 +117,13 @@ static bool launchSimulator(const QString &simUdid) { return QProcess::startDetached(simulatorAppPath, {"--args", "-CurrentDeviceUDID", simUdid}); } +static bool isAvailable(const QJsonObject &object) +{ + return object.contains(availabilityTagNew) + ? object.value(availabilityTagNew).toBool() + : !object.value(availabilityTag).toString().contains(unavailabilityToken); +} + static QList getAvailableDeviceTypes() { QList deviceTypes; @@ -126,7 +134,7 @@ static QList getAvailableDeviceTypes() const QJsonArray runtimesArray = doc.object().value(deviceTypeTag).toArray(); foreach (const QJsonValue deviceTypeValue, runtimesArray) { QJsonObject deviceTypeObject = deviceTypeValue.toObject(); - if (!deviceTypeObject.value(availabilityTag).toString().contains(unavailabilityToken)) { + if (isAvailable(deviceTypeObject)) { DeviceTypeInfo deviceType; deviceType.name = deviceTypeObject.value(nameTag).toString("unknown"); deviceType.identifier = deviceTypeObject.value(identifierTag).toString("unknown"); @@ -150,7 +158,7 @@ static QList getAvailableRuntimes() const QJsonArray runtimesArray = doc.object().value(runtimesTag).toArray(); foreach (const QJsonValue runtimeValue, runtimesArray) { QJsonObject runtimeObject = runtimeValue.toObject(); - if (!runtimeObject.value(availabilityTag).toString().contains(unavailabilityToken)) { + if (isAvailable(runtimeObject)) { RuntimeInfo runtime; runtime.name = runtimeObject.value(nameTag).toString("unknown"); runtime.build = runtimeObject.value(buildVersionTag).toString("unknown"); @@ -232,8 +240,7 @@ static QList getAllSimulatorDevices() device.identifier = deviceObject.value(udidTag).toString(); device.name = deviceObject.value(nameTag).toString(); device.runtimeName = runtime; - const QString availableStr = deviceObject.value(availabilityTag).toString(); - device.available = !availableStr.contains(unavailabilityToken); + device.available = isAvailable(deviceObject); device.state = deviceObject.value(stateTag).toString(); simulatorDevices.append(device); } From 16b8ab2461fb5172b001271024331ca28e2be344 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 6 Aug 2019 09:56:50 +0200 Subject: [PATCH 04/17] Help: Fix handling of ampersands in open pages pane E.g. for "Plug & Paint" example documentation. The list view may not show double ampersands, but for the context menu they must be "quoted". Change-Id: I773ac50f93b975504a5aff172336da77a703b52b Reviewed-by: hjk --- src/plugins/help/openpagesmodel.cpp | 3 +-- src/plugins/help/openpageswidget.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/help/openpagesmodel.cpp b/src/plugins/help/openpagesmodel.cpp index d00600737e6..3587acfc096 100644 --- a/src/plugins/help/openpagesmodel.cpp +++ b/src/plugins/help/openpagesmodel.cpp @@ -56,8 +56,7 @@ QVariant OpenPagesModel::data(const QModelIndex &index, int role) const case Qt::ToolTipRole: return m_pages.at(index.row())->source().toString(); case Qt::DisplayRole: { - QString title = m_pages.at(index.row())->title(); - title.replace('&', "&&"); + const QString title = m_pages.at(index.row())->title(); return title.isEmpty() ? tr("(Untitled)") : title; } default: diff --git a/src/plugins/help/openpageswidget.cpp b/src/plugins/help/openpageswidget.cpp index a6d98bbb702..55b55353f24 100644 --- a/src/plugins/help/openpageswidget.cpp +++ b/src/plugins/help/openpageswidget.cpp @@ -29,6 +29,7 @@ #include "openpagesmodel.h" #include +#include #include #include @@ -86,10 +87,9 @@ void OpenPagesWidget::contextMenuRequested(QPoint pos) if (index.column() == 1) index = index.sibling(index.row(), 0); QMenu contextMenu; - QAction *closeEditor = contextMenu.addAction(tr("Close %1").arg(index.data() - .toString())); - QAction *closeOtherEditors = contextMenu.addAction(tr("Close All Except %1") - .arg(index.data().toString())); + const QString displayString = Utils::quoteAmpersands(index.data().toString()); + QAction *closeEditor = contextMenu.addAction(tr("Close %1").arg(displayString)); + QAction *closeOtherEditors = contextMenu.addAction(tr("Close All Except %1").arg(displayString)); if (model()->rowCount() == 1) { closeEditor->setEnabled(false); From 63c9c5124ec3cb5bdda3d78dafc12ab18a3bf2e9 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 6 Aug 2019 10:07:19 +0200 Subject: [PATCH 05/17] Use common functions for handling ampersands/accelerators Change-Id: I4c74a041a656ed547db0a7406f4306008a513879 Reviewed-by: hjk --- src/libs/utils/proxyaction.cpp | 9 +++++---- src/plugins/debugger/watchhandler.cpp | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libs/utils/proxyaction.cpp b/src/libs/utils/proxyaction.cpp index bc17dea5803..99595da3ced 100644 --- a/src/libs/utils/proxyaction.cpp +++ b/src/libs/utils/proxyaction.cpp @@ -25,6 +25,8 @@ #include "proxyaction.h" +#include "stringutils.h" + using namespace Utils; ProxyAction::ProxyAction(QObject *parent) : @@ -167,10 +169,9 @@ void ProxyAction::updateToolTipWithKeySequence() QString ProxyAction::stringWithAppendedShortcut(const QString &str, const QKeySequence &shortcut) { - QString s = str; - s.replace(QLatin1String("&&"), QLatin1String("&")); - return QString::fromLatin1("%1 %2"). - arg(s, shortcut.toString(QKeySequence::NativeText)); + const QString s = stripAccelerator(str); + return QString::fromLatin1("%1 %2") + .arg(s, shortcut.toString(QKeySequence::NativeText)); } ProxyAction *ProxyAction::proxyActionWithIcon(QAction *original, const QIcon &newIcon) diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 3e95668d52d..9eccfbdb1eb 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -1591,8 +1592,7 @@ static QString removeWatchActionText(QString exp) exp.truncate(30); exp.append("..."); } - return WatchModel::tr("Remove Expression Evaluator for \"%1\"") - .arg(exp.replace('&', "&&")); + return WatchModel::tr("Remove Expression Evaluator for \"%1\"").arg(Utils::quoteAmpersands(exp)); } static void copyToClipboard(const QString &clipboardText) From b2cd6296688862dcc7cfc7a1283158f6e9464ac2 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 9 Aug 2019 14:48:25 +0200 Subject: [PATCH 06/17] QmlDesigner: Use ICore::dialogParent() for EasingCurveDialog Change-Id: Ibf02a4823cef4e613614f54da1d39648d144cf9a Reviewed-by: Tim Jenssen --- .../qmldesigner/components/timelineeditor/timelinewidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp index 169ac5f2f00..a7ab5d0491d 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp @@ -39,6 +39,8 @@ #include #include +#include + #include #include #include @@ -372,7 +374,7 @@ void TimelineWidget::openEasingCurveEditor() QList frames; for (auto *item : graphicsScene()->selectedKeyframes()) frames.append(item->frameNode()); - EasingCurveDialog::runDialog(frames); + EasingCurveDialog::runDialog(frames, Core::ICore::dialogParent()); } } From 596e4b041a5ac7ca53b6dfd9de69b3226100d057 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 9 Aug 2019 12:56:23 +0200 Subject: [PATCH 07/17] QmlDesigner: Add missing PGN Change-Id: Ie846c18c498ac838969c9ef8bda1090746557a81 Reviewed-by: Christian Stenger --- .../timelineeditor/images/curveGraphIcon.png | Bin 0 -> 236 bytes .../timelineeditor/images/curveGraphIcon@2x.png | Bin 0 -> 484 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/plugins/qmldesigner/components/timelineeditor/images/curveGraphIcon.png create mode 100644 src/plugins/qmldesigner/components/timelineeditor/images/curveGraphIcon@2x.png diff --git a/src/plugins/qmldesigner/components/timelineeditor/images/curveGraphIcon.png b/src/plugins/qmldesigner/components/timelineeditor/images/curveGraphIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..196b730ad43a13cf7b4b9d3fc969b76235fb14f2 GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqZ1!|<43U_c{G*>u;$Qx> zN2}U4tlqiAjG1-GF1`)ZzcD*%{%+LMT)=R>@qClnKfb)-9>FcRTdSD5qrfBmW#*&VtL4<<3H{IgtofMwf< z{Y-}IH_dD2nsMFv&crADf)+kJS2l(eLHfVgisJ?;ex9h({ qEOnpc*tvX4-72o8=^c?h!NAbSapYn1@wx{fZ+N=;xvXs3Ffuee z{C;E+$Gg5)8#ZNl_Zlr+lkp;5-$zEO%bF)jg-4lVlExy3SC3$+Pp2z{G2N z7D-OJxzglJv?>3~l{u4o78P!iDw%X6cIpD-3p$0aip#$REe@Z{=6d@je~ixr$^CmK zURbvJv7}Hp+utqPR$Q^Qo>5(kH@tn;yY|RDv1pHPr3aH;n;o52&J6dJ`M)rJcV?aO zWF->`jkafP>~37~W|#k-4k)z0yoncB zi;t%s)a+xMmUy#x*8Rw@X2-ZsZ%A3$?7gm_@9?z5lPVj(uQTAc^xp7wo#6pb=N0y|XO#7Nn*9k4jNkljd$vf@nN=&wEs|ubD;F%9_q3}t=1EgmRfGGr p!v18fSAJ@19&_eunKkhKVc*~&kuYiVd_GY0dAj Date: Mon, 12 Aug 2019 08:08:39 +0200 Subject: [PATCH 08/17] Debugger: Update breakpoint marker earlier Since the distinction between global and engine breakpoints we may not update the breakpoint marker correctly which in turn appears as if the breakpoint had been failed to set. Fix this by updating the breakpoint marker already on insertion request. Change-Id: I7c4ed046c26667e6aa1efceb5071c12a6d1e6132 Reviewed-by: hjk --- src/plugins/debugger/breakhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 9ac8b0bfb49..8befb49f8e0 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -1302,7 +1302,7 @@ void BreakpointItem::setState(BreakpointState state) m_state = state; // FIXME: updateMarker() should recognize the need for icon changes. - if (state == BreakpointInserted) { + if (state == BreakpointInserted || state == BreakpointInsertionRequested) { destroyMarker(); updateMarker(); } From dcc47f25875014d7768957ebc32b6013470c5c90 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 9 Aug 2019 11:09:27 +0200 Subject: [PATCH 09/17] iOS: Share code for simulator display name Change-Id: Iecfaa43aefc7ed783d4149dec008330ee5c124e9 Reviewed-by: Christian Stenger --- src/plugins/ios/iosrunconfiguration.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp index db732fe9533..b9d943da112 100644 --- a/src/plugins/ios/iosrunconfiguration.cpp +++ b/src/plugins/ios/iosrunconfiguration.cpp @@ -67,11 +67,16 @@ namespace Internal { static const QLatin1String deviceTypeKey("Ios.device_type"); +static QString displayName(const SimulatorInfo &device) +{ + return QString("%1, %2").arg(device.name).arg(device.runtimeName); +} + static IosDeviceType toIosDeviceType(const SimulatorInfo &device) { IosDeviceType iosDeviceType(IosDeviceType::SimulatedDevice, device.identifier, - QString("%1, %2").arg(device.name).arg(device.runtimeName)); + displayName(device)); return iosDeviceType; } @@ -351,8 +356,7 @@ void IosDeviceTypeAspect::updateValues() m_deviceTypeComboBox->setVisible(showDeviceSelector); if (showDeviceSelector && m_deviceTypeModel.rowCount() == 0) { foreach (const SimulatorInfo &device, SimulatorControl::availableSimulators()) { - QStandardItem *item = new QStandardItem(QString("%1, %2").arg(device.name) - .arg(device.runtimeName)); + QStandardItem *item = new QStandardItem(Internal::displayName(device)); QVariant v; v.setValue(device); item->setData(v); From d84a6c49884fdfb0f62f15eb60365616a7831218 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 12 Aug 2019 11:53:02 +0200 Subject: [PATCH 10/17] Update change log for 4.10.0 Change-Id: I6cb272a08fb240caca98bc6286750006518470e1 Reviewed-by: Eike Ziller --- dist/changes-4.10.0.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.10.0.md b/dist/changes-4.10.0.md index 6022f5aac9e..9ed43bf9e51 100644 --- a/dist/changes-4.10.0.md +++ b/dist/changes-4.10.0.md @@ -121,10 +121,14 @@ you can check out from the public Git repository. For example: ## Debugging * Added pretty printer for `QMargin` -* Fixed pretty printer for `std::vector` and `std::basic_string` with custom allocator -* Fixed pretty printer for `std::map::iterator` +* Fixed pretty printers for `QFile`, `QStandardItem`, + `std::vector` and `std::basic_string` with custom allocator, and `std::map::iterator` * Fixed issues with restoring layout (QTCREATORBUG-21669) +### LLDB + +* Fixed running with command line arguments with spaces (QTCREATORBUG-22811) + ### CDB * Fixed loading of custom debugging helpers (QTCREATORBUG-20481) @@ -152,6 +156,7 @@ you can check out from the public Git repository. For example: * Added all fonts from project directory to font selector (QDS-100) * Updated properties of `Flickable` * Improved handling of errors in state editor (QDS-695) +* Improved selection behavior (QDS-853) ## Version Control Systems @@ -188,6 +193,10 @@ you can check out from the public Git repository. For example: * Removed support for MIPS64 +### iOS + +* Fixed simulator detection with Xcode 11 (QTCREATORBUG-22757) + ### Remote Linux * Added deployment method that deploys everything that is installed by the build system From 68cbde187a7e752d02d7875cfeb9b354e05d74e8 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 6 Aug 2019 10:21:28 +0200 Subject: [PATCH 11/17] CMake build: Add qtc-askpass Fixes: QTCREATORBUG-22804 Change-Id: I749d0da495e77e45198ee67675c297ec68da1634 Reviewed-by: Tobias Hunger --- src/tools/CMakeLists.txt | 1 + src/tools/qtc-askpass/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 src/tools/qtc-askpass/CMakeLists.txt diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 4ec3202b0be..5c9ede15867 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -38,6 +38,7 @@ endif() add_subdirectory(qml2puppet) # add_subdirectory(qtcdebugger) ## windows only # add_subdirectory(qtcrashhandler) +add_subdirectory(qtc-askpass) add_subdirectory(qtcreatorcrashhandler) # add_subdirectory(qtcreatorwidgets) ## qbs does not build this either add_subdirectory(qtpromaker) diff --git a/src/tools/qtc-askpass/CMakeLists.txt b/src/tools/qtc-askpass/CMakeLists.txt new file mode 100644 index 00000000000..3d0bfb3c1b9 --- /dev/null +++ b/src/tools/qtc-askpass/CMakeLists.txt @@ -0,0 +1,5 @@ +add_qtc_executable(qtc-askpass + DEPENDS Qt5::Widgets + SOURCES + qtc-askpass-main.cpp +) From 37585d3c55d76f39334d1af306b224e73adcf71d Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Mon, 12 Aug 2019 12:32:58 +0200 Subject: [PATCH 12/17] QmlDesigner: Fix self-closing splash screen Task-number: QDS-896 Change-Id: Ibc76c1e4668ba5a56ba7c45e68e698ed78bfb0e7 Reviewed-by: Tim Jenssen --- src/plugins/studiowelcome/studiowelcomeplugin.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp index 57edb463270..c7db6969d2c 100644 --- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp +++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp @@ -249,10 +249,7 @@ void StudioWelcomePlugin::extensionsInitialized() s_view->show(); s_view->raise(); - QTimer::singleShot(15000, [](){ - if (s_view) - s_view->close(); - }); + QTimer::singleShot(15000, [this](){ closeSplashScreen(); }); }); } } From df48ba57813150026f2a52d7721b4b546ac1bb31 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 12 Aug 2019 13:15:23 +0200 Subject: [PATCH 13/17] QmlDesigner: Fix qbs build Change-Id: Iff06eaa50ae23f9ddcc82a2d2df9d35508ea9ad9 Reviewed-by: Christian Stenger --- src/plugins/qmldesigner/qmldesignerplugin.qbs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmldesigner/qmldesignerplugin.qbs b/src/plugins/qmldesigner/qmldesignerplugin.qbs index 30e9273ef2c..24f77ddedd4 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.qbs +++ b/src/plugins/qmldesigner/qmldesignerplugin.qbs @@ -694,6 +694,10 @@ Project { "texttool/textedititemwidget.h", "texttool/texttool.cpp", "texttool/texttool.h", + "timelineeditor/animationcurvedialog.cpp", + "timelineeditor/animationcurvedialog.h", + "timelineeditor/animationcurveeditormodel.cpp", + "timelineeditor/animationcurveeditormodel.h", "timelineeditor/canvas.cpp", "timelineeditor/canvas.h", "timelineeditor/canvasstyledialog.cpp", From d6095f9763d89dcbe055f9b6de4910300a338540 Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Mon, 12 Aug 2019 12:53:42 +0200 Subject: [PATCH 14/17] Do not clear selection when clicking on a selected keyframe Change-Id: Ia2907a3687b70faf32bc32540bac8f381b507b73 Reviewed-by: Tim Jenssen --- .../curveeditor/detail/selector.cpp | 20 ++++++++++++++++--- .../components/curveeditor/detail/selector.h | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/selector.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/selector.cpp index 6119e8e9960..13fdeb72ed3 100644 --- a/src/plugins/qmldesigner/components/curveeditor/detail/selector.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/detail/selector.cpp @@ -58,14 +58,15 @@ void Selector::mousePress(QMouseEvent *event, GraphicsView *view) if (view->hasActiveHandle()) return; - if (select(SelectionTool::Undefined, view->globalToScene(event->globalPos()), view)) - applyPreSelection(view); - m_mouseInit = event->globalPos(); m_mouseCurr = event->globalPos(); QPointF click = view->globalToScene(m_mouseInit); + if (!isOverSelectedKeyframe(click, view)) + if (select(SelectionTool::Undefined, click, view)) + applyPreSelection(view); + m_lasso = QPainterPath(click); m_lasso.closeSubpath(); @@ -119,6 +120,19 @@ void Selector::mouseRelease(QMouseEvent *event, GraphicsView *view) m_rect = QRectF(); } +bool Selector::isOverSelectedKeyframe(const QPointF &pos, GraphicsView *view) +{ + const auto itemList = view->items(); + for (auto *item : itemList) { + if (auto *frame = qgraphicsitem_cast(item)) { + QRectF itemRect = frame->mapRectToScene(frame->boundingRect()); + if (itemRect.contains(pos)) + return frame->selected(); + } + } + return false; +} + bool Selector::select(const SelectionTool &tool, const QPointF &pos, GraphicsView *view) { auto selectWidthTool = [this, tool](SelectionMode mode, const QPointF &pos, GraphicsView *view) { diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/selector.h b/src/plugins/qmldesigner/components/curveeditor/detail/selector.h index 1c955de5bef..4027cc87b1c 100644 --- a/src/plugins/qmldesigner/components/curveeditor/detail/selector.h +++ b/src/plugins/qmldesigner/components/curveeditor/detail/selector.h @@ -54,6 +54,8 @@ public: void mouseRelease(QMouseEvent *event, GraphicsView *view); private: + bool isOverSelectedKeyframe(const QPointF &pos, GraphicsView *view); + bool select(const SelectionTool &tool, const QPointF &pos, GraphicsView *view); bool pressSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view); From e0512f18a42473dc61e7b07bbbdd0214f310976a Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Mon, 12 Aug 2019 12:08:16 +0200 Subject: [PATCH 15/17] Catch alternative value type names Fixes: QDS-892 Change-Id: I73577c56479ae42ff9f2aa82db31cb766a068537 Reviewed-by: Thomas Hartmann --- .../timelineeditor/animationcurveeditormodel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp index 7b42255043f..3ea519b79e2 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/animationcurveeditormodel.cpp @@ -112,12 +112,15 @@ DesignTools::ValueType typeFrom(const QmlTimelineKeyframeGroup &group) if (group.valueType() == TypeName("double") || group.valueType() == TypeName("real")) return DesignTools::ValueType::Double; - if (group.valueType() == TypeName("bool")) + if (group.valueType() == TypeName("boolean") || group.valueType() == TypeName("bool")) return DesignTools::ValueType::Bool; - if (group.valueType() == TypeName("integer")) + if (group.valueType() == TypeName("integer") || group.valueType() == TypeName("int")) return DesignTools::ValueType::Integer; + // Ignoring types: + // QColor / HAlignment / VAlignment + return DesignTools::ValueType::Undefined; } From 31effafb60c572b15bba23caacf4f0115cf300c7 Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Mon, 12 Aug 2019 15:04:32 +0200 Subject: [PATCH 16/17] Add context-menu to insert a keyframe for all visible curves Change-Id: If86550bb9b8e73ff22fdbe3c2ffc579c35c505da Reviewed-by: Thomas Hartmann --- .../components/curveeditor/detail/graphicsview.cpp | 13 +++++++++++-- .../components/curveeditor/detail/graphicsview.h | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp index 954e0401c4a..bfa836137f7 100644 --- a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp @@ -299,6 +299,13 @@ void GraphicsView::contextMenuEvent(QContextMenuEvent *event) QAction *openEditorAction = menu.addAction(tr("Open Style Editor")); connect(openEditorAction, &QAction::triggered, openStyleEditor); + menu.addSeparator(); + auto insertKeyframes = [this, event]() { + insertKeyframe(globalToRaster(event->globalPos()).x(), true); + }; + QAction *insertKeyframeAction = menu.addAction(tr("Insert Keyframe")); + connect(insertKeyframeAction, &QAction::triggered, insertKeyframes); + menu.exec(event->globalPos()); } @@ -400,12 +407,14 @@ void GraphicsView::applyZoom(double x, double y, const QPoint &pivot) } } -void GraphicsView::insertKeyframe(double time) +void GraphicsView::insertKeyframe(double time, bool allVisibleCurves) { const auto itemList = items(); for (auto *item : itemList) { if (auto *curveItem = qgraphicsitem_cast(item)) { - if (curveItem->isUnderMouse()) + if (allVisibleCurves) + curveItem->insertKeyframeByTime(std::round(time)); + else if (curveItem->isUnderMouse()) curveItem->insertKeyframeByTime(std::round(time)); } } diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h index 15c8aeb75df..01dd0ca0261 100644 --- a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h +++ b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h @@ -124,7 +124,7 @@ protected: private: void applyZoom(double x, double y, const QPoint &pivot = QPoint()); - void insertKeyframe(double time); + void insertKeyframe(double time, bool allVisibleCurves = false); void deleteSelectedKeyframes(); From 821f799ff3d017e9cdc8bfe3c96fed1982de8753 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 12 Aug 2019 16:04:31 +0200 Subject: [PATCH 17/17] Android: Fix adding Java SDK to environment 33a9a03121c1ee4b2c56f8024a457b27b202d622 broke it by inverting the condition. Task-number: QTCREATORBUG-22504 Change-Id: Id0b66ec025281e6d6c52b7309f35a3bdfb8e7170 Reviewed-by: hjk --- src/plugins/android/androidtoolchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp index 3c458854718..e3b103012b8 100644 --- a/src/plugins/android/androidtoolchain.cpp +++ b/src/plugins/android/androidtoolchain.cpp @@ -93,7 +93,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::currentConfig().toolchainHost()); const Utils::FilePath javaHome = AndroidConfigurations::currentConfig().openJDKLocation(); - if (!javaHome.exists()) { + if (javaHome.exists()) { env.set(QLatin1String("JAVA_HOME"), javaHome.toString()); const FilePath javaBin = javaHome.pathAppended("bin"); if (!Utils::contains(env.path(), [&javaBin](const Utils::FilePath &p) { return p == javaBin; }))