());
}
const QVariant geom = m_settings->value(QLatin1String(geometryKey));
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 4be4d05dc7c..309f1c656b3 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1506,70 +1506,22 @@ void GdbEngine::handleInfoProc(const GdbResponse &response)
void GdbEngine::handleShowVersion(const GdbResponse &response)
{
- //qDebug () << "VERSION 2:" << response.data.findChild("consolestreamoutput").data();
- //qDebug () << "VERSION:" << response.toString();
- debugMessage(_("VERSION: " + response.toString()));
+ debugMessage(_("PARSING VERSION: " + response.toString()));
if (response.resultClass == GdbResultDone) {
m_gdbVersion = 100;
m_gdbBuildVersion = -1;
m_isMacGdb = false;
GdbMi version = response.data.findChild("consolestreamoutput");
QString msg = QString::fromLocal8Bit(version.data());
-
- bool foundIt = false;
-
- QRegExp supported(_("GNU gdb(.*) (\\d+)\\.(\\d+)(\\.(\\d+))?(-(\\d+))?"));
- if (supported.indexIn(msg) >= 0) {
+ extractGdbVersion(msg,
+ &m_gdbVersion, &m_gdbBuildVersion, &m_isMacGdb);
+ if (m_gdbVersion > 60500 && m_gdbVersion < 200000)
debugMessage(_("SUPPORTED GDB VERSION ") + msg);
- m_gdbVersion = 10000 * supported.cap(2).toInt()
- + 100 * supported.cap(3).toInt()
- + 1 * supported.cap(5).toInt();
- m_gdbBuildVersion = supported.cap(7).toInt();
- m_isMacGdb = msg.contains(__("Apple version"));
- foundIt = true;
- }
-
- // OpenSUSE managed to ship "GNU gdb (GDB) SUSE (6.8.91.20090930-2.4).
- if (!foundIt && msg.startsWith(_("GNU gdb (GDB) SUSE "))) {
- supported.setPattern(_("[^\\d]*(\\d+).(\\d+).(\\d+).*"));
- if (supported.indexIn(msg) >= 0) {
- debugMessage(_("SUSE PATCHED GDB VERSION ") + msg);
- m_gdbVersion = 10000 * supported.cap(1).toInt()
- + 100 * supported.cap(2).toInt()
- + 1 * supported.cap(3).toInt();
- m_gdbBuildVersion = -1;
- m_isMacGdb = false;
- foundIt = true;
- } else {
- debugMessage(_("UNPARSABLE SUSE PATCHED GDB VERSION ") + msg);
- }
- }
-
- if (!foundIt) {
+ else
debugMessage(_("UNSUPPORTED GDB VERSION ") + msg);
-#if 0
- QStringList list = msg.split(_c('\n'));
- while (list.size() > 2)
- list.removeLast();
- msg = tr("The debugger you are using identifies itself as:")
- + _("") + list.join(_("
")) + _("
")
- + tr("This version is not officially supported by Qt Creator.\n"
- "Debugging will most likely not work well.\n"
- "Using gdb 7.1 or later is strongly recommended.");
-#if 0
- // ugly, but 'Show again' check box...
- static QErrorMessage *err = new QErrorMessage(mainWindow());
- err->setMinimumSize(400, 300);
- err->showMessage(msg);
-#else
- //showMessageBox(QMessageBox::Information, tr("Warning"), msg);
-#endif
-#endif
- }
debugMessage(_("USING GDB VERSION: %1, BUILD: %2%3").arg(m_gdbVersion)
.arg(m_gdbBuildVersion).arg(_(m_isMacGdb ? " (APPLE)" : "")));
- //qDebug () << "VERSION 3:" << m_gdbVersion << m_gdbBuildVersion;
}
}
diff --git a/src/plugins/debugger/gdb/gdbmi.cpp b/src/plugins/debugger/gdb/gdbmi.cpp
index c34d81124d2..158a1fc2b99 100644
--- a/src/plugins/debugger/gdb/gdbmi.cpp
+++ b/src/plugins/debugger/gdb/gdbmi.cpp
@@ -32,6 +32,7 @@
#include
#include
+#include
#include
#include
@@ -400,5 +401,50 @@ QByteArray GdbResponse::toString() const
return result;
}
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// GdbResponse
+//
+//////////////////////////////////////////////////////////////////////////////////
+
+void extractGdbVersion(const QString &msg,
+ int *gdbVersion, int *gdbBuildVersion, bool *isMacGdb)
+{
+ const QChar dot(QLatin1Char('.'));
+
+ QString cleaned;
+ QString build;
+ bool inClean = true;
+ foreach (QChar c, msg) {
+ if (inClean && !cleaned.isEmpty() && c != dot && (c.isPunct() || c.isSpace()))
+ inClean = false;
+ if (inClean) {
+ if (c.isDigit())
+ cleaned.append(c);
+ else if (!cleaned.isEmpty() && !cleaned.endsWith(dot))
+ cleaned.append(dot);
+ } else {
+ if (c.isDigit())
+ build.append(c);
+ else if (!build.isEmpty() && !build.endsWith(dot))
+ build.append(dot);
+ }
+ }
+
+ *isMacGdb = msg.contains(QLatin1String("Apple version"));
+
+ *gdbVersion = 10000 * cleaned.section(dot, 0, 0).toInt()
+ + 100 * cleaned.section(dot, 1, 1).toInt()
+ + 1 * cleaned.section(dot, 2, 2).toInt();
+ if (cleaned.count(dot) >= 3)
+ *gdbBuildVersion = cleaned.section(dot, 3, 3).toInt();
+ else
+ *gdbBuildVersion = build.section(dot, 0, 0).toInt();
+
+ if (*isMacGdb)
+ *gdbBuildVersion = build.section(dot, 1, 1).toInt();
+}
+
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/gdb/gdbmi.h b/src/plugins/debugger/gdb/gdbmi.h
index ce484c8cd67..7803d71ce54 100644
--- a/src/plugins/debugger/gdb/gdbmi.h
+++ b/src/plugins/debugger/gdb/gdbmi.h
@@ -168,6 +168,9 @@ public:
QVariant cookie;
};
+void extractGdbVersion(const QString &msg,
+ int *gdbVersion, int *gdbBuildVersion, bool *isMacGdb);
+
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/find/searchresulttreeitemdelegate.cpp b/src/plugins/find/searchresulttreeitemdelegate.cpp
index e294c5cd26e..bec2da78391 100644
--- a/src/plugins/find/searchresulttreeitemdelegate.cpp
+++ b/src/plugins/find/searchresulttreeitemdelegate.cpp
@@ -106,10 +106,16 @@ int SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyle
painter->fillRect(lineNumberAreaRect, QBrush(isSelected ?
option.palette.brush(cg, QPalette::Highlight) :
option.palette.color(cg, QPalette::Base).darker(111)));
- painter->setPen(isSelected ?
- option.palette.color(cg, QPalette::HighlightedText) : Qt::darkGray);
- painter->drawText(lineNumberAreaRect.adjusted(0, 0, -lineNumberAreaHorizontalPadding, 0),
- Qt::AlignRight | Qt::AlignVCenter, QString::number(lineNumber));
+
+ QStyleOptionViewItemV3 opt = option;
+ opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
+ opt.palette.setColor(cg, QPalette::Text, Qt::darkGray);
+
+ const QStyle *style = QApplication::style();
+ const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
+
+ const QRect rowRect = lineNumberAreaRect.adjusted(-textMargin, 0, textMargin-lineNumberAreaHorizontalPadding, 0);
+ QItemDelegate::drawDisplay(painter, opt, rowRect, QString::number(lineNumber));
return lineNumberAreaWidth;
}
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
index b57ad1779f2..613f2272888 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
@@ -53,8 +53,6 @@
#include "propertyeditortransaction.h"
#include "originwidget.h"
-#include
-
#include
#include
#include
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index 68a2589bd0d..4d3661216c6 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -188,12 +188,12 @@ void PropertyEditorValue::setIsValid(bool valid)
m_isValid = valid;
}
-ModelNode PropertyEditorValue::modelNode() const
+QmlDesigner::ModelNode PropertyEditorValue::modelNode() const
{
return m_modelNode;
}
-void PropertyEditorValue::setModelNode(const ModelNode &modelNode)
+void PropertyEditorValue::setModelNode(const QmlDesigner::ModelNode &modelNode)
{
if (modelNode != m_modelNode) {
m_modelNode = modelNode;
@@ -250,7 +250,7 @@ QString PropertyEditorNodeWrapper::type()
}
-ModelNode PropertyEditorNodeWrapper::parentModelNode() const
+QmlDesigner::ModelNode PropertyEditorNodeWrapper::parentModelNode() const
{
return m_editorValue->modelNode();
}
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
index 1a6c42e872c..ff3912475fb 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
@@ -39,9 +39,6 @@
class PropertyEditorValue;
-typedef QmlDesigner::ModelNode ModelNode;
-
-
class PropertyEditorNodeWrapper : public QObject {
Q_OBJECT
@@ -55,7 +52,7 @@ public:
bool exists();
QString type();
QDeclarativePropertyMap* properties();
- ModelNode parentModelNode() const;
+ QmlDesigner::ModelNode parentModelNode() const;
QString propertyName() const;
public slots:
@@ -112,8 +109,8 @@ public:
QString name() const;
void setName(const QString &name);
- ModelNode modelNode() const;
- void setModelNode(const ModelNode &modelNode);
+ QmlDesigner::ModelNode modelNode() const;
+ void setModelNode(const QmlDesigner::ModelNode &modelNode);
PropertyEditorNodeWrapper* complexNode();
@@ -135,7 +132,7 @@ signals:
void isValidChanged();
private: //variables
- ModelNode m_modelNode;
+ QmlDesigner::ModelNode m_modelNode;
QVariant m_value;
QString m_expression;
QString m_name;
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 10006b18219..4b7fc1f1c87 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -1335,7 +1335,7 @@ void QtVersion::updateToolChainAndMkspec() const
reader->setCumulative(false);
reader->setParsePreAndPostFiles(false);
reader->readProFile(m_mkspecFullPath + "/qmake.conf");
- QString qmakeCXX = reader->value("QMAKE_CXX");
+ QString qmakeCXX = reader->values("QMAKE_CXX").join(" ");
QString makefileGenerator = reader->value("MAKEFILE_GENERATOR");
QString ce_sdk = reader->values("CE_SDK").join(QLatin1String(" "));
QString ce_arch = reader->value("CE_ARCH");
diff --git a/src/plugins/texteditor/completionsettings.cpp b/src/plugins/texteditor/completionsettings.cpp
index 0d800da3b32..dc4bba31162 100644
--- a/src/plugins/texteditor/completionsettings.cpp
+++ b/src/plugins/texteditor/completionsettings.cpp
@@ -40,7 +40,7 @@ static const char * const spaceAfterFunctionNameKey = "SpaceAfterFunctionName";
using namespace TextEditor;
CompletionSettings::CompletionSettings()
- : m_caseSensitivity(FirstLetterCaseSensitive)
+ : m_caseSensitivity(CaseInsensitive)
, m_autoInsertBrackets(true)
, m_partiallyComplete(true)
, m_spaceAfterFunctionName(false)
diff --git a/src/plugins/texteditor/findinfiles.cpp b/src/plugins/texteditor/findinfiles.cpp
index 62b41c25858..e2c28b417f1 100644
--- a/src/plugins/texteditor/findinfiles.cpp
+++ b/src/plugins/texteditor/findinfiles.cpp
@@ -75,10 +75,10 @@ QStringList FindInFiles::files()
fileNameFilters(),
QDir::Files|QDir::Readable,
QDirIterator::Subdirectories);
- while (it.hasNext()) {
- it.next();
- fileList << it.filePath();
- }
+
+ while (it.hasNext())
+ fileList << it.next();
+
return fileList;
}
diff --git a/src/plugins/welcome/communitywelcomepagewidget.cpp b/src/plugins/welcome/communitywelcomepagewidget.cpp
index e489761824b..8a6bf073e7b 100644
--- a/src/plugins/welcome/communitywelcomepagewidget.cpp
+++ b/src/plugins/welcome/communitywelcomepagewidget.cpp
@@ -47,7 +47,7 @@ static const Site supportSites[] = {
"Forum Nokia
Mobile Application Support"),
"http://www.forum.nokia.com/I_Want_To/Develop_Mobile_Applications/Technical_Support/"},
{ QT_TRANSLATE_NOOP("Welcome::Internal::CommunityWelcomePageWidget",
- "Qt LGPL Support
Buy professional Qt support"),
+ "Qt LGPL Support
Buy commercial Qt support"),
"http://shop.qt.nokia.com/en/support.html"},
{ QT_TRANSLATE_NOOP("Welcome::Internal::CommunityWelcomePageWidget",
"Qt Centre
Community based Qt support"),
diff --git a/tests/auto/debugger/debugger.pro b/tests/auto/debugger/debugger.pro
index ef1547f9ce6..84ad7990841 100644
--- a/tests/auto/debugger/debugger.pro
+++ b/tests/auto/debugger/debugger.pro
@@ -1,5 +1,5 @@
TEMPLATE = subdirs
-SUBDIRS = dumpers.pro plugin.pro gdb.pro
+SUBDIRS = dumpers.pro plugin.pro gdb.pro version.pro
diff --git a/tests/auto/debugger/tst_version.cpp b/tests/auto/debugger/tst_version.cpp
new file mode 100644
index 00000000000..cfac4f14de3
--- /dev/null
+++ b/tests/auto/debugger/tst_version.cpp
@@ -0,0 +1,82 @@
+
+#include "gdb/gdbmi.h"
+
+#include
+
+
+class tst_Version : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_Version() {}
+
+private slots:
+ void version();
+ void version_data();
+};
+
+void tst_Version::version()
+{
+ QFETCH(QString, msg);
+ QFETCH(int, gdbVersion);
+ QFETCH(int, gdbBuildVersion);
+ QFETCH(bool, isMacGdb);
+ int v = 0, bv = 0;
+ bool mac = true;
+ Debugger::Internal::extractGdbVersion(msg, &v, &bv, &mac);
+ qDebug() << msg << " -> " << v << bv << mac;
+ QCOMPARE(v, gdbVersion);
+ QCOMPARE(bv, gdbBuildVersion);
+ QCOMPARE(mac, isMacGdb);
+}
+
+void tst_Version::version_data()
+{
+ QTest::addColumn("msg");
+ QTest::addColumn("gdbVersion");
+ QTest::addColumn("gdbBuildVersion");
+ QTest::addColumn("isMacGdb");
+
+ QTest::newRow("Debian")
+ << "GNU gdb (GDB) 7.0.1-debian"
+ << 70001 << 0 << false;
+
+ QTest::newRow("CVS 7.0.90")
+ << "GNU gdb (GDB) 7.0.90.20100226-cvs"
+ << 70090 << 20100226 << false;
+
+ QTest::newRow("Ubuntu Lucid")
+ << "GNU gdb (GDB) 7.1-ubuntu"
+ << 70100 << 0 << false;
+
+ QTest::newRow("Fedora 13")
+ << "GNU gdb (GDB) Fedora (7.1-22.fc13)"
+ << 70100 << 22 << false;
+
+ QTest::newRow("Gentoo")
+ << "GNU gdb (Gentoo 7.1 p1) 7.1"
+ << 70100 << 1 << false;
+
+ QTest::newRow("Fedora EL5")
+ << "GNU gdb Fedora (6.8-37.el5)"
+ << 60800 << 37 << false;
+
+ QTest::newRow("SUSE")
+ << "GNU gdb (GDB) SUSE (6.8.91.20090930-2.4)"
+ << 60891 << 20090930 << false;
+
+ QTest::newRow("Apple")
+ << "GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2)"
+ << 60350 << 1461 << true;
+}
+
+
+int main(int argc, char *argv[])
+{
+ tst_Version test;
+ return QTest::qExec(&test, argc, argv);
+}
+
+#include "tst_version.moc"
+
diff --git a/tests/auto/debugger/version.pro b/tests/auto/debugger/version.pro
new file mode 100644
index 00000000000..78d3f0f77c5
--- /dev/null
+++ b/tests/auto/debugger/version.pro
@@ -0,0 +1,15 @@
+QT += testlib
+QT -= gui
+
+UTILSDIR = ../../../src/libs
+
+DEBUGGERDIR = ../../../src/plugins/debugger
+
+INCLUDEPATH += $$DEBUGGERDIR $$UTILSDIR
+
+SOURCES += \
+ tst_version.cpp \
+ $$DEBUGGERDIR/gdb/gdbmi.cpp \
+
+TARGET = tst_$$TARGET
+
diff --git a/tests/auto/qml/qmldesigner/bauhaustests/bauhaustests.pro b/tests/auto/qml/qmldesigner/bauhaustests/bauhaustests.pro
index 79e8a180cc5..33e3634f207 100644
--- a/tests/auto/qml/qmldesigner/bauhaustests/bauhaustests.pro
+++ b/tests/auto/qml/qmldesigner/bauhaustests/bauhaustests.pro
@@ -2,7 +2,7 @@ include(../../../../../src/plugins/qmldesigner/config.pri)
QT += testlib
DESTDIR = $$DESIGNER_BINARY_DIRECTORY
-include(../../../../../src/plugins/qmldesigner/core/core.pri)
+include(../../../../../src/plugins/qmldesigner/designercore/designercore.pri)
include(../../../../../src/libs/qmljs/qmljs-lib.pri)
HEADERS+=../../../../../src/libs/utils/changeset.h
SOURCES+=../../../../../src/libs/utils/changeset.cpp
diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.cpp b/tests/auto/qml/qmldesigner/coretests/testcore.cpp
index cdbc5669f12..3330097b206 100644
--- a/tests/auto/qml/qmldesigner/coretests/testcore.cpp
+++ b/tests/auto/qml/qmldesigner/coretests/testcore.cpp
@@ -3343,6 +3343,35 @@ void TestCore::testSubComponentManager()
QVERIFY(myButtonMetaInfo.property("border.width", true).isValid());
}
+void TestCore::testComponentLoadingTabWidget()
+{
+
+ QSKIP("TODO: fails", SkipAll);
+
+ QString fileName = QString(QTCREATORDIR) + "/tests/auto/qml/qmldesigner/data/fx/tabs.qml";
+ QFile file(fileName);
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
+
+ QPlainTextEdit textEdit;
+ textEdit.setPlainText(file.readAll());
+ NotIndentingTextEditModifier modifier(&textEdit);
+
+ QScopedPointer model(Model::create("Qt/Item"));
+ model->setFileUrl(QUrl::fromLocalFile(fileName));
+ QScopedPointer subComponentManager(new SubComponentManager(model->metaInfo(), 0));
+ subComponentManager->update(QUrl::fromLocalFile(fileName), modifier.text().toUtf8());
+
+ QScopedPointer testRewriterView(new TestRewriterView());
+ testRewriterView->setTextModifier(&modifier);
+ model->attachView(testRewriterView.data());
+
+ QVERIFY(testRewriterView->errors().isEmpty());
+ QVERIFY(testRewriterView->rootModelNode().isValid());
+
+ ModelNode rootModelNode = testRewriterView->rootModelNode();
+ QCOMPARE(rootModelNode.type(), QLatin1String("TabWidget"));
+}
+
void TestCore::testAnchorsAndRewriting()
{
const QString qmlString("import Qt 4.7\n"
diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.h b/tests/auto/qml/qmldesigner/coretests/testcore.h
index f3cbc8ebe8e..5e81e3aabe0 100644
--- a/tests/auto/qml/qmldesigner/coretests/testcore.h
+++ b/tests/auto/qml/qmldesigner/coretests/testcore.h
@@ -164,6 +164,7 @@ private slots:
void testCopyModelRewriter1();
void testCopyModelRewriter2();
void testSubComponentManager();
+ void testComponentLoadingTabWidget();
void testAnchorsAndRewriting();
void testAnchorsAndRewritingCenter();
diff --git a/tests/auto/qml/qmldesigner/data/fx/TabWidget.qml b/tests/auto/qml/qmldesigner/data/fx/TabWidget.qml
new file mode 100644
index 00000000000..26d25b47b58
--- /dev/null
+++ b/tests/auto/qml/qmldesigner/data/fx/TabWidget.qml
@@ -0,0 +1,57 @@
+import Qt 4.7
+
+Item {
+ id: tabWidget
+
+ property int current: 0
+ default property alias content: stack.children
+
+ onCurrentChanged: setOpacities()
+ Component.onCompleted: setOpacities()
+
+ function setOpacities()
+ {
+ for (var i = 0; i < stack.children.length; ++i) {
+ stack.children[i].opacity = i == current ? 1 : 0
+ }
+ }
+
+ Row {
+ id: header
+ Repeater {
+ delegate: Rectangle {
+ width: tabWidget.width / stack.children.length; height: 36
+
+ Rectangle {
+ width: parent.width; height: 1
+ anchors { bottom: parent.bottom; bottomMargin: 1 }
+ color: "#acb2c2"
+ }
+ BorderImage {
+ anchors { fill: parent; leftMargin: 2; topMargin: 5; rightMargin: 1 }
+ border { left: 7; right: 7 }
+ source: "tab.png"
+ visible: tabWidget.current == index
+ }
+ Text {
+ horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter
+ anchors.fill: parent
+ text: stack.children[index].title
+ elide: Text.ElideRight
+ font.bold: tabWidget.current == index
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: tabWidget.current = index
+ }
+ }
+ model: stack.children.length
+ }
+ }
+
+ Item {
+ id: stack
+ width: tabWidget.width
+ anchors.top: header.bottom; anchors.bottom: tabWidget.bottom
+ }
+}
diff --git a/tests/auto/qml/qmldesigner/data/fx/tabs.qml b/tests/auto/qml/qmldesigner/data/fx/tabs.qml
new file mode 100644
index 00000000000..fba203cc249
--- /dev/null
+++ b/tests/auto/qml/qmldesigner/data/fx/tabs.qml
@@ -0,0 +1,59 @@
+import Qt 4.7
+
+TabWidget {
+ id: tabs
+ width: 640; height: 480
+
+ Rectangle {
+ property string title: "Red"
+ anchors.fill: parent
+ color: "#e3e3e3"
+
+ Rectangle {
+ anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ color: "#ff7f7f"
+ Text {
+ width: parent.width - 20
+ anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
+ text: "Roses are red"
+ font.pixelSize: 20
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+
+ Rectangle {
+ property string title: "Green"
+ anchors.fill: parent
+ color: "#e3e3e3"
+
+ Rectangle {
+ anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ color: "#7fff7f"
+ Text {
+ width: parent.width - 20
+ anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
+ text: "Flower stems are green"
+ font.pixelSize: 20
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+
+ Rectangle {
+ property string title: "Blue"
+ anchors.fill: parent; color: "#e3e3e3"
+
+ Rectangle {
+ anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ color: "#7f7fff"
+ Text {
+ width: parent.width - 20
+ anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
+ text: "Violets are blue"
+ font.pixelSize: 20
+ wrapMode: Text.WordWrap
+ }
+ }
+ }
+}
diff --git a/tests/auto/qml/qmldesigner/propertyeditortests/propertyeditortests.pro b/tests/auto/qml/qmldesigner/propertyeditortests/propertyeditortests.pro
index 0f353ce58de..6e387052ea8 100644
--- a/tests/auto/qml/qmldesigner/propertyeditortests/propertyeditortests.pro
+++ b/tests/auto/qml/qmldesigner/propertyeditortests/propertyeditortests.pro
@@ -5,7 +5,7 @@ QT += testlib \
script \
declarative
DESTDIR = $$DESIGNER_BINARY_DIRECTORY
-include(../../../../../src/plugins/qmldesigner/core/core.pri)
+include(../../../../../src/plugins/qmldesigner/designercore/designercore.pri)
include(../../../../../src/libs/qmljs/qmljs-lib.pri)
HEADERS+=../../../../../src/libs/utils/changeset.h
SOURCES+=../../../../../src/libs/utils/changeset.cpp
diff --git a/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp b/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp
index ce87286849d..3b4a6ea0d19 100644
--- a/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp
+++ b/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp
@@ -40,6 +40,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -51,6 +52,7 @@
using namespace QmlDesigner;
+#include
#include "../common/statichelpers.cpp"
@@ -173,7 +175,9 @@ TestPropertyEditor::TestPropertyEditor()
void TestPropertyEditor::initTestCase()
{
+#ifndef QDEBUG_IN_TESTS
qInstallMsgHandler(testMessageOutput);
+#endif
Exception::setShouldAssert(false);
}
@@ -197,7 +201,7 @@ void TestPropertyEditor::createCoreModel()
int numberOfProperties = view->rootModelNode().propertyNames().count();
selectThrough(view->rootModelNode());
QCOMPARE(view->rootModelNode().propertyNames().count(), numberOfProperties);
- } catch (Exception &exception) {
+ } catch (Exception &) {
QFAIL("Exception thrown");
}
}
@@ -307,7 +311,7 @@ void TestPropertyEditor::createRect()
QCOMPARE(childNode.propertyNames().count(), 4);
QCOMPARE(childNode.variantProperty("scale").value(), QVariant());
- } catch (Exception &exception) {
+ } catch (Exception &) {
QFAIL("Exception thrown");
}
}