diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-03-01 01:51:43 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-03-01 01:51:43 (GMT) |
commit | a99b6221f5296f97bfa29e0560943634ccc30c3f (patch) | |
tree | a85e54e16358a5c9c6565369b554ceb8aa54b821 /tools | |
parent | ca03f39224fb64775ed7150685df96c6b5b83b23 (diff) | |
parent | 54869c8727e5403cea866c99a5f83ae9c8533f82 (diff) | |
download | Qt-a99b6221f5296f97bfa29e0560943634ccc30c3f.zip Qt-a99b6221f5296f97bfa29e0560943634ccc30c3f.tar.gz Qt-a99b6221f5296f97bfa29e0560943634ccc30c3f.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qml-staging
Diffstat (limited to 'tools')
-rw-r--r-- | tools/assistant/tools/assistant/helpviewer_qwv.cpp | 2 | ||||
-rw-r--r-- | tools/designer/src/components/propertyeditor/propertyeditor.cpp | 4 | ||||
-rw-r--r-- | tools/designer/src/components/signalsloteditor/signalslot_utils.cpp | 7 | ||||
-rw-r--r-- | tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp | 8 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/grid.cpp | 20 | ||||
-rw-r--r-- | tools/qml/qml.pri | 10 | ||||
-rw-r--r-- | tools/qml/qml.pro | 4 | ||||
-rw-r--r-- | tools/shared/symbian/epocroot.cpp | 5 |
8 files changed, 42 insertions, 18 deletions
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index 2d31ad7..efb9b59 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -379,7 +379,7 @@ bool HelpViewer::findText(const QString &text, FindFlags flags, bool incremental bool fromSearch) { TRACE_OBJ - Q_UNUSED((incremental && fromSearch)) + Q_UNUSED(incremental); Q_UNUSED(fromSearch); QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument; if (flags & FindBackward) options |= QWebPage::FindBackward; diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp index 521b5cb..9f298d0 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp +++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp @@ -91,6 +91,7 @@ static const char *ViewKeyC = "View"; static const char *ColorKeyC = "Colored"; static const char *SortedKeyC = "Sorted"; static const char *ExpansionKeyC = "ExpandedItems"; +static const char *SplitterPositionKeyC = "SplitterPosition"; enum SettingsView { TreeView, ButtonView }; @@ -365,10 +366,12 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare m_sorting = settings->value(QLatin1String(SortedKeyC), false).toBool(); m_coloring = settings->value(QLatin1String(ColorKeyC), true).toBool(); const QVariantMap expansionState = settings->value(QLatin1String(ExpansionKeyC), QVariantMap()).toMap(); + const int splitterPosition = settings->value(QLatin1String(SplitterPositionKeyC), 150).toInt(); settings->endGroup(); // Apply settings m_sortingAction->setChecked(m_sorting); m_coloringAction->setChecked(m_coloring); + m_treeBrowser->setSplitterPosition(splitterPosition); #if QT_VERSION >= 0x040500 switch (view) { case TreeView: @@ -415,6 +418,7 @@ void PropertyEditor::saveSettings() const expansionState.insert(it.key(), QVariant(it.value())); } settings->setValue(QLatin1String(ExpansionKeyC), expansionState); + settings->setValue(QLatin1String(SplitterPositionKeyC), m_treeBrowser->splitterPosition()); settings->endGroup(); } diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp index 3ac0167..ac1fe1c 100644 --- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp +++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp @@ -244,7 +244,12 @@ namespace qdesigner_internal { ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type, const QString &peer, QDesignerFormWindowInterface *form) { - QObject *object = form->mainContainer()->findChild<QObject*>(obj_name); + QObject *object = 0; + if (obj_name == form->mainContainer()->objectName()) { + object = form->mainContainer(); + } else { + object = form->mainContainer()->findChild<QObject*>(obj_name); + } if (!object) return ClassesMemberFunctions(); QDesignerFormEditorInterface *core = form->core(); diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index 86ce674..b06a66f 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -658,8 +658,12 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const qdesigner_internal::ClassesMemberFunctions class_list = qdesigner_internal::reverseClassesMemberFunctions(obj_name, type, peer, m_form); - QObject *object = m_form->mainContainer()->findChild<QObject*>(obj_name); - + QObject *object = 0; + if (obj_name == m_form->mainContainer()->objectName()) { + object = m_form->mainContainer(); + } else { + object = m_form->mainContainer()->findChild<QObject*>(obj_name); + } inline_editor->addText(type == qdesigner_internal::SignalMember ? tr("<signal>") : tr("<slot>")); foreach (const qdesigner_internal::ClassMemberFunctions &class_info, class_list) { if (class_info.m_className.isEmpty() || class_info.m_memberList.isEmpty()) diff --git a/tools/designer/src/lib/shared/grid.cpp b/tools/designer/src/lib/shared/grid.cpp index 6add8bd..ba991c7 100644 --- a/tools/designer/src/lib/shared/grid.cpp +++ b/tools/designer/src/lib/shared/grid.cpp @@ -89,12 +89,20 @@ Grid::Grid() : bool Grid::fromVariantMap(const QVariantMap& vm) { - *this = Grid(); - valueFromVariantMap(vm, QLatin1String(KEY_VISIBLE), m_visible); - valueFromVariantMap(vm, QLatin1String(KEY_SNAPX), m_snapX); - valueFromVariantMap(vm, QLatin1String(KEY_SNAPY), m_snapY); - valueFromVariantMap(vm, QLatin1String(KEY_DELTAX), m_deltaX); - return valueFromVariantMap(vm, QLatin1String(KEY_DELTAY), m_deltaY); + Grid grid; + bool anyData = valueFromVariantMap(vm, QLatin1String(KEY_VISIBLE), grid.m_visible); + anyData |= valueFromVariantMap(vm, QLatin1String(KEY_SNAPX), grid.m_snapX); + anyData |= valueFromVariantMap(vm, QLatin1String(KEY_SNAPY), grid.m_snapY); + anyData |= valueFromVariantMap(vm, QLatin1String(KEY_DELTAX), grid.m_deltaX); + anyData |= valueFromVariantMap(vm, QLatin1String(KEY_DELTAY), grid.m_deltaY); + if (!anyData) + return false; + if (grid.m_deltaX == 0 || grid.m_deltaY == 0) { + qWarning("Attempt to set invalid grid with a spacing of 0."); + return false; + } + *this = grid; + return true; } QVariantMap Grid::toVariantMap(bool forceKeys) const diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index 08cd506..2010cc1 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -19,18 +19,16 @@ SOURCES += $$PWD/qmlruntime.cpp \ RESOURCES = $$PWD/browser/browser.qrc \ $$PWD/startup/startup.qrc -symbian: { - contains(QT_CONFIG, s60): { +symbian { + contains(QT_CONFIG, s60) { LIBS += -lavkon -lcone } !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { LIBS += -lsensrvclient -lsensrvutil - } - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2): { SOURCES += $$PWD/deviceorientation_symbian.cpp - FORMS = $$PWD/recopts.ui \ - $$PWD/proxysettings.ui } + FORMS = $$PWD/recopts.ui \ + $$PWD/proxysettings.ui } else:maemo5 { QT += dbus HEADERS += $$PWD/texteditautoresizer_maemo5.h diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 5d6192d..b1d56ea 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -39,8 +39,8 @@ symbian { TARGET.CAPABILITY = NetworkServices ReadUserData # Deploy plugin for remote debugging - qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmldebugging/tcpserver$${QT_LIBINFIX}.dll - qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmldebugging + qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmltooling/tcpserver$${QT_LIBINFIX}.dll + qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmltooling DEPLOYMENT += qmldebuggingplugin } mac { diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp index e128cd2..5e6bc12 100644 --- a/tools/shared/symbian/epocroot.cpp +++ b/tools/shared/symbian/epocroot.cpp @@ -99,6 +99,11 @@ static void fixEpocRoot(QString &path) if (!path.size() || path[path.size()-1] != QLatin1Char('/')) { path += QLatin1Char('/'); } +#ifdef Q_OS_WIN32 + // Make sure we have drive letter in epocroot + if (path.startsWith(QLatin1Char('/'))) + path.prepend(QDir::currentPath().left(2)); +#endif } /** |