From 01054603a797805cc5c18c65aed7f0f192b68851 Mon Sep 17 00:00:00 2001 From: Marko Kangas Date: Thu, 23 Oct 2014 10:27:02 +0300 Subject: Fix tab icon vertical alignment Fixes case if custom icon size is given and height is more than width. Check of minimum valid height was compared wrongly to width and caused invalid vertical alignment. After fix vertical alignment is correct aligned to vertical center with the tab text. Change-Id: I6c4a710b15e91225edeabb629bfea7049ab2f42a Task-number: QTBUG-42143 Reviewed-by: Timur Pocheptsov Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qcommonstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 8579308820..1c5dcf5f0a 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1114,7 +1114,7 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTabV3 *opt, const QWidget (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off ); // High-dpi icons do not need adjustmet; make sure tabIconSize is not larger than iconSize - tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.width())); + tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height())); *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2, tabIconSize.width(), tabIconSize .height()); -- cgit v1.2.3 From e8f1b9917008d978c29cda9a2b40b841bc7a9df4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 20 Oct 2014 14:09:33 +0200 Subject: Don't delete QLibrarySettings configuration in ~QCoreApplication Do not clear the QLibrarySettings configuration information already in ~QCoreApplication (via qAddPostRoutine). This fixes issues where multiple QCoreApplication objects are created over time (in plugins). Task-number: QTBUG-34290 Change-Id: Ib5c58f825619ede484492e057e08d73b2b4c6101 Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- src/corelib/global/qlibraryinfo.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index c3ec2bc7f6..7ca0aa7f0b 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -84,14 +84,7 @@ class QLibraryInfoPrivate { public: static QSettings *findConfiguration(); -#ifndef QT_BOOTSTRAPPED - static void cleanup() - { - QLibrarySettings *ls = qt_library_settings(); - if (ls) - ls->settings.reset(0); - } -#else +#ifdef QT_BOOTSTRAPPED static bool haveGroup(QLibraryInfo::PathGroup group) { QLibrarySettings *ls = qt_library_settings(); @@ -114,7 +107,6 @@ QLibrarySettings::QLibrarySettings() : settings(QLibraryInfoPrivate::findConfiguration()) { #ifndef QT_BOOTSTRAPPED - qAddPostRoutine(QLibraryInfoPrivate::cleanup); bool haveEffectivePaths; bool havePaths; #endif -- cgit v1.2.3 From 0d679261176aadb3dd8efdc8e130bcbe6f3ce6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 3 Nov 2014 17:41:04 +0100 Subject: Use __aarch64__ instead of __arm64__ to detect AArch64 The latter name was used by Apple in their internal AArch64 LLVM backend, but has since been merged into LLVM upstream and renamed to AArch64. https://github.com/llvm-mirror/llvm/commit/29f94c72014eaa5d0d3b920686e68 Change-Id: I319f42f07c95dfbcd121134fbe6e554e2d36453d Reviewed-by: Thiago Macieira --- src/corelib/global/qprocessordetection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index 26ac56396b..55cb31c62b 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -87,9 +87,9 @@ ARM is bi-endian, detect using __ARMEL__ or __ARMEB__, falling back to auto-detection implemented below. */ -#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__arm64__) +#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__) # define Q_PROCESSOR_ARM -# if defined(__arm64__) +# if defined(__aarch64__) # define Q_PROCESSOR_ARM_64 # else # define Q_PROCESSOR_ARM_32 -- cgit v1.2.3 From f08ddefac7d4495c28370c84bf9b383d6cf3abd1 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Mon, 3 Nov 2014 15:52:04 +0100 Subject: Check the Q_SCRIPTABLE tag of signals and slots as early as possible. This makes is possible to generate a valid D-Bus XML from a class that has e.g. internal slots with pointer parameters by explicitly marking all D-Bus exports with Q_SCRIPTABLE and running qdbuscpp2xml with the '-a' switch. Change-Id: Iab32a0a7f46f2516f6385808bbf35b26c7708b1a Reviewed-by: Thiago Macieira --- src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp index ea24c35a07..dc735df297 100644 --- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp +++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp @@ -243,6 +243,8 @@ static QString generateInterfaceXml(const ClassDef *mo) foreach (const FunctionDef &mm, mo->signalList) { if (mm.wasCloned) continue; + if (!mm.isScriptable && !(flags & QDBusConnection::ExportNonScriptableSignals)) + continue; retval += addFunction(mm, true); } @@ -250,10 +252,14 @@ static QString generateInterfaceXml(const ClassDef *mo) if (flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) { foreach (const FunctionDef &slot, mo->slotList) { + if (!slot.isScriptable && !(flags & QDBusConnection::ExportNonScriptableSlots)) + continue; if (slot.access == FunctionDef::Public) retval += addFunction(slot); } foreach (const FunctionDef &method, mo->methodList) { + if (!method.isScriptable && !(flags & QDBusConnection::ExportNonScriptableSlots)) + continue; if (method.access == FunctionDef::Public) retval += addFunction(method); } -- cgit v1.2.3 From 293207b50377eef2b8f2bec10a24eae02bcedc93 Mon Sep 17 00:00:00 2001 From: Venu Date: Tue, 4 Nov 2014 11:06:35 +0100 Subject: qdoc: Delayed the examples manifest file creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids the creation of demos-manifest.xml if there are no demos in the repo. Change-Id: I4d3bbe4540f4b1532c0d51f62b8d1494864a7b1c Reviewed-by: Martin Smith Reviewed-by: Topi Reiniö --- src/tools/qdoc/htmlgenerator.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 32399f11c7..5b8ccd9902 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -4301,8 +4301,6 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) return; QString fileName = manifest +"-manifest.xml"; QFile file(outputDir() + QLatin1Char('/') + fileName); - if (!file.open(QFile::WriteOnly | QFile::Text)) - return ; bool demos = false; if (manifest == "demos") demos = true; @@ -4323,7 +4321,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) } ++i; } - if (!proceed) + if (!proceed || !file.open(QFile::WriteOnly | QFile::Text)) return; QXmlStreamWriter writer(&file); -- cgit v1.2.3 From dce13e4b7b0d6cf04879fc3b1f2a241579296e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 22 Oct 2014 13:29:52 +0200 Subject: Fix too many resizes and move events for native widgets When the QWidgetWindow receives a resize or move event, it should check with the widget if its crect already has this geometry. if not then send the resize or move event Ideally events should be sent whenever the QWidgetWindow receives them. QTBUG-42383 is created for this problem Task-number: QTBUG-29937 Task-number: QTBUG-38768 Task-number: QTBUG-30744 Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01 Reviewed-by: Shawn Rutledge --- src/widgets/dialogs/qwizard.cpp | 8 ++ src/widgets/kernel/qwidget.cpp | 5 +- src/widgets/kernel/qwidgetwindow.cpp | 53 ++++++++--- src/widgets/kernel/qwidgetwindow_p.h | 4 +- .../kernel/qwidget_window/tst_qwidget_window.cpp | 101 +++++++++++++++++++++ 5 files changed, 151 insertions(+), 20 deletions(-) mode change 100755 => 100644 tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 1f7b18e824..a378daa3d3 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -2571,6 +2571,14 @@ void QWizard::setWizardStyle(WizardStyle style) d->disableUpdates(); d->wizStyle = style; d->updateButtonTexts(); +#if !defined(QT_NO_STYLE_WINDOWSVISTA) + if (aeroStyleChange) { + //Send a resizeevent since the antiflicker widget probably needs a new size + //because of the backbutton in the window title + QResizeEvent ev(geometry().size(), geometry().size()); + QApplication::sendEvent(this, &ev); + } +#endif d->updateLayout(); updateGeometry(); d->enableUpdates(); diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index cc262fa3e2..315d615d89 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -7155,10 +7155,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) } } - // generate a move event for QWidgets without window handles. QWidgets with native - // window handles already receive a move event from - // QGuiApplicationPrivate::processGeometryChangeEvent. - if (isMove && (!q->windowHandle() || q->testAttribute(Qt::WA_DontShowOnScreen))) { + if (isMove) { QMoveEvent e(q->pos(), oldPos); QApplication::sendEvent(q, &e); } diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 1cd042f99d..e455b772fb 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -543,14 +543,36 @@ void QWidgetWindow::handleKeyEvent(QKeyEvent *event) QGuiApplication::sendSpontaneousEvent(receiver, event); } -void QWidgetWindow::updateGeometry() +bool QWidgetWindow::updateSize() { + bool changed = false; if (m_widget->testAttribute(Qt::WA_OutsideWSRange)) - return; + return changed; + if (m_widget->data->crect.size() != geometry().size()) { + changed = true; + m_widget->data->crect.setSize(geometry().size()); + } - const QMargins margins = frameMargins(); + updateMargins(); + return changed; +} + +bool QWidgetWindow::updatePos() +{ + bool changed = false; + if (m_widget->testAttribute(Qt::WA_OutsideWSRange)) + return changed; + if (m_widget->data->crect.topLeft() != geometry().topLeft()) { + changed = true; + m_widget->data->crect.moveTopLeft(geometry().topLeft()); + } + updateMargins(); + return changed; +} - m_widget->data->crect = geometry(); +void QWidgetWindow::updateMargins() +{ + const QMargins margins = frameMargins(); QTLWExtra *te = m_widget->d_func()->topData(); te->posIncludesFrame= false; te->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom()); @@ -609,24 +631,25 @@ void QWidgetWindow::updateNormalGeometry() void QWidgetWindow::handleMoveEvent(QMoveEvent *event) { - updateGeometry(); - QGuiApplication::sendSpontaneousEvent(m_widget, event); + if (updatePos()) + QGuiApplication::sendSpontaneousEvent(m_widget, event); } void QWidgetWindow::handleResizeEvent(QResizeEvent *event) { QSize oldSize = m_widget->data->crect.size(); - updateGeometry(); - QGuiApplication::sendSpontaneousEvent(m_widget, event); + if (updateSize()) { + QGuiApplication::sendSpontaneousEvent(m_widget, event); - if (m_widget->d_func()->paintOnScreen()) { - QRegion updateRegion(geometry()); - if (m_widget->testAttribute(Qt::WA_StaticContents)) - updateRegion -= QRect(0, 0, oldSize.width(), oldSize.height()); - m_widget->d_func()->syncBackingStore(updateRegion); - } else { - m_widget->d_func()->syncBackingStore(); + if (m_widget->d_func()->paintOnScreen()) { + QRegion updateRegion(geometry()); + if (m_widget->testAttribute(Qt::WA_StaticContents)) + updateRegion -= QRect(0, 0, oldSize.width(), oldSize.height()); + m_widget->d_func()->syncBackingStore(updateRegion); + } else { + m_widget->d_func()->syncBackingStore(); + } } } diff --git a/src/widgets/kernel/qwidgetwindow_p.h b/src/widgets/kernel/qwidgetwindow_p.h index 7f12ae8e20..0632a5c364 100644 --- a/src/widgets/kernel/qwidgetwindow_p.h +++ b/src/widgets/kernel/qwidgetwindow_p.h @@ -108,7 +108,9 @@ private slots: private: void repaintWindow(); - void updateGeometry(); + bool updateSize(); + bool updatePos(); + void updateMargins(); void updateNormalGeometry(); enum FocusWidgets { diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp old mode 100755 new mode 100644 index c6c7464194..36791293ab --- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp +++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp @@ -95,6 +95,8 @@ private slots: void tst_updateWinId_QTBUG40681(); void tst_recreateWindow_QTBUG40817(); + void tst_resize_count(); + void tst_move_count(); }; void tst_QWidget_window::initTestCase() @@ -660,6 +662,105 @@ void tst_QWidget_window::tst_recreateWindow_QTBUG40817() tab.setCurrentIndex(1); } +class ResizeWidget : public QWidget +{ +Q_OBJECT +public: + ResizeWidget(QWidget *parent = 0) + : QWidget(parent) + , resizeCount(0) + { } + + int resizeCount; + +protected: + void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE + { + resizeCount++; + } +}; + +void tst_QWidget_window::tst_resize_count() +{ + { + ResizeWidget resize; + resize.show(); + QVERIFY(QTest::qWaitForWindowExposed(&resize)); + QCOMPARE(resize.resizeCount, 1); + resize.resizeCount = 0; + QSize size = resize.size(); + size.rwidth() += 10; + resize.resize(size); + QGuiApplication::sync(); + QTRY_COMPARE(resize.resizeCount, 1); + + resize.resizeCount = 0; + + ResizeWidget child(&resize); + child.resize(200,200); + child.winId(); + child.show(); + QVERIFY(QTest::qWaitForWindowExposed(&child)); + QGuiApplication::sync(); + QTRY_COMPARE(child.resizeCount, 1); + child.resizeCount = 0; + size = child.size(); + size.rwidth() += 10; + child.resize(size); + QGuiApplication::sync(); + QCOMPARE(resize.resizeCount, 0); + QCOMPARE(child.resizeCount, 1); + } + { + ResizeWidget parent; + ResizeWidget child(&parent); + child.resize(200,200); + child.winId(); + parent.show(); + QVERIFY(QTest::qWaitForWindowExposed(&parent)); + parent.resizeCount = 0; + QGuiApplication::sync(); + QTRY_COMPARE(child.resizeCount, 1); + child.resizeCount = 0; + QSize size = child.size(); + size.rwidth() += 10; + child.resize(size); + QGuiApplication::sync(); + QCOMPARE(parent.resizeCount, 0); + QCOMPARE(child.resizeCount, 1); + } + +} + +class MoveWidget : public QWidget +{ +Q_OBJECT +public: + MoveWidget(QWidget *parent = 0) + : QWidget(parent) + , moveCount(0) + { } + + void moveEvent(QMoveEvent *) Q_DECL_OVERRIDE + { + moveCount++; + } + + int moveCount; +}; + +void tst_QWidget_window::tst_move_count() +{ + MoveWidget move; + move.move(500,500); + move.show(); + QVERIFY(QTest::qWaitForWindowExposed(&move)); + QTRY_VERIFY(move.moveCount >= 1); + move.moveCount = 0; + + move.move(220,250); + QTRY_VERIFY(move.moveCount >= 1); +} QTEST_MAIN(tst_QWidget_window) #include "tst_qwidget_window.moc" -- cgit v1.2.3 From 85a71381145528d446416d2744734384dbe739b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 4 Nov 2014 18:12:46 +0100 Subject: Define Q_CC_CLANG to be the version of upstream Clang that's in use We map the Apple Clang versions to upstream, so that we have one define to compare against. Fixes build break on iOS due to qbasicatomic.h not defining QT_BASIC_ATOMIC_HAS_CONSTRUCTORS on Apple Clang versions, which is needed after 1e9db9f5e18123f2e686c10b Change-Id: I17493c0187c20abc5d22e71944d62bfd16afbad2 Reviewed-by: Thiago Macieira --- src/corelib/global/qcompilerdetection.h | 25 ++++++++++++++++++++++--- src/corelib/thread/qbasicatomic.h | 10 +++------- src/corelib/tools/qsimd_p.h | 2 +- tests/auto/tools/moc/tst_moc.cpp | 2 +- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 949617fa7c..de8a53ea06 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -152,7 +152,26 @@ # endif # elif defined(__clang__) /* Clang also masquerades as GCC */ -# define Q_CC_CLANG +# if defined(__apple_build_version__) +# /* http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions */ +# if __apple_build_version__ >= 600051 +# define Q_CC_CLANG 305 +# elif __apple_build_version__ >= 503038 +# define Q_CC_CLANG 304 +# elif __apple_build_version__ >= 500275 +# define Q_CC_CLANG 303 +# elif __apple_build_version__ >= 425024 +# define Q_CC_CLANG 302 +# elif __apple_build_version__ >= 318045 +# define Q_CC_CLANG 301 +# elif __apple_build_version__ >= 211101 +# define Q_CC_CLANG 300 +# else +# error "Unknown Apple Clang version" +# endif +# else +# define Q_CC_CLANG ((__clang_major__ * 100) + __clang_minor__) +# endif # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() # if !defined(__has_extension) @@ -566,7 +585,7 @@ # endif // Variadic macros are supported for gnu++98, c++11, c99 ... since 2.9 -# if ((__clang_major__ * 100) + __clang_minor__) >= 209 +# if Q_CC_CLANG >= 209 # if !defined(__STRICT_ANSI__) || defined(__GXX_EXPERIMENTAL_CXX0X__) \ || (defined(__cplusplus) && (__cplusplus >= 201103L)) \ || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) @@ -668,7 +687,7 @@ # define Q_COMPILER_VARIADIC_TEMPLATES # endif /* Features that have no __has_feature() check */ -# if ((__clang_major__ * 100) + __clang_minor__) >= 209 /* since clang 2.9 */ +# if Q_CC_CLANG >= 209 /* since clang 2.9 */ # define Q_COMPILER_EXTERN_TEMPLATES # endif # endif diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 09500e92d7..be293f58e3 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -84,13 +84,9 @@ QT_END_NAMESPACE // New atomics #if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS) -# if defined(Q_CC_CLANG) && ((((__clang_major__ * 100) + __clang_minor__) < 303) \ - || defined(__apple_build_version__) \ - ) - /* Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for "stock" clang before version 3.3. - Apple's version has different (higher!) version numbers, so disable it for all of them for now. - (The only way to distinguish between them seems to be a check for __apple_build_version__ .) - +# if defined(Q_CC_CLANG) && Q_CC_CLANG < 303 + /* + Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for Clang before version 3.3. For details about the bug: see http://llvm.org/bugs/show_bug.cgi?id=12670 */ # else diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 434819aa61..3241e09b08 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -219,7 +219,7 @@ // other x86 intrinsics #if defined(Q_PROCESSOR_X86) && ((defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 404)) \ - || (defined(Q_CC_CLANG) && (__clang_major__ * 100 + __clang_minor__ >= 208)) \ + || (defined(Q_CC_CLANG) && (Q_CC_CLANG >= 208)) \ || defined(Q_CC_INTEL)) # define QT_COMPILER_SUPPORTS_X86INTRIN # ifdef Q_CC_INTEL diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 13e786cd20..edb6488eaa 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -1564,7 +1564,7 @@ public slots: void doAnotherThing(bool a = (1 < 3), bool b = (1 > 4)) { Q_UNUSED(a); Q_UNUSED(b); } -#if defined(Q_MOC_RUN) || (defined(Q_COMPILER_AUTO_TYPE) && !(defined(Q_CC_CLANG) && (__clang_major__ * 100) + __clang_minor__) < 304) +#if defined(Q_MOC_RUN) || (defined(Q_COMPILER_AUTO_TYPE) && !(defined(Q_CC_CLANG) && Q_CC_CLANG < 304)) // There is no Q_COMPILER_>> but if compiler support auto, it should also support >> void performSomething(QVector> e = QVector>(8 < 1), QHash> h = QHash>()) -- cgit v1.2.3 From 729541f7ca1129731a2ec79492d15e7ecb3cad80 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 Nov 2014 11:40:30 -0800 Subject: Store the GCC version number in Q_CC_GNU The sequence of (__GNUC__ * 100 + __GNUC_MINOR__) was used in quite a few places. Simplify it to make the code more readable. This follows the change done for Clang, which was quite necessary since Apple's version of Clang has different build numbers. Change-Id: I886271a5a5f21ae59485ecf8d140527723345a46 Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qcompilerdetection.h | 24 ++++++++++++------------ src/corelib/global/qglobal.h | 2 +- src/corelib/tools/qsimd.cpp | 2 +- src/corelib/tools/qsimd_p.h | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index de8a53ea06..ef37f00189 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -137,7 +137,7 @@ # endif #elif defined(__GNUC__) -# define Q_CC_GNU +# define Q_CC_GNU (__GNUC__ * 100 + __GNUC_MINOR__) # define Q_C_CALLBACKS # if defined(__MINGW32__) # define Q_CC_MINGW @@ -187,7 +187,7 @@ # endif # else /* Plain GCC */ -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 +# if Q_CC_GNU >= 405 # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() # define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) @@ -221,7 +221,7 @@ # define QT_NO_ARM_EABI # endif # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 && !defined(Q_CC_CLANG) +# if Q_CC_GNU >= 403 && !defined(Q_CC_CLANG) # define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x))) # endif @@ -728,7 +728,7 @@ #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) # define Q_COMPILER_RESTRICTED_VLA # define Q_COMPILER_THREADSAFE_STATICS -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 +# if Q_CC_GNU >= 403 // GCC supports binary literals in C, C++98 and C++11 modes # define Q_COMPILER_BINARY_LITERALS # endif @@ -739,13 +739,13 @@ # define Q_COMPILER_VARIADIC_MACROS # endif # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403 +# if Q_CC_GNU >= 403 /* C++11 features supported in GCC 4.3: */ # define Q_COMPILER_DECLTYPE # define Q_COMPILER_RVALUE_REFS # define Q_COMPILER_STATIC_ASSERT # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 +# if Q_CC_GNU >= 404 /* C++11 features supported in GCC 4.4: */ # define Q_COMPILER_AUTO_FUNCTION # define Q_COMPILER_AUTO_TYPE @@ -754,7 +754,7 @@ # define Q_COMPILER_UNICODE_STRINGS # define Q_COMPILER_VARIADIC_TEMPLATES # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 +# if Q_CC_GNU >= 405 /* C++11 features supported in GCC 4.5: */ # define Q_COMPILER_EXPLICIT_CONVERSIONS /* GCC 4.4 implements initializer_list but does not define typedefs required @@ -764,7 +764,7 @@ # define Q_COMPILER_RAW_STRINGS # define Q_COMPILER_CLASS_ENUM # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 +# if Q_CC_GNU >= 406 /* Pre-4.6 compilers implement a non-final snapshot of N2346, hence default and delete * functions are supported only if they are public. Starting from 4.6, GCC handles * final version - the access modifier is not relevant. */ @@ -776,7 +776,7 @@ # define Q_COMPILER_UNRESTRICTED_UNIONS # define Q_COMPILER_RANGE_FOR # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 +# if Q_CC_GNU >= 407 /* GCC 4.4 implemented and std::atomic using its old intrinsics. * However, the implementation is incomplete for most platforms until GCC 4.7: * instead, std::atomic would use an external lock. Since we need an std::atomic @@ -792,20 +792,20 @@ # define Q_COMPILER_TEMPLATE_ALIAS # define Q_COMPILER_UDL # endif -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 +# if Q_CC_GNU >= 408 # define Q_COMPILER_ATTRIBUTES # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF # define Q_COMPILER_INHERITING_CONSTRUCTORS # define Q_COMPILER_THREAD_LOCAL -# if (__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1 +# if Q_CC_GNU > 408 || __GNUC_PATCHLEVEL__ >= 1 # define Q_COMPILER_REF_QUALIFIERS # endif # endif /* C++11 features are complete as of GCC 4.8.1 */ # endif # if __cplusplus > 201103L -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 +# if Q_CC_GNU >= 409 /* C++1y features in GCC 4.9 - deprecated, do not update this list */ //# define Q_COMPILER_BINARY_LITERALS // already supported since GCC 4.3 as an extension # define Q_COMPILER_LAMBDA_CAPTURES diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 8bc489e509..f17ff3dea0 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -877,7 +877,7 @@ public: // (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#382). // GCC 4.3 and 4.4 have support for decltype, but are affected by DR 382. # if defined(Q_COMPILER_DECLTYPE) && \ - (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || (__GNUC__ * 100 + __GNUC_MINOR__) >= 405) + (defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !defined(Q_CC_GNU) || Q_CC_GNU >= 405) # define QT_FOREACH_DECLTYPE(x) typename QtPrivate::remove_reference::type # else # define QT_FOREACH_DECLTYPE(x) __typeof__((x)) diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 0b3bbc0ad0..5281723c5d 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -519,7 +519,7 @@ QBasicAtomicInt qt_cpu_features = Q_BASIC_ATOMIC_INITIALIZER(0); void qDetectCpuFeatures() { #if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) -# if (__GNUC__ * 100 + __GNUC_MINOR__) < 403 +# if Q_CC_GNU < 403 // GCC 4.2 (at least the one that comes with Apple's XCode, on Mac) is // known to be broken beyond repair in dealing with the inline assembly // above. It will generate bad code that could corrupt important registers diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 3241e09b08..891a3ff053 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -218,7 +218,7 @@ #endif // other x86 intrinsics -#if defined(Q_PROCESSOR_X86) && ((defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 404)) \ +#if defined(Q_PROCESSOR_X86) && ((defined(Q_CC_GNU) && (Q_CC_GNU >= 404)) \ || (defined(Q_CC_CLANG) && (Q_CC_CLANG >= 208)) \ || defined(Q_CC_INTEL)) # define QT_COMPILER_SUPPORTS_X86INTRIN @@ -332,7 +332,7 @@ static __forceinline unsigned long _bit_scan_forward(uint val) _BitScanForward(&result, val); return result; } -# elif (defined(Q_CC_CLANG) || (defined(Q_CC_GNU) && __GNUC__ * 100 + __GNUC_MINOR__ < 405)) \ +# elif (defined(Q_CC_CLANG) || (defined(Q_CC_GNU) && Q_CC_GNU < 405)) \ && !defined(Q_CC_INTEL) // Clang is missing the intrinsic for _bit_scan_reverse // GCC only added it in version 4.5 -- cgit v1.2.3 From ffcad3244ff6e2429da1bf985d6d1116c251c2ec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 Nov 2014 11:42:08 -0800 Subject: Define the Intel compiler and Microsoft C++ versions in the Q_CC_ macros This is for completeness, since we've done the same for Q_CC_GNU and Q_CC_CLANG. We won't really use the macros like this because both __INTEL_COMPILER and _MSC_VER are readily usable. Change-Id: I669c60166fa4839d43f84f339e6896321d62817f Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qcompilerdetection.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index ef37f00189..4c84daae13 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -78,7 +78,7 @@ # define Q_NO_USING_KEYWORD #elif defined(_MSC_VER) -# define Q_CC_MSVC +# define Q_CC_MSVC (_MSC_VER) # define Q_CC_MSVC_NET # define Q_OUTOFLINE_TEMPLATE inline # if _MSC_VER < 1600 @@ -144,7 +144,7 @@ # endif # if defined(__INTEL_COMPILER) /* Intel C++ also masquerades as GCC */ -# define Q_CC_INTEL +# define Q_CC_INTEL (__INTEL_COMPILER) # define Q_ASSUME_IMPL(expr) __assume(expr) # define Q_UNREACHABLE_IMPL() __builtin_unreachable() # if __INTEL_COMPILER >= 1300 && !defined(__APPLE__) @@ -327,7 +327,7 @@ /* Using the `using' keyword avoids Intel C++ for Linux warnings */ # elif defined(__INTEL_COMPILER) -# define Q_CC_INTEL +# define Q_CC_INTEL (__INTEL_COMPILER) /* Uses CFront, make sure to read the manual how to tweak templates. */ # elif defined(__ghs) -- cgit v1.2.3 From cf30a3d9b2e8584fa419ea1a6ee3d64a140352a0 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 4 Nov 2014 11:57:55 +0100 Subject: Rcc: ensure enough space for the embedded The two-pass feature depends on the QRC_DATA signature that needs to be stored in the array later overwritten by the embedded data. Task-number: QTBUG-42359 Change-Id: Ida1ccff40dda28f92a4267f86f48ee96d62bd214 Reviewed-by: aavit --- src/tools/rcc/rcc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index 9d8a7b7051..7623ce2e4a 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -889,6 +889,8 @@ bool RCCResourceLibrary::writeDataBlobs() if (m_format == C_Code) writeString("\n};\n\n"); else if (m_format == Pass1) { + if (offset < 8) + offset = 8; writeString("\nstatic const unsigned char qt_resource_data["); writeByteArray(QByteArray::number(offset)); writeString("] = { 'Q', 'R', 'C', '_', 'D', 'A', 'T', 'A' };\n\n"); -- cgit v1.2.3 From 82e266a83b8124df327001906d2848f625effbc6 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 31 Oct 2014 13:46:01 +0100 Subject: New Qt logo This patch replaces the old Qt logo with the new, flatter one. The PNGs were optimized via: optipng -o7 -strip "all" Task-number: QTBUG-41685 Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488 Reviewed-by: Robert Loehning Reviewed-by: Friedemann Kleint Reviewed-by: Kai Koehne Reviewed-by: Lars Knoll --- doc/global/template/images/Qt-logo.png | Bin 4344 -> 2425 bytes doc/global/template/images/logo.png | Bin 2205 -> 2370 bytes doc/global/template/images/sprites-combined.png | Bin 62534 -> 53964 bytes .../opengl/legacy/framebufferobject2/cubelogo.png | Bin 5920 -> 2884 bytes examples/opengl/legacy/pbuffers/cubelogo.png | Bin 5920 -> 2884 bytes examples/sql/doc/images/drilldown-example.png | Bin 52950 -> 9092 bytes examples/sql/drilldown/images/qt-creator.png | Bin 46906 -> 6655 bytes examples/sql/drilldown/images/qt-logo.png | Bin 45652 -> 5527 bytes examples/sql/drilldown/images/qt-project.png | Bin 37795 -> 16832 bytes examples/sql/drilldown/images/qt-quick.png | Bin 43238 -> 26635 bytes .../animation/animatedtiles/images/kinetic.png | Bin 6776 -> 5055 bytes .../widgets/animation/easing/images/qt-logo.png | Bin 5149 -> 1495 bytes examples/widgets/doc/images/dropsite-example.png | Bin 36033 -> 29056 bytes .../widgets/doc/images/icons_qt_extended_16x16.png | Bin 1184 -> 563 bytes .../widgets/doc/images/icons_qt_extended_17x17.png | Bin 1219 -> 605 bytes .../widgets/doc/images/icons_qt_extended_32x32.png | Bin 2185 -> 916 bytes .../widgets/doc/images/icons_qt_extended_33x33.png | Bin 2435 -> 975 bytes .../widgets/doc/images/icons_qt_extended_48x48.png | Bin 3805 -> 1270 bytes .../widgets/doc/images/icons_qt_extended_64x64.png | Bin 3805 -> 1614 bytes .../widgets/doc/images/icons_qt_extended_8x8.png | Bin 685 -> 340 bytes examples/widgets/draganddrop/puzzle/example.jpg | Bin 42654 -> 42654 bytes examples/widgets/graphicsview/boxes/qt-logo.jpg | Bin 40886 -> 20316 bytes examples/widgets/graphicsview/boxes/qt-logo.png | Bin 13923 -> 12167 bytes examples/widgets/itemviews/puzzle/example.jpg | Bin 42654 -> 42654 bytes .../painting/basicdrawing/images/qt-logo.png | Bin 3696 -> 1831 bytes .../widgets/icons/images/qt_extended_16x16.png | Bin 834 -> 524 bytes .../widgets/icons/images/qt_extended_32x32.png | Bin 1892 -> 892 bytes .../widgets/icons/images/qt_extended_48x48.png | Bin 3672 -> 1294 bytes src/tools/qdoc/doc/images/qt-logo.png | Bin 5149 -> 1495 bytes src/tools/qlalr/doc/src/images/qt-logo.png | Bin 1422 -> 892 bytes src/widgets/dialogs/images/qtlogo-64.png | Bin 2991 -> 1676 bytes 31 files changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/global/template/images/Qt-logo.png b/doc/global/template/images/Qt-logo.png index 64c1c4aaa3..01256ab08d 100644 Binary files a/doc/global/template/images/Qt-logo.png and b/doc/global/template/images/Qt-logo.png differ diff --git a/doc/global/template/images/logo.png b/doc/global/template/images/logo.png index 1e7ed4cf21..698dde9215 100644 Binary files a/doc/global/template/images/logo.png and b/doc/global/template/images/logo.png differ diff --git a/doc/global/template/images/sprites-combined.png b/doc/global/template/images/sprites-combined.png index 3a48b21f6b..c4f01c4bb9 100644 Binary files a/doc/global/template/images/sprites-combined.png and b/doc/global/template/images/sprites-combined.png differ diff --git a/examples/opengl/legacy/framebufferobject2/cubelogo.png b/examples/opengl/legacy/framebufferobject2/cubelogo.png index 3ae0f9ba3f..2ccbede774 100644 Binary files a/examples/opengl/legacy/framebufferobject2/cubelogo.png and b/examples/opengl/legacy/framebufferobject2/cubelogo.png differ diff --git a/examples/opengl/legacy/pbuffers/cubelogo.png b/examples/opengl/legacy/pbuffers/cubelogo.png index 3ae0f9ba3f..2ccbede774 100644 Binary files a/examples/opengl/legacy/pbuffers/cubelogo.png and b/examples/opengl/legacy/pbuffers/cubelogo.png differ diff --git a/examples/sql/doc/images/drilldown-example.png b/examples/sql/doc/images/drilldown-example.png index fd315a437e..fed51d3629 100644 Binary files a/examples/sql/doc/images/drilldown-example.png and b/examples/sql/doc/images/drilldown-example.png differ diff --git a/examples/sql/drilldown/images/qt-creator.png b/examples/sql/drilldown/images/qt-creator.png index fa0f6ed7ce..0602bdcad1 100644 Binary files a/examples/sql/drilldown/images/qt-creator.png and b/examples/sql/drilldown/images/qt-creator.png differ diff --git a/examples/sql/drilldown/images/qt-logo.png b/examples/sql/drilldown/images/qt-logo.png index 53bc39c38c..7603fa0c90 100644 Binary files a/examples/sql/drilldown/images/qt-logo.png and b/examples/sql/drilldown/images/qt-logo.png differ diff --git a/examples/sql/drilldown/images/qt-project.png b/examples/sql/drilldown/images/qt-project.png index c34d3f099d..e066fbe3f9 100644 Binary files a/examples/sql/drilldown/images/qt-project.png and b/examples/sql/drilldown/images/qt-project.png differ diff --git a/examples/sql/drilldown/images/qt-quick.png b/examples/sql/drilldown/images/qt-quick.png index f66127e8e7..90d9fd075d 100644 Binary files a/examples/sql/drilldown/images/qt-quick.png and b/examples/sql/drilldown/images/qt-quick.png differ diff --git a/examples/widgets/animation/animatedtiles/images/kinetic.png b/examples/widgets/animation/animatedtiles/images/kinetic.png index 55cfa5515f..d5fc0af0f2 100644 Binary files a/examples/widgets/animation/animatedtiles/images/kinetic.png and b/examples/widgets/animation/animatedtiles/images/kinetic.png differ diff --git a/examples/widgets/animation/easing/images/qt-logo.png b/examples/widgets/animation/easing/images/qt-logo.png index 14ddf2a028..6b72d5fb72 100644 Binary files a/examples/widgets/animation/easing/images/qt-logo.png and b/examples/widgets/animation/easing/images/qt-logo.png differ diff --git a/examples/widgets/doc/images/dropsite-example.png b/examples/widgets/doc/images/dropsite-example.png index 2c42c7be69..c555dd3609 100644 Binary files a/examples/widgets/doc/images/dropsite-example.png and b/examples/widgets/doc/images/dropsite-example.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_16x16.png b/examples/widgets/doc/images/icons_qt_extended_16x16.png index 92743690e3..8bae9499e4 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_16x16.png and b/examples/widgets/doc/images/icons_qt_extended_16x16.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_17x17.png b/examples/widgets/doc/images/icons_qt_extended_17x17.png index e9bb24a282..7ef4222f93 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_17x17.png and b/examples/widgets/doc/images/icons_qt_extended_17x17.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_32x32.png b/examples/widgets/doc/images/icons_qt_extended_32x32.png index cd3d0f3255..7b0c54bac3 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_32x32.png and b/examples/widgets/doc/images/icons_qt_extended_32x32.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_33x33.png b/examples/widgets/doc/images/icons_qt_extended_33x33.png index a67565cc2b..1a38f6e44b 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_33x33.png and b/examples/widgets/doc/images/icons_qt_extended_33x33.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_48x48.png b/examples/widgets/doc/images/icons_qt_extended_48x48.png index 5aa2d73f71..85dcb5f26c 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_48x48.png and b/examples/widgets/doc/images/icons_qt_extended_48x48.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_64x64.png b/examples/widgets/doc/images/icons_qt_extended_64x64.png index 5aa2d73f71..d0bfd97f10 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_64x64.png and b/examples/widgets/doc/images/icons_qt_extended_64x64.png differ diff --git a/examples/widgets/doc/images/icons_qt_extended_8x8.png b/examples/widgets/doc/images/icons_qt_extended_8x8.png index 8de7fce038..dcbb5811c6 100644 Binary files a/examples/widgets/doc/images/icons_qt_extended_8x8.png and b/examples/widgets/doc/images/icons_qt_extended_8x8.png differ diff --git a/examples/widgets/draganddrop/puzzle/example.jpg b/examples/widgets/draganddrop/puzzle/example.jpg index e09fb70757..023203c57a 100644 Binary files a/examples/widgets/draganddrop/puzzle/example.jpg and b/examples/widgets/draganddrop/puzzle/example.jpg differ diff --git a/examples/widgets/graphicsview/boxes/qt-logo.jpg b/examples/widgets/graphicsview/boxes/qt-logo.jpg index 4014b4659c..8d7fab052a 100644 Binary files a/examples/widgets/graphicsview/boxes/qt-logo.jpg and b/examples/widgets/graphicsview/boxes/qt-logo.jpg differ diff --git a/examples/widgets/graphicsview/boxes/qt-logo.png b/examples/widgets/graphicsview/boxes/qt-logo.png index 7d3e97eb36..0b0b15480c 100644 Binary files a/examples/widgets/graphicsview/boxes/qt-logo.png and b/examples/widgets/graphicsview/boxes/qt-logo.png differ diff --git a/examples/widgets/itemviews/puzzle/example.jpg b/examples/widgets/itemviews/puzzle/example.jpg index e09fb70757..023203c57a 100644 Binary files a/examples/widgets/itemviews/puzzle/example.jpg and b/examples/widgets/itemviews/puzzle/example.jpg differ diff --git a/examples/widgets/painting/basicdrawing/images/qt-logo.png b/examples/widgets/painting/basicdrawing/images/qt-logo.png index a8b452e07a..abfc8caadb 100644 Binary files a/examples/widgets/painting/basicdrawing/images/qt-logo.png and b/examples/widgets/painting/basicdrawing/images/qt-logo.png differ diff --git a/examples/widgets/widgets/icons/images/qt_extended_16x16.png b/examples/widgets/widgets/icons/images/qt_extended_16x16.png index 95d3bae838..bee4e7d6cd 100644 Binary files a/examples/widgets/widgets/icons/images/qt_extended_16x16.png and b/examples/widgets/widgets/icons/images/qt_extended_16x16.png differ diff --git a/examples/widgets/widgets/icons/images/qt_extended_32x32.png b/examples/widgets/widgets/icons/images/qt_extended_32x32.png index 7b7a790c12..6e7d000c04 100644 Binary files a/examples/widgets/widgets/icons/images/qt_extended_32x32.png and b/examples/widgets/widgets/icons/images/qt_extended_32x32.png differ diff --git a/examples/widgets/widgets/icons/images/qt_extended_48x48.png b/examples/widgets/widgets/icons/images/qt_extended_48x48.png index 8434dc26db..7a93d88900 100644 Binary files a/examples/widgets/widgets/icons/images/qt_extended_48x48.png and b/examples/widgets/widgets/icons/images/qt_extended_48x48.png differ diff --git a/src/tools/qdoc/doc/images/qt-logo.png b/src/tools/qdoc/doc/images/qt-logo.png index 14ddf2a028..6b72d5fb72 100644 Binary files a/src/tools/qdoc/doc/images/qt-logo.png and b/src/tools/qdoc/doc/images/qt-logo.png differ diff --git a/src/tools/qlalr/doc/src/images/qt-logo.png b/src/tools/qlalr/doc/src/images/qt-logo.png index 2dc67161c1..6e7d000c04 100644 Binary files a/src/tools/qlalr/doc/src/images/qt-logo.png and b/src/tools/qlalr/doc/src/images/qt-logo.png differ diff --git a/src/widgets/dialogs/images/qtlogo-64.png b/src/widgets/dialogs/images/qtlogo-64.png index 4f68e162de..af87e98cf5 100644 Binary files a/src/widgets/dialogs/images/qtlogo-64.png and b/src/widgets/dialogs/images/qtlogo-64.png differ -- cgit v1.2.3 From 8545821bf8c3694d0dcb5293f3b23fef2d90cd02 Mon Sep 17 00:00:00 2001 From: Aki Koskinen Date: Tue, 23 Sep 2014 14:09:21 +0300 Subject: Fix incorrect documentation from QTranslator::load Task-number: QTBUG-27506 Change-Id: I1b2d4ed2242efd52258c7f587c2121f9dde18a0d Reviewed-by: Oswald Buddenhagen --- src/corelib/kernel/qtranslator.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 33827926c6..dc56ad88a1 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -426,9 +426,8 @@ QTranslator::~QTranslator() directory. Returns \c true if the translation is successfully loaded; otherwise returns \c false. - If \a directory is not specified, the directory of the - application's executable is used (i.e., as - \l{QCoreApplication::}{applicationDirPath()}). + If \a directory is not specified, the current directory is used + (i.e., as \l{QDir::}{currentPath()}). The previous contents of this translator object are discarded. -- cgit v1.2.3 From a2ce7e6a6f0f5c638aaa644255e9352eb91b57d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 9 May 2014 09:40:19 +0200 Subject: Cocoa: Don't activate popup windows. Qt expects a handleWindowActivated call for non- popup windows only. Add a window type check, similar to the other handleWindowActivated calls. Task-number: QTBUG-38707 Change-Id: Iaa5959675f7e3ae4664bdf785d3f374debb0d0a7 Reviewed-by: Friedemann Kleint Reviewed-by: Gabriel de Dietrich Reviewed-by: Liang Qi --- src/plugins/platforms/cocoa/qnsview.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index fa85a2bf54..83e913ad58 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -603,7 +603,8 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; { if (m_window->flags() & Qt::WindowTransparentForInput) return NO; - QWindowSystemInterface::handleWindowActivated([self topLevelWindow]); + if (!m_platformWindow->windowIsPopupType()) + QWindowSystemInterface::handleWindowActivated([self topLevelWindow]); return YES; } -- cgit v1.2.3 From bb31aa853eb704bc916004ea59ad57bc6baa1276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 30 Oct 2014 16:52:36 +0100 Subject: Cocoa: refactor commit 876a428f. Conditions for when updateExposedGeometry() should actually send the expose event goes into the function itself. The window()->isVisible() check could arguably be moved to isWindowExposable(), but I'm keeping this as a straight refactor without any behavior changes. (isWindowExposable() is called from multiple locations) Change-Id: I6d792286ccbc50065ebfc588daca2240761a1937 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/cocoa/qcocoawindow.mm | 5 +++++ src/plugins/platforms/cocoa/qnsview.mm | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index f536e20b39..56c356711e 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1754,6 +1754,11 @@ void QCocoaWindow::updateExposedGeometry() if (!m_geometryUpdateExposeAllowed) return; + // Do not send incorrect exposes in case the window is not even visible yet. + // We might get here as a result of a resize() from QWidget's show(), for instance. + if (!window()->isVisible()) + return; + if (!isWindowExposable()) return; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 83e913ad58..052a7cc98f 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -361,12 +361,8 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; // Send a geometry change event to Qt, if it's ready to handle events if (!m_platformWindow->m_inConstructor) { QWindowSystemInterface::handleGeometryChange(m_window, geometry); - // Do not send incorrect exposes in case the window is not even visible yet. - // We might get here as a result of a resize() from QWidget's show(), for instance. - if (m_platformWindow->window()->isVisible()) { - m_platformWindow->updateExposedGeometry(); - QWindowSystemInterface::flushWindowSystemEvents(); - } + m_platformWindow->updateExposedGeometry(); + QWindowSystemInterface::flushWindowSystemEvents(); } } -- cgit v1.2.3 From 7146cbed6e3a42389593b775bf4a26f05b4b8d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 22 Oct 2014 00:41:55 +0200 Subject: Cocoa: Guard against recursive event delivery Fix "Recursive repaint" crash. Add guard to QCococaWindow::setGeometry and QNSView updateGeometry to prevent processing window system events during setGeometry. Task-number: QTBUG-41449 Change-Id: I304fdf134d433cbc50fafd997ecd91e31cb57f4e Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoawindow.h | 1 + src/plugins/platforms/cocoa/qcocoawindow.mm | 3 +++ src/plugins/platforms/cocoa/qnsview.mm | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index a43cf73d34..b232c7a4d3 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -268,6 +268,7 @@ public: // for QNSView bool m_inConstructor; bool m_inSetVisible; + bool m_inSetGeometry; #ifndef QT_NO_OPENGL QCocoaGLContext *m_glContext; #endif diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 56c356711e..6656212457 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -381,6 +381,7 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) , m_windowUnderMouse(false) , m_inConstructor(true) , m_inSetVisible(false) + , m_inSetGeometry(false) #ifndef QT_NO_OPENGL , m_glContext(0) #endif @@ -470,6 +471,8 @@ QSurfaceFormat QCocoaWindow::format() const void QCocoaWindow::setGeometry(const QRect &rectIn) { + QBoolBlocker inSetGeometry(m_inSetGeometry, true); + QRect rect = rectIn; // This means it is a call from QWindow::setFramePosition() and // the coordinates include the frame (size is still the contents rectangle). diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 052a7cc98f..de30972393 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -362,7 +362,10 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; if (!m_platformWindow->m_inConstructor) { QWindowSystemInterface::handleGeometryChange(m_window, geometry); m_platformWindow->updateExposedGeometry(); - QWindowSystemInterface::flushWindowSystemEvents(); + // Guard against processing window system events during QWindow::setGeometry + // calles, which Qt and Qt applications do not excpect. + if (!m_platformWindow->m_inSetGeometry) + QWindowSystemInterface::flushWindowSystemEvents(); } } -- cgit v1.2.3 From 63c7ceaf1b352efa4c6d5a6be96819d6e013e2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 30 Oct 2014 17:00:03 +0100 Subject: Revert "OS X - unified toolbar and AA_NativeWindows" Will be fixed in a different way. This reverts commit ae5f3df59b37e0ce8aaef27dc1e02f40def340ae. Change-Id: Ie706396667a5b6c9003bb92a018d88346a180e65 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qnsview.mm | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index de30972393..09368fa25e 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -676,23 +676,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; m_platformWindow->m_forwardWindow = 0; } - NSPoint globalPos = [NSEvent mouseLocation]; - - if ([self.window parentWindow] - && (theEvent.type == NSLeftMouseDragged || theEvent.type == NSLeftMouseUp)) { - // QToolBar can be implemented as a child window on top of its main window - // (with a borderless NSWindow). If an option "unified toolbar" set on the main window, - // it's possible to drag such a window using this toolbar. - // While handling mouse drag events, QToolBar moves the window (QWidget::move). - // In such a combination [NSEvent mouseLocation] is very different from the - // real event location and as a result a window will move chaotically. - NSPoint winPoint = [theEvent locationInWindow]; - NSRect tmpRect = NSMakeRect(winPoint.x, winPoint.y, 1., 1.); - tmpRect = [[theEvent window] convertRectToScreen:tmpRect]; - globalPos = tmpRect.origin; - } - - [targetView convertFromScreen:globalPos toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint]; + [targetView convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint]; ulong timestamp = [theEvent timestamp] * 1000; QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag(); -- cgit v1.2.3 From 39be577cc2dee415129d34afffc0b3509371db68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 9 May 2014 11:22:34 +0200 Subject: Cocoa: get mouse position from event if possible ...instead of using the current mouse position. This is important if event processing is delayed: we want the QMouseEvent to have the position when the event happened, not the current position. Regression from Qt 4. Change-Id: Ifd4f0f02853236a204de96c5a97e72f86c29f0b7 Task-id: QTBUG-37926 Reviewed-by: Timur Pocheptsov Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qnsview.mm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 09368fa25e..699340795d 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -662,6 +662,19 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; m_frameStrutButtons = Qt::NoButton; } +- (NSPoint) screenMousePoint:(NSEvent *)theEvent +{ + NSPoint screenPoint; + if (theEvent) { + NSPoint windowPoint = [theEvent locationInWindow]; + NSRect screenRect = [[theEvent window] convertRectToScreen:NSMakeRect(windowPoint.x, windowPoint.y, 1, 1)]; + screenPoint = screenRect.origin; + } else { + screenPoint = [NSEvent mouseLocation]; + } + return screenPoint; +} + - (void)handleMouseEvent:(NSEvent *)theEvent { [self handleTabletEvent: theEvent]; @@ -676,7 +689,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; m_platformWindow->m_forwardWindow = 0; } - [targetView convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint]; + [targetView convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint]; ulong timestamp = [theEvent timestamp] * 1000; QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag(); @@ -849,7 +862,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; QPointF windowPoint; QPointF screenPoint; - [self convertFromScreen:[NSEvent mouseLocation] toWindowPoint:&windowPoint andScreenPoint:&screenPoint]; + [self convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&windowPoint andScreenPoint:&screenPoint]; QWindow *childWindow = m_platformWindow->childWindowAt(windowPoint.toPoint()); // Top-level windows generate enter-leave events for sub-windows. -- cgit v1.2.3 From 063a54461677c0dbf75282bc367f204af792dac2 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 30 Oct 2014 14:19:32 +0100 Subject: iOS: remove unused function 'fromPortraitToPrimary' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic768790a90ef7048bd5e7027e9682988085368fe Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosglobal.h | 2 +- src/plugins/platforms/ios/qiosglobal.mm | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/plugins/platforms/ios/qiosglobal.h b/src/plugins/platforms/ios/qiosglobal.h index dbedba7e85..f7b9cd7015 100644 --- a/src/plugins/platforms/ios/qiosglobal.h +++ b/src/plugins/platforms/ios/qiosglobal.h @@ -62,7 +62,7 @@ QPointF fromCGPoint(const CGPoint &point); Qt::ScreenOrientation toQtScreenOrientation(UIDeviceOrientation uiDeviceOrientation); UIDeviceOrientation fromQtScreenOrientation(Qt::ScreenOrientation qtOrientation); -QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen); + int infoPlistValue(NSString* key, int defaultValue); QT_END_NAMESPACE diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm index 71d5a58088..9f10c3e287 100644 --- a/src/plugins/platforms/ios/qiosglobal.mm +++ b/src/plugins/platforms/ios/qiosglobal.mm @@ -127,15 +127,6 @@ UIDeviceOrientation fromQtScreenOrientation(Qt::ScreenOrientation qtOrientation) return uiOrientation; } -QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen) -{ - // UIScreen is always in portrait. Use this function to convert CGRects - // aligned with UIScreen into whatever is the current orientation of QScreen. - QRect geometry = screen->geometry(); - return geometry.width() < geometry.height() ? rect - : QRect(rect.y(), geometry.height() - rect.width() - rect.x(), rect.height(), rect.width()); -} - int infoPlistValue(NSString* key, int defaultValue) { static NSBundle *bundle = [NSBundle mainBundle]; -- cgit v1.2.3 From 8a9addf42ef1577d5ae337a9a45ef2f2c585afc0 Mon Sep 17 00:00:00 2001 From: Dyami Caliri Date: Tue, 4 Nov 2014 13:51:53 -0800 Subject: QMenu check for null result from QPlatformMenu::menuItemForTag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QMenu needs to check result of QPlatformMenu::menuItemForTag to avoid a crash dereferencing a null pointer. Task-number: QTBUG-42327 Change-Id: Ie54a94caec7a5d756c459741df182fbe4e38bec0 Reviewed-by: Morten Johan Sørvig --- src/widgets/widgets/qmenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 0fd645a4d3..acfccc8e19 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -3055,8 +3055,10 @@ void QMenu::actionEvent(QActionEvent *e) delete menuItem; } else if (e->type() == QEvent::ActionChanged) { QPlatformMenuItem *menuItem = d->platformMenu->menuItemForTag(reinterpret_cast(e->action())); - copyActionToPlatformItem(e->action(), menuItem); - d->platformMenu->syncMenuItem(menuItem); + if (menuItem) { + copyActionToPlatformItem(e->action(), menuItem); + d->platformMenu->syncMenuItem(menuItem); + } } d->platformMenu->syncSeparatorsCollapsible(d->collapsibleSeparators); -- cgit v1.2.3 From 7eb7dd555cc50112ae242a32976f075f070625d7 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 5 Nov 2014 07:31:01 +0100 Subject: Documentation CSS: remove body text color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Help text should use the QPalette color. Task-number: QTBUG-42399 Change-Id: Ibc8658b4a7affc2481d895c13cfa673b50a872e0 Reviewed-by: Topi Reiniö --- doc/global/template/style/offline.css | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index 5957e3840d..126df9d806 100644 --- a/doc/global/template/style/offline.css +++ b/doc/global/template/style/offline.css @@ -2,7 +2,6 @@ body { font: normal 400 14px/1.2 Arial; margin-top: 85px; font-family: Arial, Helvetica; - color: #313131; text-align: left; margin-left: 5px; margin-right: 5px; -- cgit v1.2.3 From 2d075bf651e246d57d25a95219d7358946b9f785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 4 Nov 2014 17:12:28 +0100 Subject: iOS: Update integrated event dispatcher to support 64-bit x86 Needed so that we can build simulator builds for x86_64 as well as i386. The function call alignment is the same, but we need to use the 64-bit versions of the instruction and operands. Change-Id: I62cc78e23b5e0923382d19570ce18f558894e6a0 Reviewed-by: Simon Hausmann --- src/plugins/platforms/ios/qioseventdispatcher.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/ios/qioseventdispatcher.mm b/src/plugins/platforms/ios/qioseventdispatcher.mm index 66fd9cd1e5..ffffc4cbc4 100644 --- a/src/plugins/platforms/ios/qioseventdispatcher.mm +++ b/src/plugins/platforms/ios/qioseventdispatcher.mm @@ -317,11 +317,16 @@ static bool rootLevelRunLoopIntegration() } #if defined(Q_PROCESSOR_X86) -# define SET_STACK_POINTER "mov %0, %%esp" # define FUNCTION_CALL_ALIGNMENT 16 +# if defined(Q_PROCESSOR_X86_32) +# define SET_STACK_POINTER "mov %0, %%esp" +# elif defined(Q_PROCESSOR_X86_64) +# define SET_STACK_POINTER "movq %0, %%rsp" +# endif #elif defined(Q_PROCESSOR_ARM) -# define SET_STACK_POINTER "mov sp, %0" +# // Valid for both 32 and 64-bit ARM # define FUNCTION_CALL_ALIGNMENT 4 +# define SET_STACK_POINTER "mov sp, %0" #else # error "Unknown processor family" #endif -- cgit v1.2.3 From ec63f5fbf3927b184f234f95c6003fe8496d8b9f Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 15 Oct 2014 14:00:05 +0200 Subject: docs: WindowType is important for dialogs to center themselves Task-number: QTBUG-41844 Task-number: QTBUG-36185 Change-Id: I61605006048e81d2666eea34f4d041124a24199f Reviewed-by: Laszlo Agocs --- src/gui/kernel/qwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index b0fbbc1570..99bf469f87 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1122,6 +1122,10 @@ Qt::WindowState QWindow::windowState() const This is a hint to the window manager that this window is a dialog or pop-up on behalf of the given window. + In order to cause the window to be centered above its transient parent by + default, depending on the window manager, it may also be necessary to call + setFlags() with a suitable \l Qt::WindowType (such as \c Qt::Dialog). + \sa transientParent(), parent() */ void QWindow::setTransientParent(QWindow *parent) -- cgit v1.2.3 From 3978249743559d31b793cdfcf77c8e9ae653cec4 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 28 Oct 2014 14:28:42 +0100 Subject: Doc: add new Qt Creator Manual topics to externalpages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New in some earlier version: - Parsing C++ Files New in Qt Creator 3.3: - Qt Quick UI Forms - Using Clang Static Analyzer Change-Id: I2821b31f4c67b79e6a178018a6acba5b828edb3e Reviewed-by: Topi Reiniö --- doc/global/externalsites/qtcreator.qdoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/global/externalsites/qtcreator.qdoc b/doc/global/externalsites/qtcreator.qdoc index 46609de160..a98fbd0a56 100644 --- a/doc/global/externalsites/qtcreator.qdoc +++ b/doc/global/externalsites/qtcreator.qdoc @@ -483,3 +483,15 @@ \externalpage http://qt-project.org/doc/qtcreator/creator-developing-winrt.html \title Qt Creator: Connecting Windows Runtime Devices */ +/*! + \externalpage http://qt-project.org/doc/qtcreator/creator-clang-codemodel.html + \title Qt Creator: Parsing C++ Files +*/ +/*! + \externalpage http://qt-project.org/doc/qtcreator/creator-quick-ui-forms.html + \title Qt Creator: Qt Quick UI Forms +*/ +/*! + \externalpage http://qt-project.org/doc/qtcreator/creator-clang-static-analyzer.html + \title Qt Creator: Using Clang Static Analyzer +*/ -- cgit v1.2.3 From 7a8bb824ff41228913c2a3e0b969767f3c49c15f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 27 Oct 2014 12:33:35 +0100 Subject: Update the copy of the Qml parser The files here are a copy of the parser from the qtdeclarative repository. This patch combines commit cfff375afcfe63d25b3c1904ff58a90bcd1edb43 and f876562de8eb978cea39fe72e76c49ae51ff2f97 from the qtdeclarative repository to fix the license and allow for read-only object property syntax. Change-Id: Idb58948cede2cd47858e3831785009f8b7ea2169 Reviewed-by: Martin Smith --- src/tools/qdoc/qmlparser/qqmljs.g | 115 +- src/tools/qdoc/qmlparser/qqmljsgrammar.cpp | 1668 ++++++++++++++-------------- src/tools/qdoc/qmlparser/qqmljsgrammar_p.h | 12 +- src/tools/qdoc/qmlparser/qqmljsparser.cpp | 384 ++++--- src/tools/qdoc/qmlparser/qqmljsparser_p.h | 4 +- 5 files changed, 1105 insertions(+), 1078 deletions(-) diff --git a/src/tools/qdoc/qmlparser/qqmljs.g b/src/tools/qdoc/qmlparser/qqmljs.g index de4fec4d56..616e3b3166 100644 --- a/src/tools/qdoc/qmlparser/qqmljs.g +++ b/src/tools/qdoc/qmlparser/qqmljs.g @@ -1,21 +1,31 @@ ---------------------------------------------------------------------------- -- --- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +-- Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -- Contact: http://www.qt-project.org/legal -- -- This file is part of the QtQml module of the Qt Toolkit. -- --- $QT_BEGIN_LICENSE:LGPL-ONLY$ +-- $QT_BEGIN_LICENSE:LGPL21$ +-- 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 Digia. For licensing terms and +-- conditions see http://qt.digia.com/licensing. For further information +-- use the contact form at http://qt.digia.com/contact-us. +-- -- GNU Lesser General Public License Usage --- This file may be used under the terms of the GNU Lesser --- General Public License version 2.1 as published by the Free Software --- Foundation and appearing in the file LICENSE.LGPL included in the --- packaging of this file. Please review the following information to --- ensure the GNU Lesser General Public License version 2.1 requirements --- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +-- Alternatively, this file may be used under the terms of the GNU Lesser +-- General Public License version 2.1 or version 3 as published by the Free +-- Software Foundation and appearing in the file LICENSE.LGPLv21 and +-- LICENSE.LGPLv3 included in the packaging of this file. Please review the +-- following information to ensure the GNU Lesser General Public License +-- requirements will be met: https://www.gnu.org/licenses/lgpl.html and +-- http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -- --- If you have questions regarding the use of this file, please contact --- us via http://www.qt-project.org/. +-- In addition, as a special exception, Digia gives you certain additional +-- rights. These rights are described in the Digia Qt LGPL Exception +-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -- -- $QT_END_LICENSE$ -- @@ -89,41 +99,33 @@ /./**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -142,41 +144,33 @@ /:/**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -1090,6 +1084,31 @@ case $rule_number: { } break; ./ +UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON UiQualifiedId UiObjectInitializer ; +/. +case $rule_number: { + AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4)); + node->isReadonlyMember = true; + node->readonlyToken = loc(1); + node->propertyToken = loc(2); + node->typeToken = loc(3); + node->identifierToken = loc(4); + node->semicolonToken = loc(5); // insert a fake ';' before ':' + + AST::UiQualifiedId *propertyName = new (pool) AST::UiQualifiedId(stringRef(4)); + propertyName->identifierToken = loc(4); + propertyName->next = 0; + + AST::UiObjectBinding *binding = new (pool) AST::UiObjectBinding( + propertyName, sym(6).UiQualifiedId, sym(7).UiObjectInitializer); + binding->colonToken = loc(5); + + node->binding = binding; + + sym(1).Node = node; +} break; +./ + UiObjectMember: FunctionDeclaration ; /. case $rule_number: { diff --git a/src/tools/qdoc/qmlparser/qqmljsgrammar.cpp b/src/tools/qdoc/qmlparser/qqmljsgrammar.cpp index d3fb3f8d1f..2600a5e14c 100644 --- a/src/tools/qdoc/qmlparser/qqmljsgrammar.cpp +++ b/src/tools/qdoc/qmlparser/qqmljsgrammar.cpp @@ -57,35 +57,35 @@ const short QQmlJSGrammar::lhs [] = { 130, 130, 130, 130, 130, 130, 130, 111, 138, 138, 138, 139, 139, 140, 140, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 124, 124, 124, 124, 124, 124, 124, 143, + 111, 111, 111, 124, 124, 124, 124, 124, 124, 124, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 129, 145, 145, - 145, 145, 144, 144, 149, 149, 149, 147, 147, 150, - 150, 150, 150, 153, 153, 153, 153, 153, 153, 153, + 143, 143, 143, 143, 143, 143, 143, 143, 129, 145, + 145, 145, 145, 144, 144, 149, 149, 149, 147, 147, + 150, 150, 150, 150, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 154, 154, 120, 120, 120, 120, - 120, 157, 157, 158, 158, 158, 158, 156, 156, 159, - 159, 160, 160, 161, 161, 161, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, - 164, 164, 164, 165, 165, 165, 165, 166, 166, 166, - 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, - 168, 168, 168, 168, 168, 169, 169, 169, 169, 169, - 170, 170, 171, 171, 172, 172, 173, 173, 174, 174, - 175, 175, 176, 176, 177, 177, 178, 178, 179, 179, - 180, 180, 181, 181, 148, 148, 182, 182, 183, 183, + 153, 153, 153, 153, 153, 154, 154, 120, 120, 120, + 120, 120, 157, 157, 158, 158, 158, 158, 156, 156, + 159, 159, 160, 160, 161, 161, 161, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 163, 163, 163, + 163, 164, 164, 164, 165, 165, 165, 165, 166, 166, + 166, 166, 166, 166, 166, 167, 167, 167, 167, 167, + 167, 168, 168, 168, 168, 168, 169, 169, 169, 169, + 169, 170, 170, 171, 171, 172, 172, 173, 173, 174, + 174, 175, 175, 176, 176, 177, 177, 178, 178, 179, + 179, 180, 180, 181, 181, 148, 148, 182, 182, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 109, 109, 184, 184, 185, 185, 186, 186, 108, 108, + 183, 109, 109, 184, 184, 185, 185, 186, 186, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 131, 195, 195, 194, 194, 142, 142, - 196, 196, 197, 197, 199, 199, 198, 200, 203, 201, - 201, 204, 202, 202, 132, 133, 133, 134, 134, 187, - 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, - 188, 189, 189, 189, 189, 190, 190, 135, 136, 205, - 205, 208, 208, 206, 206, 209, 207, 191, 192, 192, - 137, 137, 137, 210, 211, 193, 193, 212, 141, 155, - 155, 213, 213, 152, 152, 151, 151, 214, 112, 112, - 215, 215, 110, 110, 146, 146, 216}; + 108, 108, 108, 108, 131, 195, 195, 194, 194, 142, + 142, 196, 196, 197, 197, 199, 199, 198, 200, 203, + 201, 201, 204, 202, 202, 132, 133, 133, 134, 134, + 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, + 188, 188, 189, 189, 189, 189, 190, 190, 135, 136, + 205, 205, 208, 208, 206, 206, 209, 207, 191, 192, + 192, 137, 137, 137, 210, 211, 193, 193, 212, 141, + 155, 155, 213, 213, 152, 152, 151, 151, 214, 112, + 112, 215, 215, 110, 110, 146, 146, 216}; const short QQmlJSGrammar::rhs [] = { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, @@ -95,110 +95,110 @@ const short QQmlJSGrammar::rhs [] = { 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 1, 2, 4, 6, 6, 3, 3, 7, 7, 4, 4, 5, 5, 5, 6, 6, 10, 6, + 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 3, 3, 4, 5, 3, 4, 3, 1, 1, 2, - 3, 4, 1, 2, 3, 7, 8, 1, 3, 1, + 2, 3, 3, 4, 5, 3, 4, 3, 1, 1, + 2, 3, 4, 1, 2, 3, 7, 8, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, - 5, 1, 2, 4, 4, 4, 3, 0, 1, 1, - 3, 1, 1, 1, 2, 2, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 3, 3, 3, - 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, - 1, 3, 3, 3, 3, 1, 3, 3, 3, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 5, 1, 5, 1, 3, 1, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 3, 5, 1, 2, 4, 4, 4, 3, 0, 1, + 1, 3, 1, 1, 1, 2, 2, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 3, 3, + 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 3, 3, + 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 5, 1, 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 0, 1, 1, 3, 0, 1, 1, 1, + 1, 1, 3, 0, 1, 1, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 2, 0, 1, 3, 3, - 1, 1, 1, 3, 1, 3, 2, 2, 2, 0, - 1, 2, 0, 1, 1, 2, 2, 7, 5, 7, - 7, 7, 5, 9, 10, 7, 8, 2, 2, 3, - 3, 2, 2, 3, 3, 3, 3, 5, 5, 3, - 5, 1, 2, 0, 1, 4, 3, 3, 3, 3, - 3, 3, 4, 5, 2, 2, 2, 1, 8, 8, - 7, 1, 3, 0, 1, 0, 1, 1, 1, 1, - 1, 2, 1, 1, 0, 1, 2}; + 1, 1, 1, 1, 3, 1, 2, 0, 1, 3, + 3, 1, 1, 1, 3, 1, 3, 2, 2, 2, + 0, 1, 2, 0, 1, 1, 2, 2, 7, 5, + 7, 7, 7, 5, 9, 10, 7, 8, 2, 2, + 3, 3, 2, 2, 3, 3, 3, 3, 5, 5, + 3, 5, 1, 2, 0, 1, 4, 3, 3, 3, + 3, 3, 3, 4, 5, 2, 2, 2, 1, 8, + 8, 7, 1, 3, 0, 1, 0, 1, 1, 1, + 1, 1, 2, 1, 1, 0, 1, 2}; const short QQmlJSGrammar::action_default [] = { - 0, 0, 28, 0, 0, 0, 28, 0, 184, 251, - 215, 223, 219, 163, 235, 211, 3, 148, 81, 164, - 227, 231, 152, 181, 162, 167, 147, 201, 188, 0, - 88, 89, 84, 0, 78, 73, 355, 0, 0, 0, - 0, 86, 0, 0, 82, 85, 77, 0, 0, 74, - 76, 79, 75, 87, 80, 0, 83, 0, 0, 177, - 0, 0, 164, 183, 166, 165, 0, 0, 0, 179, - 180, 178, 182, 0, 212, 0, 0, 0, 0, 202, - 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, - 186, 187, 185, 190, 194, 193, 191, 189, 204, 203, - 205, 0, 220, 0, 216, 0, 0, 158, 145, 157, - 146, 114, 115, 116, 141, 117, 142, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 143, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 144, 0, 0, 156, 252, 159, 0, 160, 0, - 161, 155, 0, 248, 241, 239, 246, 247, 245, 244, - 250, 243, 242, 240, 249, 236, 0, 224, 0, 0, - 228, 0, 0, 232, 0, 0, 158, 150, 0, 149, - 0, 154, 168, 0, 344, 344, 345, 0, 342, 0, - 343, 0, 346, 259, 266, 265, 273, 261, 0, 262, - 0, 347, 0, 354, 263, 264, 81, 269, 267, 351, - 348, 353, 270, 0, 281, 0, 0, 0, 0, 338, - 0, 355, 253, 295, 0, 0, 0, 282, 0, 0, - 271, 272, 0, 260, 268, 296, 297, 0, 344, 0, - 0, 346, 0, 339, 340, 0, 328, 352, 0, 312, - 313, 314, 315, 0, 308, 309, 310, 311, 336, 337, - 0, 0, 0, 0, 0, 300, 301, 302, 257, 255, - 217, 225, 221, 237, 213, 258, 0, 164, 229, 233, - 206, 195, 0, 0, 214, 0, 0, 0, 0, 207, - 0, 0, 0, 0, 0, 199, 197, 200, 198, 196, - 209, 208, 210, 0, 222, 0, 218, 0, 256, 164, - 0, 238, 253, 254, 0, 253, 0, 0, 304, 0, - 0, 0, 306, 0, 226, 0, 0, 230, 0, 0, - 234, 293, 0, 285, 294, 288, 0, 292, 0, 253, - 286, 0, 253, 0, 0, 305, 0, 0, 0, 307, - 0, 0, 0, 299, 0, 298, 81, 108, 356, 0, - 0, 113, 275, 278, 0, 114, 281, 117, 142, 119, - 120, 84, 124, 125, 78, 126, 129, 82, 85, 253, - 79, 87, 132, 80, 134, 83, 136, 137, 282, 139, - 140, 144, 0, 110, 109, 112, 96, 111, 95, 0, - 105, 276, 274, 0, 0, 0, 346, 0, 106, 152, - 153, 158, 0, 151, 0, 316, 317, 0, 344, 0, - 0, 346, 0, 107, 0, 0, 0, 319, 324, 322, - 325, 0, 0, 323, 324, 0, 320, 0, 321, 277, - 327, 0, 277, 326, 0, 329, 330, 0, 277, 331, - 332, 0, 0, 333, 0, 0, 0, 334, 335, 170, - 169, 0, 0, 0, 303, 0, 0, 0, 318, 290, - 283, 0, 291, 287, 0, 289, 279, 0, 280, 284, - 0, 0, 346, 0, 341, 99, 0, 0, 103, 90, - 0, 92, 101, 0, 93, 102, 104, 94, 100, 91, - 0, 97, 174, 172, 176, 173, 171, 175, 349, 6, - 350, 4, 2, 71, 98, 0, 0, 74, 76, 75, - 37, 5, 0, 72, 0, 51, 50, 49, 0, 0, + 0, 0, 28, 0, 0, 0, 28, 0, 185, 252, + 216, 224, 220, 164, 236, 212, 3, 149, 82, 165, + 228, 232, 153, 182, 163, 168, 148, 202, 189, 0, + 89, 90, 85, 0, 79, 74, 356, 0, 0, 0, + 0, 87, 0, 0, 83, 86, 78, 0, 0, 75, + 77, 80, 76, 88, 81, 0, 84, 0, 0, 178, + 0, 0, 165, 184, 167, 166, 0, 0, 0, 180, + 181, 179, 183, 0, 213, 0, 0, 0, 0, 203, + 0, 0, 0, 0, 0, 0, 193, 0, 0, 0, + 187, 188, 186, 191, 195, 194, 192, 190, 205, 204, + 206, 0, 221, 0, 217, 0, 0, 159, 146, 158, + 147, 115, 116, 117, 142, 118, 143, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 144, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 145, 0, 0, 157, 253, 160, 0, 161, 0, + 162, 156, 0, 249, 242, 240, 247, 248, 246, 245, + 251, 244, 243, 241, 250, 237, 0, 225, 0, 0, + 229, 0, 0, 233, 0, 0, 159, 151, 0, 150, + 0, 155, 169, 0, 345, 345, 346, 0, 343, 0, + 344, 0, 347, 260, 267, 266, 274, 262, 0, 263, + 0, 348, 0, 355, 264, 265, 82, 270, 268, 352, + 349, 354, 271, 0, 282, 0, 0, 0, 0, 339, + 0, 356, 254, 296, 0, 0, 0, 283, 0, 0, + 272, 273, 0, 261, 269, 297, 298, 0, 345, 0, + 0, 347, 0, 340, 341, 0, 329, 353, 0, 313, + 314, 315, 316, 0, 309, 310, 311, 312, 337, 338, + 0, 0, 0, 0, 0, 301, 302, 303, 258, 256, + 218, 226, 222, 238, 214, 259, 0, 165, 230, 234, + 207, 196, 0, 0, 215, 0, 0, 0, 0, 208, + 0, 0, 0, 0, 0, 200, 198, 201, 199, 197, + 210, 209, 211, 0, 223, 0, 219, 0, 257, 165, + 0, 239, 254, 255, 0, 254, 0, 0, 305, 0, + 0, 0, 307, 0, 227, 0, 0, 231, 0, 0, + 235, 294, 0, 286, 295, 289, 0, 293, 0, 254, + 287, 0, 254, 0, 0, 306, 0, 0, 0, 308, + 0, 0, 0, 300, 0, 299, 82, 109, 357, 0, + 0, 114, 276, 279, 0, 115, 282, 118, 143, 120, + 121, 85, 125, 126, 79, 127, 130, 83, 86, 254, + 80, 88, 133, 81, 135, 84, 137, 138, 283, 140, + 141, 145, 0, 111, 110, 113, 97, 112, 96, 0, + 106, 277, 275, 0, 0, 0, 347, 0, 107, 153, + 154, 159, 0, 152, 0, 317, 318, 0, 345, 0, + 0, 347, 0, 108, 0, 0, 0, 320, 325, 323, + 326, 0, 0, 324, 325, 0, 321, 0, 322, 278, + 328, 0, 278, 327, 0, 330, 331, 0, 278, 332, + 333, 0, 0, 334, 0, 0, 0, 335, 336, 171, + 170, 0, 0, 0, 304, 0, 0, 0, 319, 291, + 284, 0, 292, 288, 0, 290, 280, 0, 281, 285, + 0, 0, 347, 0, 342, 100, 0, 0, 104, 91, + 0, 93, 102, 0, 94, 103, 105, 95, 101, 92, + 0, 98, 175, 173, 177, 174, 172, 176, 350, 6, + 351, 4, 2, 72, 99, 0, 0, 75, 77, 76, + 37, 5, 0, 73, 0, 51, 50, 49, 0, 0, 64, 0, 65, 41, 42, 43, 44, 46, 47, 68, 45, 0, 51, 0, 0, 0, 0, 0, 60, 0, 61, 0, 0, 32, 0, 0, 69, 33, 0, 36, - 34, 30, 0, 35, 31, 0, 62, 0, 63, 152, - 0, 66, 70, 0, 0, 0, 0, 67, 0, 58, + 34, 30, 0, 35, 31, 0, 62, 0, 63, 153, + 0, 66, 70, 0, 0, 0, 0, 153, 278, 0, + 67, 82, 115, 282, 118, 143, 120, 121, 85, 125, + 126, 127, 130, 83, 86, 254, 88, 133, 81, 135, + 84, 137, 138, 283, 140, 141, 145, 71, 0, 58, 52, 59, 53, 0, 0, 0, 0, 55, 0, 56, - 57, 54, 0, 0, 152, 277, 0, 0, 48, 81, - 114, 281, 117, 142, 119, 120, 84, 124, 125, 126, - 129, 82, 85, 253, 87, 132, 80, 134, 83, 136, - 137, 282, 139, 140, 144, 0, 38, 39, 0, 40, - 8, 0, 0, 9, 0, 11, 0, 10, 0, 1, - 27, 15, 14, 26, 13, 12, 29, 7, 0, 18, - 0, 19, 0, 24, 25, 0, 20, 21, 0, 22, - 23, 16, 17, 357}; + 57, 54, 0, 0, 0, 0, 48, 0, 38, 39, + 0, 40, 8, 0, 0, 9, 0, 11, 0, 10, + 0, 1, 27, 15, 14, 26, 13, 12, 29, 7, + 0, 18, 0, 19, 0, 24, 25, 0, 20, 21, + 0, 22, 23, 16, 17, 358}; const short QQmlJSGrammar::goto_default [] = { - 7, 639, 211, 198, 209, 521, 509, 634, 647, 508, - 633, 637, 635, 643, 22, 640, 638, 636, 18, 520, + 7, 641, 211, 198, 209, 521, 509, 636, 649, 508, + 635, 639, 637, 645, 22, 642, 640, 638, 18, 520, 562, 552, 559, 554, 539, 193, 197, 199, 204, 234, - 212, 231, 543, 583, 582, 203, 233, 26, 487, 486, + 212, 231, 543, 613, 612, 203, 233, 26, 487, 486, 359, 358, 9, 357, 360, 202, 480, 361, 109, 17, 147, 24, 13, 146, 19, 25, 59, 23, 8, 28, 27, 280, 15, 274, 10, 270, 12, 272, 11, 271, @@ -209,295 +209,267 @@ const short QQmlJSGrammar::goto_default [] = { 0}; const short QQmlJSGrammar::action_index [] = { - 239, 1406, 2692, 2692, 2794, 1119, 115, 29, 168, -106, - 26, -23, -60, 225, -106, 306, 33, -106, -106, 732, - -2, 145, 243, 223, -106, -106, -106, 379, 227, 1406, - -106, -106, -106, 539, -106, -106, 2488, 1698, 1406, 1406, - 1406, -106, 1023, 1406, -106, -106, -106, 1406, 1406, -106, - -106, -106, -106, -106, -106, 1406, -106, 1406, 1406, -106, - 1406, 1406, 114, 206, -106, -106, 1406, 1406, 1406, -106, - -106, -106, 211, 1406, 302, 1406, 1406, 1406, 1406, 369, - 1406, 1406, 1406, 1406, 1406, 1406, 226, 1406, 1406, 1406, - 135, 151, 110, 257, 279, 276, 256, 222, 475, 475, - 475, 1406, 7, 1406, 57, 2284, 1406, 1406, -106, -106, + 264, 1225, 2708, 2708, 2606, 938, 94, 104, 119, -106, + 92, 79, 81, 262, -106, 263, 78, -106, -106, 654, + 89, 125, 259, 229, -106, -106, -106, 322, 314, 1225, + -106, -106, -106, 412, -106, -106, 2300, 1713, 1225, 1225, + 1225, -106, 842, 1225, -106, -106, -106, 1225, 1225, -106, + -106, -106, -106, -106, -106, 1225, -106, 1225, 1225, -106, + 1225, 1225, 141, 216, -106, -106, 1225, 1225, 1225, -106, + -106, -106, 209, 1225, 281, 1225, 1225, 1225, 1225, 367, + 1225, 1225, 1225, 1225, 1225, 1225, 219, 1225, 1225, 1225, + 101, 102, 115, 314, 314, 314, 314, 314, 357, 347, + 337, 1225, 71, 1225, 70, 2198, 1225, 1225, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, 136, 1406, -106, -106, 30, -24, -106, 1406, - -106, -106, 1406, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, 1406, 2, 1406, 1406, - 10, 97, 1406, -106, 2284, 1406, 1406, -106, 141, -106, - -45, -106, -106, 4, 457, 386, 89, 79, -106, 448, - -106, 74, 2692, -106, -106, -106, -106, -106, 164, -106, - 460, -106, 85, -106, -106, -106, 96, -106, -106, -106, - 2692, -106, -106, 547, -106, 629, 143, 2794, 62, 54, - 43, 2998, 1406, -106, 51, 1406, 52, -106, 47, 45, - -106, -106, 454, -106, -106, -106, -106, 64, 352, 31, - 61, 2692, 27, -106, -106, 2794, -106, -106, 139, -106, - -106, -106, -106, 126, -106, -106, -106, -106, -106, -106, - -6, 25, 1406, 130, 159, -106, -106, -106, 1600, -106, - 68, 65, 5, -106, 308, 60, 3, 835, 99, 105, - 337, 207, 408, 1406, 317, 1406, 1406, 1406, 1406, 353, - 1406, 1406, 1406, 1406, 1406, 186, 203, 204, 212, 219, - 333, 343, 359, 1406, 20, 1406, 202, 1406, -106, 732, - 1406, -106, 1406, 81, 72, 1406, 77, 2794, -106, 1406, - 149, 2794, -106, 1406, 80, 1406, 1406, 94, 88, 1406, - -106, -8, 128, -25, -106, -106, 1406, -106, 471, 1406, - -106, -53, 1406, -56, 2794, -106, 1406, 134, 2794, -106, - 1406, 138, 2794, -5, 2794, -106, -4, -106, 9, -9, - 37, -106, -106, 2794, -12, 555, 32, 629, 123, 1406, - 2794, 41, 18, 504, 2386, 21, 1023, 49, 46, 1505, - 2386, 42, 16, 44, 1406, 24, -10, 1406, 17, 1406, - -15, -18, 2590, -106, -106, -106, -106, -106, -106, 1406, - -106, -106, -106, -1, -26, -3, 2692, -27, -106, 277, - -106, 1406, -28, -106, 90, -106, -106, 1, 552, -40, - -11, 2692, -29, -106, 1406, 117, 14, -106, 50, -106, - 40, 119, 1406, -106, 11, 35, -106, -54, -106, 2794, - -106, 116, 2794, -106, 267, -106, -106, 121, 2794, -7, - -106, -31, -19, -106, 376, 6, 78, -106, -106, -106, - -106, 1406, 98, 2794, -106, 1406, 106, 2794, -106, 76, - -106, 254, -106, -106, 1406, -106, -106, 552, -106, -106, - 71, 75, 2692, 67, -106, -106, 122, 1992, -106, -106, - 1796, -106, -106, 1894, -106, -106, -106, -106, -106, -106, - 113, -106, -106, -106, -106, -106, -106, -106, -106, -106, - 2692, -106, -106, -106, 111, 22, 929, 152, 39, 48, - -106, -106, 301, -106, 147, -106, -106, -106, 468, 155, - -106, 2182, -106, -106, -106, -106, -106, -106, -106, -106, - -106, 178, -30, 463, 181, -14, 400, 229, -106, -32, - -106, 929, 104, -106, 0, 929, -106, -106, 1311, -106, - -106, -106, 1215, -106, -106, 248, -106, 2182, -106, 392, - 59, -106, -106, 244, 552, 73, 2182, -106, 236, -106, - 237, -106, 70, 15, 368, 214, 355, -106, 103, -106, - -106, -106, 2087, 721, 392, 2896, 1698, 34, -106, 56, - 598, 55, 629, 107, 1406, 2794, 53, 23, 544, 36, - 1023, 58, 66, 1505, 69, 38, 63, 1406, 95, 84, - 1406, 102, 1406, 83, 82, 124, -106, -106, 87, -106, - -106, 929, 813, 91, 929, -106, 271, -106, 86, -106, - -106, 100, 101, -106, -106, -106, -106, -106, 552, -106, - 209, -106, 109, -106, -106, 552, -106, -106, 92, -106, - -106, -106, -106, -106, + -106, -106, 98, 1225, -106, -106, 66, 65, -106, 1225, + -106, -106, 1225, -106, -106, -106, -106, -106, -106, -106, + -106, -106, -106, -106, -106, -106, 1225, 44, 1225, 1225, + 64, 57, 1225, -106, 2198, 1225, 1225, -106, 137, -106, + 49, -106, -106, 93, 344, 474, 95, 86, -106, 390, + -106, 85, 2708, -106, -106, -106, -106, -106, 189, -106, + 474, -106, 80, -106, -106, -106, 83, -106, -106, -106, + 2708, -106, -106, 490, -106, 551, 130, 2606, 46, 51, + 52, 2912, 1225, -106, 63, 1225, 56, -106, 58, 60, + -106, -106, 474, -106, -106, -106, -106, 61, 474, 62, + 67, 2708, 68, -106, -106, 2606, -106, -106, 87, -106, + -106, -106, -106, 110, -106, -106, -106, -106, -106, -106, + -24, 69, 1225, 122, 143, -106, -106, -106, 1419, -106, + 74, 76, 77, -106, 269, 73, 72, 611, 75, 114, + 397, 314, 474, 1225, 287, 1225, 1225, 1225, 1225, 397, + 1225, 1225, 1225, 1225, 1225, 218, 215, 198, 192, 182, + 397, 397, 312, 1225, 55, 1225, 59, 1225, -106, 654, + 1225, -106, 1225, 54, 53, 1225, 50, 2606, -106, 1225, + 124, 2606, -106, 1225, 90, 1225, 1225, 105, 88, 1225, + -106, 84, 157, -27, -106, -106, 1225, -106, 474, 1225, + -106, 82, 1225, 91, 2606, -106, 1225, 120, 2606, -106, + 1225, 103, 2606, -9, 2606, -106, -2, -106, 11, -30, + 17, -106, -106, 2606, -37, 469, 15, 551, 138, 1225, + 2606, 14, -16, 433, 2402, -20, 842, 6, 5, 1324, + 2402, 4, -36, 2, 1225, 7, -18, 1225, 10, 1225, + -26, -13, 2504, -106, -106, -106, -106, -106, -106, 1225, + -106, -106, -106, -33, -59, -25, 2708, 23, -106, 197, + -106, 1225, -12, -106, 140, -106, -106, 22, 474, -4, + 26, 2708, 12, -106, 1225, 113, 30, -106, 142, -106, + 142, 121, 1225, -106, -3, 45, -106, -5, -106, 2606, + -106, 108, 2606, -106, 207, -106, -106, 106, 2606, 37, + -106, 25, 36, -106, 474, 38, 40, -106, -106, -106, + -106, 1225, 136, 2606, -106, 1225, 166, 2606, -106, 13, + -106, 200, -106, -106, 1225, -106, -106, 474, -106, -106, + -17, 16, 2708, -11, -106, -106, 131, 1811, -106, -106, + 1615, -106, -106, 1517, -106, -106, -106, -106, -106, -106, + 109, -106, -106, -106, -106, -106, -106, -106, -106, -106, + 2708, -106, -106, -106, 233, -19, 748, 152, -60, 41, + -106, -106, 191, -106, 177, -106, -106, -106, 387, 203, + -106, 1906, -106, -106, -106, -106, -106, -106, -106, -106, + -106, 180, 43, 376, 174, 48, 474, 240, -106, 8, + -106, 748, 111, -106, -1, 748, -106, -106, 1130, -106, + -106, -106, 1034, -106, -106, 228, -106, 1906, -106, 295, + 21, -106, -106, 184, 379, 39, 2001, 288, 2810, 18, + -106, 34, 482, 33, 551, 138, 1225, 2606, 31, 9, + 399, 3, 643, 19, 29, 1324, 28, 1, 27, 1225, + 24, 0, 1225, 20, 1225, -7, -8, -106, 193, -106, + 205, -106, 47, 42, 329, 208, 319, -106, 128, -106, + -106, -106, 2096, 748, 1713, 35, -106, 132, -106, -106, + 32, -106, -106, 748, 748, 94, 748, -106, 250, -106, + 116, -106, -106, 233, 233, -106, -106, -106, -106, -106, + 393, -106, 214, -106, 100, -106, -106, 474, -106, -106, + 96, -106, -106, -106, -106, -106, - -111, 43, 59, 70, 71, 369, 40, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, 21, - -111, -111, -111, -111, -111, -111, -111, -111, -111, 79, - -111, -111, -111, -16, -111, -111, 5, -26, 23, 73, - 91, -111, 83, 61, -111, -111, -111, 88, 87, -111, - -111, -111, -111, -111, -111, 29, -111, 66, 39, -111, - 97, 193, -111, -111, -111, -111, 160, 180, 183, -111, - -111, -111, -111, 176, -111, 167, 151, 155, 152, -111, - 148, 187, 195, 197, 199, 201, -111, 186, 92, 194, + -111, 15, 71, 87, 80, 305, -6, -111, -111, -111, + -111, -111, -111, -111, -111, -111, -111, -111, -111, -42, + -111, -111, -111, -111, -111, -111, -111, -111, -111, 95, + -111, -111, -111, 3, -111, -111, -5, -11, 9, 109, + 91, -111, 62, 45, -111, -111, -111, 50, 63, -111, + -111, -111, -111, -111, -111, 32, -111, 203, 197, -111, + 189, 178, -111, -111, -111, -111, 182, 185, 188, -111, + -111, -111, -111, 193, -111, 198, 168, 113, 114, -111, + 133, 116, 123, 129, 130, 132, -111, 136, 139, 142, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, 103, -111, 108, -111, 181, -2, -42, -111, -111, + -111, 148, -111, 151, -111, 186, 6, -37, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, 34, -111, -111, -111, -111, -111, 3, - -111, -111, 10, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, 127, -111, 109, 15, - -111, -111, 16, -111, 225, 44, 128, -111, -111, -111, - -111, -111, -111, -111, 25, 157, -111, -111, -111, 26, - -111, -111, 24, -111, -111, -111, -111, -111, -111, -111, - 22, -111, -111, -111, -111, -111, -111, -111, -111, -111, - 179, -111, -111, 45, -111, 46, -111, 107, -111, 48, - -111, 106, 62, -111, -111, 163, -3, -111, -111, -111, - -111, -111, -14, -111, -111, -111, -111, -111, 57, -111, - -111, 224, -111, -111, -111, 227, -111, -111, -111, -111, + -111, -111, -111, 42, -111, -111, -111, -111, -111, 22, + -111, -111, 2, -111, -111, -111, -111, -111, -111, -111, + -111, -111, -111, -111, -111, -111, 96, -111, 66, 21, + -111, -111, 0, -111, 274, 35, 88, -111, -111, -111, + -111, -111, -111, -111, 41, 75, -111, -111, -111, 49, + -111, -111, 48, -111, -111, -111, -111, -111, -111, -111, + 57, -111, -111, -111, -111, -111, -111, -111, -111, -111, + 77, -111, -111, 54, -111, 27, -111, 243, -111, 25, + -111, 160, 36, -111, -111, 169, 40, -111, -111, -111, + -111, -111, 56, -111, -111, -111, -111, -111, 180, -111, + -111, 163, -111, -111, -111, 246, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, 35, -111, -111, -111, -111, -111, 72, -111, + -111, -111, 8, -111, -111, -111, -111, -111, 69, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, 12, 264, -111, 258, 246, 254, 209, -111, - 60, 51, 52, 27, 53, -111, -111, -111, -111, -111, - -111, -111, -111, 244, -111, 255, -111, 203, -111, -111, - 207, -111, 217, -111, -111, 198, -111, 208, -111, 8, - -111, 215, -111, 232, -111, 233, 234, -111, -111, 223, - -111, -111, -111, -111, -111, -111, 230, -111, 95, 113, - -111, -111, 153, -111, 156, -111, 2, -111, 147, -111, - 58, -111, 137, -111, 100, -111, -111, -111, -111, -111, - -111, -111, -111, 135, -111, 41, -111, 54, -111, 117, - 162, -111, -111, 50, 169, -111, 174, -111, -111, 32, - 178, -111, -111, -111, 31, -111, 7, 144, -111, 130, - -111, -111, 142, -111, -111, -111, -111, -111, -111, 11, - -111, -111, -111, -111, -111, -111, 214, -111, -111, -111, - -111, 140, -111, -111, -111, -111, -111, -111, 158, -111, - -111, 149, -111, -111, 47, -111, -111, -111, -111, -111, - -55, -111, 38, -111, -67, -111, -111, -111, -111, 263, - -111, -111, 262, -111, -111, -111, -111, -111, 190, -76, - -111, -111, 30, -111, 19, -111, 14, -111, -111, -111, - -111, 33, -111, 272, -111, 64, -111, 175, -111, -111, - -111, -111, -111, -111, 18, -111, -111, 69, -111, -111, - -111, -111, 114, -111, -111, -111, -111, 20, -111, -111, - 110, -111, -111, 28, -111, -111, -111, -111, -111, -111, + -111, -111, 61, 211, -111, 272, 257, 256, 236, -111, + 81, 83, 85, 68, 94, -111, -111, -111, -111, -111, + -111, -111, -111, 235, -111, 218, -111, 209, -111, -111, + 244, -111, 227, -111, -111, 228, -111, 238, -111, 33, + -111, 167, -111, 245, -111, 253, 254, -111, -111, 225, + -111, -111, -111, -111, -111, -111, 217, -111, 194, 213, + -111, -111, 208, -111, 207, -111, 52, -111, 205, -111, + 55, -111, 201, -111, 199, -111, -111, -111, -111, -111, + -111, -111, -111, 278, -111, 39, -111, 34, -111, 173, + 219, -111, -111, 53, 231, -111, 73, -111, -111, 44, + 59, -111, -111, -111, 47, -111, 24, 102, -111, 101, + -111, -111, 111, -111, -111, -111, -111, -111, -111, 26, + -111, -111, -111, -111, -111, -111, 65, -111, -111, -111, + -111, 76, -111, -111, -111, -111, -111, -111, 79, -111, + -111, 89, -111, -111, 51, -111, -111, -111, -111, -111, + -62, -111, 37, -111, -63, -111, -111, -111, -111, 387, + -111, -111, 264, -111, -111, -111, -111, -111, 158, -54, + -111, -111, 28, -111, 38, -111, 23, -111, -111, -111, + -111, 43, -111, 78, -111, 58, -111, 67, -111, -111, + -111, -111, -111, -111, 18, -111, -111, 195, -111, -111, + -111, -111, 161, -111, -111, -111, -111, 20, -111, -111, + 157, -111, -111, 31, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - 86, -111, -111, -111, -111, -111, 55, -111, -111, -111, - -111, -111, -111, -111, -7, -111, -111, -111, 1, -111, - -111, 329, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, 0, -11, -111, -10, -111, -111, -111, - -111, 204, -111, -111, -111, 205, -111, -111, 317, -111, - -111, -111, 311, -111, -111, -111, -111, 370, -111, -111, - -9, -111, -111, -4, -12, -111, 337, -111, -111, -111, - -18, -111, -111, -111, -1, -17, -6, -111, -111, -111, - -111, -111, 466, 78, -111, 82, 307, -13, -111, -111, - -8, -111, 6, -111, 74, 76, -111, -111, 9, -111, - 85, -111, -111, 17, -111, -111, -111, 4, -111, -22, - 84, -111, 67, -111, -111, -111, -111, -111, 49, -111, - -111, 37, 42, 68, 77, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, 13, -111, - -111, -111, -111, -111, -111, 36, -111, -111, -111, -111, - -111, -111, -111, -111}; + 206, -111, -111, -111, -111, -111, -7, -111, -111, -111, + -111, -111, -111, -111, -24, -111, -111, -111, -12, -111, + -111, 342, -111, -111, -111, -111, -111, -111, -111, -111, + -111, -111, -111, -16, -32, -111, 5, -111, -111, -111, + -111, 152, -111, -111, -111, 248, -111, -111, 330, -111, + -111, -111, 324, -111, -111, -111, -111, 385, -111, -111, + -21, -111, -111, 1, 14, -111, 367, -111, 232, 12, + -111, -111, 11, -111, 10, -111, 164, 141, -111, -111, + 7, -111, 64, -111, -111, 19, -111, -111, -111, 17, + -111, -1, 60, -111, 46, -111, -111, -111, -111, -111, + -15, -111, -111, -111, -2, -17, -4, -111, -111, -111, + -111, -111, 484, 138, 313, -3, -111, -111, -111, -111, + 4, -111, -111, 13, 16, 97, 127, -111, -111, -111, + -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, + -14, -111, -111, -111, -111, -111, -111, -8, -111, -111, + -111, -111, -111, -111, -111, -111}; const short QQmlJSGrammar::action_info [] = { - 166, 438, 551, 245, 344, 454, 346, 544, 342, 336, - 546, 354, 166, 452, 448, 181, 432, 392, 465, 103, - 420, 461, 421, 448, -138, 101, 423, 73, 408, 663, - 406, -135, 413, 558, 405, 404, 151, 418, 149, -141, - 185, 143, 439, 402, 399, 432, 398, 428, -122, -111, - 101, -133, 424, -112, 268, 432, -130, 350, 73, 268, - -122, 262, -141, 245, 312, -130, 456, 558, 307, 283, - -133, 261, 350, -112, 424, 588, -111, 578, 585, 350, - 576, 465, 243, 461, 305, 448, 103, 424, 524, 143, - 184, 240, 558, 474, 241, 329, 323, 189, 268, 305, - 238, 323, -135, 245, 172, 573, 143, 192, 482, -138, - 0, 448, 555, 303, 143, 174, 174, 448, 465, 461, - 558, 143, 484, 442, 143, 143, 174, 451, 303, 435, - 490, 481, 555, 315, 175, 175, 338, 317, 143, 191, - 244, 452, 143, 0, 143, 175, 143, 662, 661, 143, - 60, 416, 415, 660, 659, 325, 64, 143, 463, 326, - 556, 61, 531, 0, 590, 589, 467, 65, 259, 258, - 654, 653, 143, 501, 436, 60, 525, 426, 491, 0, - 626, 542, 631, 632, 259, 258, 61, 257, 256, 339, - 264, 60, 144, 174, 348, 168, 0, 179, 352, 169, - 252, 251, 61, 283, 259, 258, 631, 632, 60, 321, - 525, 87, 175, 88, 411, 0, 532, 530, 66, 61, - 267, 265, 527, 66, 89, 236, 235, 527, 87, 87, - 88, 88, 87, 526, 88, 66, 549, 87, 526, 88, - 105, 89, 89, 525, 87, 89, 88, 87, 266, 88, - 89, 87, 87, 88, 88, 567, 527, 89, 174, 106, - 89, 107, 477, 67, 89, 89, 525, 526, 67, 68, - 657, 656, 580, 525, 68, 143, 0, 175, 0, 176, - 67, 87, 87, 88, 88, 0, 68, 0, 0, 527, - 550, 548, 174, 0, 89, 89, 0, 581, 579, 0, - 526, 87, 655, 88, 87, 0, 88, 0, 592, 568, - 566, 175, 527, 411, 89, 478, 476, 89, 650, 527, - 75, 76, 0, 526, 75, 76, 285, 286, 446, 445, - 526, 0, 651, 649, 558, 285, 286, 6, 5, 4, - 1, 3, 2, 0, 0, 0, 0, 77, 78, 0, - 0, 77, 78, 287, 288, 0, 290, 291, 0, 0, - 290, 291, 287, 288, 648, 292, 290, 291, 293, 292, - 294, 0, 293, 0, 294, 292, 290, 291, 293, 0, - 294, 35, 290, 291, 35, 292, 0, 0, 293, 0, - 294, 292, 80, 81, 293, 593, 294, 35, 0, 0, - 82, 83, 80, 81, 84, 35, 85, 174, 0, 0, - 82, 83, 0, 0, 84, 35, 85, 0, 49, 52, - 50, 49, 52, 50, 0, -98, 175, 0, 176, 35, - 0, 0, 0, 0, 49, 52, 50, 35, 0, 0, - 0, 0, 49, 52, 50, 0, 46, 34, 51, 46, - 34, 51, 49, 52, 50, 0, 0, 0, 0, 0, - 0, 0, 46, 34, 51, 0, 49, 52, 50, 0, - 46, 34, 51, 0, 49, 52, 50, 35, 0, 0, - 46, 34, 51, 35, 0, 0, 35, 0, 0, 35, - 0, 0, 35, 0, 46, 34, 51, 35, 80, 81, - 35, 0, 46, 34, 51, 0, 82, 83, 0, 0, - 84, 0, 85, 0, 49, 52, 50, 0, 0, 0, - 49, 52, 50, 49, 52, 50, 49, 52, 50, 49, - 52, 50, 0, 35, 49, 52, 50, 49, 52, 50, - 184, 0, 46, 34, 51, 0, 0, 0, 46, 34, - 51, 46, 34, 51, 46, 34, 51, 46, 34, 51, - 0, 0, 46, 34, 51, 46, 34, 51, 35, 0, - 49, 52, 50, 35, 0, 184, 35, 0, 0, 0, - 184, 35, 0, 0, 35, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 46, 34, - 51, 0, 0, 0, 0, 49, 52, 50, 250, 249, - 49, 52, 50, 49, 52, 50, 250, 249, 49, 52, - 50, 49, 52, 50, 0, 0, 0, 35, 0, 0, + 424, 405, 432, 404, 346, 245, 573, 354, 406, -134, + 461, -112, -113, -131, -136, 448, 350, -139, 402, 392, + 268, -123, -142, 465, 399, 398, -131, -139, 465, 461, + 474, -136, 558, 448, -134, -112, -113, 424, -123, 350, + -142, 245, 551, 481, 484, 268, 576, 524, 413, 482, + 438, 558, 439, 261, 558, 615, 420, 452, 418, 421, + 283, 454, 143, 428, 172, 558, 166, 423, 558, 448, + 608, 73, 546, 448, 149, 283, 0, 323, 408, 0, + 544, 307, 268, 0, 0, 0, 143, 184, 350, 448, + 245, 166, 101, 73, 461, 329, 465, 238, 456, 424, + 241, 336, 618, 189, 665, 262, 143, 323, 0, 181, + 317, 143, 451, 0, 315, 442, 143, 143, 192, 555, + 0, 143, 240, 243, 303, 151, 452, 101, 143, 185, + 143, 435, 143, 312, 305, 244, 0, 0, 303, 490, + 555, 60, 60, 342, 143, 143, 191, 432, 252, 251, + 103, 344, 61, 61, 144, 60, 305, 662, 661, 60, + 103, 656, 655, 352, 325, 338, 61, 556, 326, 501, + 61, 257, 256, 426, 143, 168, 436, 664, 663, 169, + 348, 542, 264, 64, 321, 633, 634, 491, 628, 620, + 619, 259, 258, 179, 65, 174, 463, 143, 622, 259, + 258, 416, 415, 525, 267, 265, 525, 87, 477, 88, + 531, 0, 174, 525, 175, 143, 411, 87, 339, 88, + 89, 66, 0, 87, 558, 88, 467, 527, 66, 610, + 89, 175, 266, 411, 525, 567, 89, 525, 526, 0, + 87, 66, 88, 87, 87, 88, 88, 549, 174, 527, + 236, 235, 527, 89, 611, 609, 89, 89, 0, 527, + 526, 478, 476, 526, 532, 530, 67, 175, 446, 445, + 526, 0, 68, 67, 174, 659, 658, 105, 0, 68, + 527, 75, 76, 527, 0, 623, 67, 285, 286, 568, + 566, 526, 68, 175, 526, 176, 106, 652, 107, 75, + 76, 550, 548, 174, 0, 285, 286, 657, 77, 78, + 174, 653, 651, 0, 287, 288, 0, 0, 0, 0, + 0, -99, 175, 0, 176, 0, 77, 78, -99, 175, + 0, 176, 287, 288, 0, 290, 291, 0, 0, 87, + 0, 88, 0, 650, 292, 80, 81, 293, 35, 294, + 0, 0, 89, 82, 83, 0, 0, 84, 35, 85, + 80, 81, 6, 5, 4, 1, 3, 2, 82, 83, + 80, 81, 84, 35, 85, 0, 0, 0, 82, 83, + 80, 81, 84, 0, 85, 49, 52, 50, 82, 83, + 80, 81, 84, 0, 85, 49, 52, 50, 82, 83, + 0, 0, 84, 0, 85, 35, 0, 0, 35, 0, + 49, 52, 50, 46, 34, 51, 35, 0, 0, 35, + 290, 291, 35, 46, 34, 51, 0, 0, 35, 292, + 0, 0, 293, 0, 294, 184, 0, 0, 46, 34, + 51, 35, 49, 52, 50, 49, 52, 50, 184, 0, + 0, 0, 0, 49, 52, 50, 49, 52, 50, 49, + 52, 50, 35, 0, 0, 49, 52, 50, 0, 184, + 46, 34, 51, 46, 34, 51, 0, 0, 49, 52, + 50, 46, 34, 51, 46, 34, 51, 46, 34, 51, + 0, 0, 0, 46, 34, 51, 0, 0, 35, 49, + 52, 50, 0, 35, 0, 0, 46, 34, 51, 0, + 0, 35, 0, 0, 0, 0, 0, 0, 0, 35, + 0, 0, 0, 0, 0, 0, 0, 46, 34, 51, + 250, 249, 0, 0, 0, 49, 52, 50, 0, 0, + 49, 52, 50, 250, 249, 0, 0, 0, 49, 52, + 50, 250, 249, 0, 0, 0, 49, 52, 50, 0, 0, 0, 0, 46, 34, 51, 0, 0, 46, 34, - 51, 46, 34, 51, 0, 0, 46, 34, 51, 46, - 34, 51, 0, 0, 0, 0, 0, 0, 35, 250, - 249, 0, 0, 0, 49, 52, 50, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 255, 254, 46, 34, 51, 49, 52, 50, 0, 0, + 51, 0, 0, 0, 0, 0, 46, 34, 51, 0, + 35, 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, - 0, 0, 0, 30, 31, 153, 0, 0, 0, 0, - 0, 0, 0, 33, 0, 154, 0, 0, 0, 155, - 35, 0, 0, 0, 36, 37, 0, 38, 156, 0, - 157, 0, 0, 0, 516, 0, 0, 0, 45, 0, - 0, 158, 0, 159, 64, 0, 0, 0, 0, 0, - 0, 160, 0, 0, 161, 65, 53, 49, 52, 50, - 162, 54, 0, 0, 0, 0, 163, 0, 0, 0, - 0, 0, 44, 56, 32, 0, 0, 0, 41, 0, - 0, 0, 164, 0, 0, 46, 34, 51, 0, 0, - 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, - 0, 0, 0, 0, 0, 33, 0, 0, 153, 0, - 0, 0, 35, 0, 0, 0, 36, 37, 154, 38, - 0, 0, 155, 0, 0, 0, 516, 0, 0, 0, - 45, 156, 0, 157, 0, 0, 319, 0, 0, 0, - 0, 0, 0, 0, 158, 0, 159, 64, 53, 49, - 52, 50, 0, 54, 160, 0, 0, 161, 65, 0, - 0, 0, 0, 162, 44, 56, 32, 0, 0, 163, - 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, - 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 255, 254, 153, 0, 0, 49, 52, 50, + 0, 0, 0, 0, 154, 0, 0, 0, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 0, 157, + 0, 0, 319, 0, 0, 46, 34, 51, 0, 0, + 158, 0, 159, 64, 0, 30, 31, 153, 0, 0, + 160, 0, 0, 161, 65, 33, 0, 154, 0, 162, + 0, 155, 35, 0, 0, 163, 36, 37, 0, 38, + 156, 0, 157, 0, 0, 0, 42, 0, 0, 0, + 45, 164, 0, 158, 0, 159, 64, 0, 0, 0, + 0, 0, 0, 160, 0, 0, 161, 65, 53, 49, + 52, 50, 162, 54, 0, 0, 0, 0, 163, 0, + 0, 0, 0, 0, 44, 56, 32, 0, 0, 0, + 41, 0, 0, 0, 164, 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, - 0, 33, 0, 0, 0, 0, 0, 0, 35, 0, - 0, 0, 36, 37, 0, 38, 0, 0, 0, 0, - 0, 0, 516, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 53, 49, 52, 50, 0, 54, + 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 35, 0, 0, + 0, 36, 37, 0, 38, 0, 0, 0, 0, 0, + 0, 516, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 44, 56, 32, 0, 0, 0, 41, 0, 0, 0, - 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, - 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, - 0, 0, 35, 0, 0, 0, 36, 37, 0, 38, - 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, - 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 53, 49, - 52, 50, 0, 54, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 44, 56, 32, 0, 0, 0, - 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, - 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, - 0, 219, 0, 0, 0, 0, 0, 0, 35, 0, - 0, 0, 36, 37, 0, 38, 0, 0, 0, 0, - 0, 0, 516, 0, 0, 0, 45, 0, 0, 0, + 0, 0, 0, 53, 49, 52, 50, 0, 54, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 56, 32, 0, 0, 0, 41, 0, 0, 0, 0, + 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, + 0, 35, 0, 0, 0, 36, 37, 0, 38, 0, + 0, 0, 0, 0, 0, 42, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 53, 517, 519, 518, 0, 54, - 0, 0, 0, 0, 227, 0, 0, 0, 0, 0, - 44, 56, 32, 214, 0, 0, 41, 0, 0, 0, - 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 515, 0, 30, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 219, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, - 0, 38, 0, 0, 0, 0, 0, 0, 516, 0, - 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, - 563, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 517, 519, 518, 0, 54, 0, 0, 0, 0, - 227, 0, 0, 0, 0, 0, 44, 56, 32, 214, - 0, 0, 41, 0, 0, 0, 0, 0, 0, 46, - 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 515, 0, 30, 31, 0, 0, 0, 0, 0, - 0, 0, 0, 219, 0, 0, 0, 0, 0, 0, - 35, 0, 0, 0, 36, 37, 0, 38, 0, 0, - 0, 0, 0, 0, 516, 0, 0, 0, 45, 0, - 0, 0, 0, 0, 0, 0, 560, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 53, 517, 519, 518, - 0, 54, 0, 0, 0, 0, 227, 0, 0, 0, - 0, 0, 44, 56, 32, 214, 0, 0, 41, 0, - 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 29, 30, 31, - 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, - 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, - 43, 0, 0, 45, 0, 0, 0, 47, 0, 48, + 0, 0, 0, 0, 0, 0, 0, 53, 49, 52, + 50, 0, 54, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 44, 56, 32, 0, 0, 0, 41, + 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 515, 0, + 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, + 219, 0, 0, 0, 0, 0, 0, 35, 0, 0, + 0, 36, 37, 0, 38, 0, 0, 0, 0, 0, + 0, 516, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 49, 52, 50, 0, 54, 0, 55, 0, - 57, 0, 58, 0, 0, 0, 0, 44, 56, 32, - 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, - 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -131, 0, 0, 0, 29, 30, 31, 0, + 0, 0, 0, 53, 517, 519, 518, 0, 54, 0, + 0, 0, 0, 227, 0, 0, 0, 0, 0, 44, + 56, 32, 214, 0, 0, 41, 0, 0, 0, 0, + 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 515, 0, 30, 31, 0, 0, + 0, 0, 0, 0, 0, 0, 219, 0, 0, 0, + 0, 0, 0, 35, 0, 0, 0, 36, 37, 0, + 38, 0, 0, 0, 0, 0, 0, 516, 0, 0, + 0, 45, 0, 0, 0, 0, 0, 0, 0, 563, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, + 517, 519, 518, 0, 54, 0, 0, 0, 0, 227, + 0, 0, 0, 0, 0, 44, 56, 32, 214, 0, + 0, 41, 0, 0, 0, 0, 0, 0, 46, 34, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 515, 0, 30, 31, 0, 0, 0, 0, 0, 0, + 0, 0, 219, 0, 0, 0, 0, 0, 0, 35, + 0, 0, 0, 36, 37, 0, 38, 0, 0, 0, + 0, 0, 0, 516, 0, 0, 0, 45, 0, 0, + 0, 0, 0, 0, 0, 560, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 517, 519, 518, 0, + 54, 0, 0, 0, 0, 227, 0, 0, 0, 0, + 0, 44, 56, 32, 214, 0, 0, 41, 0, 0, + 0, 0, 0, 0, 46, 34, 51, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, 43, @@ -507,369 +479,362 @@ const short QQmlJSGrammar::action_info [] = { 0, 58, 0, 0, 0, 0, 44, 56, 32, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, - 0, 0, 33, 0, 0, 0, 0, 0, 0, 35, - 0, 0, 0, 36, 37, 0, 38, 0, 0, 0, - 39, 0, 40, 42, 43, 0, 0, 45, 0, 0, - 0, 47, 0, 48, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 53, 49, 52, 50, 0, - 54, 0, 55, 0, 57, 282, 58, 0, 0, 0, - 0, 44, 56, 32, 0, 0, 0, 41, 0, 0, - 0, 0, 0, 0, 46, 34, 51, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 488, 0, 0, 29, - 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 0, 0, 0, 35, 0, 0, - 0, 36, 37, 0, 38, 0, 0, 0, 39, 0, - 40, 42, 43, 0, 0, 45, 0, 0, 0, 47, - 0, 48, 0, 0, 489, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 49, 52, 50, 0, 54, 0, - 55, 0, 57, 0, 58, 0, 0, 0, 0, 44, - 56, 32, 0, 0, 0, 41, 0, 0, 0, 0, - 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 488, 0, 0, 29, 30, 31, - 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, - 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, - 43, 0, 0, 45, 0, 0, 0, 47, 0, 48, - 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 49, 52, 50, 0, 54, 0, 55, 0, - 57, 0, 58, 0, 0, 0, 0, 44, 56, 32, - 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, - 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 496, 0, 0, 29, 30, 31, 0, 0, + 0, -132, 0, 0, 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, 43, 0, 0, 45, 0, 0, 0, 47, 0, 48, 0, 0, - 497, 0, 0, 0, 0, 0, 0, 0, 0, 53, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 49, 52, 50, 0, 54, 0, 55, 0, 57, 0, 58, 0, 0, 0, 0, 44, 56, 32, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 496, 0, 0, 29, 30, 31, 0, 0, 0, 0, - 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, - 0, 35, 0, 0, 0, 36, 37, 0, 38, 0, - 0, 0, 39, 0, 40, 42, 43, 0, 0, 45, - 0, 0, 0, 47, 0, 48, 0, 0, 499, 0, - 0, 0, 0, 0, 0, 0, 0, 53, 49, 52, - 50, 0, 54, 0, 55, 0, 57, 0, 58, 0, - 0, 0, 0, 44, 56, 32, 0, 0, 0, 41, - 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, + 29, 30, 31, 0, 0, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 0, 0, 0, 0, 35, 0, + 0, 0, 36, 37, 0, 38, 0, 0, 0, 39, + 0, 40, 42, 43, 0, 0, 45, 0, 0, 0, + 47, 0, 48, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 53, 49, 52, 50, 0, 54, + 0, 55, 0, 57, 282, 58, 0, 0, 0, 0, + 44, 56, 32, 0, 0, 0, 41, 0, 0, 0, + 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 496, 0, 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 0, 0, 35, 220, 0, 0, - 595, 596, 0, 38, 0, 0, 0, 39, 0, 40, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 36, 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, 43, 0, 0, 45, 0, 0, 0, 47, 0, - 48, 0, 0, 0, 0, 0, 0, 0, 223, 0, - 0, 0, 53, 49, 52, 50, 224, 54, 0, 55, - 226, 57, 0, 58, 0, 229, 0, 0, 44, 56, + 48, 0, 0, 497, 0, 0, 0, 0, 0, 0, + 0, 0, 53, 49, 52, 50, 0, 54, 0, 55, + 0, 57, 0, 58, 0, 0, 0, 0, 44, 56, 32, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 29, 30, 31, 0, 0, 0, 0, - 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, - 0, 35, 220, 0, 0, 221, 37, 0, 38, 0, - 0, 0, 39, 0, 40, 42, 43, 0, 0, 45, - 0, 0, 0, 47, 0, 48, 0, 0, 0, 0, - 0, 0, 0, 223, 0, 0, 0, 53, 49, 52, - 50, 224, 54, 0, 55, 226, 57, 0, 58, 0, - 229, 0, 0, 44, 56, 32, 0, 0, 0, 41, - 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 112, - 113, 0, 0, 115, 117, 118, 0, 0, 119, 0, - 120, 0, 0, 0, 122, 123, 124, 0, 0, 0, - 0, 0, 0, 35, 125, 126, 127, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 131, 0, 0, 0, 0, 0, 0, - 49, 52, 50, 132, 133, 134, 0, 136, 137, 138, - 139, 140, 141, 0, 0, 129, 135, 121, 114, 116, - 130, 0, 0, 0, 0, 0, 0, 0, 46, 34, - 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 111, 112, 113, 0, 0, 115, 117, 118, 0, 0, - 119, 0, 120, 0, 0, 0, 122, 123, 124, 0, - 0, 0, 0, 0, 0, 35, 125, 126, 127, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, - 0, 0, 0, 395, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 131, 0, 0, 0, 0, - 0, 397, 49, 52, 50, 132, 133, 134, 0, 136, - 137, 138, 139, 140, 141, 0, 0, 129, 135, 121, - 114, 116, 130, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 488, 0, 0, 29, 30, 31, 0, + 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, + 0, 0, 0, 0, 35, 0, 0, 0, 36, 37, + 0, 38, 0, 0, 0, 39, 0, 40, 42, 43, + 0, 0, 45, 0, 0, 0, 47, 0, 48, 0, + 0, 494, 0, 0, 0, 0, 0, 0, 0, 0, + 53, 49, 52, 50, 0, 54, 0, 55, 0, 57, + 0, 58, 0, 0, 0, 0, 44, 56, 32, 0, + 0, 0, 41, 0, 0, 0, 0, 0, 0, 46, + 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 488, 0, 0, 29, 30, 31, 0, 0, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 0, 0, 35, 0, 0, 0, 36, 37, 0, 38, + 0, 0, 0, 39, 0, 40, 42, 43, 0, 0, + 45, 0, 0, 0, 47, 0, 48, 0, 0, 489, + 0, 0, 0, 0, 0, 0, 0, 0, 53, 49, + 52, 50, 0, 54, 0, 55, 0, 57, 0, 58, + 0, 0, 0, 0, 44, 56, 32, 0, 0, 0, + 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 496, + 0, 0, 29, 30, 31, 0, 0, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, + 35, 0, 0, 0, 36, 37, 0, 38, 0, 0, + 0, 39, 0, 40, 42, 43, 0, 0, 45, 0, + 0, 0, 47, 0, 48, 0, 0, 499, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 49, 52, 50, + 0, 54, 0, 55, 0, 57, 0, 58, 0, 0, + 0, 0, 44, 56, 32, 0, 0, 0, 41, 0, + 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 29, 30, 31, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 0, 0, 0, 35, 220, 0, 0, 221, + 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, + 43, 0, 0, 45, 0, 0, 0, 47, 0, 48, + 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, + 0, 53, 49, 52, 50, 224, 54, 0, 55, 226, + 57, 0, 58, 0, 229, 0, 0, 44, 56, 32, + 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, + 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 29, 30, 31, 0, 0, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, + 35, 220, 0, 0, 578, 37, 0, 38, 0, 0, + 0, 39, 0, 40, 42, 43, 0, 0, 45, 0, + 0, 0, 47, 0, 48, 0, 0, 0, 0, 0, + 0, 0, 223, 0, 0, 0, 53, 49, 52, 50, + 224, 54, 0, 55, 226, 57, 0, 58, 0, 229, + 0, 0, 44, 56, 32, 0, 0, 0, 41, 0, + 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 29, 30, 31, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 0, 0, 0, 35, 220, 0, 0, 578, + 624, 0, 38, 0, 0, 0, 39, 0, 40, 42, + 43, 0, 0, 45, 0, 0, 0, 47, 0, 48, + 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, + 0, 53, 49, 52, 50, 224, 54, 0, 55, 226, + 57, 0, 58, 0, 229, 0, 0, 44, 56, 32, + 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 112, 113, 0, 0, 115, 117, 118, 0, 0, 119, 0, 120, 0, 0, 0, 122, 123, 124, 0, 0, 0, 0, 0, 0, 35, 125, 126, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 0, 0, 0, 395, 0, 0, 0, 0, + 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0, - 0, 0, 0, 397, 49, 52, 50, 132, 133, 134, + 0, 0, 0, 0, 49, 52, 50, 132, 133, 134, 0, 136, 137, 138, 139, 140, 141, 0, 0, 129, 135, 121, 114, 116, 130, 0, 0, 0, 0, 0, - 0, 0, 46, 374, 380, 0, 0, 0, 0, 0, + 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 112, 113, 0, 0, 115, 117, 118, 0, 0, 119, 0, 120, 0, 0, 0, 122, 123, 124, 0, 0, 0, 0, 0, 0, 35, 125, 126, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 395, 0, 0, - 0, 0, 0, 0, 0, 396, 0, 0, 0, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, 0, 0, 397, 49, 52, 50, 132, 133, 134, 0, 136, 137, 138, 139, 140, 141, 0, 0, 129, 135, 121, 114, 116, 130, 0, 0, 0, 0, 0, 0, 0, 46, 374, 380, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 213, 0, 0, 0, - 0, 215, 0, 29, 30, 31, 217, 0, 0, 0, - 0, 0, 0, 218, 219, 0, 0, 0, 0, 0, - 0, 35, 220, 0, 0, 221, 37, 0, 38, 0, - 0, 0, 39, 0, 40, 42, 43, 0, 0, 45, - 0, 0, 0, 47, 0, 48, 0, 0, 0, 0, - 0, 222, 0, 223, 0, 0, 0, 53, 49, 52, - 50, 224, 54, 225, 55, 226, 57, 227, 58, 228, - 229, 0, 0, 44, 56, 32, 214, 216, 0, 41, + 0, 0, 0, 0, 0, 0, 111, 112, 113, 0, + 0, 115, 117, 118, 0, 0, 119, 0, 120, 0, + 0, 0, 122, 123, 124, 0, 0, 0, 0, 0, + 0, 35, 125, 126, 127, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 128, 0, 0, 0, 395, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 131, 0, 0, 0, 0, 0, 397, 49, 52, + 50, 132, 133, 134, 0, 136, 137, 138, 139, 140, + 141, 0, 0, 129, 135, 121, 114, 116, 130, 0, 0, 0, 0, 0, 0, 0, 46, 34, 51, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 213, 0, - 0, 0, 0, 215, 0, 29, 30, 31, 217, 0, - 0, 0, 0, 0, 0, 218, 33, 0, 0, 0, - 0, 0, 0, 35, 220, 0, 0, 221, 37, 0, - 38, 0, 0, 0, 39, 0, 40, 42, 43, 0, - 0, 45, 0, 0, 0, 47, 0, 48, 0, 0, - 0, 0, 0, 222, 0, 223, 0, 0, 0, 53, - 49, 52, 50, 224, 54, 225, 55, 226, 57, 227, - 58, 228, 229, 0, 0, 44, 56, 32, 214, 216, - 0, 41, 0, 0, 0, 0, 0, 0, 46, 34, - 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 600, 112, 113, 0, 0, 602, 117, 604, 30, 31, - 605, 0, 120, 0, 0, 0, 122, 607, 608, 0, - 0, 0, 0, 0, 0, 35, 609, 126, 127, 221, - 37, 0, 38, 0, 0, 0, 39, 0, 40, 610, - 43, 0, 0, 612, 0, 0, 0, 47, 0, 48, - 0, 0, 0, 0, 0, 613, 0, 223, 0, 0, - 0, 614, 49, 52, 50, 615, 616, 617, 55, 619, - 620, 621, 622, 623, 624, 0, 0, 611, 618, 606, - 601, 603, 130, 41, 0, 0, 0, 0, 0, 0, - 46, 374, 380, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 365, 112, 113, 0, 0, 367, 117, 369, - 30, 31, 370, 0, 120, 0, 0, 0, 122, 372, - 373, 0, 0, 0, 0, 0, 0, 35, 375, 126, - 127, 221, 37, 0, 38, 0, 0, 0, 39, 0, - 40, 376, 43, 0, 0, 378, 0, 0, 0, 47, - 0, 48, 0, -277, 0, 0, 0, 379, 0, 223, - 0, 0, 0, 381, 49, 52, 50, 382, 383, 384, - 55, 386, 387, 388, 389, 390, 391, 0, 0, 377, - 385, 371, 366, 368, 130, 41, 0, 0, 0, 0, - 0, 0, 46, 374, 380, 0, 0, 0, 0, 0, - 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 111, 112, + 113, 0, 0, 115, 117, 118, 0, 0, 119, 0, + 120, 0, 0, 0, 122, 123, 124, 0, 0, 0, + 0, 0, 0, 35, 125, 126, 127, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, + 0, 395, 0, 0, 0, 0, 0, 0, 0, 396, + 0, 0, 0, 131, 0, 0, 0, 0, 0, 397, + 49, 52, 50, 132, 133, 134, 0, 136, 137, 138, + 139, 140, 141, 0, 0, 129, 135, 121, 114, 116, + 130, 0, 0, 0, 0, 0, 0, 0, 46, 374, + 380, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 213, 0, 0, 0, 0, 215, 0, 29, 30, 31, + 217, 0, 0, 0, 0, 0, 0, 218, 33, 0, + 0, 0, 0, 0, 0, 35, 220, 0, 0, 221, + 37, 0, 38, 0, 0, 0, 39, 0, 40, 42, + 43, 0, 0, 45, 0, 0, 0, 47, 0, 48, + 0, 0, 0, 0, 0, 222, 0, 223, 0, 0, + 0, 53, 49, 52, 50, 224, 54, 225, 55, 226, + 57, 227, 58, 228, 229, 0, 0, 44, 56, 32, + 214, 216, 0, 41, 0, 0, 0, 0, 0, 0, + 46, 34, 51, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 213, 0, 0, 0, 0, 215, 0, 29, + 30, 31, 217, 0, 0, 0, 0, 0, 0, 218, + 219, 0, 0, 0, 0, 0, 0, 35, 220, 0, + 0, 221, 37, 0, 38, 0, 0, 0, 39, 0, + 40, 42, 43, 0, 0, 45, 0, 0, 0, 47, + 0, 48, 0, 0, 0, 0, 0, 222, 0, 223, + 0, 0, 0, 53, 49, 52, 50, 224, 54, 225, + 55, 226, 57, 227, 58, 228, 229, 0, 0, 44, + 56, 32, 214, 216, 0, 41, 0, 0, 0, 0, + 0, 0, 46, 34, 51, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 582, 112, 113, 0, 0, 584, + 117, 586, 30, 31, 587, 0, 120, 0, 0, 0, + 122, 589, 590, 0, 0, 0, 0, 0, 0, 35, + 591, 126, 127, 221, 37, 0, 38, 0, 0, 0, + 39, 0, 40, 592, 43, 0, 0, 594, 0, 0, + 0, 47, 0, 48, 0, 0, 0, 0, 0, 595, + 0, 223, 0, 0, 0, 596, 49, 52, 50, 597, + 598, 599, 55, 601, 602, 603, 604, 605, 606, 0, + 0, 593, 600, 588, 583, 585, 130, 41, 0, 0, + 0, 0, 0, 0, 46, 374, 380, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 112, 113, 0, + 0, 367, 117, 369, 30, 31, 370, 0, 120, 0, + 0, 0, 122, 372, 373, 0, 0, 0, 0, 0, + 0, 35, 375, 126, 127, 221, 37, 0, 38, 0, + 0, 0, 39, 0, 40, 376, 43, 0, 0, 378, + 0, 0, 0, 47, 0, 48, 0, -278, 0, 0, + 0, 379, 0, 223, 0, 0, 0, 381, 49, 52, + 50, 382, 383, 384, 55, 386, 387, 388, 389, 390, + 391, 0, 0, 377, 385, 371, 366, 368, 130, 41, + 0, 0, 0, 0, 0, 0, 46, 374, 380, 0, + 0, 0, 0, 0, 0, 0, 0, 0, - 148, 142, 183, 447, 469, 347, 575, 444, 547, 627, - 248, 320, 587, 572, 584, 586, 485, 591, 565, 529, - 313, 545, 447, 393, 253, 528, 500, 183, 574, 453, - 331, 652, 447, 437, 444, 313, 462, 455, 263, 457, - 237, 441, 206, 188, 190, 150, 16, 178, 433, 630, - 425, 641, 165, 400, 658, 458, 642, 171, 173, 248, - 475, 351, 498, 248, 253, 313, 183, 466, 183, 541, - 495, 629, 253, 512, 511, 188, 145, 206, 260, 645, - 644, 62, 0, 62, 362, 507, 298, 469, 206, 206, - 247, 514, 514, 62, 206, 460, 646, 409, 152, 409, - 599, 628, 355, 239, 206, 62, 62, 62, 362, 260, - 296, 297, 299, 331, 62, 62, 313, 504, 206, 295, - 62, 62, 459, 460, 356, 206, 277, 62, 62, 502, - 182, 281, 206, 62, 410, 182, 410, 401, 62, 353, - 459, 62, 62, 506, 505, 62, 62, 503, 493, 349, - 91, 62, 492, 206, 63, 206, 313, 62, 345, 483, - 393, 479, 62, 62, 260, 206, 444, 206, 510, 102, - 148, 62, 104, 182, 206, 188, 188, 468, 180, 170, - 206, 62, 148, 247, 62, 394, 460, 393, 409, 340, - 412, 341, 362, 206, 422, 167, 393, 206, 62, 108, - 459, 313, 62, 187, 419, 62, 62, 86, 206, 62, - 318, 98, 100, 403, 62, 99, 69, 322, 514, 514, - 313, 62, 417, 553, 557, 410, 206, 79, 110, 246, - 62, 343, 206, 206, 62, 0, 70, 62, 74, 71, - 62, 62, 206, 108, 90, 206, 93, 62, 62, 62, - 72, 62, 92, 62, 94, 62, 95, 309, 96, 407, - 97, 309, 281, 62, 362, 362, 281, 0, 281, 242, - 302, 0, 110, 177, 464, 0, 316, 309, 0, 308, - 206, 206, 281, 311, 309, 0, 62, 62, 309, 281, - 206, 281, 281, 281, 0, 314, 0, 0, 62, 330, - 62, 324, 0, 281, 327, 281, 337, 300, 62, 62, - 328, 304, 62, 281, 281, 301, 564, 281, 62, 289, - 306, 569, 561, 281, 0, 514, 553, 284, 625, 0, - 0, 514, 0, 0, 522, 0, 0, 0, 0, 0, - 522, 0, 0, 0, 0, 0, 513, 523, 0, 485, - 443, 440, 513, 523, 533, 534, 535, 536, 540, 537, - 538, 577, 533, 534, 535, 536, 540, 537, 538, 0, + 545, 572, 565, 632, 654, 148, 529, 541, 528, 142, + 660, 263, 500, 393, 617, 616, 621, 614, 16, 629, + 444, 183, 313, 547, 447, 183, 631, 643, 253, 248, + 644, 485, 575, 574, 607, 152, 320, 437, 178, 313, + 441, 433, 173, 183, 165, 253, 462, 313, 457, 447, + 444, 453, 253, 458, 425, 347, 455, 248, 351, 188, + 475, 466, 498, 171, 150, 447, 206, 190, 400, 468, + 0, 183, 248, 495, 469, 237, 409, 393, 409, 331, + 464, 247, 512, 206, 145, 206, 62, 409, 507, 206, + 0, 511, 0, 188, 0, 206, 206, 188, 206, 62, + 62, 504, 460, 417, 62, 206, 505, 206, 647, 646, + 407, 0, 0, 410, 62, 410, 459, 62, 148, 506, + 62, 187, 62, 277, 410, 419, 412, 298, 281, 393, + 148, 0, 0, 0, 422, 62, 170, 62, 180, 62, + 295, 514, 296, 260, 297, 62, 648, 503, 62, 62, + 62, 182, 514, 299, 394, 62, 62, 460, 459, 206, + 362, 630, 362, 62, 167, 502, 514, 62, 62, 322, + 62, 553, 444, 99, 100, 93, 206, 62, 356, 206, + 510, 206, 94, 62, 62, 206, 62, 62, 95, 96, + 62, 97, 86, 62, 90, 493, 62, 91, 188, 492, + 92, 355, 62, 353, 108, 62, 483, 349, 242, 345, + 247, 313, 331, 469, 102, 104, 313, 206, 62, 206, + 182, 260, 62, 206, 206, 206, 239, 62, 98, 182, + 313, 313, 62, 110, 362, 72, 62, 206, 69, 62, + 318, 70, 62, 62, 71, 260, 63, 62, 246, 393, + 581, 62, 62, 460, 0, 74, 206, 62, 79, 459, + 0, 206, 514, 309, 206, 62, 362, 557, 281, 0, + 281, 309, 62, 0, 284, 403, 281, 281, 0, 309, + 401, 0, 206, 306, 281, 308, 343, 479, 340, 62, + 62, 341, 108, 337, 281, 281, 206, 302, 309, 62, + 0, 330, 304, 281, 281, 314, 316, 62, 309, 0, + 62, 62, 281, 281, 324, 281, 281, 301, 300, 514, + 311, 110, 177, 0, 327, 0, 62, 569, 522, 564, + 328, 281, 553, 289, 627, 561, 0, 0, 514, 0, + 513, 523, 0, 0, 514, 0, 0, 522, 0, 0, + 0, 0, 443, 522, 0, 485, 0, 0, 0, 513, + 523, 0, 0, 0, 0, 513, 523, 533, 534, 535, + 536, 540, 537, 538, 0, 0, 0, 0, 0, 0, + 0, 577, 0, 0, 0, 0, 0, 0, 0, 362, + 579, 580, 533, 534, 535, 536, 540, 537, 538, 569, + 0, 0, 0, 0, 0, 206, 0, 0, 570, 571, + 533, 534, 535, 536, 540, 537, 538, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 514, 569, 0, 0, 0, 0, 0, - 0, 0, 522, 570, 571, 533, 534, 535, 536, 540, - 537, 538, 0, 0, 513, 523, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 577, 0, + 0, 0, 0, 0, 0, 0, 0, 625, 626, 533, + 534, 535, 536, 540, 537, 538, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 594, 0, 0, 0, 0, 0, 0, 0, 0, 597, - 598, 533, 534, 535, 536, 540, 537, 538, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0}; + 0, 0, 0, 0, 0}; const short QQmlJSGrammar::action_check [] = { - 2, 55, 34, 7, 60, 36, 31, 37, 61, 17, - 24, 16, 2, 20, 33, 60, 5, 8, 36, 79, - 60, 36, 33, 33, 7, 48, 55, 1, 55, 0, - 33, 7, 60, 33, 60, 36, 60, 36, 8, 7, - 36, 8, 7, 55, 7, 5, 55, 33, 7, 7, - 48, 7, 36, 7, 36, 5, 7, 36, 1, 36, - 7, 36, 7, 7, 61, 7, 60, 33, 8, 1, - 7, 77, 36, 7, 36, 60, 7, 29, 8, 36, - 7, 36, 55, 36, 79, 33, 79, 36, 66, 8, - 36, 60, 33, 17, 33, 7, 2, 8, 36, 79, - 36, 2, 7, 7, 7, 66, 8, 33, 33, 7, - -1, 33, 8, 48, 8, 15, 15, 33, 36, 36, - 33, 8, 55, 7, 8, 8, 15, 6, 48, 10, - 8, 60, 8, 61, 34, 34, 8, 60, 8, 60, - 55, 20, 8, -1, 8, 34, 8, 61, 62, 8, - 40, 61, 62, 61, 62, 50, 42, 8, 60, 54, - 56, 51, 7, -1, 61, 62, 60, 53, 61, 62, - 61, 62, 8, 60, 55, 40, 29, 60, 56, -1, - 56, 29, 91, 92, 61, 62, 51, 61, 62, 61, - 60, 40, 56, 15, 60, 50, -1, 56, 60, 54, - 61, 62, 51, 1, 61, 62, 91, 92, 40, 60, - 29, 25, 34, 27, 36, -1, 61, 62, 12, 51, - 61, 62, 75, 12, 38, 61, 62, 75, 25, 25, - 27, 27, 25, 86, 27, 12, 7, 25, 86, 27, - 15, 38, 38, 29, 25, 38, 27, 25, 89, 27, - 38, 25, 25, 27, 27, 7, 75, 38, 15, 34, - 38, 36, 8, 57, 38, 38, 29, 86, 57, 63, - 61, 62, 36, 29, 63, 8, -1, 34, -1, 36, - 57, 25, 25, 27, 27, -1, 63, -1, -1, 75, - 61, 62, 15, -1, 38, 38, -1, 61, 62, -1, - 86, 25, 93, 27, 25, -1, 27, -1, 7, 61, - 62, 34, 75, 36, 38, 61, 62, 38, 47, 75, - 18, 19, -1, 86, 18, 19, 18, 19, 61, 62, - 86, -1, 61, 62, 33, 18, 19, 98, 99, 100, - 101, 102, 103, -1, -1, -1, -1, 45, 46, -1, - -1, 45, 46, 45, 46, -1, 23, 24, -1, -1, - 23, 24, 45, 46, 93, 32, 23, 24, 35, 32, - 37, -1, 35, -1, 37, 32, 23, 24, 35, -1, - 37, 29, 23, 24, 29, 32, -1, -1, 35, -1, - 37, 32, 23, 24, 35, 94, 37, 29, -1, -1, - 31, 32, 23, 24, 35, 29, 37, 15, -1, -1, - 31, 32, -1, -1, 35, 29, 37, -1, 66, 67, - 68, 66, 67, 68, -1, 33, 34, -1, 36, 29, - -1, -1, -1, -1, 66, 67, 68, 29, -1, -1, - -1, -1, 66, 67, 68, -1, 94, 95, 96, 94, - 95, 96, 66, 67, 68, -1, -1, -1, -1, -1, - -1, -1, 94, 95, 96, -1, 66, 67, 68, -1, - 94, 95, 96, -1, 66, 67, 68, 29, -1, -1, - 94, 95, 96, 29, -1, -1, 29, -1, -1, 29, - -1, -1, 29, -1, 94, 95, 96, 29, 23, 24, - 29, -1, 94, 95, 96, -1, 31, 32, -1, -1, - 35, -1, 37, -1, 66, 67, 68, -1, -1, -1, - 66, 67, 68, 66, 67, 68, 66, 67, 68, 66, - 67, 68, -1, 29, 66, 67, 68, 66, 67, 68, - 36, -1, 94, 95, 96, -1, -1, -1, 94, 95, - 96, 94, 95, 96, 94, 95, 96, 94, 95, 96, - -1, -1, 94, 95, 96, 94, 95, 96, 29, -1, - 66, 67, 68, 29, -1, 36, 29, -1, -1, -1, - 36, 29, -1, -1, 29, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 94, 95, - 96, -1, -1, -1, -1, 66, 67, 68, 61, 62, - 66, 67, 68, 66, 67, 68, 61, 62, 66, 67, - 68, 66, 67, 68, -1, -1, -1, 29, -1, -1, + 36, 60, 5, 36, 31, 7, 66, 16, 33, 7, + 36, 7, 7, 7, 7, 33, 36, 7, 55, 8, + 36, 7, 7, 36, 7, 55, 7, 7, 36, 36, + 17, 7, 33, 33, 7, 7, 7, 36, 7, 36, + 7, 7, 34, 60, 55, 36, 7, 66, 60, 33, + 55, 33, 7, 77, 33, 8, 60, 20, 36, 33, + 1, 36, 8, 33, 7, 33, 2, 55, 33, 33, + 29, 1, 24, 33, 8, 1, -1, 2, 55, -1, + 37, 8, 36, -1, -1, -1, 8, 36, 36, 33, + 7, 2, 48, 1, 36, 7, 36, 36, 60, 36, + 33, 17, 60, 8, 0, 36, 8, 2, -1, 60, + 60, 8, 6, -1, 61, 7, 8, 8, 33, 8, + -1, 8, 60, 55, 48, 60, 20, 48, 8, 36, + 8, 10, 8, 61, 79, 55, -1, -1, 48, 8, + 8, 40, 40, 61, 8, 8, 60, 5, 61, 62, + 79, 60, 51, 51, 56, 40, 79, 61, 62, 40, + 79, 61, 62, 60, 50, 8, 51, 56, 54, 60, + 51, 61, 62, 60, 8, 50, 55, 61, 62, 54, + 60, 29, 60, 42, 60, 91, 92, 56, 56, 61, + 62, 61, 62, 56, 53, 15, 60, 8, 7, 61, + 62, 61, 62, 29, 61, 62, 29, 25, 8, 27, + 7, -1, 15, 29, 34, 8, 36, 25, 61, 27, + 38, 12, -1, 25, 33, 27, 60, 75, 12, 36, + 38, 34, 89, 36, 29, 7, 38, 29, 86, -1, + 25, 12, 27, 25, 25, 27, 27, 7, 15, 75, + 61, 62, 75, 38, 61, 62, 38, 38, -1, 75, + 86, 61, 62, 86, 61, 62, 57, 34, 61, 62, + 86, -1, 63, 57, 15, 61, 62, 15, -1, 63, + 75, 18, 19, 75, -1, 94, 57, 18, 19, 61, + 62, 86, 63, 34, 86, 36, 34, 47, 36, 18, + 19, 61, 62, 15, -1, 18, 19, 93, 45, 46, + 15, 61, 62, -1, 45, 46, -1, -1, -1, -1, + -1, 33, 34, -1, 36, -1, 45, 46, 33, 34, + -1, 36, 45, 46, -1, 23, 24, -1, -1, 25, + -1, 27, -1, 93, 32, 23, 24, 35, 29, 37, + -1, -1, 38, 31, 32, -1, -1, 35, 29, 37, + 23, 24, 98, 99, 100, 101, 102, 103, 31, 32, + 23, 24, 35, 29, 37, -1, -1, -1, 31, 32, + 23, 24, 35, -1, 37, 66, 67, 68, 31, 32, + 23, 24, 35, -1, 37, 66, 67, 68, 31, 32, + -1, -1, 35, -1, 37, 29, -1, -1, 29, -1, + 66, 67, 68, 94, 95, 96, 29, -1, -1, 29, + 23, 24, 29, 94, 95, 96, -1, -1, 29, 32, + -1, -1, 35, -1, 37, 36, -1, -1, 94, 95, + 96, 29, 66, 67, 68, 66, 67, 68, 36, -1, + -1, -1, -1, 66, 67, 68, 66, 67, 68, 66, + 67, 68, 29, -1, -1, 66, 67, 68, -1, 36, + 94, 95, 96, 94, 95, 96, -1, -1, 66, 67, + 68, 94, 95, 96, 94, 95, 96, 94, 95, 96, + -1, -1, -1, 94, 95, 96, -1, -1, 29, 66, + 67, 68, -1, 29, -1, -1, 94, 95, 96, -1, + -1, 29, -1, -1, -1, -1, -1, -1, -1, 29, + -1, -1, -1, -1, -1, -1, -1, 94, 95, 96, + 61, 62, -1, -1, -1, 66, 67, 68, -1, -1, + 66, 67, 68, 61, 62, -1, -1, -1, 66, 67, + 68, 61, 62, -1, -1, -1, 66, 67, 68, -1, -1, -1, -1, 94, 95, 96, -1, -1, 94, 95, - 96, 94, 95, 96, -1, -1, 94, 95, 96, 94, - 95, 96, -1, -1, -1, -1, -1, -1, 29, 61, - 62, -1, -1, -1, 66, 67, 68, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 96, -1, -1, -1, -1, -1, 94, 95, 96, -1, + 29, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 61, 62, 94, 95, 96, 66, 67, 68, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, - -1, -1, -1, 12, 13, 3, -1, -1, -1, -1, - -1, -1, -1, 22, -1, 13, -1, -1, -1, 17, - 29, -1, -1, -1, 33, 34, -1, 36, 26, -1, - 28, -1, -1, -1, 43, -1, -1, -1, 47, -1, - -1, 39, -1, 41, 42, -1, -1, -1, -1, -1, - -1, 49, -1, -1, 52, 53, 65, 66, 67, 68, - 58, 70, -1, -1, -1, -1, 64, -1, -1, -1, - -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, - -1, -1, 80, -1, -1, 94, 95, 96, -1, -1, - -1, -1, -1, -1, -1, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, 3, -1, - -1, -1, 29, -1, -1, -1, 33, 34, 13, 36, - -1, -1, 17, -1, -1, -1, 43, -1, -1, -1, - 47, 26, -1, 28, -1, -1, 31, -1, -1, -1, - -1, -1, -1, -1, 39, -1, 41, 42, 65, 66, - 67, 68, -1, 70, 49, -1, -1, 52, 53, -1, - -1, -1, -1, 58, 81, 82, 83, -1, -1, 64, - 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, - -1, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 61, 62, 3, -1, -1, 66, 67, 68, + -1, -1, -1, -1, 13, -1, -1, -1, 17, -1, + -1, -1, -1, -1, -1, -1, -1, 26, -1, 28, + -1, -1, 31, -1, -1, 94, 95, 96, -1, -1, + 39, -1, 41, 42, -1, 12, 13, 3, -1, -1, + 49, -1, -1, 52, 53, 22, -1, 13, -1, 58, + -1, 17, 29, -1, -1, 64, 33, 34, -1, 36, + 26, -1, 28, -1, -1, -1, 43, -1, -1, -1, + 47, 80, -1, 39, -1, 41, 42, -1, -1, -1, + -1, -1, -1, 49, -1, -1, 52, 53, 65, 66, + 67, 68, 58, 70, -1, -1, -1, -1, 64, -1, + -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, + 87, -1, -1, -1, 80, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, -1, - -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, + 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, + -1, 33, 34, -1, 36, -1, -1, -1, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, - -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, - -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, - -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, - 67, 68, -1, 70, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, - 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, - -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, -1, - -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, + 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, + -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 12, 13, -1, -1, -1, -1, + -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, + -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, + -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, - -1, -1, -1, -1, 75, -1, -1, -1, -1, -1, - 81, 82, 83, 84, -1, -1, 87, -1, -1, -1, - -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 10, -1, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, -1, -1, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, 66, 67, 68, -1, 70, -1, -1, -1, -1, - 75, -1, -1, -1, -1, -1, 81, 82, 83, 84, - -1, -1, 87, -1, -1, -1, -1, -1, -1, 94, - 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 10, -1, 12, 13, -1, -1, -1, -1, -1, - -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, - 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, - -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, - -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 65, 66, 67, 68, - -1, 70, -1, -1, -1, -1, 75, -1, -1, -1, - -1, -1, 81, 82, 83, 84, -1, -1, 87, -1, - -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, - 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, - 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, + 68, -1, 70, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, + -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, + 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, + -1, 33, 34, -1, 36, -1, -1, -1, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, - 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, - -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, - 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 7, -1, -1, -1, 11, 12, 13, -1, + -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, + -1, -1, -1, 75, -1, -1, -1, -1, -1, 81, + 82, 83, 84, -1, -1, 87, -1, -1, -1, -1, + -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 10, -1, 12, 13, -1, -1, + -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, + -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, + 36, -1, -1, -1, -1, -1, -1, 43, -1, -1, + -1, 47, -1, -1, -1, -1, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + 66, 67, 68, -1, 70, -1, -1, -1, -1, 75, + -1, -1, -1, -1, -1, 81, 82, 83, 84, -1, + -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 10, -1, 12, 13, -1, -1, -1, -1, -1, -1, + -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, + -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, + -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, + -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, + 70, -1, -1, -1, -1, 75, -1, -1, -1, -1, + -1, 81, 82, 83, 84, -1, -1, 87, -1, -1, + -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, @@ -879,101 +844,100 @@ const short QQmlJSGrammar::action_check [] = { -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, - -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, - 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, - -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, - 70, -1, 72, -1, 74, 75, 76, -1, -1, -1, - -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, - -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 8, -1, -1, 11, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, - -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, - 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, - -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, - -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, - 72, -1, 74, -1, 76, -1, -1, -1, -1, 81, - 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, - -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 8, -1, -1, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, - 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, - 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, - -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, - -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, - 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, - -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, - 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, + -1, 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 8, -1, -1, 11, 12, 13, -1, -1, -1, -1, - -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, - -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, - -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, - -1, -1, -1, 51, -1, 53, -1, -1, 56, -1, - -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, - 68, -1, 70, -1, 72, -1, 74, -1, 76, -1, - -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, - -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, + -1, 72, -1, 74, 75, 76, -1, -1, -1, -1, + 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, + -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, - -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, -1, -1, 61, -1, - -1, -1, 65, 66, 67, 68, 69, 70, -1, 72, - 73, 74, -1, 76, -1, 78, -1, -1, 81, 82, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, 68, -1, 70, -1, 72, + -1, 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, - -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, - -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, - -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, - -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, - -1, -1, -1, 61, -1, -1, -1, 65, 66, 67, - 68, 69, 70, -1, 72, 73, 74, -1, 76, -1, - 78, -1, -1, 81, 82, 83, -1, -1, -1, 87, - -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, - 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, - 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, - 66, 67, 68, 69, 70, 71, -1, 73, 74, 75, - 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, - 86, -1, -1, -1, -1, -1, -1, -1, 94, 95, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, - 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, - -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, - -1, 65, 66, 67, 68, 69, 70, 71, -1, 73, - 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, - 84, 85, 86, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 8, -1, -1, 11, 12, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, + -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, + -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, + -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, + -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, + 65, 66, 67, 68, -1, 70, -1, 72, -1, 74, + -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, + -1, -1, 87, -1, -1, -1, -1, -1, -1, 94, + 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, + 67, 68, -1, 70, -1, 72, -1, 74, -1, 76, + -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, + 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, -1, 65, 66, 67, 68, + -1, 70, -1, 72, -1, 74, -1, 76, -1, -1, + -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, + -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, + -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, + -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, + 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, + 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, + -1, 65, 66, 67, 68, 69, 70, -1, 72, 73, + 74, -1, 76, -1, 78, -1, -1, 81, 82, 83, + -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, + 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, + -1, -1, 61, -1, -1, -1, 65, 66, 67, 68, + 69, 70, -1, 72, 73, 74, -1, 76, -1, 78, + -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, + -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, + -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, + -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, + 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, + 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, + -1, 65, 66, 67, 68, 69, 70, -1, 72, 73, + 74, -1, 76, -1, 78, -1, -1, 81, 82, 83, + -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, + -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, - -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, + -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, -1, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, 86, -1, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, @@ -982,104 +946,126 @@ const short QQmlJSGrammar::action_check [] = { 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, - -1, -1, -1, -1, -1, 55, -1, -1, -1, 59, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, -1, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, 86, -1, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, - -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, - -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, - -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, - -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, - -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, - -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, -1, -1, 81, 82, 83, 84, 85, -1, 87, + -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, + -1, 9, 10, 11, -1, -1, 14, -1, 16, -1, + -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, + -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 59, -1, -1, -1, -1, -1, 65, 66, 67, + 68, 69, 70, 71, -1, 73, 74, 75, 76, 77, + 78, -1, -1, 81, 82, 83, 84, 85, 86, -1, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, - -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, - -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, - 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, - -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, + 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, + 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, + -1, 47, -1, -1, -1, -1, -1, -1, -1, 55, + -1, -1, -1, 59, -1, -1, -1, -1, -1, 65, + 66, 67, 68, 69, 70, 71, -1, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, - -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, + 86, -1, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 4, 5, 6, -1, -1, 9, 10, 11, 12, 13, - 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, - -1, -1, -1, -1, -1, 29, 30, 31, 32, 33, + 4, -1, -1, -1, -1, 9, -1, 11, 12, 13, + 14, -1, -1, -1, -1, -1, -1, 21, 22, -1, + -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, - 84, 85, 86, 87, -1, -1, -1, -1, -1, -1, + 84, 85, -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - 12, 13, 14, -1, 16, -1, -1, -1, 20, 21, - 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, - 32, 33, 34, -1, 36, -1, -1, -1, 40, -1, + -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, + 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, + 22, -1, -1, -1, -1, -1, -1, 29, 30, -1, + -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, - -1, 53, -1, 55, -1, -1, -1, 59, -1, 61, + -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, -1, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, + 82, 83, 84, 85, -1, 87, -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, -1, -1, - -1, -1, -1, -1, + -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, + 10, 11, 12, 13, 14, -1, 16, -1, -1, -1, + 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, + 30, 31, 32, 33, 34, -1, 36, -1, -1, -1, + 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, + -1, 51, -1, 53, -1, -1, -1, -1, -1, 59, + -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, + -1, 81, 82, 83, 84, 85, 86, 87, -1, -1, + -1, -1, -1, -1, 94, 95, 96, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, + -1, 9, 10, 11, 12, 13, 14, -1, 16, -1, + -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, + -1, 29, 30, 31, 32, 33, 34, -1, 36, -1, + -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, + -1, -1, -1, 51, -1, 53, -1, 55, -1, -1, + -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, -1, -1, 81, 82, 83, 84, 85, 86, 87, + -1, -1, -1, -1, -1, -1, 94, 95, 96, -1, + -1, -1, -1, -1, -1, -1, -1, -1, - 42, 3, 18, 25, 18, 3, 18, 3, 18, 22, - 18, 3, 18, 22, 32, 32, 42, 18, 18, 18, - 3, 32, 25, 18, 18, 32, 3, 18, 32, 105, - 18, 18, 25, 100, 3, 3, 3, 18, 3, 25, - 18, 3, 18, 18, 18, 42, 3, 3, 103, 9, - 3, 14, 42, 42, 18, 25, 14, 42, 42, 18, - 42, 3, 42, 18, 18, 3, 18, 3, 18, 14, - 42, 22, 18, 2, 4, 18, 42, 18, 2, 11, - 12, 54, -1, 54, 2, 56, 59, 18, 18, 18, - 4, 14, 14, 54, 18, 56, 19, 14, 77, 14, - 18, 23, 2, 46, 18, 54, 54, 54, 2, 2, - 59, 59, 59, 18, 54, 54, 3, 56, 18, 59, - 54, 54, 56, 56, 18, 18, 54, 54, 54, 56, - 56, 59, 18, 54, 51, 56, 51, 2, 54, 2, - 56, 54, 54, 56, 56, 54, 54, 56, 38, 2, - 58, 54, 42, 18, 57, 18, 3, 54, 2, 45, - 18, 92, 54, 54, 2, 18, 3, 18, 109, 66, - 42, 54, 64, 56, 18, 18, 18, 2, 50, 70, - 18, 54, 42, 4, 54, 43, 56, 18, 14, 94, - 50, 78, 2, 18, 45, 68, 18, 18, 54, 18, - 56, 3, 54, 46, 46, 54, 54, 59, 18, 54, - 2, 60, 60, 44, 54, 60, 56, 2, 14, 14, - 3, 54, 44, 19, 19, 51, 18, 60, 47, 2, - 54, 78, 18, 18, 54, -1, 56, 54, 62, 56, - 54, 54, 18, 18, 58, 18, 59, 54, 54, 54, - 57, 54, 58, 54, 59, 54, 59, 54, 59, 45, - 59, 54, 59, 54, 2, 2, 59, -1, 59, 45, - 61, -1, 47, 48, 2, -1, 78, 54, -1, 76, - 18, 18, 59, 76, 54, -1, 54, 54, 54, 59, - 18, 59, 59, 59, -1, 78, -1, -1, 54, 76, - 54, 69, -1, 59, 71, 59, 76, 61, 54, 54, - 76, 67, 54, 59, 59, 61, 5, 59, 54, 61, - 65, 14, 5, 59, -1, 14, 19, 63, 21, -1, - -1, 14, -1, -1, 23, -1, -1, -1, -1, -1, - 23, -1, -1, -1, -1, -1, 35, 36, -1, 42, - 88, 88, 35, 36, 25, 26, 27, 28, 29, 30, - 31, 24, 25, 26, 27, 28, 29, 30, 31, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 14, 14, -1, -1, -1, -1, -1, - -1, -1, 23, 23, 24, 25, 26, 27, 28, 29, - 30, 31, -1, -1, 35, 36, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 32, 22, 18, 9, 18, 42, 18, 14, 32, 3, + 18, 3, 3, 18, 18, 32, 18, 32, 3, 22, + 3, 18, 3, 18, 25, 18, 22, 14, 18, 18, + 14, 42, 18, 32, 22, 77, 3, 100, 3, 3, + 3, 103, 42, 18, 42, 18, 3, 3, 25, 25, + 3, 105, 18, 25, 3, 3, 18, 18, 3, 18, + 42, 3, 42, 42, 42, 25, 18, 18, 42, 2, + -1, 18, 18, 42, 18, 18, 14, 18, 14, 18, + 2, 4, 2, 18, 42, 18, 54, 14, 56, 18, + -1, 4, -1, 18, -1, 18, 18, 18, 18, 54, + 54, 56, 56, 44, 54, 18, 56, 18, 11, 12, + 45, -1, -1, 51, 54, 51, 56, 54, 42, 56, + 54, 46, 54, 54, 51, 46, 50, 59, 59, 18, + 42, -1, -1, -1, 45, 54, 70, 54, 50, 54, + 59, 14, 59, 2, 59, 54, 19, 56, 54, 54, + 54, 56, 14, 59, 43, 54, 54, 56, 56, 18, + 2, 23, 2, 54, 68, 56, 14, 54, 54, 2, + 54, 19, 3, 60, 60, 59, 18, 54, 18, 18, + 109, 18, 59, 54, 54, 18, 54, 54, 59, 59, + 54, 59, 59, 54, 58, 38, 54, 58, 18, 42, + 58, 2, 54, 2, 18, 54, 45, 2, 45, 2, + 4, 3, 18, 18, 66, 64, 3, 18, 54, 18, + 56, 2, 54, 18, 18, 18, 46, 54, 60, 56, + 3, 3, 54, 47, 2, 57, 54, 18, 56, 54, + 2, 56, 54, 54, 56, 2, 57, 54, 2, 18, + 18, 54, 54, 56, -1, 62, 18, 54, 60, 56, + -1, 18, 14, 54, 18, 54, 2, 19, 59, -1, + 59, 54, 54, -1, 63, 44, 59, 59, -1, 54, + 2, -1, 18, 65, 59, 76, 78, 92, 94, 54, + 54, 78, 18, 76, 59, 59, 18, 61, 54, 54, + -1, 76, 67, 59, 59, 78, 78, 54, 54, -1, + 54, 54, 59, 59, 69, 59, 59, 61, 61, 14, + 76, 47, 48, -1, 71, -1, 54, 14, 23, 5, + 76, 59, 19, 61, 21, 5, -1, -1, 14, -1, + 35, 36, -1, -1, 14, -1, -1, 23, -1, -1, + -1, -1, 88, 23, -1, 42, -1, -1, -1, 35, + 36, -1, -1, -1, -1, 35, 36, 25, 26, 27, + 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, + -1, 14, -1, -1, -1, -1, -1, -1, -1, 2, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 14, + -1, -1, -1, -1, -1, 18, -1, -1, 23, 24, + 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 14, -1, -1, -1, -1, -1, -1, -1, -1, 23, - 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 14, -1, + -1, -1, -1, -1, -1, -1, -1, 23, 24, 25, + 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1087,6 +1073,6 @@ const short QQmlJSGrammar::action_check [] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1}; + -1, -1, -1, -1, -1}; QT_END_NAMESPACE diff --git a/src/tools/qdoc/qmlparser/qqmljsgrammar_p.h b/src/tools/qdoc/qmlparser/qqmljsgrammar_p.h index 6b3d1c8013..7a369be194 100644 --- a/src/tools/qdoc/qmlparser/qqmljsgrammar_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsgrammar_p.h @@ -161,15 +161,15 @@ public: T_XOR = 79, T_XOR_EQ = 80, - ACCEPT_STATE = 663, - RULE_COUNT = 357, - STATE_COUNT = 664, + ACCEPT_STATE = 665, + RULE_COUNT = 358, + STATE_COUNT = 666, TERMINAL_COUNT = 106, NON_TERMINAL_COUNT = 111, - GOTO_INDEX_OFFSET = 664, - GOTO_INFO_OFFSET = 3104, - GOTO_CHECK_OFFSET = 3104 + GOTO_INDEX_OFFSET = 666, + GOTO_INFO_OFFSET = 3018, + GOTO_CHECK_OFFSET = 3018 }; static const char *const spell []; diff --git a/src/tools/qdoc/qmlparser/qqmljsparser.cpp b/src/tools/qdoc/qmlparser/qqmljsparser.cpp index 262043b3b8..762e60c827 100644 --- a/src/tools/qdoc/qmlparser/qqmljsparser.cpp +++ b/src/tools/qdoc/qmlparser/qqmljsparser.cpp @@ -567,56 +567,78 @@ case 69: { } break; case 70: { - sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node); + AST::UiPublicMember *node = new (pool) AST::UiPublicMember(stringRef(3), stringRef(4)); + node->isReadonlyMember = true; + node->readonlyToken = loc(1); + node->propertyToken = loc(2); + node->typeToken = loc(3); + node->identifierToken = loc(4); + node->semicolonToken = loc(5); // insert a fake ';' before ':' + + AST::UiQualifiedId *propertyName = new (pool) AST::UiQualifiedId(stringRef(4)); + propertyName->identifierToken = loc(4); + propertyName->next = 0; + + AST::UiObjectBinding *binding = new (pool) AST::UiObjectBinding( + propertyName, sym(6).UiQualifiedId, sym(7).UiObjectInitializer); + binding->colonToken = loc(5); + + node->binding = binding; + + sym(1).Node = node; } break; case 71: { sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node); } break; -case 79: { +case 72: { + sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node); +} break; + +case 80: { AST::ThisExpression *node = new (pool) AST::ThisExpression(); node->thisToken = loc(1); sym(1).Node = node; } break; -case 80: { +case 81: { AST::IdentifierExpression *node = new (pool) AST::IdentifierExpression(stringRef(1)); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 81: { +case 82: { AST::NullExpression *node = new (pool) AST::NullExpression(); node->nullToken = loc(1); sym(1).Node = node; } break; -case 82: { +case 83: { AST::TrueLiteral *node = new (pool) AST::TrueLiteral(); node->trueToken = loc(1); sym(1).Node = node; } break; -case 83: { +case 84: { AST::FalseLiteral *node = new (pool) AST::FalseLiteral(); node->falseToken = loc(1); sym(1).Node = node; } break; -case 84: { +case 85: { AST::NumericLiteral *node = new (pool) AST::NumericLiteral(sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 85: -case 86: { +case 86: +case 87: { AST::StringLiteral *node = new (pool) AST::StringLiteral(stringRef(1)); node->literalToken = loc(1); sym(1).Node = node; } break; -case 87: { +case 88: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); @@ -632,7 +654,7 @@ case 87: { sym(1).Node = node; } break; -case 88: { +case 89: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); @@ -648,28 +670,28 @@ case 88: { sym(1).Node = node; } break; -case 89: { +case 90: { AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral((AST::Elision *) 0); node->lbracketToken = loc(1); node->rbracketToken = loc(2); sym(1).Node = node; } break; -case 90: { +case 91: { AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).Elision->finish()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 91: { +case 92: { AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 92: { +case 93: { AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish (), (AST::Elision *) 0); node->lbracketToken = loc(1); @@ -678,7 +700,7 @@ case 92: { sym(1).Node = node; } break; -case 93: { +case 94: { AST::ArrayLiteral *node = new (pool) AST::ArrayLiteral(sym(2).ElementList->finish (), sym(4).Elision->finish()); node->lbracketToken = loc(1); @@ -687,7 +709,7 @@ case 93: { sym(1).Node = node; } break; -case 94: { +case 95: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = new (pool) AST::ObjectLiteral( @@ -699,7 +721,7 @@ case 94: { sym(1).Node = node; } break; -case 95: { +case 96: { AST::ObjectLiteral *node = new (pool) AST::ObjectLiteral( sym(2).PropertyAssignmentList->finish ()); node->lbraceToken = loc(1); @@ -707,14 +729,14 @@ case 95: { sym(1).Node = node; } break; -case 96: { +case 97: { AST::NestedExpression *node = new (pool) AST::NestedExpression(sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 97: { +case 98: { if (AST::ArrayMemberExpression *mem = AST::cast(sym(1).Expression)) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken, QLatin1String("Ignored annotation"))); @@ -734,48 +756,48 @@ case 97: { } } break; -case 98: { +case 99: { sym(1).Node = new (pool) AST::ElementList((AST::Elision *) 0, sym(1).Expression); } break; -case 99: { +case 100: { sym(1).Node = new (pool) AST::ElementList(sym(1).Elision->finish(), sym(2).Expression); } break; -case 100: { +case 101: { AST::ElementList *node = new (pool) AST::ElementList(sym(1).ElementList, (AST::Elision *) 0, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 101: { +case 102: { AST::ElementList *node = new (pool) AST::ElementList(sym(1).ElementList, sym(3).Elision->finish(), sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 102: { +case 103: { AST::Elision *node = new (pool) AST::Elision(); node->commaToken = loc(1); sym(1).Node = node; } break; -case 103: { +case 104: { AST::Elision *node = new (pool) AST::Elision(sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 104: { +case 105: { AST::PropertyNameAndValue *node = new (pool) AST::PropertyNameAndValue( sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 105: { +case 106: { AST::PropertyGetterSetter *node = new (pool) AST::PropertyGetterSetter( sym(2).PropertyName, sym(6).FunctionBody); node->getSetToken = loc(1); @@ -786,7 +808,7 @@ case 105: { sym(1).Node = node; } break; -case 106: { +case 107: { AST::PropertyGetterSetter *node = new (pool) AST::PropertyGetterSetter( sym(2).PropertyName, sym(4).FormalParameterList, sym(7).FunctionBody); node->getSetToken = loc(1); @@ -797,56 +819,56 @@ case 106: { sym(1).Node = node; } break; -case 107: { +case 108: { sym(1).Node = new (pool) AST::PropertyAssignmentList(sym(1).PropertyAssignment); } break; -case 108: { +case 109: { AST::PropertyAssignmentList *node = new (pool) AST::PropertyAssignmentList( sym(1).PropertyAssignmentList, sym(3).PropertyAssignment); node->commaToken = loc(2); sym(1).Node = node; } break; -case 109: { +case 110: { AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1)); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 110: { +case 111: { AST::StringLiteralPropertyName *node = new (pool) AST::StringLiteralPropertyName(stringRef(1)); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 111: { +case 112: { AST::NumericLiteralPropertyName *node = new (pool) AST::NumericLiteralPropertyName(sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 112: { +case 113: { AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1)); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 148: { +case 149: { AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 149: { +case 150: { AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3)); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 150: { +case 151: { AST::NewMemberExpression *node = new (pool) AST::NewMemberExpression(sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -854,384 +876,384 @@ case 150: { sym(1).Node = node; } break; -case 152: { +case 153: { AST::NewExpression *node = new (pool) AST::NewExpression(sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 153: { +case 154: { AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 154: { +case 155: { AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 155: { +case 156: { AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 156: { +case 157: { AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3)); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 157: { +case 158: { sym(1).Node = 0; } break; -case 158: { +case 159: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 159: { +case 160: { sym(1).Node = new (pool) AST::ArgumentList(sym(1).Expression); } break; -case 160: { +case 161: { AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 164: { +case 165: { AST::PostIncrementExpression *node = new (pool) AST::PostIncrementExpression(sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 165: { +case 166: { AST::PostDecrementExpression *node = new (pool) AST::PostDecrementExpression(sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 167: { +case 168: { AST::DeleteExpression *node = new (pool) AST::DeleteExpression(sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 168: { +case 169: { AST::VoidExpression *node = new (pool) AST::VoidExpression(sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 169: { +case 170: { AST::TypeOfExpression *node = new (pool) AST::TypeOfExpression(sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 170: { +case 171: { AST::PreIncrementExpression *node = new (pool) AST::PreIncrementExpression(sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 171: { +case 172: { AST::PreDecrementExpression *node = new (pool) AST::PreDecrementExpression(sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 172: { +case 173: { AST::UnaryPlusExpression *node = new (pool) AST::UnaryPlusExpression(sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 173: { +case 174: { AST::UnaryMinusExpression *node = new (pool) AST::UnaryMinusExpression(sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 174: { +case 175: { AST::TildeExpression *node = new (pool) AST::TildeExpression(sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 175: { +case 176: { AST::NotExpression *node = new (pool) AST::NotExpression(sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 177: { +case 178: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 178: { +case 179: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 179: { +case 180: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 181: { +case 182: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 182: { +case 183: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 184: { +case 185: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 185: { +case 186: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 186: { +case 187: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 188: { +case 189: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 189: { +case 190: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 190: { +case 191: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 191: { +case 192: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 192: { +case 193: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 193: { +case 194: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 195: { +case 196: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 196: { +case 197: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 197: { +case 198: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 198: { +case 199: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 199: { +case 200: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 201: { +case 202: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 202: { +case 203: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 203: { +case 204: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 204: { +case 205: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 206: { +case 207: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 207: { +case 208: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 208: { +case 209: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 209: { +case 210: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 211: { +case 212: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 213: { +case 214: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 215: { +case 216: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 217: { +case 218: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 219: { +case 220: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 221: { +case 222: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 223: { +case 224: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 225: { +case 226: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 227: { +case 228: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 229: { +case 230: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 231: { +case 232: { AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1239,7 +1261,7 @@ case 231: { sym(1).Node = node; } break; -case 233: { +case 234: { AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1247,112 +1269,112 @@ case 233: { sym(1).Node = node; } break; -case 235: { +case 236: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 237: { +case 238: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 238: { +case 239: { sym(1).ival = QSOperator::Assign; } break; -case 239: { +case 240: { sym(1).ival = QSOperator::InplaceMul; } break; -case 240: { +case 241: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 241: { +case 242: { sym(1).ival = QSOperator::InplaceMod; } break; -case 242: { +case 243: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 243: { +case 244: { sym(1).ival = QSOperator::InplaceSub; } break; -case 244: { +case 245: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 245: { +case 246: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 246: { +case 247: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 247: { +case 248: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 248: { +case 249: { sym(1).ival = QSOperator::InplaceXor; } break; -case 249: { +case 250: { sym(1).ival = QSOperator::InplaceOr; } break; -case 251: { +case 252: { AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 252: { +case 253: { sym(1).Node = 0; } break; -case 255: { +case 256: { AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 256: { +case 257: { sym(1).Node = 0; } break; -case 273: { +case 274: { AST::Block *node = new (pool) AST::Block(sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 274: { +case 275: { sym(1).Node = new (pool) AST::StatementList(sym(1).Statement); } break; -case 275: { +case 276: { sym(1).Node = new (pool) AST::StatementList(sym(1).StatementList, sym(2).Statement); } break; -case 276: { +case 277: { sym(1).Node = 0; } break; -case 277: { +case 278: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 279: { +case 280: { AST::VariableStatement *node = new (pool) AST::VariableStatement( sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1360,76 +1382,76 @@ case 279: { sym(1).Node = node; } break; -case 280: { +case 281: { sym(1).ival = T_CONST; } break; -case 281: { +case 282: { sym(1).ival = T_VAR; } break; -case 282: { +case 283: { sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration); } break; -case 283: { +case 284: { AST::VariableDeclarationList *node = new (pool) AST::VariableDeclarationList( sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 284: { +case 285: { sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclaration); } break; -case 285: { +case 286: { sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 286: { +case 287: { AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 287: { +case 288: { AST::VariableDeclaration *node = new (pool) AST::VariableDeclaration(stringRef(1), sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 288: { +case 289: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 289: { +case 290: { sym(1).Node = 0; } break; -case 291: { +case 292: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 292: { +case 293: { sym(1).Node = 0; } break; -case 294: { +case 295: { AST::EmptyStatement *node = new (pool) AST::EmptyStatement(); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 296: { +case 297: { AST::ExpressionStatement *node = new (pool) AST::ExpressionStatement(sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 297: { +case 298: { AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1438,7 +1460,7 @@ case 297: { sym(1).Node = node; } break; -case 298: { +case 299: { AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1446,7 +1468,7 @@ case 298: { sym(1).Node = node; } break; -case 301: { +case 302: { AST::DoWhileStatement *node = new (pool) AST::DoWhileStatement(sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1456,7 +1478,7 @@ case 301: { sym(1).Node = node; } break; -case 302: { +case 303: { AST::WhileStatement *node = new (pool) AST::WhileStatement(sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1464,7 +1486,7 @@ case 302: { sym(1).Node = node; } break; -case 303: { +case 304: { AST::ForStatement *node = new (pool) AST::ForStatement(sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1475,7 +1497,7 @@ case 303: { sym(1).Node = node; } break; -case 304: { +case 305: { AST::LocalForStatement *node = new (pool) AST::LocalForStatement( sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1488,7 +1510,7 @@ case 304: { sym(1).Node = node; } break; -case 305: { +case 306: { AST:: ForEachStatement *node = new (pool) AST::ForEachStatement(sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1498,7 +1520,7 @@ case 305: { sym(1).Node = node; } break; -case 306: { +case 307: { AST::LocalForEachStatement *node = new (pool) AST::LocalForEachStatement( sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1509,14 +1531,14 @@ case 306: { sym(1).Node = node; } break; -case 308: { +case 309: { AST::ContinueStatement *node = new (pool) AST::ContinueStatement(); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 310: { +case 311: { AST::ContinueStatement *node = new (pool) AST::ContinueStatement(stringRef(2)); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1524,14 +1546,14 @@ case 310: { sym(1).Node = node; } break; -case 312: { +case 313: { AST::BreakStatement *node = new (pool) AST::BreakStatement(QStringRef()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 314: { +case 315: { AST::BreakStatement *node = new (pool) AST::BreakStatement(stringRef(2)); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1539,14 +1561,14 @@ case 314: { sym(1).Node = node; } break; -case 316: { +case 317: { AST::ReturnStatement *node = new (pool) AST::ReturnStatement(sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 317: { +case 318: { AST::WithStatement *node = new (pool) AST::WithStatement(sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1554,7 +1576,7 @@ case 317: { sym(1).Node = node; } break; -case 318: { +case 319: { AST::SwitchStatement *node = new (pool) AST::SwitchStatement(sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1562,83 +1584,83 @@ case 318: { sym(1).Node = node; } break; -case 319: { +case 320: { AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 320: { +case 321: { AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 321: { +case 322: { sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClause); } break; -case 322: { +case 323: { sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClauses, sym(2).CaseClause); } break; -case 323: { +case 324: { sym(1).Node = 0; } break; -case 324: { +case 325: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 325: { +case 326: { AST::CaseClause *node = new (pool) AST::CaseClause(sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 326: { +case 327: { AST::DefaultClause *node = new (pool) AST::DefaultClause(sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 327: { +case 328: { AST::LabelledStatement *node = new (pool) AST::LabelledStatement(stringRef(1), sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 329: { +case 330: { AST::ThrowStatement *node = new (pool) AST::ThrowStatement(sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 330: { +case 331: { AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 331: { +case 332: { AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 332: { +case 333: { AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 333: { +case 334: { AST::Catch *node = new (pool) AST::Catch(stringRef(3), sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1647,20 +1669,20 @@ case 333: { sym(1).Node = node; } break; -case 334: { +case 335: { AST::Finally *node = new (pool) AST::Finally(sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 336: { +case 337: { AST::DebuggerStatement *node = new (pool) AST::DebuggerStatement(); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 338: { +case 339: { AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1671,7 +1693,7 @@ case 338: { sym(1).Node = node; } break; -case 339: { +case 340: { AST::FunctionExpression *node = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (! stringRef(2).isNull()) @@ -1683,7 +1705,7 @@ case 339: { sym(1).Node = node; } break; -case 340: { +case 341: { AST::FunctionExpression *node = new (pool) AST::FunctionExpression(QStringRef(), sym(3).FormalParameterList, sym(6).FunctionBody); node->functionToken = loc(1); node->lparenToken = loc(2); @@ -1693,56 +1715,56 @@ case 340: { sym(1).Node = node; } break; -case 341: { +case 342: { AST::FormalParameterList *node = new (pool) AST::FormalParameterList(stringRef(1)); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 342: { +case 343: { AST::FormalParameterList *node = new (pool) AST::FormalParameterList(sym(1).FormalParameterList, stringRef(3)); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 343: { +case 344: { sym(1).Node = 0; } break; -case 344: { +case 345: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 345: { +case 346: { sym(1).Node = 0; } break; -case 347: { +case 348: { sym(1).Node = new (pool) AST::FunctionBody(sym(1).SourceElements->finish ()); } break; -case 349: { +case 350: { sym(1).Node = new (pool) AST::Program(sym(1).SourceElements->finish ()); } break; -case 350: { +case 351: { sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElement); } break; -case 351: { +case 352: { sym(1).Node = new (pool) AST::SourceElements(sym(1).SourceElements, sym(2).SourceElement); } break; -case 352: { +case 353: { sym(1).Node = new (pool) AST::StatementSourceElement(sym(1).Statement); } break; -case 353: { +case 354: { sym(1).Node = new (pool) AST::FunctionSourceElement(sym(1).FunctionDeclaration); } break; -case 354: { +case 355: { sym(1).Node = 0; } break; diff --git a/src/tools/qdoc/qmlparser/qqmljsparser_p.h b/src/tools/qdoc/qmlparser/qqmljsparser_p.h index b0abf06b25..cf9f641fbc 100644 --- a/src/tools/qdoc/qmlparser/qqmljsparser_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsparser_p.h @@ -240,9 +240,9 @@ protected: -#define J_SCRIPT_REGEXPLITERAL_RULE1 87 +#define J_SCRIPT_REGEXPLITERAL_RULE1 88 -#define J_SCRIPT_REGEXPLITERAL_RULE2 88 +#define J_SCRIPT_REGEXPLITERAL_RULE2 89 QT_QML_END_NAMESPACE -- cgit v1.2.3 From 76735f3fa0fdf772aa4fba9a9aaa241415eaf922 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 5 Nov 2014 14:57:03 +0100 Subject: Windows native file dialog: Work around display bug of IFileDialog. Any filter not filtering on suffix shows up duplicated in filter combo. Change-Id: I9fc9e33b6081cf6894fabc6dd52c12a4d3dfd393 Task-number: QTBUG-42405 Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 4cbead44c5..f1f472b3e2 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1224,16 +1224,21 @@ void QWindowsNativeFileDialogBase::setNameFilters(const QStringList &filters) QScopedArrayPointer buffer(new WCHAR[totalStringLength + 2 * size]); QScopedArrayPointer comFilterSpec(new COMDLG_FILTERSPEC[size]); - const QString matchesAll = QStringLiteral(" (*)"); WCHAR *ptr = buffer.data(); // Split filter specification as 'Texts (*.txt[;] *.doc)' // into description and filters specification as '*.txt;*.doc' for (int i = 0; i < size; ++i) { - // Display glitch (CLSID only): 'All files (*)' shows up as 'All files (*) (*)' + // Display glitch (CLSID only): Any filter not filtering on suffix (such as + // '*', 'a.*') will be duplicated in combo: 'All files (*) (*)', + // 'AAA files (a.*) (a.*)' QString description = specs[i].description; - if (!m_hideFiltersDetails && description.endsWith(matchesAll)) - description.truncate(description.size() - matchesAll.size()); + const QString &filter = specs[i].filter; + if (!m_hideFiltersDetails && !filter.startsWith(QLatin1String("*."))) { + const int pos = description.lastIndexOf(QLatin1Char('(')); + if (pos > 0) + description.truncate(pos); + } // Add to buffer. comFilterSpec[i].pszName = ptr; ptr += description.toWCharArray(ptr); -- cgit v1.2.3 From 78cdb6b4b1c8c6213e967be56767d7dadd2bf8bf Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 5 Nov 2014 15:03:23 +0100 Subject: Windows: fix unreadable white text for focused combo boxes Task-number: QTBUG-42390 Change-Id: Ia52c7ac3d2e3ca155692c8f020a565054716c86b Reviewed-by: Friedemann Kleint --- src/widgets/styles/qwindowsvistastyle.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 007952192a..463b120e04 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -1473,7 +1473,11 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption break; } #endif // QT_NO_ITEMVIEWS - +#ifndef QT_NO_COMBOBOX + case CE_ComboBoxLabel: + QCommonStyle::drawControl(element, option, painter, widget); + break; +#endif // QT_NO_COMBOBOX default: QWindowsXPStyle::drawControl(element, option, painter, widget); break; -- cgit v1.2.3 From 8d82066ff5a00e2bc77716f90688550a6a779dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 5 Nov 2014 12:59:04 +0100 Subject: Skip unused function isCoreProfile() on non-ES2 platforms Change-Id: Ia84e74512e7001986c620253cdf0bc431ebc00dc Reviewed-by: Simon Hausmann --- src/gui/opengl/qopengltextureglyphcache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp index 0f70a01014..cd268cd685 100644 --- a/src/gui/opengl/qopengltextureglyphcache.cpp +++ b/src/gui/opengl/qopengltextureglyphcache.cpp @@ -82,10 +82,12 @@ QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache() clear(); } +#if !defined(QT_OPENGL_ES_2) static inline bool isCoreProfile() { return QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile; } +#endif void QOpenGLTextureGlyphCache::createTextureData(int width, int height) { -- cgit v1.2.3 From af279b34a8ecccd7dfa0d59b718bc3cf65ebce65 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Mon, 27 Oct 2014 19:26:47 +1000 Subject: Reset QNAM's NetworkConfiguration when state changes. Since QNAM is initialized with defaultConfiguration, we need to reset the internal configuration used to the current defaultConfiguration when the state changes and a new configuration becomes the default. Task-number: QTBUG-40234 Change-Id: I50f23c62804f29370915eecac2c92301c5f3ead2 Reviewed-by: Kai Koehne Reviewed-by: Alex Blasche --- src/network/access/qnetworkaccessmanager.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index f00b58a8ce..52d56fb071 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1135,7 +1135,12 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera if (!d->networkSessionStrongRef && (d->initializeSession || !d->networkConfiguration.identifier().isEmpty())) { QNetworkConfigurationManager manager; if (!d->networkConfiguration.identifier().isEmpty()) { - d->createSession(d->networkConfiguration); + if ((d->networkConfiguration.state() & QNetworkConfiguration::Defined) + && d->networkConfiguration != manager.defaultConfiguration()) + d->createSession(manager.defaultConfiguration()); + else + d->createSession(d->networkConfiguration); + } else { if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) d->createSession(manager.defaultConfiguration()); @@ -1590,6 +1595,11 @@ void QNetworkAccessManagerPrivate::_q_onlineStateChanged(bool isOnline) if (customNetworkConfiguration) { online = (networkConfiguration.state() & QNetworkConfiguration::Active); } else { + if (isOnline && online != isOnline) { + networkSessionStrongRef.clear(); + networkSessionWeakRef.clear(); + } + online = isOnline; } } -- cgit v1.2.3 From 4763a3571f3301dd2da6d35636a94e4d1dc1f216 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 29 Oct 2014 19:40:43 +1000 Subject: Use a property cache to cut down on blocking calls Refactor old code Stop memory leaks Properly support mobile data (ofono) Change-Id: I7f23882ee0ee345a049a4a93ddd452b6d2e53710 Reviewed-by: Alex Blasche --- src/plugins/bearer/connman/connman.pro | 4 +- src/plugins/bearer/connman/qconnmanengine.h | 2 +- src/plugins/bearer/connman/qofonoservice_linux.cpp | 303 --------- src/plugins/bearer/connman/qofonoservice_linux_p.h | 172 ----- .../bearer/linux_common/qofonoservice_linux.cpp | 370 +++++++++++ .../bearer/linux_common/qofonoservice_linux_p.h | 195 ++++++ .../bearer/networkmanager/networkmanager.pro | 6 +- .../networkmanager/qnetworkmanagerengine.cpp | 364 +++++------ .../bearer/networkmanager/qnetworkmanagerengine.h | 22 +- .../networkmanager/qnetworkmanagerservice.cpp | 693 +++++++++++++++------ .../bearer/networkmanager/qnetworkmanagerservice.h | 105 +++- .../bearer/networkmanager/qnmdbushelper.cpp | 140 ----- src/plugins/bearer/networkmanager/qnmdbushelper.h | 73 --- 13 files changed, 1318 insertions(+), 1131 deletions(-) delete mode 100644 src/plugins/bearer/connman/qofonoservice_linux.cpp delete mode 100644 src/plugins/bearer/connman/qofonoservice_linux_p.h create mode 100644 src/plugins/bearer/linux_common/qofonoservice_linux.cpp create mode 100644 src/plugins/bearer/linux_common/qofonoservice_linux_p.h delete mode 100644 src/plugins/bearer/networkmanager/qnmdbushelper.cpp delete mode 100644 src/plugins/bearer/networkmanager/qnmdbushelper.h diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro index bc4efe8b62..efa13a6ebd 100644 --- a/src/plugins/bearer/connman/connman.pro +++ b/src/plugins/bearer/connman/connman.pro @@ -8,14 +8,14 @@ QT = core network-private dbus CONFIG += link_pkgconfig HEADERS += qconnmanservice_linux_p.h \ - qofonoservice_linux_p.h \ + ../linux_common/qofonoservice_linux_p.h \ qconnmanengine.h \ ../qnetworksession_impl.h \ ../qbearerengine_impl.h SOURCES += main.cpp \ qconnmanservice_linux.cpp \ - qofonoservice_linux.cpp \ + ../linux_common/qofonoservice_linux.cpp \ qconnmanengine.cpp \ ../qnetworksession_impl.cpp diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h index 52e8b384a0..a995d8ed25 100644 --- a/src/plugins/bearer/connman/qconnmanengine.h +++ b/src/plugins/bearer/connman/qconnmanengine.h @@ -48,7 +48,7 @@ #include "../qbearerengine_impl.h" #include "qconnmanservice_linux_p.h" -#include "qofonoservice_linux_p.h" +#include "../linux_common/qofonoservice_linux_p.h" #include #include diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp deleted file mode 100644 index 2ce2bd40e4..0000000000 --- a/src/plugins/bearer/connman/qofonoservice_linux.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "qofonoservice_linux_p.h" - -#ifndef QT_NO_BEARERMANAGEMENT -#ifndef QT_NO_DBUS - -QDBusArgument &operator<<(QDBusArgument &argument, const ObjectPathProperties &item) -{ - argument.beginStructure(); - argument << item.path << item.properties; - argument.endStructure(); - return argument; -} - -const QDBusArgument &operator>>(const QDBusArgument &argument, ObjectPathProperties &item) -{ - argument.beginStructure(); - argument >> item.path >> item.properties; - argument.endStructure(); - return argument; -} - -QT_BEGIN_NAMESPACE - -QOfonoManagerInterface::QOfonoManagerInterface( QObject *parent) - : QDBusAbstractInterface(QStringLiteral(OFONO_SERVICE), - QStringLiteral(OFONO_MANAGER_PATH), - OFONO_MANAGER_INTERFACE, - QDBusConnection::systemBus(), parent) -{ - qDBusRegisterMetaType(); - qDBusRegisterMetaType(); - - QDBusConnection::systemBus().connect(QStringLiteral(OFONO_SERVICE), - QStringLiteral(OFONO_MANAGER_PATH), - QStringLiteral(OFONO_MANAGER_INTERFACE), - QStringLiteral("ModemAdded"), - this,SLOT(modemAdded(QDBusObjectPath, QVariantMap))); - QDBusConnection::systemBus().connect(QStringLiteral(OFONO_SERVICE), - QStringLiteral(OFONO_MANAGER_PATH), - QStringLiteral(OFONO_MANAGER_INTERFACE), - QStringLiteral("ModemRemoved"), - this,SLOT(modemRemoved(QDBusObjectPath))); -} - -QOfonoManagerInterface::~QOfonoManagerInterface() -{ -} - -QStringList QOfonoManagerInterface::getModems() -{ - if (modemList.isEmpty()) { - QList argumentList; - QDBusPendingReply reply = asyncCallWithArgumentList(QLatin1String("GetModems"), argumentList); - reply.waitForFinished(); - if (!reply.isError()) { - foreach (ObjectPathProperties modem, reply.value()) { - modemList << modem.path.path(); - } - } else { - qDebug() << reply.error().message(); - } - } - - return modemList; -} - -QString QOfonoManagerInterface::currentModem() -{ - QStringList modems = getModems(); - foreach (const QString &modem, modems) { - QOfonoModemInterface device(modem); - if (device.isPowered() && device.isOnline()) - return modem; - } - return QString(); -} - -void QOfonoManagerInterface::modemAdded(const QDBusObjectPath &path, const QVariantMap &/*var*/) -{ - if (!modemList.contains(path.path())) { - modemList << path.path(); - Q_EMIT modemChanged(); - } -} - -void QOfonoManagerInterface::modemRemoved(const QDBusObjectPath &path) -{ - if (modemList.contains(path.path())) { - modemList.removeOne(path.path()); - Q_EMIT modemChanged(); - } -} - - -QOfonoModemInterface::QOfonoModemInterface(const QString &dbusPathName, QObject *parent) - : QDBusAbstractInterface(QStringLiteral(OFONO_SERVICE), - dbusPathName, - OFONO_MODEM_INTERFACE, - QDBusConnection::systemBus(), parent) -{ - QDBusConnection::systemBus().connect(QStringLiteral(OFONO_SERVICE), - path(), - OFONO_MODEM_INTERFACE, - QStringLiteral("PropertyChanged"), - this,SLOT(propertyChanged(QString,QDBusVariant))); -} - -QOfonoModemInterface::~QOfonoModemInterface() -{ -} - -void QOfonoModemInterface::propertyChanged(const QString &name,const QDBusVariant &value) -{ - propertiesMap[name] = value.variant(); -} - -bool QOfonoModemInterface::isPowered() -{ - QVariant var = getProperty(QStringLiteral("Powered")); - return qdbus_cast(var); -} - -bool QOfonoModemInterface::isOnline() -{ - QVariant var = getProperty(QStringLiteral("Online")); - return qdbus_cast(var); -} - -QVariantMap QOfonoModemInterface::getProperties() -{ - if (propertiesMap.isEmpty()) { - QList argumentList; - QDBusPendingReply reply = asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList); - if (!reply.isError()) { - propertiesMap = reply.value(); - } - } - return propertiesMap; -} - -QVariant QOfonoModemInterface::getProperty(const QString &property) -{ - QVariant var; - QVariantMap map = getProperties(); - var = map.value(property); - return var; -} - - -QOfonoNetworkRegistrationInterface::QOfonoNetworkRegistrationInterface(const QString &dbusPathName, QObject *parent) - : QDBusAbstractInterface(QStringLiteral(OFONO_SERVICE), - dbusPathName, - OFONO_NETWORK_REGISTRATION_INTERFACE, - QDBusConnection::systemBus(), parent) -{ -} - -QOfonoNetworkRegistrationInterface::~QOfonoNetworkRegistrationInterface() -{ -} - -QString QOfonoNetworkRegistrationInterface::getTechnology() -{ - QVariant var = getProperty(QStringLiteral("Technology")); - return qdbus_cast(var); -} - -QVariant QOfonoNetworkRegistrationInterface::getProperty(const QString &property) -{ - QVariant var; - QVariantMap map = getProperties(); - var = map.value(property); - return var; -} - -QVariantMap QOfonoNetworkRegistrationInterface::getProperties() -{ - if (propertiesMap.isEmpty()) { - QList argumentList; - QDBusPendingReply reply = asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList); - reply.waitForFinished(); - if (!reply.isError()) { - propertiesMap = reply.value(); - } else { - qDebug() << reply.error().message(); - } - } - return propertiesMap; -} - -QOfonoDataConnectionManagerInterface::QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent) - : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), - dbusPathName, - OFONO_DATA_CONNECTION_MANAGER_INTERFACE, - QDBusConnection::systemBus(), parent) -{ - QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE), - path(), - QLatin1String(OFONO_MODEM_INTERFACE), - QLatin1String("PropertyChanged"), - this,SLOT(propertyChanged(QString,QDBusVariant))); -} - -QOfonoDataConnectionManagerInterface::~QOfonoDataConnectionManagerInterface() -{ -} - -QStringList QOfonoDataConnectionManagerInterface::contexts() -{ - if (contextList.isEmpty()) { - QDBusPendingReply reply = call(QLatin1String("GetContexts")); - reply.waitForFinished(); - if (!reply.isError()) { - foreach (ObjectPathProperties context, reply.value()) { - contextList << context.path.path(); - } - } - } - return contextList; -} - -bool QOfonoDataConnectionManagerInterface::roamingAllowed() -{ - QVariant var = getProperty(QStringLiteral("RoamingAllowed")); - return qdbus_cast(var); -} - -QVariant QOfonoDataConnectionManagerInterface::getProperty(const QString &property) -{ - QVariant var; - QVariantMap map = getProperties(); - var = map.value(property); - return var; -} - -QVariantMap QOfonoDataConnectionManagerInterface::getProperties() -{ - if (propertiesMap.isEmpty()) { - QList argumentList; - QDBusPendingReply reply = asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList); - if (!reply.isError()) { - propertiesMap = reply.value(); - } - } - return propertiesMap; -} - -void QOfonoDataConnectionManagerInterface::propertyChanged(const QString &name, const QDBusVariant &value) -{ - propertiesMap[name] = value.variant(); - if (name == QLatin1String("RoamingAllowed")) - Q_EMIT roamingAllowedChanged(value.variant().toBool()); -} - -QT_END_NAMESPACE - -#endif // QT_NO_DBUS -#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/plugins/bearer/connman/qofonoservice_linux_p.h b/src/plugins/bearer/connman/qofonoservice_linux_p.h deleted file mode 100644 index 8a6a932e0d..0000000000 --- a/src/plugins/bearer/connman/qofonoservice_linux_p.h +++ /dev/null @@ -1,172 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QOFONOSERVICE_H -#define QOFONOSERVICE_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifndef QT_NO_BEARERMANAGEMENT -#ifndef QT_NO_DBUS - -#define OFONO_SERVICE "org.ofono" -#define OFONO_MANAGER_INTERFACE "org.ofono.Manager" -#define OFONO_MANAGER_PATH "/" - -#define OFONO_MODEM_INTERFACE "org.ofono.Modem" -#define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration" -#define OFONO_DATA_CONNECTION_MANAGER_INTERFACE "org.ofono.ConnectionManager" - -QT_BEGIN_NAMESPACE - -QT_END_NAMESPACE - -struct ObjectPathProperties -{ - QDBusObjectPath path; - QVariantMap properties; -}; -typedef QList PathPropertiesList; -Q_DECLARE_METATYPE(ObjectPathProperties) -Q_DECLARE_METATYPE (PathPropertiesList) - -QT_BEGIN_NAMESPACE - -class QOfonoManagerInterface : public QDBusAbstractInterface -{ - Q_OBJECT - -public: - - QOfonoManagerInterface( QObject *parent = 0); - ~QOfonoManagerInterface(); - - QStringList getModems(); - QString currentModem(); -signals: - void modemChanged(); -private: - QStringList modemList; -private slots: - void modemAdded(const QDBusObjectPath &path, const QVariantMap &var); - void modemRemoved(const QDBusObjectPath &path); -}; - -class QOfonoModemInterface : public QDBusAbstractInterface -{ - Q_OBJECT - -public: - - explicit QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent = 0); - ~QOfonoModemInterface(); - - bool isPowered(); - bool isOnline(); -private: - QVariantMap getProperties(); - QVariantMap propertiesMap; - QVariant getProperty(const QString &); - void propertyChanged(const QString &, const QDBusVariant &value); -}; - - -class QOfonoNetworkRegistrationInterface : public QDBusAbstractInterface -{ - Q_OBJECT - -public: - - explicit QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent = 0); - ~QOfonoNetworkRegistrationInterface(); - - QString getTechnology(); - -private: - QVariantMap getProperties(); - QVariant getProperty(const QString &); - QVariantMap propertiesMap; -Q_SIGNALS: - void propertyChanged(const QString &, const QDBusVariant &value); -}; - -class QOfonoDataConnectionManagerInterface : public QDBusAbstractInterface -{ - Q_OBJECT - -public: - - explicit QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent = 0); - ~QOfonoDataConnectionManagerInterface(); - - QStringList contexts(); - bool roamingAllowed(); -Q_SIGNALS: - void roamingAllowedChanged(bool); -private: - QVariantMap getProperties(); - QVariantMap propertiesMap; - QVariant getProperty(const QString &); - QStringList contextList; -private slots: - void propertyChanged(const QString &, const QDBusVariant &value); -}; - - -QT_END_NAMESPACE - -#endif // QT_NO_DBUS -#endif // QT_NO_BEARERMANAGEMENT - -#endif //QOFONOSERVICE_H diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp new file mode 100644 index 0000000000..e994ebf2ce --- /dev/null +++ b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp @@ -0,0 +1,370 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qofonoservice_linux_p.h" + +#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_DBUS + +QDBusArgument &operator<<(QDBusArgument &argument, const ObjectPathProperties &item) +{ + argument.beginStructure(); + argument << item.path << item.properties; + argument.endStructure(); + return argument; +} + +const QDBusArgument &operator>>(const QDBusArgument &argument, ObjectPathProperties &item) +{ + argument.beginStructure(); + argument >> item.path >> item.properties; + argument.endStructure(); + return argument; +} + +QT_BEGIN_NAMESPACE + +QOfonoManagerInterface::QOfonoManagerInterface( QObject *parent) + : QDBusAbstractInterface(QStringLiteral(OFONO_SERVICE), + QStringLiteral(OFONO_MANAGER_PATH), + OFONO_MANAGER_INTERFACE, + QDBusConnection::systemBus(), parent) +{ + qDBusRegisterMetaType(); + qDBusRegisterMetaType(); + + QDBusConnection::systemBus().connect(QStringLiteral(OFONO_SERVICE), + QStringLiteral(OFONO_MANAGER_PATH), + QStringLiteral(OFONO_MANAGER_INTERFACE), + QStringLiteral("ModemAdded"), + this,SLOT(modemAdded(QDBusObjectPath, QVariantMap))); + QDBusConnection::systemBus().connect(QStringLiteral(OFONO_SERVICE), + QStringLiteral(OFONO_MANAGER_PATH), + QStringLiteral(OFONO_MANAGER_INTERFACE), + QStringLiteral("ModemRemoved"), + this,SLOT(modemRemoved(QDBusObjectPath))); +} + +QOfonoManagerInterface::~QOfonoManagerInterface() +{ +} + +QStringList QOfonoManagerInterface::getModems() +{ + if (modemList.isEmpty()) { + QList argumentList; + QDBusPendingReply reply = callWithArgumentList(QDBus::Block, QLatin1String("GetModems"), argumentList); + reply.waitForFinished(); + if (!reply.isError()) { + foreach (ObjectPathProperties modem, reply.value()) { + modemList << modem.path.path(); + } + } + } + + return modemList; +} + +QString QOfonoManagerInterface::currentModem() +{ + QStringList modems = getModems(); + foreach (const QString &modem, modems) { + QOfonoModemInterface device(modem); + if (device.isPowered() && device.isOnline()) + return modem; + } + return QString(); +} + +void QOfonoManagerInterface::modemAdded(const QDBusObjectPath &path, const QVariantMap &/*var*/) +{ + if (!modemList.contains(path.path())) { + modemList << path.path(); + Q_EMIT modemChanged(); + } +} + +void QOfonoManagerInterface::modemRemoved(const QDBusObjectPath &path) +{ + if (modemList.contains(path.path())) { + modemList.removeOne(path.path()); + Q_EMIT modemChanged(); + } +} + + +QOfonoModemInterface::QOfonoModemInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QStringLiteral(OFONO_SERVICE), + dbusPathName, + OFONO_MODEM_INTERFACE, + QDBusConnection::systemBus(), parent) +{ + QDBusConnection::systemBus().connect(QStringLiteral(OFONO_SERVICE), + path(), + OFONO_MODEM_INTERFACE, + QStringLiteral("PropertyChanged"), + this,SLOT(propertyChanged(QString,QDBusVariant))); +} + +QOfonoModemInterface::~QOfonoModemInterface() +{ +} + +void QOfonoModemInterface::propertyChanged(const QString &name,const QDBusVariant &value) +{ + propertiesMap[name] = value.variant(); +} + +bool QOfonoModemInterface::isPowered() +{ + QVariant var = getProperty(QStringLiteral("Powered")); + return qdbus_cast(var); +} + +bool QOfonoModemInterface::isOnline() +{ + QVariant var = getProperty(QStringLiteral("Online")); + return qdbus_cast(var); +} + +QVariantMap QOfonoModemInterface::getProperties() +{ + if (propertiesMap.isEmpty()) { + QList argumentList; + QDBusPendingReply reply = callWithArgumentList(QDBus::Block, QLatin1String("GetProperties"), argumentList); + if (!reply.isError()) { + propertiesMap = reply.value(); + } + } + return propertiesMap; +} + +QVariant QOfonoModemInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) + var = map.value(property); + return var; +} + + +QOfonoNetworkRegistrationInterface::QOfonoNetworkRegistrationInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QStringLiteral(OFONO_SERVICE), + dbusPathName, + OFONO_NETWORK_REGISTRATION_INTERFACE, + QDBusConnection::systemBus(), parent) +{ +} + +QOfonoNetworkRegistrationInterface::~QOfonoNetworkRegistrationInterface() +{ +} + +QString QOfonoNetworkRegistrationInterface::getTechnology() +{ + QVariant var = getProperty(QStringLiteral("Technology")); + return qdbus_cast(var); +} + +QVariant QOfonoNetworkRegistrationInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) + var = map.value(property); + return var; +} + +QVariantMap QOfonoNetworkRegistrationInterface::getProperties() +{ + if (propertiesMap.isEmpty()) { + QList argumentList; + QDBusPendingReply reply = callWithArgumentList(QDBus::Block, QLatin1String("GetProperties"), argumentList); + reply.waitForFinished(); + if (!reply.isError()) { + propertiesMap = reply.value(); + } + } + return propertiesMap; +} + +QOfonoDataConnectionManagerInterface::QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_DATA_CONNECTION_MANAGER_INTERFACE, + QDBusConnection::systemBus(), parent) +{ + QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE), + path(), + QLatin1String(OFONO_MODEM_INTERFACE), + QLatin1String("PropertyChanged"), + this,SLOT(propertyChanged(QString,QDBusVariant))); +} + +QOfonoDataConnectionManagerInterface::~QOfonoDataConnectionManagerInterface() +{ +} + +QStringList QOfonoDataConnectionManagerInterface::contexts() +{ + if (contextList.isEmpty()) { + QDBusPendingReply reply = call(QLatin1String("GetContexts")); + reply.waitForFinished(); + if (!reply.isError()) { + foreach (ObjectPathProperties context, reply.value()) { + contextList << context.path.path(); + } + } + } + return contextList; +} + +bool QOfonoDataConnectionManagerInterface::roamingAllowed() +{ + QVariant var = getProperty(QStringLiteral("RoamingAllowed")); + return qdbus_cast(var); +} + +QString QOfonoDataConnectionManagerInterface::bearer() +{ + QVariant var = getProperty(QStringLiteral("Bearer")); + return qdbus_cast(var); +} + +QVariant QOfonoDataConnectionManagerInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) + var = map.value(property); + return var; +} + +QVariantMap QOfonoDataConnectionManagerInterface::getProperties() +{ + if (propertiesMap.isEmpty()) { + QList argumentList; + QDBusPendingReply reply = callWithArgumentList(QDBus::Block, QLatin1String("GetProperties"), argumentList); + if (!reply.isError()) { + propertiesMap = reply.value(); + } + } + return propertiesMap; +} + +void QOfonoDataConnectionManagerInterface::propertyChanged(const QString &name, const QDBusVariant &value) +{ + propertiesMap[name] = value.variant(); + if (name == QLatin1String("RoamingAllowed")) + Q_EMIT roamingAllowedChanged(value.variant().toBool()); +} + + +QOfonoConnectionContextInterface::QOfonoConnectionContextInterface(const QString &dbusPathName, QObject *parent) + : QDBusAbstractInterface(QLatin1String(OFONO_SERVICE), + dbusPathName, + OFONO_CONNECTION_CONTEXT_INTERFACE, + QDBusConnection::systemBus(), parent) +{ + QDBusConnection::systemBus().connect(QLatin1String(OFONO_SERVICE), + path(), + QLatin1String(OFONO_MODEM_INTERFACE), + QLatin1String("PropertyChanged"), + this,SLOT(propertyChanged(QString,QDBusVariant))); +} + +QOfonoConnectionContextInterface::~QOfonoConnectionContextInterface() +{ +} + +QVariantMap QOfonoConnectionContextInterface::getProperties() +{ + if (propertiesMap.isEmpty()) { + QList argumentList; + QDBusPendingReply reply = callWithArgumentList(QDBus::Block, QLatin1String("GetProperties"), argumentList); + if (!reply.isError()) { + propertiesMap = reply.value(); + } + } + return propertiesMap; +} + +void QOfonoConnectionContextInterface::propertyChanged(const QString &name, const QDBusVariant &value) +{ + propertiesMap[name] = value.variant(); +} + +QVariant QOfonoConnectionContextInterface::getProperty(const QString &property) +{ + QVariant var; + QVariantMap map = getProperties(); + if (map.contains(property)) + var = map.value(property); + return var; +} + +bool QOfonoConnectionContextInterface::active() +{ + QVariant var = getProperty(QStringLiteral("Active")); + return qdbus_cast(var); +} + +QString QOfonoConnectionContextInterface::accessPointName() +{ + QVariant var = getProperty(QStringLiteral("AccessPointName")); + return qdbus_cast(var); +} + +QString QOfonoConnectionContextInterface::name() +{ + QVariant var = getProperty(QStringLiteral("Name")); + return qdbus_cast(var); +} + +QT_END_NAMESPACE + +#endif // QT_NO_DBUS +#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h new file mode 100644 index 0000000000..2b3d43deb5 --- /dev/null +++ b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h @@ -0,0 +1,195 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QOFONOSERVICE_H +#define QOFONOSERVICE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifndef QT_NO_BEARERMANAGEMENT +#ifndef QT_NO_DBUS + +#define OFONO_SERVICE "org.ofono" +#define OFONO_MANAGER_INTERFACE "org.ofono.Manager" +#define OFONO_MANAGER_PATH "/" + +#define OFONO_MODEM_INTERFACE "org.ofono.Modem" +#define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration" +#define OFONO_DATA_CONNECTION_MANAGER_INTERFACE "org.ofono.ConnectionManager" +#define OFONO_CONNECTION_CONTEXT_INTERFACE "org.ofono.ConnectionContext" + +QT_BEGIN_NAMESPACE + +QT_END_NAMESPACE + +struct ObjectPathProperties +{ + QDBusObjectPath path; + QVariantMap properties; +}; +typedef QList PathPropertiesList; +Q_DECLARE_METATYPE(ObjectPathProperties) +Q_DECLARE_METATYPE (PathPropertiesList) + +QT_BEGIN_NAMESPACE + +class QOfonoManagerInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + QOfonoManagerInterface( QObject *parent = 0); + ~QOfonoManagerInterface(); + + QStringList getModems(); + QString currentModem(); +signals: + void modemChanged(); +private: + QStringList modemList; +private slots: + void modemAdded(const QDBusObjectPath &path, const QVariantMap &var); + void modemRemoved(const QDBusObjectPath &path); +}; + +class QOfonoModemInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + explicit QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent = 0); + ~QOfonoModemInterface(); + + bool isPowered(); + bool isOnline(); +private: + QVariantMap getProperties(); + QVariantMap propertiesMap; + QVariant getProperty(const QString &); + void propertyChanged(const QString &, const QDBusVariant &value); +}; + + +class QOfonoNetworkRegistrationInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + explicit QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent = 0); + ~QOfonoNetworkRegistrationInterface(); + + QString getTechnology(); + +private: + QVariantMap getProperties(); + QVariant getProperty(const QString &); + QVariantMap propertiesMap; +Q_SIGNALS: + void propertyChanged(const QString &, const QDBusVariant &value); +}; + +class QOfonoDataConnectionManagerInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + explicit QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent = 0); + ~QOfonoDataConnectionManagerInterface(); + + QStringList contexts(); + bool roamingAllowed(); + QVariant getProperty(const QString &); + QString bearer(); +Q_SIGNALS: + void roamingAllowedChanged(bool); +private: + QVariantMap getProperties(); + QVariantMap propertiesMap; + QStringList contextList; +private slots: + void propertyChanged(const QString &, const QDBusVariant &value); +}; + +class QOfonoConnectionContextInterface : public QDBusAbstractInterface +{ + Q_OBJECT + +public: + + explicit QOfonoConnectionContextInterface(const QString &dbusPathName, QObject *parent = 0); + ~QOfonoConnectionContextInterface(); + + QVariant getProperty(const QString &); + bool active(); + QString accessPointName(); + QString name(); + +Q_SIGNALS: +private: + QVariantMap getProperties(); + QVariantMap propertiesMap; +private slots: + void propertyChanged(const QString &, const QDBusVariant &value); +}; + +QT_END_NAMESPACE + +#endif // QT_NO_DBUS +#endif // QT_NO_BEARERMANAGEMENT + +#endif //QOFONOSERVICE_H diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro index 1ed9bfaa1b..b3a270615c 100644 --- a/src/plugins/bearer/networkmanager/networkmanager.pro +++ b/src/plugins/bearer/networkmanager/networkmanager.pro @@ -6,16 +6,16 @@ load(qt_plugin) QT = core network-private dbus -HEADERS += qnmdbushelper.h \ - qnetworkmanagerservice.h \ +HEADERS += qnetworkmanagerservice.h \ qnetworkmanagerengine.h \ + ../linux_common/qofonoservice_linux_p.h \ ../qnetworksession_impl.h \ ../qbearerengine_impl.h SOURCES += main.cpp \ - qnmdbushelper.cpp \ qnetworkmanagerservice.cpp \ qnetworkmanagerengine.cpp \ + ../linux_common/qofonoservice_linux.cpp \ ../qnetworksession_impl.cpp OTHER_FILES += networkmanager.json diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 5f49ea0b6d..f07d7b242b 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -47,6 +47,7 @@ #include #include #include +#include "../linux_common/qofonoservice_linux_p.h" #ifndef QT_NO_BEARERMANAGEMENT #ifndef QT_NO_DBUS @@ -57,44 +58,55 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent) : QBearerEngineImpl(parent), managerInterface(new QNetworkManagerInterface(this)), systemSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE, this)), - userSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE, this)) + ofonoManager(new QOfonoManagerInterface(this)), + ofonoNetwork(0), + ofonoContextManager(0) { + if (!managerInterface->isValid()) return; - managerInterface->setConnections(); + qDBusRegisterMetaType(); + connect(managerInterface, SIGNAL(deviceAdded(QDBusObjectPath)), this, SLOT(deviceAdded(QDBusObjectPath))); connect(managerInterface, SIGNAL(deviceRemoved(QDBusObjectPath)), this, SLOT(deviceRemoved(QDBusObjectPath))); connect(managerInterface, SIGNAL(activationFinished(QDBusPendingCallWatcher*)), this, SLOT(activationFinished(QDBusPendingCallWatcher*))); - connect(managerInterface, SIGNAL(propertiesChanged(QString,QMap)), - this, SLOT(interfacePropertiesChanged(QString,QMap))); - - qDBusRegisterMetaType(); + connect(managerInterface, SIGNAL(propertiesChanged(QMap)), + this, SLOT(interfacePropertiesChanged(QMap))); + managerInterface->setConnections(); - systemSettings->setConnections(); connect(systemSettings, SIGNAL(newConnection(QDBusObjectPath)), this, SLOT(newConnection(QDBusObjectPath))); - - userSettings->setConnections(); - connect(userSettings, SIGNAL(newConnection(QDBusObjectPath)), - this, SLOT(newConnection(QDBusObjectPath))); + systemSettings->setConnections(); } QNetworkManagerEngine::~QNetworkManagerEngine() { qDeleteAll(connections); + connections.clear(); qDeleteAll(accessPoints); + accessPoints.clear(); qDeleteAll(wirelessDevices); - qDeleteAll(activeConnections); + wirelessDevices.clear(); + qDeleteAll(activeConnectionsList); + activeConnectionsList.clear(); + qDeleteAll(interfaceDevices); + interfaceDevices.clear(); + + connectionInterfaces.clear(); } void QNetworkManagerEngine::initialize() { QMutexLocker locker(&mutex); + connect(ofonoManager,SIGNAL(modemChanged()),this,SLOT(changedModem())); + ofonoNetwork = new QOfonoNetworkRegistrationInterface(ofonoManager->currentModem(),this); + ofonoContextManager = new QOfonoDataConnectionManagerInterface(ofonoManager->currentModem(),this); + // Get current list of access points. foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { locker.unlock(); @@ -102,66 +114,44 @@ void QNetworkManagerEngine::initialize() locker.relock(); } - // Get connections. + // Get active connections. + foreach (const QDBusObjectPath &acPath, managerInterface->activeConnections()) { - foreach (const QDBusObjectPath &settingsPath, systemSettings->listConnections()) { - locker.unlock(); - if (!hasIdentifier(settingsPath.path())) - newConnection(settingsPath, systemSettings); //add system connection configs - locker.relock(); + QNetworkManagerConnectionActive *activeConnection = + new QNetworkManagerConnectionActive(acPath.path(),this); + activeConnectionsList.insert(acPath.path(), activeConnection); + connect(activeConnection, SIGNAL(propertiesChanged(QMap)), + this, SLOT(activeConnectionPropertiesChanged(QMap))); + activeConnection->setConnections(); + + QList devices = activeConnection->devices(); + if (!devices.isEmpty()) { + QNetworkManagerInterfaceDevice device(devices.at(0).path(),this); + connectionInterfaces.insert(activeConnection->connection().path(),device.networkInterface()); + } } - foreach (const QDBusObjectPath &settingsPath, userSettings->listConnections()) { + // Get connections. + foreach (const QDBusObjectPath &settingsPath, systemSettings->listConnections()) { locker.unlock(); if (!hasIdentifier(settingsPath.path())) - newConnection(settingsPath, userSettings); + newConnection(settingsPath, systemSettings); //add system connection configs locker.relock(); } - // Get active connections. - foreach (const QDBusObjectPath &acPath, managerInterface->activeConnections()) { - QNetworkManagerConnectionActive *activeConnection = - new QNetworkManagerConnectionActive(acPath.path(),this); - activeConnections.insert(acPath.path(), activeConnection); - - activeConnection->setConnections(); - connect(activeConnection, SIGNAL(propertiesChanged(QString,QMap)), - this, SLOT(activeConnectionPropertiesChanged(QString,QMap))); - } Q_EMIT updateCompleted(); } bool QNetworkManagerEngine::networkManagerAvailable() const { - QMutexLocker locker(&mutex); - return managerInterface->isValid(); } -QString QNetworkManagerEngine::getInterfaceFromId(const QString &id) +QString QNetworkManagerEngine::getInterfaceFromId(const QString &settingsPath) { - QMutexLocker locker(&mutex); - - foreach (const QDBusObjectPath &acPath, managerInterface->activeConnections()) { - QNetworkManagerConnectionActive activeConnection(acPath.path()); - - const QString identifier = activeConnection.connection().path(); - - if (id == identifier) { - QList devices = activeConnection.devices(); - - if (devices.isEmpty()) - continue; - - QNetworkManagerInterfaceDevice device(devices.at(0).path()); - return device.networkInterface(); - } - } - - return QString(); + return connectionInterfaces.value(settingsPath); } - bool QNetworkManagerEngine::hasIdentifier(const QString &id) { QMutexLocker locker(&mutex); @@ -177,35 +167,34 @@ void QNetworkManagerEngine::connectToId(const QString &id) if (!connection) return; - QNmSettingsMap map = connection->getSettings(); - const QString connectionType = map.value("connection").value("type").toString(); + NMDeviceType connectionType = connection->getType(); QString dbusDevicePath; - foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { - QNetworkManagerInterfaceDevice device(devicePath.path()); - if (device.deviceType() == DEVICE_TYPE_ETHERNET && - connectionType == QLatin1String("802-3-ethernet")) { - dbusDevicePath = devicePath.path(); + const QString settingsPath = connection->connectionInterface()->path(); + QString specificPath = configuredAccessPoints.key(settingsPath); + + QHashIterator i(interfaceDevices); + while (i.hasNext()) { + i.next(); + if (i.value()->deviceType() == DEVICE_TYPE_ETHERNET && + connectionType == DEVICE_TYPE_ETHERNET) { + dbusDevicePath = i.key(); break; - } else if (device.deviceType() == DEVICE_TYPE_WIFI && - connectionType == QLatin1String("802-11-wireless")) { - dbusDevicePath = devicePath.path(); + } else if (i.value()->deviceType() == DEVICE_TYPE_WIFI && + connectionType == DEVICE_TYPE_WIFI) { + dbusDevicePath = i.key(); break; - } else if (device.deviceType() == DEVICE_TYPE_MODEM && - connectionType == QLatin1String("gsm")) { - dbusDevicePath = devicePath.path(); + } else if (i.value()->deviceType() == DEVICE_TYPE_MODEM && + connectionType == DEVICE_TYPE_MODEM) { + dbusDevicePath = i.key(); break; } } - const QString service = connection->connectionInterface()->service(); - const QString settingsPath = connection->connectionInterface()->path(); - QString specificPath = configuredAccessPoints.key(settingsPath); - if (specificPath.isEmpty()) specificPath = "/"; - managerInterface->activateConnection(service, QDBusObjectPath(settingsPath), + managerInterface->activateConnection(QDBusObjectPath(settingsPath), QDBusObjectPath(dbusDevicePath), QDBusObjectPath(specificPath)); } @@ -221,13 +210,11 @@ void QNetworkManagerEngine::disconnectFromId(const QString &id) return; } - foreach (const QDBusObjectPath &acPath, managerInterface->activeConnections()) { - QNetworkManagerConnectionActive activeConnection(acPath.path()); - - const QString identifier = activeConnection.connection().path(); - - if (id == identifier && accessPointConfigurations.contains(id)) { - managerInterface->deactivateConnection(acPath); + QHashIterator i(activeConnectionsList); + while (i.hasNext()) { + i.next(); + if (id == i.value()->connection().path() && accessPointConfigurations.contains(id)) { + managerInterface->deactivateConnection(QDBusObjectPath(i.key())); break; } } @@ -250,12 +237,9 @@ void QNetworkManagerEngine::scanFinished() QMetaObject::invokeMethod(this, "updateCompleted", Qt::QueuedConnection); } -void QNetworkManagerEngine::interfacePropertiesChanged(const QString &path, - const QMap &properties) +void QNetworkManagerEngine::interfacePropertiesChanged(const QMap &properties) { - Q_UNUSED(path) QMutexLocker locker(&mutex); - QMapIterator i(properties); while (i.hasNext()) { i.next(); @@ -267,22 +251,20 @@ void QNetworkManagerEngine::interfacePropertiesChanged(const QString &path, qdbus_cast >(i.value().value()); QStringList identifiers = accessPointConfigurations.keys(); - foreach (const QString &id, identifiers) - QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); - - QStringList priorActiveConnections = this->activeConnections.keys(); + QStringList priorActiveConnections = activeConnectionsList.keys(); foreach (const QDBusObjectPath &acPath, activeConnections) { priorActiveConnections.removeOne(acPath.path()); QNetworkManagerConnectionActive *activeConnection = - this->activeConnections.value(acPath.path()); + activeConnectionsList.value(acPath.path()); + if (!activeConnection) { activeConnection = new QNetworkManagerConnectionActive(acPath.path(),this); - this->activeConnections.insert(acPath.path(), activeConnection); + activeConnectionsList.insert(acPath.path(), activeConnection); + connect(activeConnection, SIGNAL(propertiesChanged(QMap)), + this, SLOT(activeConnectionPropertiesChanged(QMap))); activeConnection->setConnections(); - connect(activeConnection, SIGNAL(propertiesChanged(QString,QMap)), - this, SLOT(activeConnectionPropertiesChanged(QString,QMap))); } const QString id = activeConnection->connection().path(); @@ -295,6 +277,11 @@ void QNetworkManagerEngine::interfacePropertiesChanged(const QString &path, if (activeConnection->state() == NM_ACTIVE_CONNECTION_STATE_ACTIVATED && ptr->state != QNetworkConfiguration::Active) { ptr->state = QNetworkConfiguration::Active; + + if (activeConnectionsList.value(id) && activeConnectionsList.value(id)->defaultRoute() + && managerInterface->state() < QNetworkManagerInterface::NM_STATE_CONNECTED_GLOBAL) { + ptr->purpose = QNetworkConfiguration::PrivatePurpose; + } ptr->mutex.unlock(); locker.unlock(); @@ -307,7 +294,7 @@ void QNetworkManagerEngine::interfacePropertiesChanged(const QString &path, } while (!priorActiveConnections.isEmpty()) - delete this->activeConnections.take(priorActiveConnections.takeFirst()); + delete activeConnectionsList.take(priorActiveConnections.takeFirst()); while (!identifiers.isEmpty()) { QNetworkConfigurationPrivatePointer ptr = @@ -330,14 +317,13 @@ void QNetworkManagerEngine::interfacePropertiesChanged(const QString &path, } } -void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QString &path, - const QMap &properties) +void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QMap &properties) { QMutexLocker locker(&mutex); Q_UNUSED(properties) - QNetworkManagerConnectionActive *activeConnection = activeConnections.value(path); + QNetworkManagerConnectionActive *activeConnection = qobject_cast(sender()); if (!activeConnection) return; @@ -347,8 +333,13 @@ void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QString &pat QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); if (ptr) { ptr->mutex.lock(); - if (activeConnection->state() == NM_ACTIVE_CONNECTION_STATE_ACTIVATED && - ptr->state != QNetworkConfiguration::Active) { + if (properties.value("State").toUInt() == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) { + QList devices = activeConnection->devices(); + if (!devices.isEmpty()) { + QNetworkManagerInterfaceDevice device(devices.at(0).path(),this); + connectionInterfaces.insert(id,device.networkInterface()); + } + ptr->state |= QNetworkConfiguration::Active; ptr->mutex.unlock(); @@ -356,22 +347,17 @@ void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QString &pat emit configurationChanged(ptr); locker.relock(); } else { + connectionInterfaces.remove(id); ptr->mutex.unlock(); } } } -void QNetworkManagerEngine::devicePropertiesChanged(const QString &/*path*/,quint32 /*state*/) -{ -// Q_UNUSED(path); -// Q_UNUSED(state) -} - -void QNetworkManagerEngine::deviceConnectionsChanged(const QStringList &activeConnectionsList) +void QNetworkManagerEngine::deviceConnectionsChanged(const QStringList &connectionsList) { QMutexLocker locker(&mutex); for (int i = 0; i < connections.count(); ++i) { - if (activeConnectionsList.contains(connections.at(i)->connectionInterface()->path())) + if (connectionsList.contains(connections.at(i)->connectionInterface()->path())) continue; const QString settingsPath = connections.at(i)->connectionInterface()->path(); @@ -392,27 +378,23 @@ void QNetworkManagerEngine::deviceConnectionsChanged(const QStringList &activeCo void QNetworkManagerEngine::deviceAdded(const QDBusObjectPath &path) { - QMutexLocker locker(&mutex); QNetworkManagerInterfaceDevice *iDevice; iDevice = new QNetworkManagerInterfaceDevice(path.path(),this); connect(iDevice,SIGNAL(connectionsChanged(QStringList)), this,SLOT(deviceConnectionsChanged(QStringList))); - connect(iDevice,SIGNAL(stateChanged(QString,quint32)), - this,SLOT(devicePropertiesChanged(QString,quint32))); iDevice->setConnections(); interfaceDevices.insert(path.path(),iDevice); - if (iDevice->deviceType() == DEVICE_TYPE_WIFI) { QNetworkManagerInterfaceDeviceWireless *wirelessDevice = new QNetworkManagerInterfaceDeviceWireless(iDevice->connectionInterface()->path(),this); - wirelessDevice->setConnections(); connect(wirelessDevice, SIGNAL(accessPointAdded(QString)), this, SLOT(newAccessPoint(QString))); connect(wirelessDevice, SIGNAL(accessPointRemoved(QString)), this, SLOT(removeAccessPoint(QString))); connect(wirelessDevice,SIGNAL(scanDone()),this,SLOT(scanFinished())); + wirelessDevice->setConnections(); foreach (const QDBusObjectPath &apPath, wirelessDevice->getAccessPoints()) newAccessPoint(apPath.path()); @@ -444,10 +426,10 @@ void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path, if (!settings) settings = qobject_cast(sender()); - if (!settings) + if (!settings) { return; + } - settings->deleteLater(); QNetworkManagerSettingsConnection *connection = new QNetworkManagerSettingsConnection(settings->connectionInterface()->service(), path.path(),this); @@ -482,12 +464,10 @@ void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path, parseConnection(settingsPath, connection->getSettings()); // Check if connection is active. - foreach (const QDBusObjectPath &acPath, managerInterface->activeConnections()) { - QNetworkManagerConnectionActive activeConnection(acPath.path()); - - if (activeConnection.defaultRoute() && - activeConnection.connection().path() == settingsPath && - activeConnection.state() == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) { + QHashIterator i(activeConnectionsList); + while (i.hasNext()) { + i.next(); + if (i.value()->connection().path() == settingsPath) { cpPriv->state |= QNetworkConfiguration::Active; break; } @@ -505,6 +485,7 @@ void QNetworkManagerEngine::removeConnection(const QString &path) QNetworkManagerSettingsConnection *connection = qobject_cast(sender()); + if (!connection) return; @@ -525,6 +506,7 @@ void QNetworkManagerEngine::removeConnection(const QString &path) while (i.hasNext()) { i.next(); if (i.value() == path) { + configuredAccessPoints.remove(i.key()); newAccessPoint(i.key()); } } @@ -575,10 +557,9 @@ void QNetworkManagerEngine::updateConnection() void QNetworkManagerEngine::activationFinished(QDBusPendingCallWatcher *watcher) { QMutexLocker locker(&mutex); - + QDBusPendingReply reply(*watcher); watcher->deleteLater(); - QDBusPendingReply reply(*watcher); if (!reply.isError()) { QDBusObjectPath result = reply.value(); @@ -620,15 +601,14 @@ void QNetworkManagerEngine::newAccessPoint(const QString &path) if (okToAdd) { accessPoints.append(accessPoint); accessPoint->setConnections(); - connect(accessPoint, SIGNAL(propertiesChanged(QMap)), - this, SLOT(updateAccessPoint(QMap))); } - // Check if configuration exists for connection. if (!accessPoint->ssid().isEmpty()) { + for (int i = 0; i < connections.count(); ++i) { QNetworkManagerSettingsConnection *connection = connections.at(i); const QString settingsPath = connection->connectionInterface()->path(); + if (accessPoint->ssid() == connection->getSsid()) { if (!configuredAccessPoints.contains(path)) { configuredAccessPoints.insert(path,settingsPath); @@ -655,11 +635,7 @@ void QNetworkManagerEngine::newAccessPoint(const QString &path) ptr->isValid = true; ptr->id = path; ptr->type = QNetworkConfiguration::InternetAccessPoint; - if (accessPoint->flags() == NM_802_11_AP_FLAGS_PRIVACY) { - ptr->purpose = QNetworkConfiguration::PrivatePurpose; - } else { - ptr->purpose = QNetworkConfiguration::PublicPurpose; - } + ptr->purpose = QNetworkConfiguration::PublicPurpose; ptr->state = QNetworkConfiguration::Undefined; ptr->bearerType = QNetworkConfiguration::BearerWLAN; @@ -674,13 +650,13 @@ void QNetworkManagerEngine::removeAccessPoint(const QString &path) QMutexLocker locker(&mutex); for (int i = 0; i < accessPoints.count(); ++i) { QNetworkManagerInterfaceAccessPoint *accessPoint = accessPoints.at(i); - if (accessPoint->connectionInterface()->path() == path) { accessPoints.removeOne(accessPoint); if (configuredAccessPoints.contains(accessPoint->connectionInterface()->path())) { // find connection and change state to Defined configuredAccessPoints.remove(accessPoint->connectionInterface()->path()); + for (int i = 0; i < connections.count(); ++i) { QNetworkManagerSettingsConnection *connection = connections.at(i); @@ -705,8 +681,6 @@ void QNetworkManagerEngine::removeAccessPoint(const QString &path) accessPointConfigurations.take(path); if (ptr) { - locker.unlock(); - locker.unlock(); emit configurationRemoved(ptr); locker.relock(); @@ -718,42 +692,9 @@ void QNetworkManagerEngine::removeAccessPoint(const QString &path) } } -void QNetworkManagerEngine::updateAccessPoint(const QMap &map) -{ - QMutexLocker locker(&mutex); - - Q_UNUSED(map) - - QNetworkManagerInterfaceAccessPoint *accessPoint = - qobject_cast(sender()); - if (!accessPoint) - return; - accessPoint->deleteLater(); - for (int i = 0; i < connections.count(); ++i) { - QNetworkManagerSettingsConnection *connection = connections.at(i); - - if (accessPoint->ssid() == connection->getSsid()) { - const QString settingsPath = connection->connectionInterface()->path(); - const QString connectionId = settingsPath; - - QNetworkConfigurationPrivatePointer ptr = - accessPointConfigurations.value(connectionId); - ptr->mutex.lock(); - QNetworkConfiguration::StateFlags flag = QNetworkConfiguration::Defined; - ptr->state = (flag | QNetworkConfiguration::Discovered); - ptr->mutex.unlock(); - - locker.unlock(); - emit configurationChanged(ptr); - return; - } - } -} - QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QString &settingsPath, const QNmSettingsMap &map) { - // Q_UNUSED(service); QMutexLocker locker(&mutex); QNetworkConfigurationPrivate *cpPriv = new QNetworkConfigurationPrivate; cpPriv->name = map.value("connection").value("id").toString(); @@ -765,17 +706,15 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri cpPriv->purpose = QNetworkConfiguration::PublicPurpose; cpPriv->state = QNetworkConfiguration::Defined; - const QString connectionType = map.value("connection").value("type").toString(); if (connectionType == QLatin1String("802-3-ethernet")) { cpPriv->bearerType = QNetworkConfiguration::BearerEthernet; - cpPriv->purpose = QNetworkConfiguration::PublicPurpose; foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { - QNetworkManagerInterfaceDevice device(devicePath.path()); + QNetworkManagerInterfaceDevice device(devicePath.path(),this); if (device.deviceType() == DEVICE_TYPE_ETHERNET) { - QNetworkManagerInterfaceDeviceWired wiredDevice(device.connectionInterface()->path()); + QNetworkManagerInterfaceDeviceWired wiredDevice(device.connectionInterface()->path(),this); if (wiredDevice.carrier()) { cpPriv->state |= QNetworkConfiguration::Discovered; break; @@ -786,12 +725,6 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri cpPriv->bearerType = QNetworkConfiguration::BearerWLAN; const QString connectionSsid = map.value("802-11-wireless").value("ssid").toString(); - const QString connectionSecurity = map.value("802-11-wireless").value("security").toString(); - if (!connectionSecurity.isEmpty()) { - cpPriv->purpose = QNetworkConfiguration::PrivatePurpose; - } else { - cpPriv->purpose = QNetworkConfiguration::PublicPurpose; - } for (int i = 0; i < accessPoints.count(); ++i) { if (connectionSsid == accessPoints.at(i)->ssid() && map.value("802-11-wireless").value("seen-bssids").toStringList().contains(accessPoints.at(i)->hwAddress())) { @@ -813,31 +746,11 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri } } } else if (connectionType == QLatin1String("gsm")) { - - foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { - QNetworkManagerInterfaceDevice device(devicePath.path()); - - if (device.deviceType() == DEVICE_TYPE_MODEM) { - QNetworkManagerInterfaceDeviceModem deviceModem(device.connectionInterface()->path(),this); - switch (deviceModem.currentCapabilities()) { - case 2: - cpPriv->bearerType = QNetworkConfiguration::Bearer2G; - break; - case 4: - cpPriv->bearerType = QNetworkConfiguration::Bearer3G; - break; - case 8: - cpPriv->bearerType = QNetworkConfiguration::Bearer4G; - break; - default: - cpPriv->bearerType = QNetworkConfiguration::BearerUnknown; - break; - }; - } + cpPriv->bearerType = currentBearerType(); + if (map.value("connection").contains("timestamp")) { + cpPriv->state |= QNetworkConfiguration::Discovered; } - - cpPriv->purpose = QNetworkConfiguration::PrivatePurpose; - cpPriv->state |= QNetworkConfiguration::Discovered; + cpPriv->name = contextName(map.value("connection").value("id").toString()); } return cpPriv; @@ -857,7 +770,6 @@ QNetworkManagerSettingsConnection *QNetworkManagerEngine::connectionFromId(const QNetworkSession::State QNetworkManagerEngine::sessionStateForId(const QString &id) { QMutexLocker locker(&mutex); - QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); if (!ptr) @@ -866,8 +778,8 @@ QNetworkSession::State QNetworkManagerEngine::sessionStateForId(const QString &i if (!ptr->isValid) return QNetworkSession::Invalid; - foreach (const QString &acPath, activeConnections.keys()) { - QNetworkManagerConnectionActive *activeConnection = activeConnections.value(acPath); + foreach (const QString &acPath, activeConnectionsList.keys()) { + QNetworkManagerConnectionActive *activeConnection = activeConnectionsList.value(acPath); const QString identifier = activeConnection->connection().path(); @@ -899,7 +811,7 @@ quint64 QNetworkManagerEngine::bytesWritten(const QString &id) QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); if (ptr && (ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { - const QString networkInterface = getInterfaceFromId(id); + const QString networkInterface = connectionInterfaces.value(id); if (!networkInterface.isEmpty()) { const QString devFile = QLatin1String("/sys/class/net/") + networkInterface + @@ -927,7 +839,7 @@ quint64 QNetworkManagerEngine::bytesReceived(const QString &id) QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); if (ptr && (ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { - const QString networkInterface = getInterfaceFromId(id); + const QString networkInterface = connectionInterfaces.value(id); if (!networkInterface.isEmpty()) { const QString devFile = QLatin1String("/sys/class/net/") + networkInterface + @@ -977,6 +889,54 @@ QNetworkConfigurationPrivatePointer QNetworkManagerEngine::defaultConfiguration( return QNetworkConfigurationPrivatePointer(); } +void QNetworkManagerEngine::changedModem() +{ + if (ofonoNetwork) + delete ofonoNetwork; + + ofonoNetwork = new QOfonoNetworkRegistrationInterface(ofonoManager->currentModem(),this); + + if (ofonoContextManager) + delete ofonoContextManager; + ofonoContextManager = new QOfonoDataConnectionManagerInterface(ofonoManager->currentModem(),this); +} + +QNetworkConfiguration::BearerType QNetworkManagerEngine::currentBearerType() +{ + if (ofonoContextManager) { + QString bearer = ofonoContextManager->bearer(); + if (bearer == QLatin1String("gsm")) { + return QNetworkConfiguration::Bearer2G; + } else if (bearer == QLatin1String("edge")) { + return QNetworkConfiguration::Bearer2G; + } else if (bearer == QLatin1String("umts")) { + return QNetworkConfiguration::BearerWCDMA; + } else if (bearer == QLatin1String("hspa") + || bearer == QLatin1String("hsdpa") + || bearer == QLatin1String("hsupa")) { + return QNetworkConfiguration::BearerHSPA; + } else if (bearer == QLatin1String("lte")) { + return QNetworkConfiguration::BearerLTE; + } + } + return QNetworkConfiguration::BearerUnknown; +} + +QString QNetworkManagerEngine::contextName(const QString &path) +{ + if (ofonoContextManager) { + QString contextPart = path.section('/', -1); + + Q_FOREACH (const QString &oContext, ofonoContextManager->contexts()) { + if (oContext.contains(contextPart)) { + QOfonoConnectionContextInterface contextInterface(oContext,this); + return contextInterface.name(); + } + } + } + return path; +} + QT_END_NAMESPACE #endif // QT_NO_DBUS diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h index ab1cfea71e..d2ef9886a3 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h @@ -49,6 +49,8 @@ #include "qnetworkmanagerservice.h" +#include "../linux_common/qofonoservice_linux_p.h" + #include #include @@ -89,11 +91,8 @@ public: QNetworkConfigurationPrivatePointer defaultConfiguration(); private Q_SLOTS: - void interfacePropertiesChanged(const QString &path, - const QMap &properties); - void activeConnectionPropertiesChanged(const QString &path, - const QMap &properties); - void devicePropertiesChanged(const QString &path, quint32); + void interfacePropertiesChanged(const QMap &properties); + void activeConnectionPropertiesChanged(const QMap &properties); void deviceAdded(const QDBusObjectPath &path); void deviceRemoved(const QDBusObjectPath &path); @@ -106,8 +105,8 @@ private Q_SLOTS: void newAccessPoint(const QString &path); void removeAccessPoint(const QString &path); - void updateAccessPoint(const QMap &map); void scanFinished(); + void changedModem(); private: QNetworkConfigurationPrivate *parseConnection(const QString &settingsPath, @@ -116,14 +115,21 @@ private: QNetworkManagerInterface *managerInterface; QNetworkManagerSettings *systemSettings; - QNetworkManagerSettings *userSettings; QHash wirelessDevices; - QHash activeConnections; + QHash activeConnectionsList; QList connections; QList accessPoints; QHash interfaceDevices; QMap configuredAccessPoints; //ap, settings path + QHash connectionInterfaces; // ac, interface + + QOfonoManagerInterface *ofonoManager; + QOfonoNetworkRegistrationInterface *ofonoNetwork; + QOfonoDataConnectionManagerInterface *ofonoContextManager; + QNetworkConfiguration::BearerType currentBearerType(); + QString contextName(const QString &path); + }; QT_END_NAMESPACE diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp index f249ac6100..2d54fa3029 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp @@ -44,7 +44,6 @@ #include #include "qnetworkmanagerservice.h" -#include "qnmdbushelper.h" #ifndef QT_NO_DBUS @@ -64,18 +63,38 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent) d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), QLatin1String(NM_DBUS_PATH), QLatin1String(NM_DBUS_INTERFACE), - QDBusConnection::systemBus()); + QDBusConnection::systemBus(),parent); if (!d->connectionInterface->isValid()) { d->valid = false; return; } d->valid = true; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap)), - this,SIGNAL(propertiesChanged(QString,QMap))); - connect(nmDBusHelper,SIGNAL(pathForStateChanged(QString,quint32)), - this, SIGNAL(stateChanged(QString,quint32))); + QDBusInterface managerPropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + QLatin1String(NM_DBUS_PATH), + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus()); + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE); + QDBusPendingReply propsReply + = managerPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } + + QDBusPendingReply > nmReply + = d->connectionInterface->call(QLatin1String("GetDevices")); + nmReply.waitForFinished(); + if (!nmReply.isError()) { + devicesPathList = nmReply.value(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + QLatin1String(NM_DBUS_PATH), + QLatin1String(NM_DBUS_INTERFACE), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); } QNetworkManagerInterface::~QNetworkManagerInterface() @@ -91,27 +110,24 @@ bool QNetworkManagerInterface::isValid() bool QNetworkManagerInterface::setConnections() { - if(!isValid() ) + if (!isValid()) return false; - QDBusConnection dbusConnection = QDBusConnection::systemBus(); - - bool allOk = false; - if (dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), QLatin1String(NM_DBUS_PATH), QLatin1String(NM_DBUS_INTERFACE), QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(slotPropertiesChanged(QMap)))) { - allOk = true; - } - if (dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), + this,SLOT(propertiesSwap(QMap))); + + bool allOk = false; + if (QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), QLatin1String(NM_DBUS_PATH), QLatin1String(NM_DBUS_INTERFACE), QLatin1String("DeviceAdded"), this,SIGNAL(deviceAdded(QDBusObjectPath)))) { allOk = true; } - if (dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), + if (QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), QLatin1String(NM_DBUS_PATH), QLatin1String(NM_DBUS_INTERFACE), QLatin1String("DeviceRemoved"), @@ -127,14 +143,17 @@ QDBusInterface *QNetworkManagerInterface::connectionInterface() const return d->connectionInterface; } -QList QNetworkManagerInterface::getDevices() const +QList QNetworkManagerInterface::getDevices() { - QDBusReply > reply = d->connectionInterface->call(QLatin1String("GetDevices")); - return reply.value(); + if (devicesPathList.isEmpty()) { + qWarning() << "using blocking call!"; + QDBusReply > reply = d->connectionInterface->call(QLatin1String("GetDevices")); + devicesPathList = reply.value(); + } + return devicesPathList; } -void QNetworkManagerInterface::activateConnection( const QString &, - QDBusObjectPath connectionPath, +void QNetworkManagerInterface::activateConnection(QDBusObjectPath connectionPath, QDBusObjectPath devicePath, QDBusObjectPath specificObject) { @@ -150,28 +169,80 @@ void QNetworkManagerInterface::activateConnection( const QString &, void QNetworkManagerInterface::deactivateConnection(QDBusObjectPath connectionPath) const { - d->connectionInterface->call(QLatin1String("DeactivateConnection"), QVariant::fromValue(connectionPath)); + d->connectionInterface->asyncCall(QLatin1String("DeactivateConnection"), QVariant::fromValue(connectionPath)); } bool QNetworkManagerInterface::wirelessEnabled() const { - return d->connectionInterface->property("WirelessEnabled").toBool(); + if (propertyMap.contains("WirelessEnabled")) + return propertyMap.value("WirelessEnabled").toBool(); + return false; } bool QNetworkManagerInterface::wirelessHardwareEnabled() const { - return d->connectionInterface->property("WirelessHardwareEnabled").toBool(); + if (propertyMap.contains("WirelessHardwareEnabled")) + return propertyMap.value("WirelessHardwareEnabled").toBool(); + return false; } QList QNetworkManagerInterface::activeConnections() const { - QVariant prop = d->connectionInterface->property("ActiveConnections"); - return prop.value >(); + if (propertyMap.contains("ActiveConnections")) { + + const QDBusArgument &dbusArgs = propertyMap.value("ActiveConnections").value(); + QDBusObjectPath path; + QList list; + + dbusArgs.beginArray(); + while (!dbusArgs.atEnd()) { + dbusArgs >> path; + list.append(path); + } + dbusArgs.endArray(); + + return list; + } + + QList list; + list << QDBusObjectPath(); + return list; +} + +QNetworkManagerInterface::NMState QNetworkManagerInterface::state() +{ + if (propertyMap.contains("State")) + return static_cast(propertyMap.value("State").toUInt()); + return QNetworkManagerInterface::NM_STATE_UNKNOWN; } -quint32 QNetworkManagerInterface::state() +QString QNetworkManagerInterface::version() const { - return d->connectionInterface->property("State").toUInt(); + if (propertyMap.contains("Version")) + return propertyMap.value("Version").toString(); + return QString(); +} + +void QNetworkManagerInterface::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + propertyMap.insert(i.key(),i.value()); + + if (i.key() == QStringLiteral("State")) { + quint32 state = i.value().toUInt(); + if (state == NM_DEVICE_STATE_ACTIVATED + || state == NM_DEVICE_STATE_DISCONNECTED + || state == NM_DEVICE_STATE_UNAVAILABLE + || state == NM_DEVICE_STATE_FAILED) { + Q_EMIT propertiesChanged(map); + Q_EMIT stateChanged(state); + } + } else if (i.key() == QStringLiteral("ActiveConnections")) { + Q_EMIT propertiesChanged(map); + } + } } class QNetworkManagerInterfaceAccessPointPrivate @@ -183,18 +254,38 @@ public: }; QNetworkManagerInterfaceAccessPoint::QNetworkManagerInterfaceAccessPoint(const QString &dbusPathName, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { d = new QNetworkManagerInterfaceAccessPointPrivate(); d->path = dbusPathName; d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT), - QDBusConnection::systemBus()); + QDBusConnection::systemBus(),parent); if (!d->connectionInterface->isValid()) { d->valid = false; return; } + QDBusInterface accessPointPropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus()); + + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT); + QDBusPendingReply propsReply + = accessPointPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); + d->valid = true; } @@ -212,24 +303,10 @@ bool QNetworkManagerInterfaceAccessPoint::isValid() bool QNetworkManagerInterfaceAccessPoint::setConnections() { - if(!isValid() ) + if (!isValid()) return false; - bool allOk = false; - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap)), - this,SIGNAL(propertiesChanged(QString,QMap))); - - if (QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT), - QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(slotPropertiesChanged(QMap))) ) { - allOk = true; - - } - return allOk; + return true; } QDBusInterface *QNetworkManagerInterfaceAccessPoint::connectionInterface() const @@ -239,47 +316,74 @@ QDBusInterface *QNetworkManagerInterfaceAccessPoint::connectionInterface() const quint32 QNetworkManagerInterfaceAccessPoint::flags() const { - return d->connectionInterface->property("Flags").toUInt(); + if (propertyMap.contains("Flags")) + return propertyMap.value("Flags").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceAccessPoint::wpaFlags() const { - return d->connectionInterface->property("WpaFlags").toUInt(); + if (propertyMap.contains("WpaFlags")) + return propertyMap.value("WpaFlags").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceAccessPoint::rsnFlags() const { - return d->connectionInterface->property("RsnFlags").toUInt(); + if (propertyMap.contains("RsnFlags")) + return propertyMap.value("RsnFlags").toUInt(); + return 0; } QString QNetworkManagerInterfaceAccessPoint::ssid() const { - return d->connectionInterface->property("Ssid").toString(); + if (propertyMap.contains("Ssid")) + return propertyMap.value("Ssid").toString(); + return QString(); } quint32 QNetworkManagerInterfaceAccessPoint::frequency() const { - return d->connectionInterface->property("Frequency").toUInt(); + if (propertyMap.contains("Frequency")) + return propertyMap.value("Frequency").toUInt(); + return 0; } QString QNetworkManagerInterfaceAccessPoint::hwAddress() const { - return d->connectionInterface->property("HwAddress").toString(); + if (propertyMap.contains("HwAddress")) + return propertyMap.value("HwAddress").toString(); + return QString(); } quint32 QNetworkManagerInterfaceAccessPoint::mode() const { - return d->connectionInterface->property("Mode").toUInt(); + if (propertyMap.contains("Mode")) + return propertyMap.value("Mode").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceAccessPoint::maxBitrate() const { - return d->connectionInterface->property("MaxBitrate").toUInt(); + if (propertyMap.contains("MaxBitrate")) + return propertyMap.value("MaxBitrate").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceAccessPoint::strength() const { - return d->connectionInterface->property("Strength").toUInt(); + if (propertyMap.contains("Strength")) + return propertyMap.value("Strength").toUInt(); + return 0; +} + +void QNetworkManagerInterfaceAccessPoint::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + propertyMap.insert(i.key(),i.value()); + } } class QNetworkManagerInterfaceDevicePrivate @@ -291,18 +395,39 @@ public: }; QNetworkManagerInterfaceDevice::QNetworkManagerInterfaceDevice(const QString &deviceObjectPath, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { + d = new QNetworkManagerInterfaceDevicePrivate(); d->path = deviceObjectPath; d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, QLatin1String(NM_DBUS_INTERFACE_DEVICE), - QDBusConnection::systemBus()); + QDBusConnection::systemBus(),parent); if (!d->connectionInterface->isValid()) { d->valid = false; return; } + QDBusInterface devicePropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus(),parent); + + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE); + QDBusPendingReply propsReply + = devicePropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String(NM_DBUS_INTERFACE_DEVICE), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); d->valid = true; } @@ -319,35 +444,10 @@ bool QNetworkManagerInterfaceDevice::isValid() bool QNetworkManagerInterfaceDevice::setConnections() { - if(!isValid() ) + if (!isValid()) return false; - bool allOk = true; - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper,SIGNAL(pathForStateChanged(QString,quint32)), - this, SIGNAL(stateChanged(QString,quint32))); - - if (QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_DEVICE), - QLatin1String("StateChanged"), - nmDBusHelper,SLOT(deviceStateChanged(quint32)))) { - allOk = false; - } - - connect(nmDBusHelper, SIGNAL(pathForConnectionsChanged(QStringList)), - this,SIGNAL(connectionsChanged(QStringList))); - - if (QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT), - QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(slotPropertiesChanged(QMap))) ) { - allOk = false; - } - - return allOk; + return true; } QDBusInterface *QNetworkManagerInterfaceDevice::connectionInterface() const @@ -357,33 +457,66 @@ QDBusInterface *QNetworkManagerInterfaceDevice::connectionInterface() const QString QNetworkManagerInterfaceDevice::udi() const { - return d->connectionInterface->property("Udi").toString(); + if (propertyMap.contains("Udi")) + return propertyMap.value("Udi").toString(); + return QString(); } QString QNetworkManagerInterfaceDevice::networkInterface() const { - return d->connectionInterface->property("Interface").toString(); + if (propertyMap.contains("Interface")) + return propertyMap.value("Interface").toString(); + return QString(); } quint32 QNetworkManagerInterfaceDevice::ip4Address() const { - return d->connectionInterface->property("Ip4Address").toUInt(); + if (propertyMap.contains("Ip4Address")) + return propertyMap.value("Ip4Address").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceDevice::state() const { - return d->connectionInterface->property("State").toUInt(); + if (propertyMap.contains("State")) + return propertyMap.value("State").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceDevice::deviceType() const { - return d->connectionInterface->property("DeviceType").toUInt(); + if (propertyMap.contains("DeviceType")) + return propertyMap.value("DeviceType").toUInt(); + return 0; } QDBusObjectPath QNetworkManagerInterfaceDevice::ip4config() const { - QVariant prop = d->connectionInterface->property("Ip4Config"); - return prop.value(); + if (propertyMap.contains("Ip4Config")) + return propertyMap.value("Ip4Config").value(); + return QDBusObjectPath(); +} + +void QNetworkManagerInterfaceDevice::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + if (i.key() == QStringLiteral("AvailableConnections")) { //Device + const QDBusArgument &dbusArgs = i.value().value(); + QDBusObjectPath path; + QStringList paths; + dbusArgs.beginArray(); + while (!dbusArgs.atEnd()) { + dbusArgs >> path; + paths << path.path(); + } + dbusArgs.endArray(); + Q_EMIT connectionsChanged(paths); + } + propertyMap.insert(i.key(),i.value()); + } + Q_EMIT propertiesChanged(map); } class QNetworkManagerInterfaceDeviceWiredPrivate @@ -395,7 +528,7 @@ public: }; QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const QString &ifaceDevicePath, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { d = new QNetworkManagerInterfaceDeviceWiredPrivate(); d->path = ifaceDevicePath; @@ -407,6 +540,27 @@ QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const Q d->valid = false; return; } + QDBusInterface deviceWiredPropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus(),parent); + + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED); + QDBusPendingReply propsReply + = deviceWiredPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); + d->valid = true; } @@ -424,23 +578,9 @@ bool QNetworkManagerInterfaceDeviceWired::isValid() bool QNetworkManagerInterfaceDeviceWired::setConnections() { - if(!isValid() ) + if (!isValid()) return false; - - bool allOk = true; - - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap)), - this,SIGNAL(propertiesChanged(QString,QMap))); - if (!QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED), - QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(slotPropertiesChanged(QMap))) ) { - allOk = false; - } - return allOk; + return true; } QDBusInterface *QNetworkManagerInterfaceDeviceWired::connectionInterface() const @@ -450,17 +590,33 @@ QDBusInterface *QNetworkManagerInterfaceDeviceWired::connectionInterface() const QString QNetworkManagerInterfaceDeviceWired::hwAddress() const { - return d->connectionInterface->property("HwAddress").toString(); + if (propertyMap.contains("HwAddress")) + return propertyMap.value("HwAddress").toString(); + return QString(); } quint32 QNetworkManagerInterfaceDeviceWired::speed() const { - return d->connectionInterface->property("Speed").toUInt(); + if (propertyMap.contains("Speed")) + return propertyMap.value("Speed").toUInt(); + return 0; } bool QNetworkManagerInterfaceDeviceWired::carrier() const { - return d->connectionInterface->property("Carrier").toBool(); + if (propertyMap.contains("Carrier")) + return propertyMap.value("Carrier").toBool(); + return false; +} + +void QNetworkManagerInterfaceDeviceWired::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + propertyMap.insert(i.key(),i.value()); + } + Q_EMIT propertiesChanged(map); } class QNetworkManagerInterfaceDeviceWirelessPrivate @@ -472,7 +628,7 @@ public: }; QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(const QString &ifaceDevicePath, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { d = new QNetworkManagerInterfaceDeviceWirelessPrivate(); d->path = ifaceDevicePath; @@ -484,6 +640,34 @@ QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(c d->valid = false; return; } + + + QDBusPendingReply > nmReply + = d->connectionInterface->call(QLatin1String("GetAccessPoints")); + + if (!nmReply.isError()) { + accessPointsList = nmReply.value(); + } + + QDBusInterface deviceWirelessPropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus(),parent); + + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS); + QDBusPendingReply propsReply + = deviceWirelessPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); d->valid = true; } @@ -498,29 +682,31 @@ bool QNetworkManagerInterfaceDeviceWireless::isValid() return d->valid; } +void QNetworkManagerInterfaceDeviceWireless::slotAccessPointAdded(QDBusObjectPath path) +{ + if (path.path().length() > 2) + Q_EMIT accessPointAdded(path.path()); +} + +void QNetworkManagerInterfaceDeviceWireless::slotAccessPointRemoved(QDBusObjectPath path) +{ + if (path.path().length() > 2) + Q_EMIT accessPointRemoved(path.path()); +} + bool QNetworkManagerInterfaceDeviceWireless::setConnections() { - if(!isValid() ) + if (!isValid()) return false; QDBusConnection dbusConnection = QDBusConnection::systemBus(); bool allOk = true; - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap)), - this,SIGNAL(propertiesChanged(QString,QMap))); - - connect(nmDBusHelper, SIGNAL(pathForAccessPointAdded(QString)), - this,SIGNAL(accessPointAdded(QString))); - - connect(nmDBusHelper, SIGNAL(pathForAccessPointRemoved(QString)), - this,SIGNAL(accessPointRemoved(QString))); if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), - d->path, + d->path, QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), QLatin1String("AccessPointAdded"), - nmDBusHelper, SLOT(slotAccessPointAdded(QDBusObjectPath)))) { + this, SLOT(slotAccessPointAdded(QDBusObjectPath)))) { allOk = false; } @@ -529,18 +715,10 @@ bool QNetworkManagerInterfaceDeviceWireless::setConnections() d->path, QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), QLatin1String("AccessPointRemoved"), - nmDBusHelper, SLOT(slotAccessPointRemoved(QDBusObjectPath)))) { + this, SLOT(slotAccessPointRemoved(QDBusObjectPath)))) { allOk = false; } - - if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), - QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(slotPropertiesChanged(QMap)))) { - allOk = false; - } if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), @@ -558,33 +736,48 @@ QDBusInterface *QNetworkManagerInterfaceDeviceWireless::connectionInterface() co QList QNetworkManagerInterfaceDeviceWireless::getAccessPoints() { - QDBusReply > reply = d->connectionInterface->call(QLatin1String("GetAccessPoints")); - return reply.value(); + if (accessPointsList.isEmpty()) { + qWarning() << "Using blocking call!"; + QDBusReply > reply + = d->connectionInterface->call(QLatin1String("GetAccessPoints")); + accessPointsList = reply.value(); + } + return accessPointsList; } QString QNetworkManagerInterfaceDeviceWireless::hwAddress() const { - return d->connectionInterface->property("HwAddress").toString(); + if (propertyMap.contains("HwAddress")) + return propertyMap.value("HwAddress").toString(); + return QString(); } quint32 QNetworkManagerInterfaceDeviceWireless::mode() const { - return d->connectionInterface->property("Mode").toUInt(); + if (propertyMap.contains("Mode")) + return propertyMap.value("Mode").toUInt(); + return 0; } quint32 QNetworkManagerInterfaceDeviceWireless::bitrate() const { - return d->connectionInterface->property("Bitrate").toUInt(); + if (propertyMap.contains("Bitrate")) + return propertyMap.value("Bitrate").toUInt(); + return 0; } QDBusObjectPath QNetworkManagerInterfaceDeviceWireless::activeAccessPoint() const { - return d->connectionInterface->property("ActiveAccessPoint").value(); + if (propertyMap.contains("ActiveAccessPoint")) + return propertyMap.value("ActiveAccessPoint").value(); + return QDBusObjectPath(); } quint32 QNetworkManagerInterfaceDeviceWireless::wirelessCapabilities() const { - return d->connectionInterface->property("WirelelessCapabilities").toUInt(); + if (propertyMap.contains("WirelelessCapabilities")) + return propertyMap.value("WirelelessCapabilities").toUInt(); + return 0; } void QNetworkManagerInterfaceDeviceWireless::scanIsDone() @@ -597,6 +790,17 @@ void QNetworkManagerInterfaceDeviceWireless::requestScan() d->connectionInterface->asyncCall(QLatin1String("RequestScan")); } +void QNetworkManagerInterfaceDeviceWireless::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + propertyMap.insert(i.key(),i.value()); + if (i.key() == QStringLiteral("ActiveAccessPoint")) { //DeviceWireless + Q_EMIT propertiesChanged(map); + } + } +} class QNetworkManagerInterfaceDeviceModemPrivate { @@ -607,7 +811,7 @@ public: }; QNetworkManagerInterfaceDeviceModem::QNetworkManagerInterfaceDeviceModem(const QString &ifaceDevicePath, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { d = new QNetworkManagerInterfaceDeviceModemPrivate(); d->path = ifaceDevicePath; @@ -619,6 +823,25 @@ QNetworkManagerInterfaceDeviceModem::QNetworkManagerInterfaceDeviceModem(const Q d->valid = false; return; } + QDBusInterface deviceModemPropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus(),parent); + + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE_MODEM); + QDBusPendingReply propsReply + = deviceModemPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String(NM_DBUS_INTERFACE_DEVICE_MODEM), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); d->valid = true; } @@ -639,20 +862,7 @@ bool QNetworkManagerInterfaceDeviceModem::setConnections() if (!isValid() ) return false; - bool allOk = true; - - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap)), - this,SIGNAL(propertiesChanged(QString,QMap))); - if (!QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_DEVICE_MODEM), - QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(slotDevicePropertiesChanged(QMap))) ) { - allOk = false; - } - return allOk; + return true; } QDBusInterface *QNetworkManagerInterfaceDeviceModem::connectionInterface() const @@ -660,14 +870,28 @@ QDBusInterface *QNetworkManagerInterfaceDeviceModem::connectionInterface() const return d->connectionInterface; } -quint32 QNetworkManagerInterfaceDeviceModem::modemCapabilities() const +QNetworkManagerInterfaceDeviceModem::ModemCapabilities QNetworkManagerInterfaceDeviceModem::modemCapabilities() const { - return d->connectionInterface->property("ModemCapabilities").toUInt(); + if (propertyMap.contains("ModemCapabilities")) + return static_cast(propertyMap.value("ModemCapabilities").toUInt()); + return QNetworkManagerInterfaceDeviceModem::None; } -quint32 QNetworkManagerInterfaceDeviceModem::currentCapabilities() const +QNetworkManagerInterfaceDeviceModem::ModemCapabilities QNetworkManagerInterfaceDeviceModem::currentCapabilities() const { - return d->connectionInterface->property("CurrentCapabilities").toUInt(); + if (propertyMap.contains("CurrentCapabilities")) + return static_cast(propertyMap.value("CurrentCapabilities").toUInt()); + return QNetworkManagerInterfaceDeviceModem::None; +} + +void QNetworkManagerInterfaceDeviceModem::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + propertyMap.insert(i.key(),i.value()); + } + Q_EMIT propertiesChanged(map); } class QNetworkManagerSettingsPrivate @@ -691,6 +915,14 @@ QNetworkManagerSettings::QNetworkManagerSettings(const QString &settingsService, d->valid = false; return; } + + QDBusPendingReply > nmReply + = d->connectionInterface->call(QLatin1String("ListConnections")); + + if (!nmReply.isError()) { + connectionsList = nmReply.value(); + } + d->valid = true; } @@ -722,10 +954,16 @@ bool QNetworkManagerSettings::setConnections() QList QNetworkManagerSettings::listConnections() { - QDBusReply > reply = d->connectionInterface->call(QLatin1String("ListConnections")); - return reply.value(); + if (connectionsList.isEmpty()) { + qWarning() << "Using blocking call!"; + QDBusReply > reply + = d->connectionInterface->call(QLatin1String("ListConnections")); + connectionsList = reply.value(); + } + return connectionsList; } + QString QNetworkManagerSettings::getConnectionByUuid(const QString &uuid) { QList argumentList; @@ -751,7 +989,7 @@ public: }; QNetworkManagerSettingsConnection::QNetworkManagerSettingsConnection(const QString &settingsService, const QString &connectionObjectPath, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { qDBusRegisterMetaType(); d = new QNetworkManagerSettingsConnectionPrivate(); @@ -766,8 +1004,12 @@ QNetworkManagerSettingsConnection::QNetworkManagerSettingsConnection(const QStri return; } d->valid = true; - QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings")); - d->settingsMap = rep.value(); + + QDBusPendingReply nmReply + = d->connectionInterface->call(QLatin1String("GetSettings")); + if (!nmReply.isError()) { + d->settingsMap = nmReply.value(); + } } QNetworkManagerSettingsConnection::~QNetworkManagerSettingsConnection() @@ -783,7 +1025,7 @@ bool QNetworkManagerSettingsConnection::isValid() bool QNetworkManagerSettingsConnection::setConnections() { - if(!isValid() ) + if (!isValid()) return false; QDBusConnection dbusConnection = QDBusConnection::systemBus(); @@ -796,21 +1038,21 @@ bool QNetworkManagerSettingsConnection::setConnections() allOk = false; } - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(QString)), - this,SIGNAL(removed(QString))); - if (!dbusConnection.connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"), - nmDBusHelper, SIGNAL(slotSettingsRemoved()))) { + this, SIGNAL(slotSettingsRemoved()))) { allOk = false; } return allOk; } +void QNetworkManagerSettingsConnection::slotSettingsRemoved() +{ + Q_EMIT removed(d->path); +} + QDBusInterface *QNetworkManagerSettingsConnection::connectionInterface() const { return d->connectionInterface; @@ -818,8 +1060,11 @@ QDBusInterface *QNetworkManagerSettingsConnection::connectionInterface() const QNmSettingsMap QNetworkManagerSettingsConnection::getSettings() { - QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings")); - d->settingsMap = rep.value(); + if (d->settingsMap.isEmpty()) { + qWarning() << "Using blocking call!"; + QDBusReply reply = d->connectionInterface->call(QLatin1String("GetSettings")); + d->settingsMap = reply.value(); + } return d->settingsMap; } @@ -832,6 +1077,8 @@ NMDeviceType QNetworkManagerSettingsConnection::getType() return DEVICE_TYPE_ETHERNET; else if (devType == QLatin1String("802-11-wireless")) return DEVICE_TYPE_WIFI; + else if (devType == QLatin1String("gsm")) + return DEVICE_TYPE_MODEM; else return DEVICE_TYPE_UNKNOWN; } @@ -908,7 +1155,7 @@ public: }; QNetworkManagerConnectionActive::QNetworkManagerConnectionActive(const QString &activeConnectionObjectPath, QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { d = new QNetworkManagerConnectionActivePrivate(); d->path = activeConnectionObjectPath; @@ -920,6 +1167,29 @@ QNetworkManagerConnectionActive::QNetworkManagerConnectionActive(const QString & d->valid = false; return; } + QDBusInterface connectionActivePropertiesInterface(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String("org.freedesktop.DBus.Properties"), + QDBusConnection::systemBus()); + + + QList argumentList; + argumentList << QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION); + QDBusPendingReply propsReply + = connectionActivePropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"), + argumentList); + + if (!propsReply.isError()) { + propertyMap = propsReply.value(); + } else { + qWarning() << propsReply.error().message(); + } + + QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), + d->path, + QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION), + QLatin1String("PropertiesChanged"), + this,SLOT(propertiesSwap(QMap))); d->valid = true; } @@ -936,24 +1206,10 @@ bool QNetworkManagerConnectionActive::isValid() bool QNetworkManagerConnectionActive::setConnections() { - if(!isValid() ) + if (!isValid()) return false; - bool allOk = true; - delete nmDBusHelper; - nmDBusHelper = new QNmDBusHelper(this); - connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap)), - this,SIGNAL(propertiesChanged(QString,QMap))); - - if (!QDBusConnection::systemBus().connect(QLatin1String(NM_DBUS_SERVICE), - d->path, - QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION), - QLatin1String("PropertiesChanged"), - nmDBusHelper,SLOT(activeConnectionPropertiesChanged(QMap))) ) { - allOk = false; - } - - return allOk; + return true; } QDBusInterface *QNetworkManagerConnectionActive::connectionInterface() const @@ -963,30 +1219,67 @@ QDBusInterface *QNetworkManagerConnectionActive::connectionInterface() const QDBusObjectPath QNetworkManagerConnectionActive::connection() const { - QVariant prop = d->connectionInterface->property("Connection"); - return prop.value(); + if (propertyMap.contains("Connection")) + return propertyMap.value("Connection").value(); + return QDBusObjectPath(); } QDBusObjectPath QNetworkManagerConnectionActive::specificObject() const { - QVariant prop = d->connectionInterface->property("SpecificObject"); - return prop.value(); + if (propertyMap.contains("SpecificObject")) + return propertyMap.value("SpecificObject").value(); + return QDBusObjectPath(); } QList QNetworkManagerConnectionActive::devices() const { - QVariant prop = d->connectionInterface->property("Devices"); - return prop.value >(); + if (propertyMap.contains("Devices")) { + const QDBusArgument &dbusArgs = propertyMap.value("Devices").value(); + QDBusObjectPath path; + QList list; + + dbusArgs.beginArray(); + while (!dbusArgs.atEnd()) { + dbusArgs >> path; + list.append(path); + } + dbusArgs.endArray(); + + return list; + } + QList list; + list << QDBusObjectPath(); + return list; } quint32 QNetworkManagerConnectionActive::state() const { - return d->connectionInterface->property("State").toUInt(); + if (propertyMap.contains("State")) + return propertyMap.value("State").toUInt(); + return 0; } bool QNetworkManagerConnectionActive::defaultRoute() const { - return d->connectionInterface->property("Default").toBool(); + if (propertyMap.contains("Default")) + return propertyMap.value("Default").toBool(); + return false; +} + +void QNetworkManagerConnectionActive::propertiesSwap(QMap map) +{ + QMapIterator i(map); + while (i.hasNext()) { + i.next(); + propertyMap.insert(i.key(),i.value()); + if (i.key() == QStringLiteral("State")) { + quint32 state = i.value().toUInt(); + if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED + || state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) { + Q_EMIT propertiesChanged(map); + } + } + } } class QNetworkManagerIp4ConfigPrivate diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h index 11ddaf7088..df4e5d49e1 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h @@ -56,7 +56,6 @@ #include #include #include -#include "qnmdbushelper.h" #ifndef QT_NO_DBUS @@ -89,7 +88,7 @@ typedef enum NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, NM_ACTIVE_CONNECTION_STATE_ACTIVATING, NM_ACTIVE_CONNECTION_STATE_ACTIVATED, - NM_ACTIVE_CONNECTION_STATE_DEACTIVATED + NM_ACTIVE_CONNECTION_STATE_DEACTIVATED = 4 } NMActiveConnectionState; #define NM_DBUS_SERVICE "org.freedesktop.NetworkManager" @@ -135,12 +134,23 @@ class QNetworkManagerInterface : public QObject Q_OBJECT public: + typedef enum + { + NM_STATE_UNKNOWN = 0, + NM_STATE_ASLEEP = 10, + NM_STATE_DISCONNECTED = 20, + NM_STATE_DISCONNECTING = 30, + NM_STATE_CONNECTING = 40, + NM_STATE_CONNECTED_LOCAL = 50, + NM_STATE_CONNECTED_SITE = 60, + NM_STATE_CONNECTED_GLOBAL = 70 + } NMState; QNetworkManagerInterface(QObject *parent = 0); ~QNetworkManagerInterface(); - QList getDevices() const; - void activateConnection(const QString &serviceName, QDBusObjectPath connection, QDBusObjectPath device, QDBusObjectPath specificObject); + QList getDevices(); + void activateConnection(QDBusObjectPath connection,QDBusObjectPath device, QDBusObjectPath specificObject); void deactivateConnection(QDBusObjectPath connectionPath) const; QDBusObjectPath path() const; @@ -149,21 +159,28 @@ public: bool wirelessEnabled() const; bool wirelessHardwareEnabled() const; QList activeConnections() const; - quint32 state(); + NMState state(); + QString version() const; bool setConnections(); bool isValid(); Q_SIGNALS: void deviceAdded(QDBusObjectPath); void deviceRemoved(QDBusObjectPath); - void propertiesChanged( const QString &, QMap); - void stateChanged(const QString&, quint32); + void propertiesChanged(QMap); + void stateChanged(quint32); void activationFinished(QDBusPendingCallWatcher*); + void propertiesReady(); + void devicesListReady(); private Q_SLOTS: + void propertiesSwap(QMap); + private: QNetworkManagerInterfacePrivate *d; - QNmDBusHelper *nmDBusHelper; + QVariantMap propertyMap; + QList devicesPathList; + }; class QNetworkManagerInterfaceAccessPointPrivate; @@ -228,11 +245,14 @@ public: Q_SIGNALS: void propertiesChanged(QMap ); - void propertiesChanged( const QString &, QMap); + void propertiesReady(); + +private Q_SLOTS: + void propertiesSwap(QMap); + private: QNetworkManagerInterfaceAccessPointPrivate *d; - QNmDBusHelper *nmDBusHelper; - + QVariantMap propertyMap; }; class QNetworkManagerInterfaceDevicePrivate; @@ -258,11 +278,14 @@ public: Q_SIGNALS: void stateChanged(const QString &, quint32); - void propertiesChanged(const QString &, QMap); + void propertiesChanged(QMap); void connectionsChanged(QStringList); + void propertiesReady(); +private Q_SLOTS: + void propertiesSwap(QMap); private: QNetworkManagerInterfaceDevicePrivate *d; - QNmDBusHelper *nmDBusHelper; + QVariantMap propertyMap; }; class QNetworkManagerInterfaceDeviceWiredPrivate; @@ -284,10 +307,15 @@ public: bool isValid(); Q_SIGNALS: - void propertiesChanged( const QString &, QMap); + void propertiesChanged(QMap); + void propertiesReady(); + +private Q_SLOTS: + void propertiesSwap(QMap); + private: QNetworkManagerInterfaceDeviceWiredPrivate *d; - QNmDBusHelper *nmDBusHelper; + QVariantMap propertyMap; }; class QNetworkManagerInterfaceDeviceWirelessPrivate; @@ -325,15 +353,24 @@ public: void requestScan(); Q_SIGNALS: - void propertiesChanged( const QString &, QMap); + void propertiesChanged(QMap); void accessPointAdded(const QString &); void accessPointRemoved(const QString &); void scanDone(); + void propertiesReady(); + void accessPointsReady(); + private Q_SLOTS: void scanIsDone(); + void propertiesSwap(QMap); + + void slotAccessPointAdded(QDBusObjectPath); + void slotAccessPointRemoved(QDBusObjectPath); + private: QNetworkManagerInterfaceDeviceWirelessPrivate *d; - QNmDBusHelper *nmDBusHelper; + QVariantMap propertyMap; + QList accessPointsList; }; class QNetworkManagerInterfaceDeviceModemPrivate; @@ -350,6 +387,7 @@ public: Gsm_Umts = 0x4, Lte = 0x08 }; + Q_DECLARE_FLAGS(ModemCapabilities, ModemCapability) explicit QNetworkManagerInterfaceDeviceModem(const QString &ifaceDevicePath, QObject *parent = 0); @@ -361,16 +399,22 @@ public: bool setConnections(); bool isValid(); - quint32 modemCapabilities() const; - quint32 currentCapabilities() const; + ModemCapabilities modemCapabilities() const; + ModemCapabilities currentCapabilities() const; Q_SIGNALS: - void propertiesChanged( const QString &, QMap); + void propertiesChanged(QMap); + void propertiesReady(); + +private Q_SLOTS: + void propertiesSwap(QMap); + private: QNetworkManagerInterfaceDeviceModemPrivate *d; - QNmDBusHelper *nmDBusHelper; + QVariantMap propertyMap; }; +Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkManagerInterfaceDeviceModem::ModemCapabilities) class QNetworkManagerSettingsPrivate; class QNetworkManagerSettings : public QObject @@ -390,8 +434,10 @@ public: Q_SIGNALS: void newConnection(QDBusObjectPath); + void connectionsListReady(); private: QNetworkManagerSettingsPrivate *d; + QList connectionsList; }; class QNetworkManagerSettingsConnectionPrivate; @@ -418,12 +464,14 @@ public: bool isValid(); Q_SIGNALS: - void updated(); void removed(const QString &path); + void settingsReady(); + +private Q_SLOTS: + void slotSettingsRemoved(); private: - QNmDBusHelper *nmDBusHelper; QNetworkManagerSettingsConnectionPrivate *d; }; @@ -444,7 +492,6 @@ public: ~ QNetworkManagerConnectionActive(); QDBusInterface *connectionInterface() const; - QString serviceName() const; QDBusObjectPath connection() const; QDBusObjectPath specificObject() const; QList devices() const; @@ -455,11 +502,15 @@ public: Q_SIGNALS: - void propertiesChanged(QList); - void propertiesChanged( const QString &, QMap); + void propertiesChanged(QMap); + void propertiesReady(); + +private Q_SLOTS: + void propertiesSwap(QMap); + private: QNetworkManagerConnectionActivePrivate *d; - QNmDBusHelper *nmDBusHelper; + QVariantMap propertyMap; }; class QNetworkManagerIp4ConfigPrivate; diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp deleted file mode 100644 index 0decfd78b9..0000000000 --- a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// this class is for helping qdbus get stuff - -#include "qnmdbushelper.h" - -#include "qnetworkmanagerservice.h" - -#include -#include -#include -#include - -#include - -#ifndef QT_NO_DBUS - -QT_BEGIN_NAMESPACE - -QNmDBusHelper::QNmDBusHelper(QObject * parent) - : QObject(parent) -{ -} - -QNmDBusHelper::~QNmDBusHelper() -{ -} - -void QNmDBusHelper::deviceStateChanged(quint32 state) - { - QDBusMessage msg = this->message(); - if (state == NM_DEVICE_STATE_ACTIVATED - || state == NM_DEVICE_STATE_DISCONNECTED - || state == NM_DEVICE_STATE_UNAVAILABLE - || state == NM_DEVICE_STATE_FAILED) { - emit pathForStateChanged(msg.path(), state); - } - } - -void QNmDBusHelper::slotAccessPointAdded(QDBusObjectPath path) -{ - if (path.path().length() > 2) - emit pathForAccessPointAdded(path.path()); -} - -void QNmDBusHelper::slotAccessPointRemoved(QDBusObjectPath path) -{ - if (path.path().length() > 2) - emit pathForAccessPointRemoved(path.path()); -} - -void QNmDBusHelper::slotPropertiesChanged(QMap map) -{ - QDBusMessage msg = this->message(); - QMapIterator i(map); - while (i.hasNext()) { - i.next(); - if (i.key() == QStringLiteral("State")) { - quint32 state = i.value().toUInt(); - if (state == NM_DEVICE_STATE_ACTIVATED - || state == NM_DEVICE_STATE_DISCONNECTED - || state == NM_DEVICE_STATE_UNAVAILABLE - || state == NM_DEVICE_STATE_FAILED) { - emit pathForPropertiesChanged(msg.path(), map); - } - } else if (i.key() == QStringLiteral("ActiveAccessPoint")) { - emit pathForPropertiesChanged(msg.path(), map); - } else if (i.key() == QStringLiteral("ActiveConnections")) { - emit pathForPropertiesChanged(msg.path(), map); - } else if (i.key() == QStringLiteral("AvailableConnections")) { - const QDBusArgument &dbusArgs = i.value().value(); - QDBusObjectPath path; - QStringList paths; - dbusArgs.beginArray(); - while (!dbusArgs.atEnd()) { - dbusArgs >> path; - paths << path.path(); - } - dbusArgs.endArray(); - emit pathForConnectionsChanged(paths); - } - } -} - -void QNmDBusHelper::slotSettingsRemoved() -{ - QDBusMessage msg = this->message(); - emit pathForSettingsRemoved(msg.path()); -} - -void QNmDBusHelper::activeConnectionPropertiesChanged(QMap map) -{ - QDBusMessage msg = this->message(); - QMapIterator i(map); - while (i.hasNext()) { - i.next(); - if (i.key() == QStringLiteral("State")) { - quint32 state = i.value().toUInt(); - if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED - || state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) { - emit pathForPropertiesChanged(msg.path(), map); - } - } - } -} - -QT_END_NAMESPACE - -#endif // QT_NO_DBUS diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.h b/src/plugins/bearer/networkmanager/qnmdbushelper.h deleted file mode 100644 index e224af87f1..0000000000 --- a/src/plugins/bearer/networkmanager/qnmdbushelper.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNMDBUSHELPERPRIVATE_H -#define QNMDBUSHELPERPRIVATE_H - -#include -#include -#include - -#ifndef QT_NO_DBUS - -QT_BEGIN_NAMESPACE - -class QNmDBusHelper: public QObject, protected QDBusContext - { - Q_OBJECT - public: - QNmDBusHelper(QObject *parent = 0); - ~QNmDBusHelper(); - - public slots: - void deviceStateChanged(quint32); - void slotAccessPointAdded(QDBusObjectPath); - void slotAccessPointRemoved(QDBusObjectPath); - void slotPropertiesChanged(QMap); - void slotSettingsRemoved(); - void activeConnectionPropertiesChanged(QMap); - -Q_SIGNALS: - void pathForStateChanged(const QString &, quint32); - void pathForAccessPointAdded(const QString &); - void pathForAccessPointRemoved(const QString &); - void pathForPropertiesChanged(const QString &, QMap); - void pathForSettingsRemoved(const QString &); - void pathForConnectionsChanged(const QStringList &pathsList); -}; - -QT_END_NAMESPACE - -#endif // QT_NO_DBUS - -#endif// QNMDBUSHELPERPRIVATE_H -- cgit v1.2.3 From 0b54de41bc6beeddc0453a3f31527eaaf53ffee5 Mon Sep 17 00:00:00 2001 From: Axel Rasmussen Date: Sun, 2 Nov 2014 15:02:07 -0700 Subject: moc: use Q_NULLPTR instead of 0 in generated code. This commit changes several instances where moc was generating code that used 0 as a null pointer constant. The Q_NULLPTR define is the more idiomatic way to do this, and additionally this silences warnings generated by e.g. GCC's -Wzero-as-null-pointer-constant. [ChangeLog][Tools][moc] Fixed "zero as null pointer constant" warnings in moc's generated code. Change-Id: Ibe382b7bdbdddaf20cb4bdfd075fcdd1f363f9d3 Reviewed-by: Thiago Macieira Reviewed-by: Olivier Goffart --- src/tools/moc/generator.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index dd032e46f6..6c5e772e8c 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -493,7 +493,7 @@ void Generator::generateCode() for (int i = 0; i < extraList.count(); ++i) { fprintf(out, " &%s::staticMetaObject,\n", extraList.at(i).constData()); } - fprintf(out, " 0\n};\n\n"); + fprintf(out, " Q_NULLPTR\n};\n\n"); } // @@ -505,24 +505,24 @@ void Generator::generateCode() fprintf(out, "const QMetaObject %s::staticMetaObject = {\n", cdef->qualified.constData()); if (isQObject) - fprintf(out, " { 0, "); + fprintf(out, " { Q_NULLPTR, "); else if (cdef->superclassList.size()) fprintf(out, " { &%s::staticMetaObject, ", purestSuperClass.constData()); else - fprintf(out, " { 0, "); + fprintf(out, " { Q_NULLPTR, "); fprintf(out, "qt_meta_stringdata_%s.data,\n" " qt_meta_data_%s, ", qualifiedClassNameIdentifier.constData(), qualifiedClassNameIdentifier.constData()); if (cdef->hasQObject && !isQt) fprintf(out, " qt_static_metacall, "); else - fprintf(out, " 0, "); + fprintf(out, " Q_NULLPTR, "); if (extraList.isEmpty()) - fprintf(out, "0, "); + fprintf(out, "Q_NULLPTR, "); else fprintf(out, "qt_meta_extradata_%s, ", qualifiedClassNameIdentifier.constData()); - fprintf(out, "0}\n};\n\n"); + fprintf(out, "Q_NULLPTR}\n};\n\n"); if(isQt) return; @@ -537,7 +537,7 @@ void Generator::generateCode() // Generate smart cast function // fprintf(out, "\nvoid *%s::qt_metacast(const char *_clname)\n{\n", cdef->qualified.constData()); - fprintf(out, " if (!_clname) return 0;\n"); + fprintf(out, " if (!_clname) return Q_NULLPTR;\n"); fprintf(out, " if (!strcmp(_clname, qt_meta_stringdata_%s.stringdata))\n" " return static_cast(const_cast< %s*>(this));\n", qualifiedClassNameIdentifier.constData(), cdef->classname.constData()); @@ -562,7 +562,7 @@ void Generator::generateCode() QByteArray superClass = purestSuperClass; fprintf(out, " return %s::qt_metacast(_clname);\n", superClass.constData()); } else { - fprintf(out, " return 0;\n"); + fprintf(out, " return Q_NULLPTR;\n"); } fprintf(out, "}\n"); @@ -1416,7 +1416,7 @@ void Generator::generateSignal(FunctionDef *def,int index) fprintf(out, "QPrivateSignal"); fprintf(out, ")%s\n{\n" - " QMetaObject::activate(%s, &staticMetaObject, %d, 0);\n" + " QMetaObject::activate(%s, &staticMetaObject, %d, Q_NULLPTR);\n" "}\n", constQualifier, thisPtr.constData(), index); return; } @@ -1446,7 +1446,7 @@ void Generator::generateSignal(FunctionDef *def,int index) fprintf(out, " void *_a[] = { "); if (def->normalizedType == "void") { - fprintf(out, "0"); + fprintf(out, "Q_NULLPTR"); } else { if (def->returnTypeIsVolatile) fprintf(out, "const_cast(reinterpret_cast(&_t0))"); -- cgit v1.2.3 From 3c0ea78283b6c231854192e4e8519e02d70887d8 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Wed, 5 Nov 2014 12:56:26 +0400 Subject: Do not pass a null pointer to unlink() Found by clang static analyzer. Change-Id: I8f15ae1a8e6afb91eafa6cee1d1b21e3539af6c1 Reviewed-by: Friedemann Kleint Reviewed-by: Andy Shaw --- src/plugins/printsupport/cups/qppdprintdevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/printsupport/cups/qppdprintdevice.cpp b/src/plugins/printsupport/cups/qppdprintdevice.cpp index 7a6acf8b78..d20fbb558b 100644 --- a/src/plugins/printsupport/cups/qppdprintdevice.cpp +++ b/src/plugins/printsupport/cups/qppdprintdevice.cpp @@ -470,9 +470,10 @@ void QPpdPrintDevice::loadPrinter() m_cupsDest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, m_cupsName, m_cupsInstance); if (m_cupsDest) { const char *ppdFile = cupsGetPPD(m_cupsName); - if (ppdFile) + if (ppdFile) { m_ppd = ppdOpenFile(ppdFile); - unlink(ppdFile); + unlink(ppdFile); + } if (m_ppd) { ppdMarkDefaults(m_ppd); } else { -- cgit v1.2.3 From df106921b2f3d24dca5639104f0b5074044aef2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Wed, 5 Nov 2014 20:42:07 +0100 Subject: Android: Fix for build issue on x86 In the toolchain for x86 the va_list type is defined as char *, which in itself isn't strange, but it was somewhat unexpected as it differs from the arm toolchains. Either way we should not make assumption about the va_list type as there is no guarantee it won't cause conflicts when overloading. This fix simply renames the private overloads. Change-Id: I7808619d0fa3ca63b75796308cfdff6aa41a7fd0 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/corelib/kernel/qjni.cpp | 248 ++++++++++++++++++++++---------------------- src/corelib/kernel/qjni_p.h | 48 +++++---- 2 files changed, 151 insertions(+), 145 deletions(-) diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp index 452e3464d6..b179323fdc 100644 --- a/src/corelib/kernel/qjni.cpp +++ b/src/corelib/kernel/qjni.cpp @@ -311,7 +311,7 @@ QJNIObjectPrivate::QJNIObjectPrivate(const char *className, const char *sig, ... } } -QJNIObjectPrivate::QJNIObjectPrivate(const char *className, const char *sig, va_list args) +QJNIObjectPrivate::QJNIObjectPrivate(const char *className, const char *sig, const QVaListPrivate &args) : d(new QJNIObjectData()) { QJNIEnvironmentPrivate env; @@ -369,7 +369,7 @@ QJNIObjectPrivate::QJNIObjectPrivate(jclass clazz, const char *sig, ...) } } -QJNIObjectPrivate::QJNIObjectPrivate(jclass clazz, const char *sig, va_list args) +QJNIObjectPrivate::QJNIObjectPrivate(jclass clazz, const char *sig, const QVaListPrivate &args) : d(new QJNIObjectData()) { QJNIEnvironmentPrivate env; @@ -402,7 +402,7 @@ QJNIObjectPrivate::QJNIObjectPrivate(jobject obj) } template <> -void QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +void QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jmethodID id = getCachedMethodID(env, d->m_jclass, methodName, sig); @@ -416,12 +416,12 @@ void QJNIObjectPrivate::callMethod(const char *methodName, const char *sig { va_list args; va_start(args, sig); - callMethod(methodName, sig, args); + callMethodV(methodName, sig, args); va_end(args); } template <> -jboolean QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jboolean QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jboolean res = 0; @@ -437,13 +437,13 @@ jboolean QJNIObjectPrivate::callMethod(const char *methodName, const c { va_list args; va_start(args, sig); - jboolean res = callMethod(methodName, sig, args); + jboolean res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jbyte QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jbyte QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jbyte res = 0; @@ -459,13 +459,13 @@ jbyte QJNIObjectPrivate::callMethod(const char *methodName, const char *s { va_list args; va_start(args, sig); - jbyte res = callMethod(methodName, sig, args); + jbyte res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jchar QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jchar QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jchar res = 0; @@ -481,13 +481,13 @@ jchar QJNIObjectPrivate::callMethod(const char *methodName, const char *s { va_list args; va_start(args, sig); - jchar res = callMethod(methodName, sig, args); + jchar res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jshort QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jshort QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jshort res = 0; @@ -503,13 +503,13 @@ jshort QJNIObjectPrivate::callMethod(const char *methodName, const char { va_list args; va_start(args, sig); - jshort res = callMethod(methodName, sig, args); + jshort res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jint QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jint QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jint res = 0; @@ -525,13 +525,13 @@ jint QJNIObjectPrivate::callMethod(const char *methodName, const char *sig { va_list args; va_start(args, sig); - jint res = callMethod(methodName, sig, args); + jint res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jlong QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jlong QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jlong res = 0; @@ -547,13 +547,13 @@ jlong QJNIObjectPrivate::callMethod(const char *methodName, const char *s { va_list args; va_start(args, sig); - jlong res = callMethod(methodName, sig, args); + jlong res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jfloat QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jfloat QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jfloat res = 0.f; @@ -569,13 +569,13 @@ jfloat QJNIObjectPrivate::callMethod(const char *methodName, const char { va_list args; va_start(args, sig); - jfloat res = callMethod(methodName, sig, args); + jfloat res = callMethodV(methodName, sig, args); va_end(args); return res; } template <> -jdouble QJNIObjectPrivate::callMethod(const char *methodName, const char *sig, va_list args) const +jdouble QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { QJNIEnvironmentPrivate env; jdouble res = 0.; @@ -591,7 +591,7 @@ jdouble QJNIObjectPrivate::callMethod(const char *methodName, const cha { va_list args; va_start(args, sig); - jdouble res = callMethod(methodName, sig, args); + jdouble res = callMethodV(methodName, sig, args); va_end(args); return res; } @@ -651,10 +651,10 @@ jdouble QJNIObjectPrivate::callMethod(const char *methodName) const } template <> -void QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +void QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jclass clazz = loadClass(className, env); @@ -674,15 +674,15 @@ void QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - callStaticMethod(className, methodName, sig, args); + callStaticMethodV(className, methodName, sig, args); va_end(args); } template <> -void QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +void QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jmethodID id = getCachedMethodID(env, clazz, methodName, sig, true); @@ -699,15 +699,15 @@ void QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - callStaticMethod(clazz, methodName, sig, args); + callStaticMethodV(clazz, methodName, sig, args); va_end(args); } template <> -jboolean QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jboolean QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jboolean res = 0; @@ -730,16 +730,16 @@ jboolean QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jboolean res = callStaticMethod(className, methodName, sig, args); + jboolean res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jboolean QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jboolean QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jboolean res = 0; @@ -759,16 +759,16 @@ jboolean QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jboolean res = callStaticMethod(clazz, methodName, sig, args); + jboolean res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jbyte QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jbyte QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jbyte res = 0; @@ -791,16 +791,16 @@ jbyte QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jbyte res = callStaticMethod(className, methodName, sig, args); + jbyte res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jbyte QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jbyte QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jbyte res = 0; @@ -820,16 +820,16 @@ jbyte QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jbyte res = callStaticMethod(clazz, methodName, sig, args); + jbyte res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jchar QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jchar QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jchar res = 0; @@ -852,16 +852,16 @@ jchar QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jchar res = callStaticMethod(className, methodName, sig, args); + jchar res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jchar QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jchar QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jchar res = 0; @@ -881,16 +881,16 @@ jchar QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jchar res = callStaticMethod(clazz, methodName, sig, args); + jchar res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jshort QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jshort QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jshort res = 0; @@ -913,16 +913,16 @@ jshort QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jshort res = callStaticMethod(className, methodName, sig, args); + jshort res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jshort QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jshort QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jshort res = 0; @@ -942,16 +942,16 @@ jshort QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jshort res = callStaticMethod(clazz, methodName, sig, args); + jshort res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jint QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jint QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jint res = 0; @@ -974,16 +974,16 @@ jint QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jint res = callStaticMethod(className, methodName, sig, args); + jint res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jint QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jint QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jint res = 0; @@ -1003,16 +1003,16 @@ jint QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jint res = callStaticMethod(clazz, methodName, sig, args); + jint res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jlong QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jlong QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jlong res = 0; @@ -1035,16 +1035,16 @@ jlong QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jlong res = callStaticMethod(className, methodName, sig, args); + jlong res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jlong QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jlong QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jlong res = 0; @@ -1064,16 +1064,16 @@ jlong QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jlong res = callStaticMethod(clazz, methodName, sig, args); + jlong res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jfloat QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jfloat QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jfloat res = 0.f; @@ -1096,16 +1096,16 @@ jfloat QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jfloat res = callStaticMethod(className, methodName, sig, args); + jfloat res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jfloat QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jfloat QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jfloat res = 0.f; @@ -1125,16 +1125,16 @@ jfloat QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jfloat res = callStaticMethod(clazz, methodName, sig, args); + jfloat res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } template <> -jdouble QJNIObjectPrivate::callStaticMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +jdouble QJNIObjectPrivate::callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jdouble res = 0.; @@ -1157,16 +1157,16 @@ jdouble QJNIObjectPrivate::callStaticMethod(const char *className, { va_list args; va_start(args, sig); - jdouble res = callStaticMethod(className, methodName, sig, args); + jdouble res = callStaticMethodV(className, methodName, sig, args); va_end(args); return res; } template <> -jdouble QJNIObjectPrivate::callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +jdouble QJNIObjectPrivate::callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jdouble res = 0.; @@ -1186,7 +1186,7 @@ jdouble QJNIObjectPrivate::callStaticMethod(jclass clazz, { va_list args; va_start(args, sig); - jdouble res = callStaticMethod(clazz, methodName, sig, args); + jdouble res = callStaticMethodV(clazz, methodName, sig, args); va_end(args); return res; } @@ -1299,9 +1299,9 @@ jdouble QJNIObjectPrivate::callStaticMethod(jclass clazz, const char *m return callStaticMethod(clazz, methodName, "()D"); } -QJNIObjectPrivate QJNIObjectPrivate::callObjectMethod(const char *methodName, - const char *sig, - va_list args) const +QJNIObjectPrivate QJNIObjectPrivate::callObjectMethodV(const char *methodName, + const char *sig, + va_list args) const { QJNIEnvironmentPrivate env; jobject res = 0; @@ -1323,7 +1323,7 @@ QJNIObjectPrivate QJNIObjectPrivate::callObjectMethod(const char *methodName, { va_list args; va_start(args, sig); - QJNIObjectPrivate res = callObjectMethod(methodName, sig, args); + QJNIObjectPrivate res = callObjectMethodV(methodName, sig, args); va_end(args); return res; } @@ -1376,10 +1376,10 @@ QJNIObjectPrivate QJNIObjectPrivate::callObjectMethod(const char * return callObjectMethod(methodName, "()[D"); } -QJNIObjectPrivate QJNIObjectPrivate::callStaticObjectMethod(const char *className, - const char *methodName, - const char *sig, - va_list args) +QJNIObjectPrivate QJNIObjectPrivate::callStaticObjectMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jobject res = 0; @@ -1405,15 +1405,15 @@ QJNIObjectPrivate QJNIObjectPrivate::callStaticObjectMethod(const char *classNam { va_list args; va_start(args, sig); - QJNIObjectPrivate res = callStaticObjectMethod(className, methodName, sig, args); + QJNIObjectPrivate res = callStaticObjectMethodV(className, methodName, sig, args); va_end(args); return res; } -QJNIObjectPrivate QJNIObjectPrivate::callStaticObjectMethod(jclass clazz, - const char *methodName, - const char *sig, - va_list args) +QJNIObjectPrivate QJNIObjectPrivate::callStaticObjectMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args) { QJNIEnvironmentPrivate env; jobject res = 0; @@ -1436,7 +1436,7 @@ QJNIObjectPrivate QJNIObjectPrivate::callStaticObjectMethod(jclass clazz, { va_list args; va_start(args, sig); - QJNIObjectPrivate res = callStaticObjectMethod(clazz, methodName, sig, args); + QJNIObjectPrivate res = callStaticObjectMethodV(clazz, methodName, sig, args); va_end(args); return res; } diff --git a/src/corelib/kernel/qjni_p.h b/src/corelib/kernel/qjni_p.h index 19f2cf7601..5f573624c6 100644 --- a/src/corelib/kernel/qjni_p.h +++ b/src/corelib/kernel/qjni_p.h @@ -186,31 +186,37 @@ public: private: friend class QAndroidJniObject; - QJNIObjectPrivate(const char *className, const char *sig, va_list args); - QJNIObjectPrivate(jclass clazz, const char *sig, va_list args); + struct QVaListPrivate { operator va_list &() const { return m_args; } va_list &m_args; }; + + QJNIObjectPrivate(const char *className, const char *sig, const QVaListPrivate &args); + QJNIObjectPrivate(jclass clazz, const char *sig, const QVaListPrivate &args); template - T callMethod(const char *methodName, - const char *sig, - va_list args) const; - QJNIObjectPrivate callObjectMethod(const char *methodName, - const char *sig, - va_list args) const; + T callMethodV(const char *methodName, + const char *sig, + va_list args) const; + QJNIObjectPrivate callObjectMethodV(const char *methodName, + const char *sig, + va_list args) const; template - static T callStaticMethod(const char *className, - const char *methodName, - const char *sig, va_list args); + static T callStaticMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args); template - static T callStaticMethod(jclass clazz, - const char *methodName, - const char *sig, va_list args); - static QJNIObjectPrivate callStaticObjectMethod(const char *className, - const char *methodName, - const char *sig, va_list args); - - static QJNIObjectPrivate callStaticObjectMethod(jclass clazz, - const char *methodName, - const char *sig, va_list args); + static T callStaticMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args); + static QJNIObjectPrivate callStaticObjectMethodV(const char *className, + const char *methodName, + const char *sig, + va_list args); + + static QJNIObjectPrivate callStaticObjectMethodV(jclass clazz, + const char *methodName, + const char *sig, + va_list args); bool isSameObject(jobject obj) const; bool isSameObject(const QJNIObjectPrivate &other) const; -- cgit v1.2.3 From 9c8943a862a5762eef0ae98f2b6b14e5c449105c Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 24 Oct 2014 12:07:32 +0200 Subject: Doc: updated documentation QString::toDouble Task-number: QTBUG-35543 Change-Id: I60d5cc253e6d6a24e9b031758e16a547a9a07443 Reviewed-by: Martin Smith --- src/corelib/tools/qstring.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 48f251e3f4..543c75668f 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -6339,8 +6339,7 @@ ushort QString::toUShort(bool *ok, int base) const \snippet qstring/main.cpp 66 - Various string formats for floating point numbers can be converted - to double values: + \warning The QString content may only contain valid numerical characters which includes the plus/minus sign, the characters g and e used in scientific notation, and the decimal point. Including the unit or additional characters leads to a conversion error. \snippet qstring/main.cpp 67 @@ -6349,7 +6348,7 @@ ushort QString::toUShort(bool *ok, int base) const \snippet qstring/main.cpp 68 - For historic reasons, this function does not handle + For historical reasons, this function does not handle thousands group separators. If you need to convert such numbers, use QLocale::toDouble(). -- cgit v1.2.3 From 30d9498329489020f1720841ac960e06e2e7c5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 27 Oct 2014 16:11:58 +0100 Subject: iOS: Detect when inputMethodAccepted() is out of sync with focus object The GraphicsView stack still seems to have issues emitting focusObject change signals when the focus object changes inside the item hierarchy. To be on the safe side we use our own view of whether or not IM is enabled, and try to detect and warn if we find a case where the two are out of sync. Change-Id: I9fde896ea14ea5b65784723110887e06453edbd4 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qiosinputcontext.h | 1 + src/plugins/platforms/ios/qiosinputcontext.mm | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/plugins/platforms/ios/qiosinputcontext.h b/src/plugins/platforms/ios/qiosinputcontext.h index 5791367d84..f07408db81 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.h +++ b/src/plugins/platforms/ios/qiosinputcontext.h @@ -82,6 +82,7 @@ public: void commit(); const ImeState &imeState() { return m_imeState; }; + bool inputMethodAccepted() const; bool isReloadingInputViewsFromUpdate() const { return m_isReloadingInputViewsFromUpdate; } diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index c038628fd9..25d9f6c421 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -486,6 +486,26 @@ void QIOSInputContext::update(Qt::InputMethodQueries updatedProperties) } } +bool QIOSInputContext::inputMethodAccepted() const +{ + // The IM enablement state is based on the last call to update() + bool lastKnownImEnablementState = m_imeState.currentState.value(Qt::ImEnabled).toBool(); + +#if !defined(QT_NO_DEBUG) + // QPlatformInputContext keeps a cached value of the current IM enablement state that is + // updated by QGuiApplication when the current focus object changes, or by QInputMethod's + // update() function. If the focus object changes, but the change is not propagated as + // a signal to QGuiApplication due to bugs in the widget/graphicsview/qml stack, we'll + // end up with a stale value for QPlatformInputContext::inputMethodAccepted(). To be on + // the safe side we always use our own cached value to decide if IM is enabled, and try + // to detect the case where the two values are out of sync. + if (lastKnownImEnablementState != QPlatformInputContext::inputMethodAccepted()) + qWarning("QPlatformInputContext::inputMethodAccepted() does not match actual focus object IM enablement!"); +#endif + + return lastKnownImEnablementState; +} + /*! Called by the input item to reset the input method state. */ -- cgit v1.2.3 From 79f832594dc103ef4a663153f8b9a88691e46233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Wed, 8 Oct 2014 15:11:31 +0300 Subject: eglfs: obey QT_NO_REGULAREXPRESSION define Not all platforms do have QRegularExpression as it is based on pcre. Change-Id: I6b8e701ff7cf30e776ee34e5dc836cd24c9543b5 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp index b6b1be9244..26d77a2abb 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp @@ -63,11 +63,13 @@ QByteArray QEglFSHooks::fbDeviceName() const int QEglFSHooks::framebufferIndex() const { int fbIndex = 0; +#ifndef QT_NO_REGULAREXPRESSION QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)")); QRegularExpressionMatch match = fbIndexRx.match(fbDeviceName()); if (match.hasMatch()) fbIndex = match.captured(1).toInt(); +#endif return fbIndex; } -- cgit v1.2.3 From c493546a0a1bbf1455f67092364bdba18e43ba01 Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Mon, 13 Oct 2014 21:33:57 +0200 Subject: Merge TextFormat attributes for identical ranges in QInputMethodEvents IBus can hand us multiple attributes for different formatting properties of the same text range for events. The IBus input method plugin used to convert these straight into multiple QInputMethodEvent::Attributes, each with their own QTextCharFormat instance. According to the QInputMethodEvent documentation, behavior with multiple TextFormat attributes for the same text range is undefined. In at least one known user, KDE's Kate text editor, it causes invisible text for pre-edit text events as the QTextCharFormats are applied in turn with partially default-constructed foreground/background brushes: https://bugs.kde.org/show_bug.cgi?id=339467 This patch makes an effort to merge formatting information for identical text ranges into a single QTextCharFomat, while otherwise preserving existing behavior (attribute order is unchanged and attributes deseria- lized from D-Bus as having invalid QTextFormats remain untouched). No attempt is made to cope with overlapping text ranges. Segmenting into smaller ranges and merging for the overlaps would be conceivable, but until a case of an input method creating events with overlapping ranges is known seems not worth the effort. It's worth noting that the IBus input method plugin for Qt 4 also attempts to merge formatting information into a single QTextCharFormat, but with a distinct implementation from this one. Change-Id: Ie3dc38b353724ffb7b5f2d7f316393027373baf2 Task-number: 41640 Reviewed-by: Simon Hausmann --- .../platforminputcontexts/ibus/qibustypes.cpp | 26 +++++++++++++++++++--- .../platforminputcontexts/ibus/qibustypes.h | 3 ++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforminputcontexts/ibus/qibustypes.cpp b/src/plugins/platforminputcontexts/ibus/qibustypes.cpp index 9bc53ed5c0..ec8c746b2d 100644 --- a/src/plugins/platforminputcontexts/ibus/qibustypes.cpp +++ b/src/plugins/platforminputcontexts/ibus/qibustypes.cpp @@ -32,7 +32,6 @@ ****************************************************************************/ #include "qibustypes.h" -#include #include #include @@ -134,7 +133,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, QIBusAttribute &a return argument; } -QTextFormat QIBusAttribute::format() const +QTextCharFormat QIBusAttribute::format() const { QTextCharFormat fmt; switch (type) { @@ -225,11 +224,32 @@ const QDBusArgument &operator>>(const QDBusArgument &arg, QIBusAttributeList &at QList QIBusAttributeList::imAttributes() const { + QHash, QTextCharFormat> rangeAttrs; + + // Merge text fomats for identical ranges into a single QTextFormat. + for (int i = 0; i < attributes.size(); ++i) { + const QIBusAttribute &attr = attributes.at(i); + const QTextCharFormat &format = attr.format(); + + if (format.isValid()) { + const QPair range(attr.start, attr.end); + rangeAttrs[range].merge(format); + } + } + + // Assemble list in original attribute order. QList imAttrs; + for (int i = 0; i < attributes.size(); ++i) { const QIBusAttribute &attr = attributes.at(i); - imAttrs += QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, attr.start, attr.end - attr.start, attr.format()); + const QTextFormat &format = attr.format(); + + imAttrs += QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, + attr.start, + attr.end - attr.start, + format.isValid() ? rangeAttrs[QPair(attr.start, attr.end)] : format); } + return imAttrs; } diff --git a/src/plugins/platforminputcontexts/ibus/qibustypes.h b/src/plugins/platforminputcontexts/ibus/qibustypes.h index 2ec3b019ff..96791b17a1 100644 --- a/src/plugins/platforminputcontexts/ibus/qibustypes.h +++ b/src/plugins/platforminputcontexts/ibus/qibustypes.h @@ -36,6 +36,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -70,7 +71,7 @@ public: QIBusAttribute(); ~QIBusAttribute(); - QTextFormat format() const; + QTextCharFormat format() const; Type type; quint32 value; -- cgit v1.2.3 From 13401116cce64bc7f2cf80b07ce34a4ad3abe829 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Sat, 6 Sep 2014 13:07:37 +0300 Subject: Remove incorrect read from QSslSocket::readData() QIODevice makes readData() call only when its read buffer is empty. Also data argument points to the user or reserved read buffer area. So, no need in data transfer from read buffer at this point at all. Task-number: QTBUG-41797 Change-Id: Ieb4afdf7eec37fdf288073e4a060e64424f22b9c Reviewed-by: Thiago Macieira (cherry picked from commit 1853579dad1bbb44599314213a1d8a203ecae1c9) Reviewed-by: Alex Trotsenko Reviewed-by: Oswald Buddenhagen --- src/network/ssl/qsslsocket.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 27b085ddbd..8887f478dd 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1908,18 +1908,14 @@ qint64 QSslSocket::readData(char *data, qint64 maxlen) if (d->mode == UnencryptedMode && !d->autoStartHandshake) { readBytes = d->plainSocket->read(data, maxlen); - } else { - int bytesToRead = qMin(maxlen, d->buffer.size()); - readBytes = d->buffer.read(data, bytesToRead); - } - #ifdef QSSLSOCKET_DEBUG - qDebug() << "QSslSocket::readData(" << (void *)data << ',' << maxlen << ") ==" << readBytes; + qDebug() << "QSslSocket::readData(" << (void *)data << ',' << maxlen << ") ==" + << readBytes; #endif - - // possibly trigger another transmit() to decrypt more data from the socket - if (d->buffer.isEmpty() && d->plainSocket->bytesAvailable()) { - QMetaObject::invokeMethod(this, "_q_flushReadBuffer", Qt::QueuedConnection); + } else { + // possibly trigger another transmit() to decrypt more data from the socket + if (d->plainSocket->bytesAvailable()) + QMetaObject::invokeMethod(this, "_q_flushReadBuffer", Qt::QueuedConnection); } return readBytes; -- cgit v1.2.3 From 999fa634829bf90e939f2fc14678a842eb49c75e Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Tue, 4 Nov 2014 17:59:24 +1000 Subject: Support dual sim in QtBearer's networkmanager backend Task-number: QTBUG-42368 Change-Id: I306733b5de7871fdeaa0accb512a3610753c84a5 Reviewed-by: Alex Blasche --- .../bearer/linux_common/qofonoservice_linux.cpp | 9 ++- .../bearer/linux_common/qofonoservice_linux_p.h | 1 + .../networkmanager/qnetworkmanagerengine.cpp | 90 ++++++++++++---------- .../bearer/networkmanager/qnetworkmanagerengine.h | 6 +- 4 files changed, 60 insertions(+), 46 deletions(-) diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp index e994ebf2ce..b2e2131a92 100644 --- a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp +++ b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp @@ -112,7 +112,8 @@ QString QOfonoManagerInterface::currentModem() QStringList modems = getModems(); foreach (const QString &modem, modems) { QOfonoModemInterface device(modem); - if (device.isPowered() && device.isOnline()) + if (device.isPowered() && device.isOnline() + && device.interfaces().contains(QStringLiteral("org.ofono.NetworkRegistration"))) return modem; } return QString(); @@ -169,6 +170,12 @@ bool QOfonoModemInterface::isOnline() return qdbus_cast(var); } +QStringList QOfonoModemInterface::interfaces() +{ + const QVariant var = getProperty(QStringLiteral("Interfaces")); + return var.toStringList(); +} + QVariantMap QOfonoModemInterface::getProperties() { if (propertiesMap.isEmpty()) { diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h index 2b3d43deb5..0ed00d94ff 100644 --- a/src/plugins/bearer/linux_common/qofonoservice_linux_p.h +++ b/src/plugins/bearer/linux_common/qofonoservice_linux_p.h @@ -115,6 +115,7 @@ public: bool isPowered(); bool isOnline(); + QStringList interfaces(); private: QVariantMap getProperties(); QVariantMap propertiesMap; diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index f07d7b242b..9adadb8f4f 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -58,9 +58,7 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent) : QBearerEngineImpl(parent), managerInterface(new QNetworkManagerInterface(this)), systemSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE, this)), - ofonoManager(new QOfonoManagerInterface(this)), - ofonoNetwork(0), - ofonoContextManager(0) + ofonoManager(new QOfonoManagerInterface(this)) { if (!managerInterface->isValid()) @@ -97,16 +95,22 @@ QNetworkManagerEngine::~QNetworkManagerEngine() interfaceDevices.clear(); connectionInterfaces.clear(); + + qDeleteAll(ofonoContextManagers); + ofonoContextManagers.clear(); } void QNetworkManagerEngine::initialize() { QMutexLocker locker(&mutex); - connect(ofonoManager,SIGNAL(modemChanged()),this,SLOT(changedModem())); - ofonoNetwork = new QOfonoNetworkRegistrationInterface(ofonoManager->currentModem(),this); - ofonoContextManager = new QOfonoDataConnectionManagerInterface(ofonoManager->currentModem(),this); - + if (ofonoManager->isValid()) { + Q_FOREACH (const QString &modem, ofonoManager->getModems()) { + QOfonoDataConnectionManagerInterface *ofonoContextManager + = new QOfonoDataConnectionManagerInterface(modem,this); + ofonoContextManagers.insert(modem, ofonoContextManager); + } + } // Get current list of access points. foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { locker.unlock(); @@ -746,11 +750,14 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri } } } else if (connectionType == QLatin1String("gsm")) { - cpPriv->bearerType = currentBearerType(); + + const QString contextPath = map.value("connection").value("id").toString(); + cpPriv->name = contextName(contextPath); + cpPriv->bearerType = currentBearerType(contextPath); + if (map.value("connection").contains("timestamp")) { cpPriv->state |= QNetworkConfiguration::Discovered; } - cpPriv->name = contextName(map.value("connection").value("id").toString()); } return cpPriv; @@ -889,34 +896,32 @@ QNetworkConfigurationPrivatePointer QNetworkManagerEngine::defaultConfiguration( return QNetworkConfigurationPrivatePointer(); } -void QNetworkManagerEngine::changedModem() +QNetworkConfiguration::BearerType QNetworkManagerEngine::currentBearerType(const QString &id) { - if (ofonoNetwork) - delete ofonoNetwork; - - ofonoNetwork = new QOfonoNetworkRegistrationInterface(ofonoManager->currentModem(),this); - - if (ofonoContextManager) - delete ofonoContextManager; - ofonoContextManager = new QOfonoDataConnectionManagerInterface(ofonoManager->currentModem(),this); -} + if (ofonoManager->isValid()) { + QString contextPart = id.section('/', -1); -QNetworkConfiguration::BearerType QNetworkManagerEngine::currentBearerType() -{ - if (ofonoContextManager) { - QString bearer = ofonoContextManager->bearer(); - if (bearer == QLatin1String("gsm")) { - return QNetworkConfiguration::Bearer2G; - } else if (bearer == QLatin1String("edge")) { - return QNetworkConfiguration::Bearer2G; - } else if (bearer == QLatin1String("umts")) { - return QNetworkConfiguration::BearerWCDMA; - } else if (bearer == QLatin1String("hspa") - || bearer == QLatin1String("hsdpa") - || bearer == QLatin1String("hsupa")) { - return QNetworkConfiguration::BearerHSPA; - } else if (bearer == QLatin1String("lte")) { - return QNetworkConfiguration::BearerLTE; + QHashIterator i(ofonoContextManagers); + while (i.hasNext()) { + i.next(); + QString contextPath = i.key() +"/"+contextPart; + if (i.value()->contexts().contains(contextPath)) { + + QString bearer = i.value()->bearer(); + if (bearer == QStringLiteral("gsm")) { + return QNetworkConfiguration::Bearer2G; + } else if (bearer == QStringLiteral("edge")) { + return QNetworkConfiguration::Bearer2G; + } else if (bearer == QStringLiteral("umts")) { + return QNetworkConfiguration::BearerWCDMA; + } else if (bearer == QStringLiteral("hspa") + || bearer == QStringLiteral("hsdpa") + || bearer == QStringLiteral("hsupa")) { + return QNetworkConfiguration::BearerHSPA; + } else if (bearer == QStringLiteral("lte")) { + return QNetworkConfiguration::BearerLTE; + } + } } } return QNetworkConfiguration::BearerUnknown; @@ -924,13 +929,16 @@ QNetworkConfiguration::BearerType QNetworkManagerEngine::currentBearerType() QString QNetworkManagerEngine::contextName(const QString &path) { - if (ofonoContextManager) { + if (ofonoManager->isValid()) { QString contextPart = path.section('/', -1); - - Q_FOREACH (const QString &oContext, ofonoContextManager->contexts()) { - if (oContext.contains(contextPart)) { - QOfonoConnectionContextInterface contextInterface(oContext,this); - return contextInterface.name(); + QHashIterator i(ofonoContextManagers); + while (i.hasNext()) { + i.next(); + Q_FOREACH (const QString &oContext, i.value()->contexts()) { + if (oContext.contains(contextPart)) { + QOfonoConnectionContextInterface contextInterface(oContext,this); + return contextInterface.name(); + } } } } diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h index d2ef9886a3..84c0b21b6c 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h @@ -106,7 +106,6 @@ private Q_SLOTS: void newAccessPoint(const QString &path); void removeAccessPoint(const QString &path); void scanFinished(); - void changedModem(); private: QNetworkConfigurationPrivate *parseConnection(const QString &settingsPath, @@ -125,9 +124,8 @@ private: QHash connectionInterfaces; // ac, interface QOfonoManagerInterface *ofonoManager; - QOfonoNetworkRegistrationInterface *ofonoNetwork; - QOfonoDataConnectionManagerInterface *ofonoContextManager; - QNetworkConfiguration::BearerType currentBearerType(); + QHash ofonoContextManagers; + QNetworkConfiguration::BearerType currentBearerType(const QString &id); QString contextName(const QString &path); }; -- cgit v1.2.3 From 8a81319be1d0d9ceadc1b4f17a707c6db08dd280 Mon Sep 17 00:00:00 2001 From: MihailNaydenov Date: Fri, 3 Oct 2014 15:37:13 +0300 Subject: Fix loading 2x images in Rich Text Documents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are some issues preventing 2x images from loading, mainly incorrect testing for exist() by passing an url, which always reports ‘false’. Task-number: QTBUG-36383 Change-Id: I1e8e5a91b01f1a4ddd3559c2e860db5bc41908ce Reviewed-by: Morten Johan Sørvig --- src/gui/text/qtextimagehandler.cpp | 67 +++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/src/gui/text/qtextimagehandler.cpp b/src/gui/text/qtextimagehandler.cpp index f6525448de..37c18e3624 100644 --- a/src/gui/text/qtextimagehandler.cpp +++ b/src/gui/text/qtextimagehandler.cpp @@ -44,31 +44,49 @@ QT_BEGIN_NAMESPACE -static QString resolve2xFile(const QString &fileName, qreal targetDevicePixelRatio) +static QString resolveFileName(QString fileName, QUrl *url, qreal targetDevicePixelRatio) { + // We might use the fileName for loading if url loading fails + // try to make sure it is a valid file path. + // Also, QFile{Info}::exists works only on filepaths (not urls) + + if (url->isValid()) { + if (url->scheme() == QLatin1Literal("qrc")) { + fileName = fileName.right(fileName.length() - 3); + } + else if (url->scheme() == QLatin1Literal("file")) { + fileName = url->toLocalFile(); + } + } + if (targetDevicePixelRatio <= 1.0) return fileName; - int dotIndex = fileName.lastIndexOf(QLatin1Char('.')); + // try to find a 2x version + + const int dotIndex = fileName.lastIndexOf(QLatin1Char('.')); if (dotIndex != -1) { QString at2xfileName = fileName; at2xfileName.insert(dotIndex, QStringLiteral("@2x")); - if (QFile::exists(at2xfileName)) - return at2xfileName; + if (QFile::exists(at2xfileName)) { + fileName = at2xfileName; + *url = QUrl(fileName); + } } + return fileName; } -static QPixmap getPixmap(QTextDocument *doc, const QTextImageFormat &format) + +static QPixmap getPixmap(QTextDocument *doc, const QTextImageFormat &format, const qreal devicePixelRatio = 1.0) { QPixmap pm; QString name = format.name(); - if (name.startsWith(QLatin1String(":/"))) // auto-detect resources + if (name.startsWith(QLatin1String(":/"))) // auto-detect resources and convert them to url name.prepend(QLatin1String("qrc")); - QPaintDevice *pdev = doc->documentLayout()->paintDevice(); - name = resolve2xFile(name, pdev ? pdev->devicePixelRatio() : qApp->devicePixelRatio()); QUrl url = QUrl(name); + name = resolveFileName(name, &url, devicePixelRatio); const QVariant data = doc->resource(QTextDocument::ImageResource, url); if (data.type() == QVariant::Pixmap || data.type() == QVariant::Image) { pm = qvariant_cast(data); @@ -77,19 +95,18 @@ static QPixmap getPixmap(QTextDocument *doc, const QTextImageFormat &format) } if (pm.isNull()) { - QString context; #if 0 + QString context; // ### Qt5 QTextBrowser *browser = qobject_cast(doc->parent()); if (browser) context = browser->source().toString(); #endif + // try direct loading QImage img; - if (img.isNull()) { // try direct loading - name = format.name(); // remove qrc:/ prefix again - if (name.isEmpty() || !img.load(name)) - return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png")); - } + if (name.isEmpty() || !img.load(name)) + return QPixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png")); + pm = QPixmap::fromImage(img); doc->addResource(QTextDocument::ImageResource, url, pm); } @@ -142,16 +159,15 @@ static QSize getPixmapSize(QTextDocument *doc, const QTextImageFormat &format) return size; } -static QImage getImage(QTextDocument *doc, const QTextImageFormat &format) +static QImage getImage(QTextDocument *doc, const QTextImageFormat &format, const qreal devicePixelRatio = 1.0) { QImage image; QString name = format.name(); if (name.startsWith(QLatin1String(":/"))) // auto-detect resources name.prepend(QLatin1String("qrc")); - QPaintDevice *pdev = doc->documentLayout()->paintDevice(); - name = resolve2xFile(name, pdev ? pdev->devicePixelRatio() : qApp->devicePixelRatio()); QUrl url = QUrl(name); + name = resolveFileName(name, &url, devicePixelRatio); const QVariant data = doc->resource(QTextDocument::ImageResource, url); if (data.type() == QVariant::Image) { image = qvariant_cast(data); @@ -160,19 +176,18 @@ static QImage getImage(QTextDocument *doc, const QTextImageFormat &format) } if (image.isNull()) { - QString context; - #if 0 + QString context; // ### Qt5 QTextBrowser *browser = qobject_cast(doc->parent()); if (browser) context = browser->source().toString(); #endif - if (image.isNull()) { // try direct loading - name = format.name(); // remove qrc:/ prefix again - if (name.isEmpty() || !image.load(name)) - return QImage(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png")); - } + // try direct loading + + if (name.isEmpty() || !image.load(name)) + return QImage(QLatin1String(":/qt-project.org/styles/commonstyle/images/file-16.png")); + doc->addResource(QTextDocument::ImageResource, url, image); } @@ -241,10 +256,10 @@ void QTextImageHandler::drawObject(QPainter *p, const QRectF &rect, QTextDocumen const QTextImageFormat imageFormat = format.toImageFormat(); if (QCoreApplication::instance()->thread() != QThread::currentThread()) { - const QImage image = getImage(doc, imageFormat); + const QImage image = getImage(doc, imageFormat, p->device()->devicePixelRatio()); p->drawImage(rect, image, image.rect()); } else { - const QPixmap pixmap = getPixmap(doc, imageFormat); + const QPixmap pixmap = getPixmap(doc, imageFormat, p->device()->devicePixelRatio()); p->drawPixmap(rect, pixmap, pixmap.rect()); } } -- cgit v1.2.3 From a61247723a7b8b371a7328d1d7ec5ca4a5ff3d84 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Fri, 7 Nov 2014 14:05:41 +1000 Subject: Make QtBearer networkmanager backend respond to wired cabling changes Cabling changes can be detected right away, so we should act on that and change the configuration state. Change-Id: Ifa9709077215567001e11ab655208a2c1b090073 Reviewed-by: Alex Blasche --- .../networkmanager/qnetworkmanagerengine.cpp | 128 +++++++++++++++------ .../bearer/networkmanager/qnetworkmanagerengine.h | 4 + .../networkmanager/qnetworkmanagerservice.cpp | 30 +++-- .../bearer/networkmanager/qnetworkmanagerservice.h | 4 +- 4 files changed, 124 insertions(+), 42 deletions(-) diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 9adadb8f4f..6be682878d 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -98,6 +98,9 @@ QNetworkManagerEngine::~QNetworkManagerEngine() qDeleteAll(ofonoContextManagers); ofonoContextManagers.clear(); + + qDeleteAll(wiredDevices); + wiredDevices.clear(); } void QNetworkManagerEngine::initialize() @@ -111,13 +114,6 @@ void QNetworkManagerEngine::initialize() ofonoContextManagers.insert(modem, ofonoContextManager); } } - // Get current list of access points. - foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { - locker.unlock(); - deviceAdded(devicePath); //add all accesspoints - locker.relock(); - } - // Get active connections. foreach (const QDBusObjectPath &acPath, managerInterface->activeConnections()) { @@ -128,13 +124,20 @@ void QNetworkManagerEngine::initialize() this, SLOT(activeConnectionPropertiesChanged(QMap))); activeConnection->setConnections(); - QList devices = activeConnection->devices(); + QStringList devices = activeConnection->devices(); if (!devices.isEmpty()) { - QNetworkManagerInterfaceDevice device(devices.at(0).path(),this); + QNetworkManagerInterfaceDevice device(devices.at(0),this); connectionInterfaces.insert(activeConnection->connection().path(),device.networkInterface()); } } + // Get current list of access points. + foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { + locker.unlock(); + deviceAdded(devicePath); //add all accesspoints + locker.relock(); + } + // Get connections. foreach (const QDBusObjectPath &settingsPath, systemSettings->listConnections()) { locker.unlock(); @@ -338,9 +341,9 @@ void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QMapmutex.lock(); if (properties.value("State").toUInt() == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) { - QList devices = activeConnection->devices(); + QStringList devices = activeConnection->devices(); if (!devices.isEmpty()) { - QNetworkManagerInterfaceDevice device(devices.at(0).path(),this); + QNetworkManagerInterfaceDevice device(devices.at(0),this); connectionInterfaces.insert(id,device.networkInterface()); } @@ -405,6 +408,13 @@ void QNetworkManagerEngine::deviceAdded(const QDBusObjectPath &path) wirelessDevices.insert(path.path(), wirelessDevice); } + + if (iDevice->deviceType() == DEVICE_TYPE_ETHERNET) { + QNetworkManagerInterfaceDeviceWired *wiredDevice = + new QNetworkManagerInterfaceDeviceWired(iDevice->connectionInterface()->path(),this); + connect(wiredDevice,SIGNAL(carrierChanged(bool)),this,SLOT(wiredCarrierChanged(bool))); + wiredDevices.insert(iDevice->connectionInterface()->path(), wiredDevice); + } } void QNetworkManagerEngine::deviceRemoved(const QDBusObjectPath &path) @@ -421,6 +431,41 @@ void QNetworkManagerEngine::deviceRemoved(const QDBusObjectPath &path) delete wirelessDevices.take(path.path()); locker.relock(); } + if (wiredDevices.contains(path.path())) { + locker.unlock(); + delete wiredDevices.take(path.path()); + locker.relock(); + } +} + +void QNetworkManagerEngine::wiredCarrierChanged(bool carrier) +{ + QNetworkManagerInterfaceDeviceWired *deviceWired = qobject_cast(sender()); + if (!deviceWired) + return; + QMutexLocker locker(&mutex); + foreach (const QDBusObjectPath &settingsPath, systemSettings->listConnections()) { + for (int i = 0; i < connections.count(); ++i) { + QNetworkManagerSettingsConnection *connection = connections.at(i); + if (connection->getType() == DEVICE_TYPE_ETHERNET + && settingsPath.path() == connection->connectionInterface()->path()) { + QNetworkConfigurationPrivatePointer ptr = + accessPointConfigurations.value(settingsPath.path()); + + if (ptr) { + ptr->mutex.lock(); + if (carrier) + ptr->state |= QNetworkConfiguration::Discovered; + else + ptr->state = QNetworkConfiguration::Defined; + ptr->mutex.unlock(); + locker.unlock(); + emit configurationChanged(ptr); + return; + } + } + } + } } void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path, @@ -437,32 +482,37 @@ void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path, QNetworkManagerSettingsConnection *connection = new QNetworkManagerSettingsConnection(settings->connectionInterface()->service(), path.path(),this); - QString apPath; - for (int i = 0; i < accessPoints.count(); ++i) { - if (connection->getSsid() == accessPoints.at(i)->ssid()) { - // remove the corresponding accesspoint from configurations - apPath = accessPoints.at(i)->connectionInterface()->path(); - - QNetworkConfigurationPrivatePointer ptr - = accessPointConfigurations.take(apPath); - if (ptr) { - locker.unlock(); - emit configurationRemoved(ptr); - locker.relock(); - } - } + const QString settingsPath = connection->connectionInterface()->path(); + if (accessPointConfigurations.contains(settingsPath)) { + return; } + connections.append(connection); connect(connection,SIGNAL(removed(QString)),this,SLOT(removeConnection(QString))); connect(connection,SIGNAL(updated()),this,SLOT(updateConnection())); connection->setConnections(); - const QString settingsPath = connection->connectionInterface()->path(); + NMDeviceType deviceType = connection->getType(); - if (connection->getType() == DEVICE_TYPE_WIFI - && !configuredAccessPoints.contains(settingsPath)) - configuredAccessPoints.insert(apPath,settingsPath); + if (deviceType == DEVICE_TYPE_WIFI) { + QString apPath; + for (int i = 0; i < accessPoints.count(); ++i) { + if (connection->getSsid() == accessPoints.at(i)->ssid()) { + // remove the corresponding accesspoint from configurations + apPath = accessPoints.at(i)->connectionInterface()->path(); + QNetworkConfigurationPrivatePointer ptr + = accessPointConfigurations.take(apPath); + if (ptr) { + locker.unlock(); + emit configurationRemoved(ptr); + locker.relock(); + } + } + } + if (!configuredAccessPoints.contains(settingsPath)) + configuredAccessPoints.insert(apPath,settingsPath); + } QNetworkConfigurationPrivate *cpPriv = parseConnection(settingsPath, connection->getSettings()); @@ -476,9 +526,21 @@ void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path, break; } } + if (deviceType == DEVICE_TYPE_ETHERNET) { + QHashIterator i(interfaceDevices); + while (i.hasNext()) { + i.next(); + if (i.value()->deviceType() == deviceType) { + QNetworkManagerInterfaceDeviceWired *wiredDevice + = wiredDevices.value(i.value()->connectionInterface()->path()); + if (wiredDevice->carrier()) { + cpPriv->state |= QNetworkConfiguration::Discovered; + } + } + } + } QNetworkConfigurationPrivatePointer ptr(cpPriv); accessPointConfigurations.insert(ptr->id, ptr); - locker.unlock(); emit configurationAdded(ptr); } @@ -524,8 +586,6 @@ void QNetworkManagerEngine::updateConnection() qobject_cast(sender()); if (!connection) return; - - connection->deleteLater(); const QString settingsPath = connection->connectionInterface()->path(); QNetworkConfigurationPrivate *cpPriv = parseConnection(settingsPath, connection->getSettings()); @@ -718,8 +778,8 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri foreach (const QDBusObjectPath &devicePath, managerInterface->getDevices()) { QNetworkManagerInterfaceDevice device(devicePath.path(),this); if (device.deviceType() == DEVICE_TYPE_ETHERNET) { - QNetworkManagerInterfaceDeviceWired wiredDevice(device.connectionInterface()->path(),this); - if (wiredDevice.carrier()) { + QNetworkManagerInterfaceDeviceWired *wiredDevice = wiredDevices.value(device.connectionInterface()->path()); + if (wiredDevice->carrier()) { cpPriv->state |= QNetworkConfiguration::Discovered; break; } diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h index 84c0b21b6c..671ed80dab 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h @@ -107,6 +107,8 @@ private Q_SLOTS: void removeAccessPoint(const QString &path); void scanFinished(); + void wiredCarrierChanged(bool); + private: QNetworkConfigurationPrivate *parseConnection(const QString &settingsPath, const QNmSettingsMap &map); @@ -114,7 +116,9 @@ private: QNetworkManagerInterface *managerInterface; QNetworkManagerSettings *systemSettings; + QHash wiredDevices; QHash wirelessDevices; + QHash activeConnectionsList; QList connections; QList accessPoints; diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp index 2d54fa3029..dd7000bfb8 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp @@ -609,12 +609,32 @@ bool QNetworkManagerInterfaceDeviceWired::carrier() const return false; } +QStringList QNetworkManagerInterfaceDeviceWired::availableConnections() +{ + QStringList list; + if (propertyMap.contains("AvailableConnections")) { + const QDBusArgument &dbusArgs = propertyMap.value("Carrier").value(); + QDBusObjectPath path; + dbusArgs.beginArray(); + while (!dbusArgs.atEnd()) { + dbusArgs >> path; + list << path.path(); + } + dbusArgs.endArray(); + } + + return list; +} + void QNetworkManagerInterfaceDeviceWired::propertiesSwap(QMap map) { QMapIterator i(map); while (i.hasNext()) { i.next(); propertyMap.insert(i.key(),i.value()); + if (i.key() == QStringLiteral("Carrier")) { + Q_EMIT carrierChanged(i.value().toBool()); + } } Q_EMIT propertiesChanged(map); } @@ -1231,24 +1251,20 @@ QDBusObjectPath QNetworkManagerConnectionActive::specificObject() const return QDBusObjectPath(); } -QList QNetworkManagerConnectionActive::devices() const +QStringList QNetworkManagerConnectionActive::devices() const { + QStringList list; if (propertyMap.contains("Devices")) { const QDBusArgument &dbusArgs = propertyMap.value("Devices").value(); QDBusObjectPath path; - QList list; dbusArgs.beginArray(); while (!dbusArgs.atEnd()) { dbusArgs >> path; - list.append(path); + list.append(path.path()); } dbusArgs.endArray(); - - return list; } - QList list; - list << QDBusObjectPath(); return list; } diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h index df4e5d49e1..5e3c1c85f1 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h @@ -305,10 +305,12 @@ public: bool carrier() const; bool setConnections(); bool isValid(); + QStringList availableConnections(); Q_SIGNALS: void propertiesChanged(QMap); void propertiesReady(); + void carrierChanged(bool); private Q_SLOTS: void propertiesSwap(QMap); @@ -494,7 +496,7 @@ public: QDBusInterface *connectionInterface() const; QDBusObjectPath connection() const; QDBusObjectPath specificObject() const; - QList devices() const; + QStringList devices() const; quint32 state() const; bool defaultRoute() const; bool setConnections(); -- cgit v1.2.3 From 7a593e0d00abd0d8930fd7cdd8334a42fca7da6d Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Fri, 7 Nov 2014 15:38:32 +1000 Subject: make qtbearer networkmanager defaultConfiguration more reliable The defaultConfiguration could switch and be either active connection, so we determine the default should be what has the default route. Change-Id: I194f27b60e7a3598eca2ff09c2225ba1a46564d9 Reviewed-by: Alex Blasche --- src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 9 +++++++++ src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp | 7 +++++++ src/plugins/bearer/networkmanager/qnetworkmanagerservice.h | 1 + 3 files changed, 17 insertions(+) diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 6be682878d..a8244f05cf 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -953,6 +953,15 @@ QNetworkSessionPrivate *QNetworkManagerEngine::createSessionBackend() QNetworkConfigurationPrivatePointer QNetworkManagerEngine::defaultConfiguration() { + QHashIterator i(activeConnectionsList); + while (i.hasNext()) { + i.next(); + QNetworkManagerConnectionActive *activeConnection = i.value(); + if ((activeConnection->defaultRoute() || activeConnection->default6Route())) { + return accessPointConfigurations.value(activeConnection->connection().path()); + } + } + return QNetworkConfigurationPrivatePointer(); } diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp index dd7000bfb8..dc3b71ec8e 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp @@ -1282,6 +1282,13 @@ bool QNetworkManagerConnectionActive::defaultRoute() const return false; } +bool QNetworkManagerConnectionActive::default6Route() const +{ + if (propertyMap.contains("Default6")) + return propertyMap.value("Default6").toBool(); + return false; +} + void QNetworkManagerConnectionActive::propertiesSwap(QMap map) { QMapIterator i(map); diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h index 5e3c1c85f1..da909c443a 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h @@ -499,6 +499,7 @@ public: QStringList devices() const; quint32 state() const; bool defaultRoute() const; + bool default6Route() const; bool setConnections(); bool isValid(); -- cgit v1.2.3 From 2f7d0838b8fd338b20eb7059caf6bc5fba6e5266 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 3 Nov 2014 17:44:50 +0100 Subject: WinRT: Add missing manifest specifier for rotation Add WINRT_MANIFEST.rotation_preference as description which orientation is allowed or preferred by the app. Valid values for Windows Phone are portrait, landscape, landscapeFlipped. WinRT also allows portraitFlipped Task-number: QTBUG-40830 Change-Id: I6b11afcdb72c2c158dadddafc5d90c1d18ab9d8b Reviewed-by: Andrew Knight --- .../winrt_winphone/manifests/8.1/AppxManifest.xml.in | 2 +- .../winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in | 2 +- mkspecs/features/winrt/package_manifest.prf | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in index 97d3407403..a6fc9697f4 100644 --- a/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in +++ b/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in @@ -34,7 +34,7 @@ - + $${WINRT_MANIFEST.rotation_preference} $${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies} diff --git a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in index cf18a4dc79..b75570ad4e 100644 --- a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in +++ b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in @@ -37,7 +37,7 @@ - + $${WINRT_MANIFEST.rotation_preference} $${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies} diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index b4242bfdaa..2ccb5db963 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -24,6 +24,7 @@ # WINRT_MANIFEST.logo_medium: Medium logo image file. Default provided by the mkspec. # WINRT_MANIFEST.logo_large: Large logo image file. Default provided by the mkspec. # WINRT_MANIFEST.splash_screen: Splash screen image file. Default provided by the mkspec. +# WINRT_MANIFEST.rotation_preference: Orientation specification. Default is empty. (portrait, landscape, landscapeFlipped) # WINRT_MANIFEST.iconic_tile_icon: Image file for the "iconic" tile template icon. Default provided by the mkspec. # WINRT_MANIFEST.iconic_tile_small: Image file for the small "iconic" tile template logo. Default provided by the mkspec. # WINRT_MANIFEST.default_language: Specifies the default language of the application @@ -87,6 +88,20 @@ isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en + INDENT = "$$escape_expand(\\r\\n) " + + VS_XML_NAMESPACE = "m2" + winphone: VS_XML_NAMESPACE = "m3" + WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference) + !isEmpty(WINRT_MANIFEST.rotation_preference) { + MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>" + for(ROTATION, WINRT_MANIFEST.rotation_preference): \ + MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />" + MANIFEST_ROTATION += "" + + WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT) + } + INDENT = "$$escape_expand(\\r\\n) " # Capabilities are given as a string list and may change with the configuration (network, sensors, etc.) -- cgit v1.2.3 From b67d853d2c3d9cb3e9be9a62396f5cd97a18c125 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Tue, 4 Nov 2014 12:41:10 +0200 Subject: Fix crash in QNetworkSession when engine is not set Task-number: QTBUG-42427 Change-Id: Ie35d5e0f72be3a16ecb6b928e12bc50d9f183590 Reviewed-by: Andy Shaw --- src/plugins/bearer/qnetworksession_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp index 1db59fec94..c5adc98af7 100644 --- a/src/plugins/bearer/qnetworksession_impl.cpp +++ b/src/plugins/bearer/qnetworksession_impl.cpp @@ -366,7 +366,8 @@ void QNetworkSessionPrivateImpl::networkConfigurationsChanged() else updateStateFromActiveConfig(); - startTime = engine->startTime(activeConfig.identifier()); + if (engine) + startTime = engine->startTime(activeConfig.identifier()); } void QNetworkSessionPrivateImpl::configurationChanged(QNetworkConfigurationPrivatePointer config) -- cgit v1.2.3 From 645f9eec00b63c076cad488c7ec19a5be9e5dd5e Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 3 Nov 2014 20:38:01 +0100 Subject: QGraphicsItem: clarify the documentation about caching modes and update() It is possible that Qt calls paint() several times for an item that has caching enabled, even without any explicit call to update(). There are various reasons why that is possible (memory pressure, item gets transformed, etc.); the important part is that 1) the user must not rely into "caching enabled" = "1 paint() call" 2) the user must always draw the same content from within paint(), unless update() was called before that call to paint(). Task-number: QTBUG-18410 Change-Id: I2c8d77e6e11aaceffc9a21003dd3f4cc46edd582 Reviewed-by: Venugopal Shivashankar Reviewed-by: Andy Shaw --- src/widgets/graphicsview/qgraphicsitem.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 76a75dfc35..300e2f492b 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -1968,8 +1968,10 @@ QGraphicsItem::CacheMode QGraphicsItem::cacheMode() const Caching can speed up rendering if your item spends a significant time redrawing itself. In some cases the cache can also slow down rendering, in particular when the item spends less time redrawing than QGraphicsItem - spends redrawing from the cache. When enabled, the item's paint() function - will be called only once for each call to update(); for any subsequent + spends redrawing from the cache. + + When caching is enabled, an item's paint() function will generally draw into an + offscreen pixmap cache; for any subsequent repaint requests, the Graphics View framework will redraw from the cache. This approach works particularly well with QGLWidget, which stores all the cache as OpenGL textures. @@ -1980,6 +1982,12 @@ QGraphicsItem::CacheMode QGraphicsItem::cacheMode() const You can read more about the different cache modes in the CacheMode documentation. + \note Enabling caching does not imply that the item's paint() function will be + called only in response to an explicit update() call. For instance, under + memory pressure, Qt may decide to drop some of the cache information; + in such cases an item's paint() function will be called even if there + was no update() call (that is, exactly as if there were no caching enabled). + \sa CacheMode, QPixmapCache::setCacheLimit() */ void QGraphicsItem::setCacheMode(CacheMode mode, const QSize &logicalCacheSize) @@ -5337,6 +5345,16 @@ void QGraphicsItem::setBoundingRegionGranularity(qreal granularity) All painting is done in local coordinates. + \note It is mandatory that an item will always redraw itself in the exact + same way, unless update() was called; otherwise visual artifacts may + occur. In other words, two subsequent calls to paint() must always produce + the same output, unless update() was called between them. + + \note Enabling caching for an item does not guarantee that paint() + will be invoked only once by the Graphics View framework, + even without any explicit call to update(). See the documentation of + setCacheMode() for more details. + \sa setCacheMode(), QPen::width(), {Item Coordinates}, ItemUsesExtendedStyleOption */ -- cgit v1.2.3 From 6451c4baeb829708628a5759ee3d3978489acc7d Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Wed, 15 Oct 2014 09:47:10 -0500 Subject: Fix release-with-debuginfo flags for QCC Due to the way that the QCC mkspecs are structured, the recent change to add full optimization support causes the -O2 flag to be completely dropped from QCC builds in release-with-debuginfo mode, since the QMAKE_CFLAGS_OPTIMIZE variable is not declared in any configuration file included by QCC toolchains. This patch adds the necessary flags to make the QCC toolchain operate correctly. Change-Id: I4cd93442d59fae7c92fc5219cddb16f367447203 Reviewed-by: Rafael Roquetto --- mkspecs/common/qcc-base.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf index 122f940ec3..f529d7fc7b 100644 --- a/mkspecs/common/qcc-base.conf +++ b/mkspecs/common/qcc-base.conf @@ -11,11 +11,15 @@ QMAKE_COMPILER = rim_qcc gcc # qcc is mostly gcc in disguise +QMAKE_CFLAGS_OPTIMIZE = -O2 +QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 + QMAKE_CFLAGS += -Wno-psabi QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC -shared QMAKE_CFLAGS_STATIC_LIB += -fPIC @@ -36,6 +40,7 @@ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -- cgit v1.2.3 From 82c2118cba2744000cff7cd3e5e952df775f5aba Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Tue, 14 Oct 2014 16:57:20 -0500 Subject: Improve QElapsedTimer resolution on QNX The standard POSIX clock functions are present on QNX, but only return timing information with millisecond accuracy. To get accuracy beyond that, platform-specific functions must be used. Change-Id: I54a0550f1865dbea3c60a86ecd8ad99df3fe42b4 Reviewed-by: Frank Osterfeld Reviewed-by: Bernd Weimer Reviewed-by: Rafael Roquetto --- src/corelib/tools/qelapsedtimer_unix.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp index 5b26d551a7..9dd5df0266 100644 --- a/src/corelib/tools/qelapsedtimer_unix.cpp +++ b/src/corelib/tools/qelapsedtimer_unix.cpp @@ -35,8 +35,12 @@ #define _POSIX_C_SOURCE 200809L #include "qelapsedtimer.h" -#ifdef Q_OS_VXWORKS +#if defined(Q_OS_VXWORKS) #include "qfunctions_vxworks.h" +#elif defined(Q_OS_QNX) +#include +#include +#include #else #include #include @@ -84,7 +88,18 @@ QT_BEGIN_NAMESPACE * see http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html */ -#ifndef CLOCK_REALTIME +#if defined(Q_OS_QNX) +static inline void qt_clock_gettime(clockid_t clock, struct timespec *ts) +{ + // The standard POSIX clock calls only have 1ms accuracy on QNX. To get + // higher accuracy, this platform-specific function must be used instead + quint64 cycles_per_sec = SYSPAGE_ENTRY(qtime)->cycles_per_sec; + quint64 cycles = ClockCycles(); + ts->tv_sec = cycles / cycles_per_sec; + quint64 mod = cycles % cycles_per_sec; + ts->tv_nsec = mod * Q_INT64_C(1000000000) / cycles_per_sec; +} +#elif !defined(CLOCK_REALTIME) # define CLOCK_REALTIME 0 static inline void qt_clock_gettime(int, struct timespec *ts) { -- cgit v1.2.3 From 370d7bf48afb20017852c0c7faff45d40dbf81a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 22 Oct 2014 13:46:35 +0200 Subject: iOS: Make hide-keyboard gesture use normal UIGestureRecognizer flow Allows us to track state through the normal gesture recognizer states instead of custom variables. Change-Id: I4fe1b370a581132a9bbb8f51f7bee73381b80341 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qiosinputcontext.mm | 131 ++++++++++++++++++-------- 1 file changed, 90 insertions(+), 41 deletions(-) diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index 25d9f6c421..acdf6d9715 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -46,25 +46,28 @@ #include "qiosglobal.h" #include "qiosintegration.h" #include "qiostextresponder.h" +#include "qiosviewcontroller.h" #include "qioswindow.h" #include "quiview.h" #include #include +// ------------------------------------------------------------------------- + static QUIView *focusView() { return qApp->focusWindow() ? reinterpret_cast(qApp->focusWindow()->winId()) : 0; } -@interface QIOSKeyboardListener : UIGestureRecognizer { +// ------------------------------------------------------------------------- + +@interface QIOSKeyboardListener : UIGestureRecognizer { @public QIOSInputContext *m_context; BOOL m_keyboardVisible; BOOL m_keyboardVisibleAndDocked; - BOOL m_touchPressWhileKeyboardVisible; - BOOL m_keyboardHiddenByGesture; QRectF m_keyboardRect; CGRect m_keyboardEndRect; NSTimeInterval m_duration; @@ -77,13 +80,11 @@ static QUIView *focusView() - (id)initWithQIOSInputContext:(QIOSInputContext *)context { - self = [super initWithTarget:self action:@selector(gestureTriggered)]; + self = [super initWithTarget:self action:@selector(gestureStateChanged:)]; if (self) { m_context = context; m_keyboardVisible = NO; m_keyboardVisibleAndDocked = NO; - m_touchPressWhileKeyboardVisible = NO; - m_keyboardHiddenByGesture = NO; m_duration = 0; m_curve = UIViewAnimationCurveEaseOut; m_viewController = 0; @@ -99,10 +100,9 @@ static QUIView *focusView() Q_ASSERT(m_viewController); // Attach 'hide keyboard' gesture to the window, but keep it disabled when the - // keyboard is not visible. Note that we never trigger the gesture the way it is intended - // since we don't want to cancel touch events and interrupt flicking etc. Instead we use - // the gesture framework more as an event filter and hide the keyboard silently. + // keyboard is not visible. self.enabled = NO; + self.cancelsTouchesInView = NO; self.delaysTouchesEnded = NO; [m_viewController.view.window addGestureRecognizer:self]; } @@ -156,11 +156,19 @@ static QUIView *focusView() // Note that UIKeyboardWillShowNotification is only sendt when the keyboard is docked. m_keyboardVisibleAndDocked = YES; m_keyboardEndRect = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; - self.enabled = YES; + if (!m_duration) { m_duration = [[notification.userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; m_curve = UIViewAnimationCurve([[notification.userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue]); } + + UIResponder *firstResponder = [UIResponder currentFirstResponder]; + if (![firstResponder isKindOfClass:[QIOSTextInputResponder class]]) + return; + + // Enable hide-keyboard gesture + self.enabled = YES; + m_context->scrollToCursor(); } @@ -169,7 +177,7 @@ static QUIView *focusView() // Note that UIKeyboardWillHideNotification is also sendt when the keyboard is undocked. m_keyboardVisibleAndDocked = NO; m_keyboardEndRect = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; - if (!m_keyboardHiddenByGesture) { + if (self.state != UIGestureRecognizerStateBegan) { // Only disable the gesture if the hiding of the keyboard was not caused by it. // Otherwise we need to await the final touchEnd callback for doing some clean-up. self.enabled = NO; @@ -202,54 +210,81 @@ static QUIView *focusView() } } -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +// ------------------------------------------------------------------------- + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - CGPoint p = [[touches anyObject] locationInView:m_viewController.view.window]; - if (CGRectContainsPoint(m_keyboardEndRect, p)) { - m_keyboardHiddenByGesture = YES; + [super touchesBegan:touches withEvent:event]; - UIResponder *firstResponder = [UIResponder currentFirstResponder]; - Q_ASSERT([firstResponder isKindOfClass:[QIOSTextInputResponder class]]); - [firstResponder resignFirstResponder]; - } + Q_ASSERT(m_keyboardVisibleAndDocked); - [super touchesMoved:touches withEvent:event]; + if ([touches count] != 1) + self.state = UIGestureRecognizerStateFailed; } -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - Q_ASSERT(m_keyboardVisibleAndDocked); - m_touchPressWhileKeyboardVisible = YES; - [super touchesBegan:touches withEvent:event]; + [super touchesMoved:touches withEvent:event]; + + if (self.state != UIGestureRecognizerStatePossible) + return; + + CGPoint touchPoint = [[touches anyObject] locationInView:m_viewController.view.window]; + if (CGRectContainsPoint(m_keyboardEndRect, touchPoint)) + self.state = UIGestureRecognizerStateBegan; } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { - m_touchPressWhileKeyboardVisible = NO; - [self performSelectorOnMainThread:@selector(touchesEndedPostDelivery) withObject:nil waitUntilDone:NO]; [super touchesEnded:touches withEvent:event]; + + [self touchesEndedOrCancelled]; } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { - m_touchPressWhileKeyboardVisible = NO; - [self performSelectorOnMainThread:@selector(touchesEndedPostDelivery) withObject:nil waitUntilDone:NO]; [super touchesCancelled:touches withEvent:event]; + + [self touchesEndedOrCancelled]; } -- (void)touchesEndedPostDelivery +- (void)touchesEndedOrCancelled { - // Do some clean-up _after_ touchEnd has been delivered to QUIView - m_keyboardHiddenByGesture = NO; + // Defer final state change until next runloop iteration, so that Qt + // has a chance to process the final touch events first, before we eg. + // scroll the view. + dispatch_async(dispatch_get_main_queue (), ^{ + // iOS will transition from began to changed by itself + Q_ASSERT(self.state != UIGestureRecognizerStateBegan); + + if (self.state == UIGestureRecognizerStateChanged) + self.state = UIGestureRecognizerStateEnded; + else + self.state = UIGestureRecognizerStateFailed; + }); +} + +- (void)gestureStateChanged:(id)sender +{ + Q_UNUSED(sender); + + if (self.state == UIGestureRecognizerStateBegan) { + qImDebug() << "hide keyboard gesture was triggered"; + UIResponder *firstResponder = [UIResponder currentFirstResponder]; + Q_ASSERT([firstResponder isKindOfClass:[QIOSTextInputResponder class]]); + [firstResponder resignFirstResponder]; + } +} + +- (void)reset +{ + [super reset]; + if (!m_keyboardVisibleAndDocked) { + qImDebug() << "keyboard was hidden, disabling hide-keyboard gesture"; self.enabled = NO; - if (qApp->focusObject()) { - // UI Controls are told to gain focus on touch release. So when the 'hide keyboard' gesture - // finishes, the final touch end can trigger a control to gain focus. This is in conflict with - // the gesture, so we clear focus once more as a work-around. - static_cast(QObjectPrivate::get(qApp->focusWindow()))->clearFocusObject(); - } } else { + qImDebug() << "gesture completed without triggering, scrolling view to cursor"; m_context->scrollToCursor(); } } @@ -353,10 +388,10 @@ void QIOSInputContext::scrollToCursor() if (!isQtApplication()) return; - if (m_keyboardListener->m_touchPressWhileKeyboardVisible) { - // Don't scroll to the cursor if the user is touching the screen. This - // interferes with selection and the 'hide keyboard' gesture. Instead - // we update scrolling upon touchEnd. + if (m_keyboardListener.state == UIGestureRecognizerStatePossible && m_keyboardListener.numberOfTouches == 1) { + // Don't scroll to the cursor if the user is touching the screen and possibly + // trying to trigger the hide-keyboard gesture. + qImDebug() << "preventing scrolling to cursor as we're still waiting for a possible gesture"; return; } @@ -426,6 +461,18 @@ void QIOSInputContext::setFocusObject(QObject *focusObject) { Q_UNUSED(focusObject); + qImDebug() << "new focus object =" << focusObject; + + if (m_keyboardListener.state == UIGestureRecognizerStateChanged) { + // A new focus object may be set as part of delivering touch events to + // application during the hide-keyboard gesture, but we don't want that + // to result in a new object getting focus and bringing the keyboard up + // again. + qImDebug() << "clearing focus object" << focusObject << "as hide-keyboard gesture is active"; + clearCurrentFocusObject(); + return; + } + reset(); if (m_keyboardListener->m_keyboardVisibleAndDocked) @@ -436,6 +483,8 @@ void QIOSInputContext::focusWindowChanged(QWindow *focusWindow) { Q_UNUSED(focusWindow); + qImDebug() << "new focus window =" << focusWindow; + reset(); [m_keyboardListener handleKeyboardRectChanged]; -- cgit v1.2.3 From 719a6fd50d590e819fa541dc5b31661b38537344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 28 Oct 2014 12:54:26 +0100 Subject: iOS: Allow virtual keyboard to be hidden by QInputMethod::hide() Calling the function has the same effect as dismissing the keyboard using the native keyboard dismiss button or the hide-keyboard gesture, and will result in the QIOSTextInputResponder losing first-responder status and the current focus object being cleared. QtWidgets and other parts of Qt will try to hide the keyboard during focus changes between widgets, which we already take care of when the focus object changes, so we detect the situation and ignore it, by requiring that the current focus object matches the one we've brought up the text responder for. Showing the virtual keyboard is still a no-op, as there is no way to show the virtual keyboard without a focus-object. Change-Id: Iefcb403c2b6d3da8a4df3fcd53bc1244ba9c4d23 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qiosinputcontext.h | 3 ++- src/plugins/platforms/ios/qiosinputcontext.mm | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/ios/qiosinputcontext.h b/src/plugins/platforms/ios/qiosinputcontext.h index f07408db81..1f1130f932 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.h +++ b/src/plugins/platforms/ios/qiosinputcontext.h @@ -51,9 +51,10 @@ QT_BEGIN_NAMESPACE struct ImeState { - ImeState() : currentState(0) {} + ImeState() : currentState(0), focusObject(0) {} Qt::InputMethodQueries update(Qt::InputMethodQueries properties); QInputMethodQueryEvent currentState; + QObject *focusObject; }; class QIOSInputContext : public QPlatformInputContext diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index acdf6d9715..072a49c7c5 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -300,8 +300,11 @@ Qt::InputMethodQueries ImeState::update(Qt::InputMethodQueries properties) QInputMethodQueryEvent newState(properties); - if (qApp && qApp->focusObject()) - QCoreApplication::sendEvent(qApp->focusObject(), &newState); + // Update the focus object that the new state is based on + focusObject = qApp ? qApp->focusObject() : 0; + + if (focusObject) + QCoreApplication::sendEvent(focusObject, &newState); Qt::InputMethodQueries updatedProperties; for (uint i = 0; i < (sizeof(Qt::ImQueryAll) * CHAR_BIT); ++i) { @@ -348,11 +351,23 @@ QRectF QIOSInputContext::keyboardRect() const void QIOSInputContext::showInputPanel() { // No-op, keyboard controlled fully by platform based on focus + qImDebug() << "can't show virtual keyboard without a focus object, ignoring"; } void QIOSInputContext::hideInputPanel() { - // No-op, keyboard controlled fully by platform based on focus + if (![m_textResponder isFirstResponder]) { + qImDebug() << "QIOSTextInputResponder is not first responder, ignoring"; + return; + } + + if (qGuiApp->focusObject() != m_imeState.focusObject) { + qImDebug() << "current focus object does not match IM state, likely hiding from focusOut event, so ignoring"; + return; + } + + qImDebug() << "hiding VKB as requested by QInputMethod::hide()"; + [m_textResponder resignFirstResponder]; } void QIOSInputContext::clearCurrentFocusObject() -- cgit v1.2.3 From 5d99beb14e01f490b38fc568806a6ad972ed5dda Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 Nov 2014 14:48:20 -0800 Subject: Place the Qt plugin metadata in a PE-COFF section with MinGW too Commit ec360d7ad90945273c7d96c9a159131dcbcd67c3 made it work for ELF platforms, Apple platforms and for MSVC, but we apparently forgot it for MinGW. This patch corrects that mistake. We won't have the PE-COFF section parser until 5.5, but this will at least making Qt 5.4-built plugins work on the faster case. Change-Id: I51b06837dc321eaa4724c9598293cf85570f67fc Reviewed-by: Lars Knoll --- src/corelib/plugin/qplugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h index 4e9a60504a..c424344c3a 100644 --- a/src/corelib/plugin/qplugin.h +++ b/src/corelib/plugin/qplugin.h @@ -71,7 +71,7 @@ Q_DECLARE_TYPEINFO(QStaticPlugin, Q_PRIMITIVE_TYPE); void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin); -#if defined (Q_OF_ELF) && (defined (Q_CC_GNU) || defined(Q_CC_CLANG)) +#if (defined(Q_OF_ELF) || defined(Q_OS_WIN)) && (defined (Q_CC_GNU) || defined(Q_CC_CLANG)) # define QT_PLUGIN_METADATA_SECTION \ __attribute__ ((section (".qtmetadata"))) __attribute__((used)) #elif defined(Q_OS_MAC) -- cgit v1.2.3 From ba73bde66efa588a74eaaa946e80e9de2b9e2d59 Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Fri, 7 Nov 2014 09:41:07 +0100 Subject: Compile fix for QT_NO_DOCKWIDGET in QtWidgets Change-Id: I4567e4d0e5738c1de74661a325895f9eaa1d06c4 Reviewed-by: Laszlo Agocs --- src/widgets/widgets/qmainwindowlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp index 1cc7f201ba..8f8642a72a 100644 --- a/src/widgets/widgets/qmainwindowlayout.cpp +++ b/src/widgets/widgets/qmainwindowlayout.cpp @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_DOCKWIDGET +#ifdef QT_NO_DOCKWIDGET extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); #endif -- cgit v1.2.3