From 02c484a343949ec79adaf80c72ed4f3452052237 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 16 Oct 2013 17:36:19 +0200 Subject: [PATCH 1/3] QmlDesigner.MetaInfo: fix handling of enum scopes The codel model does not provide enum scopes at the moment. As a fallback we use class names, but this fails if we use the original cpp class name from the package. For this reason we always try to find an export with a package different from . As a final solution the code model should be able to provide the enum scopes. Task-number: QTCREATORBUG-10114 Change-Id: I15396c83590426ab0b9b55c8646a89c8d5712683 Reviewed-by: Fawzi Mohamed --- .../designercore/metainfo/nodemetainfo.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index 750f9a3624a..000176d2075 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -40,6 +40,7 @@ #include #include #include +#include namespace QmlDesigner { @@ -775,8 +776,20 @@ QString NodeMetaInfoPrivate::propertyEnumScope(const PropertyName &propertyName) return QString(); const CppComponentValue *definedIn = 0; qmlObjectValue->getEnum(propertyType(propertyName), &definedIn); - if (definedIn) + if (definedIn) { + QString nonCppPackage; + foreach (const LanguageUtils::FakeMetaObject::Export &qmlExport, definedIn->metaObject()->exports()) { + if (qmlExport.package != QLatin1String("")) + nonCppPackage = qmlExport.package; + } + + const LanguageUtils::FakeMetaObject::Export qmlExport = + definedIn->metaObject()->exportInPackage(nonCppPackage); + if (qmlExport.isValid()) + return qmlExport.type; + return definedIn->className(); + } return QString(); } From a64adc4cd114526e57d6091dc9a7528264259e62 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 17 Oct 2013 08:54:15 +0300 Subject: [PATCH 2/3] Git: Fix crash on show stash * show() is called with a QString reference to the model * And editor is opened, which triggers stateChanged() * stateChanged() updates StashDialog, which refreshes the model with an empty directory (another bug) * The QString name reference is invalidated => crash on access Task-number: QTCREATORBUG-10397 Change-Id: I0c4077f8c4fc90905568f80d1cd89f61c4cd2cba Reviewed-by: Eike Ziller --- src/plugins/git/stashdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/stashdialog.cpp b/src/plugins/git/stashdialog.cpp index ffbf7ecb3fe..fecdedddd85 100644 --- a/src/plugins/git/stashdialog.cpp +++ b/src/plugins/git/stashdialog.cpp @@ -212,7 +212,7 @@ void StashDialog::showCurrent() { const int index = currentRow(); QTC_ASSERT(index >= 0, return); - gitClient()->show(m_repository, m_model->at(index).name); + gitClient()->show(m_repository, QString(m_model->at(index).name)); } // Suggest Branch name to restore 'stash@{0}' -> 'stash0-date' From 1a960865a2821c292c51a4d5acb870aaeb461b22 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 21 Oct 2013 12:03:41 +0200 Subject: [PATCH 3/3] QmlDesigner.PropertyEditor: fix for point and pixel size Task-number: QTCREATORBUG-9769 Change-Id: I1a1a9ebbda78daec0a62cb2e7c7859a636da57dd Reviewed-by: Thomas Hartmann --- .../HelperWidgets/FontGroupBox.qml | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml index 3ecd6aaf640..85f552b6dc0 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/HelperWidgets/FontGroupBox.qml @@ -44,6 +44,14 @@ GroupBox { property variant underlineStyle: backendValues.font_underline property variant strikeoutStyle: backendValues.font_strikeout + onPointSizeChanged: { + sizeWidget.setPointPixelSize(); + } + + onPixelSizeChanged: { + sizeWidget.setPointPixelSize(); + } + layout: VerticalLayout { QWidget { @@ -61,17 +69,22 @@ GroupBox { QWidget { id: sizeWidget property bool selectionFlag: selectionChanged - + property bool pixelSize: sizeType.currentText == "pixels" property bool isSetup; - - onSelectionFlagChanged: { + + function setPointPixelSize() { isSetup = true; sizeType.currentText = "points"; - if (pixelSize.isInModel) + if (fontGroupBox.pixelSize.isInModel) sizeType.currentText = "pixels"; isSetup = false; - } + } + + onSelectionFlagChanged: { + setPointPixelSize(); + } + layout: HorizontalLayout { Label { text: qsTr("Size")