diff --git a/scripts/createDevPackage.py b/scripts/createDevPackage.py index 66ddf40f346..21f71eef5b5 100755 --- a/scripts/createDevPackage.py +++ b/scripts/createDevPackage.py @@ -69,6 +69,7 @@ source_include_patterns = [ r"^.*\.h$", # .h files in all directories that are looked into r"^.*\.hpp$", # .hpp files in all directories that are looked into # qtdesignstudio docs are build against dev package, so we need to include some image directories + r"^share/qtcreator/qml/qmlpuppet/mockfiles/images/.*$", r"^share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/.*$", r"^src/libs/qmleditorwidgets/images/.*$", r"^src/libs/utils/images/.*$", @@ -79,10 +80,10 @@ source_include_patterns = [ r"^src/plugins/qmldesigner/components/componentcore/images/.*$", r"^src/plugins/qmldesigner/components/timelineeditor/images/.*$", r"^src/plugins/qmldesigner/qmlpreviewplugin/images/.*$", - r"^src/plugins/texteditor/images/.*$" + r"^src/plugins/texteditor/images/.*$", # also some single files r"^src/plugins/qmldesigner/components/formeditor/.*\.png$", - r"^src/plugins/qmldesigner/components/navigator/.*\.png$", + r"^src/plugins/qmldesigner/components/navigator/.*\.png$" ] build_include_patterns = [ diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index 2f51aa2ec1e..56890487b11 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -634,6 +634,15 @@ def qdumpHelper_std__string(d, value, charType, format): qdumpHelper__std__string__MSVC(d, value, charType, format) return + # GCC 9, QTCREATORBUG-22753 + try: + data = value["_M_dataplus"]["_M_p"].pointer() + size = int(value["_M_string_length"]) + d.putCharArrayHelper(data, size, charType, format) + return + except: + pass + data = value.extractPointer() # We can't lookup the std::string::_Rep type without crashing LLDB, # so hard-code assumption on member position diff --git a/share/qtcreator/qml/qmlpuppet/commands/commands.pri b/share/qtcreator/qml/qmlpuppet/commands/commands.pri index 7985b259758..47ec4473eaf 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/commands.pri +++ b/share/qtcreator/qml/qmlpuppet/commands/commands.pri @@ -30,6 +30,7 @@ HEADERS += $$PWD/changeselectioncommand.h HEADERS += $$PWD/drop3dlibraryitemcommand.h HEADERS += $$PWD/update3dviewstatecommand.h HEADERS += $$PWD/enable3dviewcommand.h +HEADERS += $$PWD/view3dclosedcommand.h SOURCES += $$PWD/synchronizecommand.cpp SOURCES += $$PWD/debugoutputcommand.cpp @@ -61,3 +62,4 @@ SOURCES += $$PWD/changeselectioncommand.cpp SOURCES += $$PWD/drop3dlibraryitemcommand.cpp SOURCES += $$PWD/update3dviewstatecommand.cpp SOURCES += $$PWD/enable3dviewcommand.cpp +SOURCES += $$PWD/view3dclosedcommand.cpp diff --git a/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp new file mode 100644 index 00000000000..c7de7a99dee --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#include "view3dclosedcommand.h" + +namespace QmlDesigner { + +View3DClosedCommand::View3DClosedCommand() = default; + +QDataStream &operator<<(QDataStream &out, const View3DClosedCommand &/*command*/) +{ + return out; +} + +QDataStream &operator>>(QDataStream &in, View3DClosedCommand &/*command*/) +{ + return in; +} + +QDebug operator<<(QDebug debug, const View3DClosedCommand &/*command*/) +{ + return debug.nospace() << "View3DClosedCommand()"; +} + +} // namespace QmlDesigner diff --git a/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h b/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h new file mode 100644 index 00000000000..132bb3c37bd --- /dev/null +++ b/share/qtcreator/qml/qmlpuppet/commands/view3dclosedcommand.h @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include +#include +#include + +namespace QmlDesigner { + +class View3DClosedCommand +{ +public: + View3DClosedCommand(); +}; + +QDataStream &operator<<(QDataStream &out, const View3DClosedCommand &command); +QDataStream &operator>>(QDataStream &in, View3DClosedCommand &command); + +QDebug operator<<(QDebug debug, const View3DClosedCommand &command); + +} // namespace QmlDesigner + +Q_DECLARE_METATYPE(QmlDesigner::View3DClosedCommand) diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp index d12cfe327fd..01d9cd18424 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp @@ -71,6 +71,7 @@ #include "puppetalivecommand.h" #include "changeselectioncommand.h" #include "drop3dlibraryitemcommand.h" +#include "view3dclosedcommand.h" namespace QmlDesigner { @@ -261,6 +262,11 @@ void NodeInstanceClientProxy::library3DItemDropped(const Drop3DLibraryItemComman writeCommand(QVariant::fromValue(command)); } +void NodeInstanceClientProxy::view3DClosed(const View3DClosedCommand &command) +{ + writeCommand(QVariant::fromValue(command)); +} + void NodeInstanceClientProxy::flush() { } diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h index 5a742947d2d..7c9724e1ff0 100644 --- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h +++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.h @@ -60,6 +60,7 @@ class ChangeNodeSourceCommand; class EndPuppetCommand; class ChangeSelectionCommand; class Drop3DLibraryItemCommand; +class View3DClosedCommand; class NodeInstanceClientProxy : public QObject, public NodeInstanceClientInterface { @@ -80,6 +81,7 @@ public: void puppetAlive(const PuppetAliveCommand &command); void selectionChanged(const ChangeSelectionCommand &command) override; void library3DItemDropped(const Drop3DLibraryItemCommand &command) override; + void view3DClosed(const View3DClosedCommand &command) override; void flush() override; void synchronizeWithClientProcess() override; diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h index 10688cdd89f..b188d7edfdc 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceclientinterface.h @@ -42,6 +42,7 @@ class DebugOutputCommand; class PuppetAliveCommand; class ChangeSelectionCommand; class Drop3DLibraryItemCommand; +class View3DClosedCommand; class NodeInstanceClientInterface { @@ -57,6 +58,7 @@ public: virtual void debugOutput(const DebugOutputCommand &command) = 0; virtual void selectionChanged(const ChangeSelectionCommand &command) = 0; virtual void library3DItemDropped(const Drop3DLibraryItemCommand &command) = 0; + virtual void view3DClosed(const View3DClosedCommand &command) = 0; virtual void flush() {} virtual void synchronizeWithClientProcess() {} diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp index bbd73e63caf..f606bfacf2f 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp +++ b/share/qtcreator/qml/qmlpuppet/interfaces/nodeinstanceserverinterface.cpp @@ -63,12 +63,13 @@ #include "endpuppetcommand.h" #include "debugoutputcommand.h" #include "puppetalivecommand.h" +#include "view3dclosedcommand.h" #include namespace QmlDesigner { -static bool isRegistered=false; +static bool isRegistered = false; NodeInstanceServerInterface::NodeInstanceServerInterface(QObject *parent) : QObject(parent) @@ -205,6 +206,9 @@ void NodeInstanceServerInterface::registerCommands() qRegisterMetaType("PuppetAliveCommand"); qRegisterMetaTypeStreamOperators("PuppetAliveCommand"); + + qRegisterMetaType("View3DClosedCommand"); + qRegisterMetaTypeStreamOperators("View3DClosedCommand"); } } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index 83382fb198d..2d2edeee4a6 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -571,11 +571,30 @@ QVariant ObjectNodeInstance::property(const PropertyName &name) const return property.read(); } +void ObjectNodeInstance::ensureVector3DDotProperties(PropertyNameList &list) const +{ + const PropertyNameList properties = { "rotation", "scale", "pivot" }; + for (const auto &property : properties) { + if (list.contains(property) && instanceType(property) == "QVector3D") { + const PropertyNameList dotProperties = { "x", "y", "z" }; + for (const auto &dotProperty : dotProperties) { + const PropertyName dotPropertyName = property + "." + dotProperty; + if (!list.contains(dotPropertyName)) + list.append(dotPropertyName); + } + } + } +} + PropertyNameList ObjectNodeInstance::propertyNames() const { + PropertyNameList list; if (isValid()) - return QmlPrivateGate::allPropertyNames(object()); - return PropertyNameList(); + list = QmlPrivateGate::allPropertyNames(object()); + + ensureVector3DDotProperties(list); + + return list; } QString ObjectNodeInstance::instanceType(const PropertyName &name) const diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h index ced76dee58e..d716c4d755f 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h @@ -209,6 +209,7 @@ protected: static QVariant enumationValue(const Enumeration &enumeration); void initializePropertyWatcher(const ObjectNodeInstance::Pointer &objectNodeInstance); + void ensureVector3DDotProperties(PropertyNameList &list) const; private: QString m_id; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index e65b1b4b2da..db38985d90e 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -61,6 +61,7 @@ #include "removesharedmemorycommand.h" #include "objectnodeinstance.h" #include "drop3dlibraryitemcommand.h" +#include "view3dclosedcommand.h" #include "dummycontextobject.h" #include "../editor3d/generalhelper.h" @@ -97,6 +98,10 @@ bool Qt5InformationNodeInstanceServer::eventFilter(QObject *, QEvent *event) } break; + case QEvent::Close: { + nodeInstanceClient()->view3DClosed(View3DClosedCommand()); + } break; + default: break; } diff --git a/src/libs/utils/checkablemessagebox.cpp b/src/libs/utils/checkablemessagebox.cpp index 3ec411cfb32..ccf773cb99d 100644 --- a/src/libs/utils/checkablemessagebox.cpp +++ b/src/libs/utils/checkablemessagebox.cpp @@ -62,6 +62,7 @@ public: sizePolicy.setHeightForWidth(pixmapLabel->sizePolicy().hasHeightForWidth()); pixmapLabel->setSizePolicy(sizePolicy); pixmapLabel->setVisible(false); + pixmapLabel->setFocusPolicy(Qt::NoFocus); auto pixmapSpacer = new QSpacerItem(0, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding); @@ -71,6 +72,7 @@ public: messageLabel->setWordWrap(true); messageLabel->setOpenExternalLinks(true); messageLabel->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse); + messageLabel->setFocusPolicy(Qt::NoFocus); auto checkBoxRightSpacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum); diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp index 0f96122a94f..0a046e4a174 100644 --- a/src/libs/utils/fancylineedit.cpp +++ b/src/libs/utils/fancylineedit.cpp @@ -371,15 +371,20 @@ void FancyLineEdit::onEditingFinished() void FancyLineEdit::keyPressEvent(QKeyEvent *event) { - const QTextCursor::MoveMode mode = (event->modifiers() & Qt::ShiftModifier) - ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor; - - if (camelCaseNavigation && event == QKeySequence::MoveToPreviousWord) - CamelCaseCursor::left(this, mode); - else if (camelCaseNavigation && event == QKeySequence::MoveToNextWord) - CamelCaseCursor::right(this, mode); - else + if (camelCaseNavigation) { + if (event == QKeySequence::MoveToPreviousWord) + CamelCaseCursor::left(this, QTextCursor::MoveAnchor); + else if (event == QKeySequence::SelectPreviousWord) + CamelCaseCursor::left(this, QTextCursor::KeepAnchor); + else if (event == QKeySequence::MoveToNextWord) + CamelCaseCursor::right(this, QTextCursor::MoveAnchor); + else if (event == QKeySequence::SelectNextWord) + CamelCaseCursor::right(this, QTextCursor::KeepAnchor); + else + QLineEdit::keyPressEvent(event); + } else { QLineEdit::keyPressEvent(event); + } } void FancyLineEdit::setCamelCaseNavigationEnabled(bool enabled) diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index c652b00126b..32cab5d9450 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/src/plugins/clangpchmanager/clangindexingprojectsettingswidget.h b/src/plugins/clangpchmanager/clangindexingprojectsettingswidget.h index 2a3b4293b51..846e8bde23f 100644 --- a/src/plugins/clangpchmanager/clangindexingprojectsettingswidget.h +++ b/src/plugins/clangpchmanager/clangindexingprojectsettingswidget.h @@ -27,13 +27,11 @@ #include -namespace ProjectExplorer { -class Project; -} +namespace ProjectExplorer { class Project; } -namespace Ui { -class ClangIndexingProjectSettingsWidget; -} +QT_BEGIN_NAMESPACE +namespace Ui { class ClangIndexingProjectSettingsWidget; } +QT_END_NAMESPACE namespace ClangPchManager { diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index d7c3e11f997..d2cbacaa2d7 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -1695,21 +1695,25 @@ bool WatchModel::contextMenuEvent(const ItemViewEvent &ev) addAction(menu, tr("Expand All Children"), item, - [this, item] { - m_expandedINames.insert(item->iname); - item->forFirstLevelChildren([this](WatchItem *child) { - m_expandedINames.insert(child->iname); - }); - m_engine->updateLocals(); + [this, name = item->iname] { + m_expandedINames.insert(name); + if (auto item = findItem(name)) { + item->forFirstLevelChildren([this](WatchItem *child) { + m_expandedINames.insert(child->iname); + }); + m_engine->updateLocals(); + } }); addAction(menu, tr("Collapse All Children"), item, - [this, item] { - item->forFirstLevelChildren([this](WatchItem *child) { - m_expandedINames.remove(child->iname); - }); - m_engine->updateLocals(); + [this, name = item->iname] { + if (auto item = findItem(name)) { + item->forFirstLevelChildren([this](WatchItem *child) { + m_expandedINames.remove(child->iname); + }); + m_engine->updateLocals(); + } }); addAction(menu, tr("Close Editor Tooltips"), @@ -1722,7 +1726,10 @@ bool WatchModel::contextMenuEvent(const ItemViewEvent &ev) addAction(menu, tr("Copy Current Value to Clipboard"), item, - [item] { copyToClipboard(item->value); }); + [this, name = item->iname] { + if (auto item = findItem(name)) + copyToClipboard(item->value); + }); // addAction(menu, tr("Copy Selected Rows to Clipboard"), // selectionModel()->hasSelection(), diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index b27ee2da19a..22788c63e07 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -1970,11 +1970,12 @@ InstallsList QmakeProFile::installsList(const QtSupport::ProFileReader *reader, if (itemList.isEmpty()) return result; - const QString installPrefix - = reader->propertyValue(QLatin1String("QT_INSTALL_PREFIX")); - const QString devInstallPrefix - = reader->propertyValue(QLatin1String("QT_INSTALL_PREFIX/dev")); - bool fixInstallPrefix = (installPrefix != devInstallPrefix); + const QStringList installPrefixVars{"QT_INSTALL_PREFIX", "QT_INSTALL_EXAMPLES"}; + QList> installPrefixValues; + for (const QString &installPrefix : installPrefixVars) { + installPrefixValues << qMakePair(reader->propertyValue(installPrefix), + reader->propertyValue(installPrefix + "/dev")); + } foreach (const QString &item, itemList) { const QStringList config = reader->values(item + ".CONFIG"); @@ -1993,13 +1994,18 @@ InstallsList QmakeProFile::installsList(const QtSupport::ProFileReader *reader, } QString itemPath = itemPaths.last(); - if (fixInstallPrefix && itemPath.startsWith(installPrefix)) { + for (const auto &prefixValuePair : qAsConst(installPrefixValues)) { + if (prefixValuePair.first == prefixValuePair.second + || !itemPath.startsWith(prefixValuePair.first)) { + continue; + } // This is a hack for projects which install into $$[QT_INSTALL_*], // in particular Qt itself, examples being most relevant. // Projects which implement their own install path policy must // parametrize their INSTALLS themselves depending on the intended // installation/deployment mode. - itemPath.replace(0, installPrefix.length(), devInstallPrefix); + itemPath.replace(0, prefixValuePair.first.length(), prefixValuePair.second); + break; } if (item == QLatin1String("target")) { if (active) diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index 6d3bca379c0..0a758c135f1 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -142,6 +142,7 @@ extend_qtc_plugin(QmlDesigner drop3dlibraryitemcommand.cpp drop3dlibraryitemcommand.h update3dviewstatecommand.cpp update3dviewstatecommand.h enable3dviewcommand.cpp enable3dviewcommand.h + view3dclosedcommand.cpp view3dclosedcommand.h ) extend_qtc_plugin(QmlDesigner diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index ee7b3f18a9a..baec3813168 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -462,6 +462,9 @@ void FormEditorView::auxiliaryDataChanged(const ModelNode &node, const PropertyN if (isInvisible) newNode.deselectNode(); } + } else if (name == "3d-view") { + bool is3DEnabled = data.isNull() || data.toBool(); + formEditorWidget()->option3DAction()->set3DEnabled(is3DEnabled); } } diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h index 3a4b8c0f379..14dd36fc2b0 100644 --- a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h +++ b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h @@ -129,6 +129,7 @@ public: void selectionChanged(const ChangeSelectionCommand &command) override; void library3DItemDropped(const Drop3DLibraryItemCommand &command) override; + void view3DClosed(const View3DClosedCommand &command) override; void selectedNodesChanged(const QList &selectedNodeList, const QList &lastSelectedNodeList) override; diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp index 5dd19179a31..31272b54978 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -284,6 +285,7 @@ void NodeInstanceServerProxy::dispatchCommand(const QVariant &command, PuppetStr static const int puppetAliveCommandType = QMetaType::type("PuppetAliveCommand"); static const int changeSelectionCommandType = QMetaType::type("ChangeSelectionCommand"); static const int drop3DLibraryItemCommandType = QMetaType::type("Drop3DLibraryItemCommand"); + static const int view3DClosedCommand = QMetaType::type("View3DClosedCommand"); if (m_destructing) return; @@ -311,6 +313,8 @@ void NodeInstanceServerProxy::dispatchCommand(const QVariant &command, PuppetStr nodeInstanceClient()->selectionChanged(command.value()); } else if (command.userType() == drop3DLibraryItemCommandType) { nodeInstanceClient()->library3DItemDropped(command.value()); + } else if (command.userType() == view3DClosedCommand) { + nodeInstanceClient()->view3DClosed(command.value()); } else if (command.userType() == puppetAliveCommandType) { puppetAlive(puppetStreamType); } else if (command.userType() == synchronizeCommandType) { diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index 4d43e522788..ca2d601dac5 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -1446,6 +1446,13 @@ void NodeInstanceView::library3DItemDropped(const Drop3DLibraryItemCommand &comm QmlVisualNode::createQmlVisualNode(this, itemLibraryEntry, {}); } +void NodeInstanceView::view3DClosed(const View3DClosedCommand &command) +{ + Q_UNUSED(command) + + rootModelNode().setAuxiliaryData("3d-view", false); +} + void NodeInstanceView::selectedNodesChanged(const QList &selectedNodeList, const QList & /*lastSelectedNodeList*/) { diff --git a/src/plugins/qmldesigner/designersettings.cpp b/src/plugins/qmldesigner/designersettings.cpp index f1afe3cf664..e08035389ff 100644 --- a/src/plugins/qmldesigner/designersettings.cpp +++ b/src/plugins/qmldesigner/designersettings.cpp @@ -67,7 +67,7 @@ void DesignerSettings::fromSettings(QSettings *settings) restoreValue(settings, DesignerSettingsKey::CONTROLS_STYLE); restoreValue(settings, DesignerSettingsKey::SHOW_PROPERTYEDITOR_WARNINGS, false); restoreValue(settings, DesignerSettingsKey::ENABLE_MODEL_EXCEPTION_OUTPUT, false); - restoreValue(settings, DesignerSettingsKey::PUPPET_KILL_TIMEOUT, 3000); // this has no ui at the moment + restoreValue(settings, DesignerSettingsKey::PUPPET_KILL_TIMEOUT, 30000); // this has no ui at the moment restoreValue(settings, DesignerSettingsKey::DEBUG_PUPPET, QString()); restoreValue(settings, DesignerSettingsKey::FORWARD_PUPPET_OUTPUT, QString()); restoreValue(settings, DesignerSettingsKey::REFORMAT_UI_QML_FILES, true); diff --git a/src/plugins/qmldesigner/qmldesignerplugin.qbs b/src/plugins/qmldesigner/qmldesignerplugin.qbs index 1ef8407d8e7..67783c7c157 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.qbs +++ b/src/plugins/qmldesigner/qmldesignerplugin.qbs @@ -175,6 +175,8 @@ Project { "commands/update3dviewstatecommand.h", "commands/enable3dviewcommand.cpp", "commands/enable3dviewcommand.h", + "commands/view3dclosedcommand.cpp", + "commands/view3dclosedcommand.h", "container/addimportcontainer.cpp", "container/addimportcontainer.h", "container/idcontainer.cpp", diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 31c11aef8b1..014cea172a5 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -833,6 +833,10 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent) m_fileLineEnding->addItems(ExtraEncodingSettings::lineTerminationModeNames()); m_fileLineEnding->setContentsMargins(spacing, 0, spacing, 0); m_fileLineEndingAction = m_toolBar->addWidget(m_fileLineEnding); + m_fileLineEndingAction->setVisible(!q->isReadOnly()); + connect(q, &TextEditorWidget::readOnlyChanged, this, [this] { + m_fileLineEndingAction->setVisible(!q->isReadOnly()); + }); m_fileEncodingLabel = new FixedSizeClickLabel; m_fileEncodingLabel->setContentsMargins(spacing, 0, spacing, 0); diff --git a/src/plugins/updateinfo/updateinfoplugin.cpp b/src/plugins/updateinfo/updateinfoplugin.cpp index c602136ef20..3c047e6723f 100644 --- a/src/plugins/updateinfo/updateinfoplugin.cpp +++ b/src/plugins/updateinfo/updateinfoplugin.cpp @@ -207,6 +207,7 @@ void UpdateInfoPlugin::checkForUpdatesFinished() label->setContentsMargins(0, 0, 0, 8); return label; }); + Core::ICore::infoBar()->removeInfo(InstallUpdates); // remove any existing notifications Core::ICore::infoBar()->unsuppressInfo(InstallUpdates); Core::ICore::infoBar()->addInfo(info); } else { diff --git a/src/plugins/winrt/winrtdevice.cpp b/src/plugins/winrt/winrtdevice.cpp index cf99e212b03..a8458ace905 100644 --- a/src/plugins/winrt/winrtdevice.cpp +++ b/src/plugins/winrt/winrtdevice.cpp @@ -137,10 +137,9 @@ WinRtDeviceFactory::WinRtDeviceFactory(Core::Id deviceType) void WinRtDeviceFactory::autoDetect() { qCDebug(winrtDeviceLog) << __FUNCTION__; - MessageManager::write(tr("Running Windows Runtime device detection.")); const QString runnerFilePath = findRunnerFilePath(); if (runnerFilePath.isEmpty()) { - MessageManager::write(tr("No winrtrunner.exe found.")); + qCDebug(winrtDeviceLog) << "No winrtrunner.exe found."; return; } @@ -155,7 +154,6 @@ void WinRtDeviceFactory::autoDetect() const CommandLine cmd{runnerFilePath, {"--list-devices"}}; m_process->setCommand(cmd); qCDebug(winrtDeviceLog) << __FUNCTION__ << "Starting process" << cmd.toUserOutput(); - MessageManager::write(cmd.toUserOutput()); m_process->start(); qCDebug(winrtDeviceLog) << __FUNCTION__ << "Process started"; } @@ -361,7 +359,7 @@ void WinRtDeviceFactory::parseRunnerOutput(const QByteArray &output) const message += QLatin1Char(' '); message += tr("%n of them are new.", nullptr, numNew); } - MessageManager::write(message); + qCDebug(winrtDeviceLog) << message; } } // Internal diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt index fc502b9e8ba..c48557a8064 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt @@ -48,6 +48,7 @@ extend_qtc_executable(qml2puppet drop3dlibraryitemcommand.cpp drop3dlibraryitemcommand.h update3dviewstatecommand.cpp update3dviewstatecommand.h enable3dviewcommand.cpp enable3dviewcommand.h + view3dclosedcommand.cpp view3dclosedcommand.h valueschangedcommand.cpp ) diff --git a/src/tools/qml2puppet/qml2puppet.qbs b/src/tools/qml2puppet/qml2puppet.qbs index fb73413038f..645250c2d41 100644 --- a/src/tools/qml2puppet/qml2puppet.qbs +++ b/src/tools/qml2puppet/qml2puppet.qbs @@ -101,6 +101,8 @@ QtcTool { "commands/update3dviewstatecommand.h", "commands/enable3dviewcommand.cpp", "commands/enable3dviewcommand.h", + "commands/view3dclosedcommand.cpp", + "commands/view3dclosedcommand.h", "container/addimportcontainer.cpp", "container/addimportcontainer.h", "container/idcontainer.cpp",