diff --git a/.gitignore b/.gitignore index 3a5b611b286..fa9097edfc1 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,7 @@ wrapper.sh *.pyqtc.user* *.qbs.user* *.qmlproject.user* -CMakeLists.txt.user +CMakeLists.txt.user* /share/qtcreator/examples/ /share/qtcreator/externaltools/ /share/qtcreator/fonts/ diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index f7cd2f591bb..36302be0d6a 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -841,7 +841,7 @@ class Dumper(DumperBase): self.startMode_ = args.get('startmode', 1) self.breakOnMain_ = args.get('breakonmain', 0) self.useTerminal_ = args.get('useterminal', 0) - self.processArgs_ = self.hexdecode(args.get('processargs')) + self.processArgs_ = self.hexdecode(args.get('processargs', '')).split('\0') self.environment_ = args.get('environment', []) self.environment_ = list(map(lambda x: self.hexdecode(x), self.environment_)) self.attachPid_ = args.get('attachpid', 0) @@ -932,19 +932,7 @@ class Dumper(DumperBase): else: self.reportState('enginerunfailed') else: - # This does not seem to work on Linux nor macOS? - #launchInfo = lldb.SBLaunchInfo([self.processArgs_]) - #launchInfo.SetShellExpandArguments(True) - args = [] - try: - import subprocess - cmd = 'for x in {} ; do printf "%s\n" "$x" ; done' \ - .format(self.processArgs_) - args = subprocess.check_output(cmd, shell=True, cwd=self.workingDirectory_).split() - except: - # Wrong, but... - args = self.processArgs_ - launchInfo = lldb.SBLaunchInfo(args) + launchInfo = lldb.SBLaunchInfo(self.processArgs_) launchInfo.SetWorkingDirectory(self.workingDirectory_) launchInfo.SetEnvironmentEntries(self.environment_, False) if self.breakOnMain_: diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml index 6d0d42dd6ec..37f97126785 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml @@ -27,6 +27,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.0 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 Item { Rectangle { @@ -69,9 +70,11 @@ Item { renderType: Text.NativeRendering } - MouseArea { + ToolTipArea { id: mouseRegion anchors.fill: parent + tooltip: itemName + onPressed: { rootView.startDragAndDrop(mouseRegion, itemLibraryEntry) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml index d190b0e8e42..f960e5ea238 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorButton.qml @@ -254,7 +254,7 @@ Item { } DoubleSpinBox { id: redSlider - width: 64 + width: 68 stepSize: 1 minimumValue: 0 @@ -283,7 +283,7 @@ Item { } DoubleSpinBox { id: greenSlider - width: 64 + width: 68 stepSize: 1 minimumValue: 0 @@ -312,7 +312,7 @@ Item { } DoubleSpinBox { id: blueSlider - width: 64 + width: 68 stepSize: 1 minimumValue: 0 @@ -341,7 +341,8 @@ Item { } DoubleSpinBox { id: alphaSlider - width: 64 + sliderIndicatorVisible: true + width: 68 onValueModified: { if (colorButton.alpha !== alphaSlider.value && !colorButton.block) { colorButton.alpha = alphaSlider.value diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml index 03600125708..6cbc8a77c00 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml @@ -196,11 +196,7 @@ Section { } SecondColumnLayout { - Label { - text: qsTr("Word") - tooltip: qsTr("Sets the word spacing for the font.") - width: 42 - } + SpinBox { maximumValue: 500 minimumValue: -500 @@ -210,16 +206,17 @@ Section { Layout.minimumWidth: 60 stepSize: 0.1 } + Label { + text: qsTr("Word") + tooltip: qsTr("Sets the word spacing for the font.") + width: 42 + } Item { width: 4 height: 4 } - Label { - text: qsTr("Letter") - tooltip: qsTr("Sets the letter spacing for the font.") - width: 42 - } + SpinBox { maximumValue: 500 minimumValue: -500 @@ -229,6 +226,11 @@ Section { Layout.minimumWidth: 60 stepSize: 0.1 } + Label { + text: qsTr("Letter") + tooltip: qsTr("Sets the letter spacing for the font.") + width: 42 + } } Label { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientDialogPopup.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientDialogPopup.qml index a3e886f6b57..d206ad9b889 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientDialogPopup.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientDialogPopup.qml @@ -82,7 +82,6 @@ Loader { width: parent.width - 8 - xOffset height: gradientDialogLoader.dialogHeight - radius: 2 color: Theme.qmlDesignerBackgroundColorDarkAlternate() border.color: Theme.qmlDesignerBorderColor() diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml index e261ebed677..e53df0712db 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml @@ -32,7 +32,7 @@ Rectangle { property Item myControl - property bool showBackground: true + property bool showBackground: StudioTheme.Constants.showActionIndicatorBackground property alias icon: actionIndicatorIcon property bool hover: false diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml index 5ec29bbe2e3..0faaf7e0a8d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml @@ -57,23 +57,9 @@ T.CheckBox { hoverEnabled: true activeFocusOnTab: false - contentItem: T.Label { - id: checkBoxLabel - leftPadding: 0 - rightPadding: 0 - verticalAlignment: Text.AlignVCenter - text: myCheckBox.text - font: myCheckBox.font - color: StudioTheme.Values.themeTextColor - visible: text !== "" - } - ActionIndicator { id: actionIndicator myControl: myCheckBox // TODO global hover issue. Can be solved with extra property in ActionIndicator - - x: checkBoxLabel.visible ? checkBoxLabel.contentWidth + myCheckBox.spacing : 0 - y: 0 width: actionIndicator.visible ? __actionIndicatorWidth : 0 height: actionIndicator.visible ? __actionIndicatorHeight : 0 } @@ -113,6 +99,17 @@ T.CheckBox { } } + contentItem: T.Label { + id: checkBoxLabel + leftPadding: checkBoxBackground.x + checkBoxBackground.width + myCheckBox.spacing + rightPadding: 0 + verticalAlignment: Text.AlignVCenter + text: myCheckBox.text + font: myCheckBox.font + color: StudioTheme.Values.themeTextColor + visible: text !== "" + } + states: [ State { name: "default" diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml index 207a154719b..66736a97152 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Constants.qml @@ -78,4 +78,6 @@ QtObject { }) readonly property color backgroundColor: "#c2c2c2" + + readonly property bool showActionIndicatorBackground: false } diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index a5483aacefe..d60b0951e7a 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -275,7 +275,7 @@ void LldbEngine::setupEngine() cmd2.arg("nativemixed", isNativeMixedActive()); cmd2.arg("workingdirectory", rp.inferior.workingDirectory); cmd2.arg("environment", rp.inferior.environment.toStringList()); - cmd2.arg("processargs", toHex(rp.inferior.commandLineArguments)); + cmd2.arg("processargs", toHex(QtcProcess::splitArgs(rp.inferior.commandLineArguments).join(QChar(0)))); if (terminal()) { const qint64 attachedPID = terminal()->applicationPid(); diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp index f5319b7c67c..f709d58c72c 100644 --- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp +++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp @@ -169,6 +169,9 @@ QIcon KitManagerConfigWidget::displayIcon() const void KitManagerConfigWidget::apply() { + // TODO: Rework the mechanism so this won't be necessary. + const bool wasDefaultKit = m_isDefaultKit; + const auto copyIntoKit = [this](Kit *k) { k->copyFrom(m_modifiedKit.get()); }; if (m_kit) { copyIntoKit(m_kit); @@ -178,6 +181,7 @@ void KitManagerConfigWidget::apply() m_kit = KitManager::registerKit(copyIntoKit); m_isRegistering = false; } + m_isDefaultKit = wasDefaultKit; if (m_isDefaultKit) KitManager::setDefaultKit(m_kit); emit dirty(); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 04869aab3b3..645fab095df 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -3771,7 +3771,9 @@ void ProjectExplorerPluginPrivate::updateSessionMenu() for (int i = 0; i < sessions.size(); ++i) { const QString &session = sessions[i]; - const QString actionText = ActionManager::withNumberAccelerator(session, i + 1); + const QString actionText = ActionManager::withNumberAccelerator(Utils::quoteAmpersands( + session), + i + 1); QAction *act = ag->addAction(actionText); act->setData(session); act->setCheckable(true); diff --git a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp index ccd5813a9f2..242b5649d27 100644 --- a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp @@ -90,7 +90,7 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType) if (!m_beginFormEditorItem) return; - QList itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::ContainsItemBoundingRect); + QList itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::IntersectsItemBoundingRect); QList newNodeList; foreach (QGraphicsItem* item, itemList) diff --git a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp index c9dd8411579..a5f5a786177 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp @@ -62,12 +62,18 @@ void SelectionTool::mousePressEvent(const QList &itemList, if (event->button() == Qt::LeftButton) { m_mousePressTimer.start(); FormEditorItem* formEditorItem = nearestFormEditorItem(event->scenePos(), itemList); - if (formEditorItem + + if (formEditorItem) + m_itemSelectedAndMovable = toQmlItemNodeList(view()->selectedModelNodes()).contains(formEditorItem->qmlItemNode()) + && view()->hasSingleSelectedModelNode() && !formEditorItem->qmlItemNode().isRootNode(); + else + m_itemSelectedAndMovable = false; + + if (formEditorItem && m_itemSelectedAndMovable && formEditorItem->qmlItemNode().isValid()) { m_singleSelectionManipulator.begin(event->scenePos()); - m_itemAlreadySelected = toQmlItemNodeList(view()->selectedModelNodes()).contains(formEditorItem->qmlItemNode()) - || !view()->hasSingleSelectedModelNode(); + } else { if (event->modifiers().testFlag(Qt::AltModifier)) { m_singleSelectionManipulator.begin(event->scenePos()); @@ -98,7 +104,7 @@ void SelectionTool::mouseMoveEvent(const QList &/*itemList*/, if ((mouseMovementVector.toPoint().manhattanLength() > s_startDragDistance) && (m_mousePressTimer.elapsed() > s_startDragTime)) { m_singleSelectionManipulator.end(event->scenePos()); - if (m_itemAlreadySelected) + if (m_itemSelectedAndMovable) view()->changeToMoveTool(m_singleSelectionManipulator.beginPoint()); return; } diff --git a/src/plugins/qmldesigner/components/formeditor/selectiontool.h b/src/plugins/qmldesigner/components/formeditor/selectiontool.h index 72bad79f4f6..c16ef4f30fe 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectiontool.h +++ b/src/plugins/qmldesigner/components/formeditor/selectiontool.h @@ -90,7 +90,7 @@ private: ContentNotEditableIndicator m_contentNotEditableIndicator; QElapsedTimer m_mousePressTimer; QCursor m_cursor; - bool m_itemAlreadySelected = false; + bool m_itemSelectedAndMovable = false; }; } // namespace QmlDesigner