| 1 | /* |
| 2 | * Copyright 2013 Canonical Ltd. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU Lesser General Public License as published by |
| 6 | * the Free Software Foundation; version 3. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU Lesser General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU Lesser General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | * |
| 16 | * Author: Zsombor Egri <[email protected]> |
| 17 | */ |
| 18 | |
| 19 | #include <signal.h> |
| 20 | |
| 21 | #include <QtCore/QCoreApplication> |
| 22 | #include <QtCore/QProcess> |
| 23 | #include <QtCore/QProcessEnvironment> |
| 24 | #include <QtCore/QRegularExpression> |
| 25 | #include <QtGui/QMatrix4x4> |
| 26 | #include <QtGui/QQuaternion> |
| 27 | #include <QtGui/QVector3D> |
| 28 | #include <QtGui/QVector4D> |
| 29 | #include <QtQml/QQmlEngine> |
| 30 | #include <QtQml/QQmlProperty> |
| 31 | #include <QtQuick/QQuickItem> |
| 32 | #include <QtQuick/QQuickView> |
| 33 | #include <QtTest/QSignalSpy> |
| 34 | #include <QtTest/QtTest> |
| 35 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0) |
| 36 | #include <LomiriToolkit-Qt6/lomiritoolkitmodule.h> |
| 37 | #else |
| 38 | #include <LomiriToolkit/lomiritoolkitmodule.h>cxx . . $ `<file>/include/LomiriToolkit/lomiritoolkitmodule.h`/ |
| 39 | #endif |
| 40 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0) |
| 41 | #include <LomiriToolkit-Qt6/private/quickutils_p.h> |
| 42 | #else |
| 43 | #include <LomiriToolkit/private/quickutils_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/quickutils_p.h`/ |
| 44 | #endif |
| 45 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0) |
| 46 | #include <LomiriToolkit-Qt6/private/ucapplication_p.h> |
| 47 | #else |
| 48 | #include <LomiriToolkit/private/ucapplication_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucapplication_p.h`/ |
| 49 | #endif |
| 50 | #define protectedcxx . . $ `tests/unit/statesaver11/tst_statesaver.cpp:50:9`! public |
| 51 | #define privatecxx . . $ `tests/unit/statesaver11/tst_statesaver.cpp:51:9`! public |
| 52 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0) |
| 53 | #include <LomiriToolkit-Qt6/private/ucstatesaver_p.h> |
| 54 | #else |
| 55 | #include <LomiriToolkit/private/ucstatesaver_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/ucstatesaver_p.h`/ |
| 56 | #endif |
| 57 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0) |
| 58 | #include <LomiriToolkit-Qt6/private/statesaverbackend_p.h> |
| 59 | #else |
| 60 | #include <LomiriToolkit/private/statesaverbackend_p.h>cxx . . $ `<file>/include/LomiriToolkit/5.5.0/LomiriToolkit/private/statesaverbackend_p.h`/ |
| 61 | #endif |
| 62 | #undef privatecxx . . $ `tests/unit/statesaver11/tst_statesaver.cpp:51:9`! |
| 63 | #undef protectedcxx . . $ `tests/unit/statesaver11/tst_statesaver.cpp:50:9`! |
| 64 | |
| 65 | #include "uctestcase.h"cxx . . $ `<file>/src/imports/Test/plugin/uctestcase.h`/ |
| 66 | |
| 67 | UT_USE_NAMESPACEcxx . . $ `src/LomiriToolkit/lomiritoolkitglobal.h:55:9`! |
| 68 | |
| 69 | class tst_StateSaverTestcxx . . $ tst_StateSaverTest# : public QObjectcxx . . $ QObject# |
| 70 | { |
| 71 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 72 | public: |
| 73 | tst_StateSaverTestcxx . . $ tst_StateSaverTest#tst_StateSaverTest(49f6e7a06ebc5aa8).() {} |
| 74 | |
| 75 | private: |
| 76 | QTemporaryDircxx . . $ QTemporaryDir# *tempDircxx . . $ tst_StateSaverTest#tempDir. = nullptr; |
| 77 | QStringcxx . . $ QString# m_modulePathcxx . . $ tst_StateSaverTest#m_modulePath.; |
| 78 | QQmlEnginecxx . . $ QQmlEngine# *enginecxx . . $ tst_StateSaverTest#engine. = nullptr; |
| 79 | |
| 80 | QQuickViewcxx . . $ QQuickView# *createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).(const QStringcxx . . $ QString# &file) |
| 81 | { |
| 82 | LomiriTestCasecxx . . $ LomiriTestCase#* testCase = new LomiriTestCasecxx . . $ LomiriTestCase#(file); |
| 83 | return qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<QQuickViewcxx . . $ QQuickView#*>(testCase); |
| 84 | } |
| 85 | |
| 86 | void resetViewcxx . . $ tst_StateSaverTest#resetView(cb83509f3ccdf58).(QScopedPointercxx . . $ QScopedPointer#<LomiriTestCasecxx . . $ LomiriTestCase#> &view, const QStringcxx . . $ QString# &file) |
| 87 | { |
| 88 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! StateSaverBackendcxx . . $ StateSaverBackend#::instancecxx . . $ StateSaverBackend#instance(87462851321d3138).()->initiateStateSavingcxx . . $ StateSaverBackend#initiateStateSaving(49f6e7a06ebc5aa8).(); |
| 89 | view.resetcxx . . $ QScopedPointer#reset(b1f27668ced7db9d).(); |
| 90 | // Make sure that the state is reloaded from file |
| 91 | StateSaverBackendcxx . . $ StateSaverBackend#::instancecxx . . $ StateSaverBackend#instance(87462851321d3138).()->m_archivecxx . . $ StateSaverBackend#m_archive..datacxx . . $ QPointer#data(5a2a78a048fb49a8).()->synccxx . . $ QSettings#sync(49f6e7a06ebc5aa8).(); |
| 92 | view.resetcxx . . $ QScopedPointer#reset(b1f27668ced7db9d).(new LomiriTestCasecxx . . $ LomiriTestCase#(file)); |
| 93 | } |
| 94 | |
| 95 | void resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> &view, const QStringcxx . . $ QString# &file) |
| 96 | { |
| 97 | Q_EMITcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:95:10`! StateSaverBackendcxx . . $ StateSaverBackend#::instancecxx . . $ StateSaverBackend#instance(87462851321d3138).()->initiateStateSavingcxx . . $ StateSaverBackend#initiateStateSaving(49f6e7a06ebc5aa8).(); |
| 98 | view.resetcxx . . $ QScopedPointer#reset(b1f27668ced7db9d).(); |
| 99 | // Make sure that the state is reloaded from file |
| 100 | StateSaverBackendcxx . . $ StateSaverBackend#::instancecxx . . $ StateSaverBackend#instance(87462851321d3138).()->m_archivecxx . . $ StateSaverBackend#m_archive..datacxx . . $ QPointer#data(5a2a78a048fb49a8).()->synccxx . . $ QSettings#sync(49f6e7a06ebc5aa8).(); |
| 101 | view.resetcxx . . $ QScopedPointer#reset(b1f27668ced7db9d).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).(file)); |
| 102 | } |
| 103 | |
| 104 | QStringcxx . . $ QString# stateFilecxx . . $ tst_StateSaverTest#stateFile(fd988a2ab94d906b).(const QStringcxx . . $ QString# &appId) |
| 105 | { |
| 106 | return QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1/%2/statesaver.appstate") |
| 107 | .argcxx . . $ QString#arg(bc823072288cbbb5).(QStandardPathscxx . . $ QStandardPaths#::writableLocationcxx . . $ QStandardPaths#writableLocation(7d8b34fbb6a9c1bf).(QStandardPathscxx . . $ QStandardPaths#::RuntimeLocationcxx . . $ QStandardPaths#RuntimeLocation.)) |
| 108 | .argcxx . . $ QString#arg(bc823072288cbbb5).(appId); |
| 109 | } |
| 110 | |
| 111 | private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!: |
| 112 | |
| 113 | void initTestCasecxx . . $ tst_StateSaverTest#initTestCase(49f6e7a06ebc5aa8).() |
| 114 | { |
| 115 | QCoreApplicationcxx . . $ QCoreApplication#::setApplicationNamecxx . . $ QCoreApplication#setApplicationName(3520e46b33348bf6).("savedstate"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 116 | QCoreApplicationcxx . . $ QCoreApplication#::setOrganizationNamecxx . . $ QCoreApplication#setOrganizationName(3520e46b33348bf6).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 117 | QDircxx . . $ QDir# modulescxx . . $ QDir#QDir(3520e46b33348bf6). (LOMIRI_QML_IMPORT_PATHcxx . . $ `<built-in>:485:9`!); |
| 118 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(modules.exists()); |
| 119 | m_modulePathcxx . . $ tst_StateSaverTest#m_modulePath. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). modules.absolutePathcxx . . $ QDir#absolutePath(6ef7b6c27b00b43d).(); |
| 120 | // XDG_RUNTIME_DIR may not be set in a test environment |
| 121 | |
| 122 | tempDircxx . . $ tst_StateSaverTest#tempDir. = new QTemporaryDircxx . . $ QTemporaryDir#(); |
| 123 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(tempDir->isValid()); |
| 124 | QStringcxx . . $ QString# testRuntimeDir(tempDircxx . . $ tst_StateSaverTest#tempDir.->filePathcxx . . $ QTemporaryDir#filePath(5555d9024dcf93fb).("tst_statesaver"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 125 | // Create manually to avoid wrong ownership |
| 126 | QDircxx . . $ QDir#QDir(3520e46b33348bf6).(testRuntimeDir).mkdircxx . . $ QDir#mkdir(f3b39adf77d9c36c).("tst_statesaver"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 127 | setenv("XDG_RUNTIME_DIR", testRuntimeDir.toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).(), 1); |
| 128 | QFilecxx . . $ QFile#::setPermissionscxx . . $ QFile#setPermissions(8c341457b00c996b).(testRuntimeDircxx . . $ QString#QString(45672f3c6961a244)..toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).(), QFileDevicecxx . . $ QFileDevice#::ReadOwnercxx . . $ QFileDevice#ReadOwner. |cxx . . $ `operator|`(2d520c7bd59561d4). QFileDevicecxx . . $ QFileDevice#::WriteOwnercxx . . $ QFileDevice#WriteOwner. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QFileDevicecxx . . $ QFileDevice#::ExeOwnercxx . . $ QFileDevice#ExeOwner.); |
| 129 | } |
| 130 | |
| 131 | void cleanupTestCasecxx . . $ tst_StateSaverTest#cleanupTestCase(49f6e7a06ebc5aa8).() |
| 132 | { |
| 133 | delete tempDircxx . . $ tst_StateSaverTest#tempDir.; |
| 134 | } |
| 135 | |
| 136 | void initcxx . . $ tst_StateSaverTest#init(49f6e7a06ebc5aa8).() |
| 137 | { |
| 138 | enginecxx . . $ tst_StateSaverTest#engine. = new QQmlEnginecxx . . $ QQmlEngine#QQmlEngine(749de1b6ae65bddd).; |
| 139 | LomiriToolkitModulecxx . . $ LomiriToolkitModule#::initializeContextPropertiescxx . . $ LomiriToolkitModule#initializeContextProperties(448ebc38f81b69d7).(enginecxx . . $ tst_StateSaverTest#engine.); |
| 140 | // invoke initialization |
| 141 | StateSaverBackendcxx . . $ StateSaverBackend#::instancecxx . . $ StateSaverBackend#instance(87462851321d3138).(enginecxx . . $ tst_StateSaverTest#engine.); |
| 142 | } |
| 143 | void cleanupcxx . . $ tst_StateSaverTest#cleanup(49f6e7a06ebc5aa8).() |
| 144 | { |
| 145 | StateSaverBackendcxx . . $ StateSaverBackend#::instancecxx . . $ StateSaverBackend#instance(87462851321d3138).()->resetcxx . . $ StateSaverBackend#reset(c9857a73d68e59ba).(); |
| 146 | delete enginecxx . . $ tst_StateSaverTest#engine.; |
| 147 | } |
| 148 | |
| 149 | void test_SaveArrayscxx . . $ tst_StateSaverTest#test_SaveArrays(49f6e7a06ebc5aa8).() |
| 150 | { |
| 151 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("SaveArrays.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 152 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 153 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 154 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 155 | |
| 156 | QVariantListcxx . . $ QVariantList# boolValuescxx . . $ QList#QList(ced63f7c635d850d).; |
| 157 | boolValues <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). truecxx . . $ QVariant#QVariant(b45ddcbc8423892c). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). truecxx . . $ QVariant#QVariant(b45ddcbc8423892c).; |
| 158 | QVariantListcxx . . $ QVariantList# intValuescxx . . $ QList#QList(ced63f7c635d850d).; |
| 159 | intValues <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). 100cxx . . $ QVariant#QVariant(d4f767463ce0a6b3). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). 200cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).; |
| 160 | QVariantListcxx . . $ QVariantList# realValuescxx . . $ QList#QList(ced63f7c635d850d).; |
| 161 | realValues <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). 123.45cxx . . $ QVariant#QVariant(ba8836b59fb42830). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). 678.9cxx . . $ QVariant#QVariant(ba8836b59fb42830).; |
| 162 | QVariantListcxx . . $ QVariantList# stringValuescxx . . $ QList#QList(ced63f7c635d850d).; |
| 163 | stringValues <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "one"cxx . . $ QVariant#QVariant(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "two"cxx . . $ QVariant#QVariant(85c52e162fed56f9).; |
| 164 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("boolArray", boolValuescxx . . $ QVariant#QVariant(2f4009bfc0c7e161).); |
| 165 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("intArray", intValuescxx . . $ QVariant#QVariant(2f4009bfc0c7e161).); |
| 166 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("realArray", realValuescxx . . $ QVariant#QVariant(2f4009bfc0c7e161).); |
| 167 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("stringArray", stringValuescxx . . $ QVariant#QVariant(2f4009bfc0c7e161).); |
| 168 | |
| 169 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "SaveArrays.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 170 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 171 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 172 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 173 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItem->property("boolArray").value<QVariantList>(), boolValues); |
| 174 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItem->property("intArray").value<QVariantList>(), intValues); |
| 175 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItem->property("realArray").value<QVariantList>(), realValues); |
| 176 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItem->property("stringArray").value<QVariantList>(), stringValues); |
| 177 | } |
| 178 | |
| 179 | void test_SaveStructurescxx . . $ tst_StateSaverTest#test_SaveStructures(49f6e7a06ebc5aa8).() |
| 180 | { |
| 181 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("SaveSupportedTypes.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 182 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 183 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 184 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 185 | |
| 186 | QVariantHashcxx . . $ QVariantHash# valuescxx . . $ QHash#QHash(ced63f7c635d850d).; |
| 187 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("intValue"cxx . . $ QString#QString(85c52e162fed56f9)., 1000cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).); |
| 188 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("boolValue"cxx . . $ QString#QString(85c52e162fed56f9)., truecxx . . $ QVariant#QVariant(b45ddcbc8423892c).); |
| 189 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("realValue"cxx . . $ QString#QString(85c52e162fed56f9)., 345.12cxx . . $ QVariant#QVariant(ba8836b59fb42830).); |
| 190 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("doubleValue"cxx . . $ QString#QString(85c52e162fed56f9)., 65535.33244cxx . . $ QVariant#QVariant(ba8836b59fb42830).); |
| 191 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("string"cxx . . $ QString#QString(85c52e162fed56f9)., "test string"cxx . . $ QVariant#QVariant(85c52e162fed56f9).); |
| 192 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("url"cxx . . $ QString#QString(85c52e162fed56f9)., QUrlcxx . . $ QVariant#QVariant(37355d2f77053a23).::fromLocalFilecxx . . $ QUrl#fromLocalFile(daf4b0201622af21).("tst_statesaver.cpp"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 193 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("date"cxx . . $ QString#QString(85c52e162fed56f9)., QDateTimecxx . . $ QVariant#QVariant(3672ecc950120406).::currentDateTimecxx . . $ QDateTime#currentDateTime(bf5129c8228c71c0).().addDayscxx . . $ QDateTime#addDays(95f9ba7c82d0c5e8).(5)); |
| 194 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("point"cxx . . $ QString#QString(85c52e162fed56f9)., QPointFcxx . . $ QVariant#QVariant(4258778b894f8bb6).(100, 100)); |
| 195 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("rect"cxx . . $ QString#QString(85c52e162fed56f9)., QRectFcxx . . $ QVariant#QVariant(7a51d6bf5aba0926).(100, 100, 200, 200)); |
| 196 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("size"cxx . . $ QString#QString(85c52e162fed56f9)., QSizeFcxx . . $ QVariant#QVariant(20547220bcb692d1).(345, 678)); |
| 197 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("color"cxx . . $ QString#QString(85c52e162fed56f9)., QColorcxx . . $ QColor#QColor(85c52e162fed56f9).("blue")); |
| 198 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("font"cxx . . $ QString#QString(85c52e162fed56f9)., QFontcxx . . $ QFont#QFont(7ae16150a604556).("Noto Sans"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 199 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("vector2d"cxx . . $ QString#QString(85c52e162fed56f9)., QVector2Dcxx . . $ QVector2D#QVector2D(5102ef758adc0ae7).(100.0, 200.0)); |
| 200 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("vector3d"cxx . . $ QString#QString(85c52e162fed56f9)., QVector3Dcxx . . $ QVector3D#QVector3D(bd1040fe176e0786).(100.0, 200.0, 300.0)); |
| 201 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("vector4d"cxx . . $ QString#QString(85c52e162fed56f9)., QVector4Dcxx . . $ QVector4D#QVector4D(7e9a355db6148521).(100.0, 200.0, 300.0, 400.0)); |
| 202 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("quaternion"cxx . . $ QString#QString(85c52e162fed56f9)., QQuaternioncxx . . $ QQuaternion#QQuaternion(7e9a355db6148521).(1, 100.0, 200.0, 300.0)); |
| 203 | values.insertcxx . . $ QHash#insert(d77b19c31d2eb147).("matrix4x4"cxx . . $ QString#QString(85c52e162fed56f9)., QMatrix4x4cxx . . $ QMatrix4x4#QMatrix4x4(2baec959f14975bf).(5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)); |
| 204 | |
| 205 | QHashIteratorcxx . . $ QHashIterator#<QStringcxx . . $ QString#, QVariantcxx . . $ QVariant#> icxx . . $ QHashIterator#QHashIterator(b49801d1bb7ffe09).(values); |
| 206 | while (i.hasNextcxx . . $ QHashIterator#hasNext(50ce9a9e25b4a850).()) { |
| 207 | i.nextcxx . . $ QHashIterator#next(502dc262f89e6c2c).(); |
| 208 | QVERIFY2cxx . . $ `<external>/8602788698586413231/qtestcase.h:75:9`!(testItem->setProperty(i.key().toLocal8Bit().constData(), i.value()), |
| 209 | QString("set %1").arg(i.key()).toLocal8Bit().constData()); |
| 210 | } |
| 211 | |
| 212 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "SaveSupportedTypes.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 213 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 214 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 215 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 216 | |
| 217 | UCStateSaverAttachedcxx . . $ UCStateSaverAttached# *stateSaver = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(testItem, false)); |
| 218 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver); |
| 219 | |
| 220 | QStringListcxx . . $ QStringList# properties = stateSaver->propertiescxx . . $ UCStateSaverAttached#properties(6ef7b6c27b00b43d).().splitcxx . . $ QString#split(92030b8bf74e4227).(','cxx . . $ QChar#QChar(f349c77f591a7878).); |
| 221 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(const QString &property, properties) { |
| 222 | QVERIFY2cxx . . $ `<external>/8602788698586413231/qtestcase.h:75:9`!(testItem->property(property.toLocal8Bit().constData()) == values.value(property), QString("verifying %1").arg(property).toLocal8Bit().constData()); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | void test_SaveEnumcxx . . $ tst_StateSaverTest#test_SaveEnum(49f6e7a06ebc5aa8).() |
| 227 | { |
| 228 | /* This test is important because when saving the value of an enum |
| 229 | * property to QSettings, it is deserialized as a string. Setting that |
| 230 | * string value to an enum property fails and therefore the state |
| 231 | * restoration does not work. |
| 232 | * In most cases implicit type conversion from string to the appropriate |
| 233 | * type works. |
| 234 | */ |
| 235 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("SaveEnum.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 236 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 237 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 238 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 239 | |
| 240 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("horizontalAlignment", Qtcxx . . $ QVariant#QVariant(d4f767463ce0a6b3).::AlignRightcxx . . $ Qt/AlignRight.); |
| 241 | |
| 242 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "SaveEnum.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 243 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 244 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 245 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 246 | |
| 247 | |
| 248 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem->property("horizontalAlignment") == Qt::AlignRight); |
| 249 | } |
| 250 | |
| 251 | void test_SavePropertyGroupcxx . . $ tst_StateSaverTest#test_SavePropertyGroup(49f6e7a06ebc5aa8).() |
| 252 | { |
| 253 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("SavePropertyGroups.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 254 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 255 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 256 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 257 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem->setProperty("color", QColor("red"))); |
| 258 | // set property groups using QQmlProperty |
| 259 | QQmlPropertycxx . . $ QQmlProperty# borderColorcxx . . $ QQmlProperty#QQmlProperty(c8761f536c0fe045).(testItem, "border.color"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 260 | borderColor.writecxx . . $ QQmlProperty#write(d03696648ee9d662).(QColorcxx . . $ QColor#QColor(85c52e162fed56f9).("green")); |
| 261 | QQmlPropertycxx . . $ QQmlProperty# propertyGroupcxx . . $ QQmlProperty#QQmlProperty(c8761f536c0fe045).(testItem, "propertyGroup.color"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 262 | propertyGroup.writecxx . . $ QQmlProperty#write(d03696648ee9d662).(QColorcxx . . $ QColor#QColor(85c52e162fed56f9).("blue")); |
| 263 | |
| 264 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "SavePropertyGroups.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 265 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 266 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 267 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 268 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItem->property("color"), QVariant(QColor("red"))); |
| 269 | // read property groups using QQmlProperty |
| 270 | QQmlPropertycxx . . $ QQmlProperty# verifyBorderColorcxx . . $ QQmlProperty#QQmlProperty(c8761f536c0fe045).(testItem, "border.color"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 271 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(verifyBorderColor.read(), QVariant(QColor("green"))); |
| 272 | QQmlPropertycxx . . $ QQmlProperty# verifyPropertyGroupcxx . . $ QQmlProperty#QQmlProperty(c8761f536c0fe045).(testItem, "propertyGroup.color"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 273 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(verifyPropertyGroup.read(), QVariant(QColor("blue"))); |
| 274 | } |
| 275 | |
| 276 | void test_SaveObjectcxx . . $ tst_StateSaverTest#test_SaveObject(49f6e7a06ebc5aa8).() |
| 277 | { |
| 278 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("SaveObject.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 279 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 280 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 281 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 282 | |
| 283 | QScopedPointercxx . . $ QScopedPointer#<QQuickItemcxx . . $ QQuickItem#> objcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new QQuickItemcxx . . $ QQuickItem#QQuickItem(28aa4acb8f529eea).); |
| 284 | obj->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("internal"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 285 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("object", QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(28ec88ac519b76da).(obj.datacxx . . $ QScopedPointer#data(34d6acfd341ba7ab).())); |
| 286 | |
| 287 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "SaveObject.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 288 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 289 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).(); |
| 290 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 291 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem->property("object").value<QQuickItem*>() != obj.data()); |
| 292 | } |
| 293 | |
| 294 | void test_ValidUIDcxx . . $ tst_StateSaverTest#test_ValidUID(49f6e7a06ebc5aa8).() |
| 295 | { |
| 296 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("ValidUID.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 297 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 298 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 299 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 300 | |
| 301 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 302 | |
| 303 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "ValidUID.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 304 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 305 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 306 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 307 | } |
| 308 | |
| 309 | void test_InvalidUIDcxx . . $ tst_StateSaverTest#test_InvalidUID(49f6e7a06ebc5aa8).() |
| 310 | { |
| 311 | QStringcxx . . $ QString# filePath(QFileInfocxx . . $ QFileInfo#("InvalidUID.qml"cxx . . $ QString#QString(85c52e162fed56f9).).absoluteFilePathcxx . . $ QFileInfo#absoluteFilePath(6ef7b6c27b00b43d).()); |
| 312 | QStringcxx . . $ QString# objectId(filePath.replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9)., "_"cxx . . $ QString#QString(85c52e162fed56f9).) +cxx . . $ operator+(3d22f08efddf8107). ":21:5:testItem"); |
| 313 | |
| 314 | QRegularExpressioncxx . . $ QRegularExpression# warningRecxx . . $ QRegularExpression#QRegularExpression(4279d2539df7cd4a).(QStringLiteralcxx . . $ `<external>/2817157206922689722/qstringliteral.h:65:9`!( |
| 315 | ": QML (Item|InvalidUID): All the parents must have an id\\.\n" |
| 316 | "State saving disabled for %1, class (QQuickItem|InvalidUID)$" |
| 317 | ).argcxx . . $ QString#arg(bc823072288cbbb5).(QRegularExpressioncxx . . $ QRegularExpression#::escapecxx . . $ QRegularExpression#escape(fd988a2ab94d906b).(objectId))); |
| 318 | // The warning happens twice. |
| 319 | QTestcxx . . $ QTest/::ignoreMessagecxx . . $ QTest/ignoreMessage(f69cfd74466c3965).(QtWarningMsgcxx . . $ QtWarningMsg., warningRe); |
| 320 | QTestcxx . . $ QTest/::ignoreMessagecxx . . $ QTest/ignoreMessage(f69cfd74466c3965).(QtWarningMsgcxx . . $ QtWarningMsg., warningRe); |
| 321 | |
| 322 | QScopedPointercxx . . $ QScopedPointer#<LomiriTestCasecxx . . $ LomiriTestCase#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new LomiriTestCasecxx . . $ LomiriTestCase#("InvalidUID.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 323 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 324 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 325 | |
| 326 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 327 | |
| 328 | resetViewcxx . . $ tst_StateSaverTest#resetView(cb83509f3ccdf58).(view, "InvalidUID.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 329 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 330 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 331 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem == 0); |
| 332 | } |
| 333 | |
| 334 | void test_ValidGroupPropertycxx . . $ tst_StateSaverTest#test_ValidGroupProperty(49f6e7a06ebc5aa8).() |
| 335 | { |
| 336 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("ValidGroupProperty.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 337 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 338 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 339 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 340 | |
| 341 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("group"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 342 | |
| 343 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "ValidGroupProperty.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 344 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 345 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("group"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 346 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 347 | } |
| 348 | |
| 349 | void test_InvalidGroupPropertycxx . . $ tst_StateSaverTest#test_InvalidGroupProperty(49f6e7a06ebc5aa8).() |
| 350 | { |
| 351 | LomiriTestCasecxx . . $ LomiriTestCase#::ignoreWarningcxx . . $ LomiriTestCase#ignoreWarning(b4044705ef85da45).("InvalidGroupProperty.qml"cxx . . $ QString#QString(85c52e162fed56f9)., 24, 29, |
| 352 | "QML QtObject: Warning: attachee must have an ID. State will not be saved."cxx . . $ QString#QString(85c52e162fed56f9)., 2); |
| 353 | QScopedPointercxx . . $ QScopedPointer#<LomiriTestCasecxx . . $ LomiriTestCase#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new LomiriTestCasecxx . . $ LomiriTestCase#("InvalidGroupProperty.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 354 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 355 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 356 | |
| 357 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("group"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 358 | |
| 359 | resetViewcxx . . $ tst_StateSaverTest#resetView(cb83509f3ccdf58).(view, "InvalidGroupProperty.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 360 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("group"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 361 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem == 0); |
| 362 | } |
| 363 | |
| 364 | void test_Dynamiccxx . . $ tst_StateSaverTest#test_Dynamic(49f6e7a06ebc5aa8).() |
| 365 | { |
| 366 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("Dynamic.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 367 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 368 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 369 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 370 | |
| 371 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 372 | |
| 373 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "Dynamic.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 374 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 375 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 376 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 377 | } |
| 378 | |
| 379 | void test_TwoDynamicscxx . . $ tst_StateSaverTest#test_TwoDynamics(49f6e7a06ebc5aa8).() |
| 380 | { |
| 381 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("TwoDynamics.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 382 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 383 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 384 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 385 | |
| 386 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 387 | |
| 388 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "TwoDynamics.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 389 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 390 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 391 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 392 | } |
| 393 | |
| 394 | void test_DisabledStateSavercxx . . $ tst_StateSaverTest#test_DisabledStateSaver(49f6e7a06ebc5aa8).() |
| 395 | { |
| 396 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("DisabledStateSaver.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 397 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 398 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 399 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 400 | |
| 401 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 402 | |
| 403 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "DisabledStateSaver.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 404 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 405 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 406 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem == 0); |
| 407 | } |
| 408 | |
| 409 | void test_SameIdsInDifferentComponentscxx . . $ tst_StateSaverTest#test_SameIdsInDifferentComponents(49f6e7a06ebc5aa8).() |
| 410 | { |
| 411 | QSKIPcxx . . $ `<external>/8602788698586413231/qtestcase.h:193:9`!("Failing on Qt 5.9 due to unknown parent missing ID."); |
| 412 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("SameIdsInDifferentComponents.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 413 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 414 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 415 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 416 | |
| 417 | testItem->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("source", "SecondComponent.qml"cxx . . $ QVariant#QVariant(85c52e162fed56f9).); |
| 418 | // check if the SecondComponent state saver is enabled |
| 419 | QObjectcxx . . $ QObject# *item = testItem->propertycxx . . $ QObject#property(950ff6813be46b58).("item").valuecxx . . $ QVariant#value(8f5363d873dd4781).<QObjectcxx . . $ QObject#*>(); |
| 420 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(item); |
| 421 | QObjectcxx . . $ QObject# *innerItem = item->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("secondComponent"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 422 | UCStateSaverAttachedcxx . . $ UCStateSaverAttached# *stateSaver = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(innerItem, false)); |
| 423 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver); |
| 424 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver->enabled()); |
| 425 | |
| 426 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "SameIdsInDifferentComponents.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 427 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 428 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("secondComponent"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 429 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 430 | } |
| 431 | |
| 432 | void test_ComponentsWithStateSaverscxx . . $ tst_StateSaverTest#test_ComponentsWithStateSavers(49f6e7a06ebc5aa8).() |
| 433 | { |
| 434 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("ComponentsWithStateSavers.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 435 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 436 | QObjectcxx . . $ QObject# *control1 = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("control1"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 437 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control1); |
| 438 | QObjectcxx . . $ QObject# *control2 = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("control2"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 439 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control2); |
| 440 | UCStateSaverAttachedcxx . . $ UCStateSaverAttached# *stateSaver1 = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(control1, false)); |
| 441 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver1); |
| 442 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver1->enabled()); |
| 443 | UCStateSaverAttachedcxx . . $ UCStateSaverAttached# *stateSaver2 = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(control2, false)); |
| 444 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver2); |
| 445 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver2->enabled()); |
| 446 | |
| 447 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control1->setProperty("color", QColor("green"))); |
| 448 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control2->setProperty("color", QColor("blue"))); |
| 449 | |
| 450 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "ComponentsWithStateSavers.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 451 | control1 = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("control1"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 452 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control1); |
| 453 | control2 = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("control2"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 454 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control2); |
| 455 | stateSaver1 = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(control1, false)); |
| 456 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver1); |
| 457 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver1->enabled()); |
| 458 | stateSaver2 = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(control2, false)); |
| 459 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver2); |
| 460 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver2->enabled()); |
| 461 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 462 | |
| 463 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(control1->property("color"), QVariant(QColor("green"))); |
| 464 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(control2->property("color"), QVariant(QColor("blue"))); |
| 465 | } |
| 466 | |
| 467 | void test_ComponentsWithStateSaversNoIdcxx . . $ tst_StateSaverTest#test_ComponentsWithStateSaversNoId(49f6e7a06ebc5aa8).() |
| 468 | { |
| 469 | QRegularExpressioncxx . . $ QRegularExpression# warningRecxx . . $ QRegularExpression#QRegularExpression(4279d2539df7cd4a).(QStringLiteralcxx . . $ `<external>/2817157206922689722/qstringliteral.h:65:9`!( |
| 470 | ": QML (Rectangle|CustomControl): Warning: attachee must have an ID\\. State will not be saved\\.$" |
| 471 | )); |
| 472 | QTestcxx . . $ QTest/::ignoreMessagecxx . . $ QTest/ignoreMessage(f69cfd74466c3965).(QtWarningMsgcxx . . $ QtWarningMsg., warningRe); |
| 473 | |
| 474 | QScopedPointercxx . . $ QScopedPointer#<LomiriTestCasecxx . . $ LomiriTestCase#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(new LomiriTestCasecxx . . $ LomiriTestCase#("ComponentsWithStateSaversNoId.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 475 | QObjectcxx . . $ QObject# *control1 = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("control1"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 476 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control1); |
| 477 | QObjectcxx . . $ QObject# *control2 = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("control2"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 478 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(control2); |
| 479 | UCStateSaverAttachedcxx . . $ UCStateSaverAttached# *stateSaver1 = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(control1, false)); |
| 480 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver1); |
| 481 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver1->enabled() == false); |
| 482 | UCStateSaverAttachedcxx . . $ UCStateSaverAttached# *stateSaver2 = qobject_castcxx . . $ qobject_cast(c988cfc0ca08742e).<UCStateSaverAttachedcxx . . $ UCStateSaverAttached#*>(qmlAttachedPropertiesObjectcxx . . $ qmlAttachedPropertiesObject(a9fd081730eca712).<UCStateSavercxx . . $ UCStateSaver#>(control2, false)); |
| 483 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver2); |
| 484 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(stateSaver2->enabled()); |
| 485 | } |
| 486 | |
| 487 | void test_nestedDynamicscxx . . $ tst_StateSaverTest#test_nestedDynamics(49f6e7a06ebc5aa8).() |
| 488 | { |
| 489 | QSKIPcxx . . $ `<external>/8602788698586413231/qtestcase.h:193:9`!("Failing on Qt 5.9 due to unknown parent missing ID."); |
| 490 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("NestedDynamics.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 491 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 492 | QObjectcxx . . $ QObject# *topLoader = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("outerLoader"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 493 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(topLoader); |
| 494 | |
| 495 | topLoader->setPropertycxx . . $ QObject#setProperty(395943cdf6cf5058).("source", "Dynamic.qml"cxx . . $ QVariant#QVariant(85c52e162fed56f9).); |
| 496 | QCoreApplicationcxx . . $ QCoreApplication#::processEventscxx . . $ QCoreApplication#processEvents(5ce75b802d22674c).(); |
| 497 | |
| 498 | QObjectcxx . . $ QObject# *testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("testItem"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 499 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 500 | testItem->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 501 | |
| 502 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "NestedDynamics.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 503 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 504 | testItem = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QObjectcxx . . $ QObject#*>("updated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 505 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testItem); |
| 506 | } |
| 507 | |
| 508 | void test_repeaterStatescxx . . $ tst_StateSaverTest#test_repeaterStates(49f6e7a06ebc5aa8).() |
| 509 | { |
| 510 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("RepeaterStates.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 511 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 512 | QQuickItemcxx . . $ QQuickItem# *column = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QQuickItemcxx . . $ QQuickItem#*>("column"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 513 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(column); |
| 514 | |
| 515 | QListcxx . . $ QList#<QQuickItemcxx . . $ QQuickItem#*> items = column->childItemscxx . . $ QQuickItem#childItems(c6671ef70eed85d2).(); |
| 516 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(items.count(), 5); // 4 Rectangles + 1 Repeater |
| 517 | |
| 518 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(QQuickItem *item, items) { |
| 519 | if (QuickUtilscxx . . $ QuickUtils#::instancecxx . . $ QuickUtils#instance(abb75bba3ce2).()->classNamecxx . . $ QuickUtils#className(27ade8e3707e93d).(item) ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "QQuickRectangle") { |
| 520 | item->setHeightcxx . . $ QQuickItem#setHeight(ba8836b59fb42830).(25); |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "RepeaterStates.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 525 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 526 | column = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QQuickItemcxx . . $ QQuickItem#*>("column"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 527 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(column); |
| 528 | |
| 529 | items =cxx . . $ QList#`operator=`(fb6690361a2f6b44). column->childItemscxx . . $ QQuickItem#childItems(c6671ef70eed85d2).(); |
| 530 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(items.count(), 5); // 4 Rectangles + 1 Repeater |
| 531 | |
| 532 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(QQuickItem *item, items) { |
| 533 | if (QuickUtilscxx . . $ QuickUtils#::instancecxx . . $ QuickUtils#instance(abb75bba3ce2).()->classNamecxx . . $ QuickUtils#className(27ade8e3707e93d).(item) ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "QQuickRectangle") { |
| 534 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(item->height(), 25.0); |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | void test_ListViewItemStatescxx . . $ tst_StateSaverTest#test_ListViewItemStates(49f6e7a06ebc5aa8).() |
| 540 | { |
| 541 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("ListViewItems.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 542 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 543 | QQuickItemcxx . . $ QQuickItem# *list = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QQuickItemcxx . . $ QQuickItem#*>("list"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 544 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(list); |
| 545 | QQuickItemcxx . . $ QQuickItem# *contentItem = list->propertycxx . . $ QObject#property(950ff6813be46b58).("contentItem").valuecxx . . $ QVariant#value(8f5363d873dd4781).<QQuickItemcxx . . $ QQuickItem#*>(); |
| 546 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(contentItem); |
| 547 | QListcxx . . $ QList#<QQuickItemcxx . . $ QQuickItem#*> items = contentItem->childItemscxx . . $ QQuickItem#childItems(c6671ef70eed85d2).(); |
| 548 | |
| 549 | int testItemCount = 0; |
| 550 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(QQuickItem *item, items) { |
| 551 | if (item->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "testItem") { |
| 552 | item->setHeightcxx . . $ QQuickItem#setHeight(ba8836b59fb42830).(25); |
| 553 | testItemCount++; |
| 554 | } |
| 555 | } |
| 556 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItemCount, 2); |
| 557 | |
| 558 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "ListViewItems.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 559 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 560 | list = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QQuickItemcxx . . $ QQuickItem#*>("list"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 561 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(list); |
| 562 | contentItem = list->propertycxx . . $ QObject#property(950ff6813be46b58).("contentItem").valuecxx . . $ QVariant#value(8f5363d873dd4781).<QQuickItemcxx . . $ QQuickItem#*>(); |
| 563 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(contentItem); |
| 564 | items =cxx . . $ QList#`operator=`(fb6690361a2f6b44). contentItem->childItemscxx . . $ QQuickItem#childItems(c6671ef70eed85d2).(); |
| 565 | |
| 566 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(QQuickItem *item, items) { |
| 567 | if (item->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "testItem") { |
| 568 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(item->height(), 25.0); |
| 569 | } |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | void test_GridViewItemStatescxx . . $ tst_StateSaverTest#test_GridViewItemStates(49f6e7a06ebc5aa8).() |
| 574 | { |
| 575 | QScopedPointercxx . . $ QScopedPointer#<QQuickViewcxx . . $ QQuickView#> viewcxx . . $ QScopedPointer#QScopedPointer(6f97683fca3ece44).(createViewcxx . . $ tst_StateSaverTest#createView(3c2d736a7cc93c4c).("GridViewItems.qml"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 576 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 577 | QQuickItemcxx . . $ QQuickItem# *list = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QQuickItemcxx . . $ QQuickItem#*>("grid"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 578 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(list); |
| 579 | QQuickItemcxx . . $ QQuickItem# *contentItem = list->propertycxx . . $ QObject#property(950ff6813be46b58).("contentItem").valuecxx . . $ QVariant#value(8f5363d873dd4781).<QQuickItemcxx . . $ QQuickItem#*>(); |
| 580 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(contentItem); |
| 581 | QListcxx . . $ QList#<QQuickItemcxx . . $ QQuickItem#*> items = contentItem->childItemscxx . . $ QQuickItem#childItems(c6671ef70eed85d2).(); |
| 582 | |
| 583 | int testItemCount = 0; |
| 584 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(QQuickItem *item, items) { |
| 585 | if (item->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "testItem") { |
| 586 | item->setHeightcxx . . $ QQuickItem#setHeight(ba8836b59fb42830).(25); |
| 587 | testItemCount++; |
| 588 | } |
| 589 | } |
| 590 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(testItemCount, 2); |
| 591 | |
| 592 | resetViewcxx . . $ tst_StateSaverTest#resetView(9f21e0ed1bfd81f2).(view, "GridViewItems.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 593 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(view); |
| 594 | list = view->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).rootObjectcxx . . $ QQuickView#rootObject(e7eee0192cff5fb0).()->findChildcxx . . $ QObject#findChild(d560e1421e3a90b4).<QQuickItemcxx . . $ QQuickItem#*>("grid"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 595 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(list); |
| 596 | contentItem = list->propertycxx . . $ QObject#property(950ff6813be46b58).("contentItem").valuecxx . . $ QVariant#value(8f5363d873dd4781).<QQuickItemcxx . . $ QQuickItem#*>(); |
| 597 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(contentItem); |
| 598 | items =cxx . . $ QList#`operator=`(fb6690361a2f6b44). contentItem->childItemscxx . . $ QQuickItem#childItems(c6671ef70eed85d2).(); |
| 599 | |
| 600 | Q_FOREACHcxx . . $ `<external>/15045578679651060896/qglobal.h:1137:9`!(QQuickItem *item, items) { |
| 601 | if (item->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "testItem") { |
| 602 | QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(item->height(), 25.0); |
| 603 | } |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | void test_normalAppClosecxx . . $ tst_StateSaverTest#test_normalAppClose(49f6e7a06ebc5aa8).() |
| 608 | { |
| 609 | QProcesscxx . . $ QProcess# testAppcxx . . $ QProcess#QProcess(749de1b6ae65bddd).; |
| 610 | testApp.startcxx . . $ QProcess#start(5e315ba9c811784d).("qmlscene"cxx . . $ QString#QString(85c52e162fed56f9)., QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-I"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053). LOMIRI_QML_IMPORT_PATHcxx . . $ `<built-in>:485:9`! <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "NormalAppClose.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 611 | testApp.waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 612 | |
| 613 | QStringcxx . . $ QString# fileName = stateFilecxx . . $ tst_StateSaverTest#stateFile(fd988a2ab94d906b).("NormalAppClose"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 614 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!QFile(fileName).exists()); |
| 615 | } |
| 616 | |
| 617 | void test_SigTermcxx . . $ tst_StateSaverTest#test_SigTerm(49f6e7a06ebc5aa8).() |
| 618 | { |
| 619 | QProcesscxx . . $ QProcess# testAppcxx . . $ QProcess#QProcess(749de1b6ae65bddd).; |
| 620 | testApp.startcxx . . $ QProcess#start(5e315ba9c811784d).("qmlscene"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-I"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053). LOMIRI_QML_IMPORT_PATHcxx . . $ `<built-in>:485:9`! <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "SimpleApp.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 621 | testApp.waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 622 | |
| 623 | // send SIGTERM signal to the process, use terminate() to do that. |
| 624 | testApp.terminatecxx . . $ QProcess#terminate(49f6e7a06ebc5aa8).(); |
| 625 | testApp.waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 626 | |
| 627 | QStringcxx . . $ QString# fileName = stateFilecxx . . $ tst_StateSaverTest#stateFile(fd988a2ab94d906b).("SimpleApp"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 628 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(!QFile(fileName).exists()); |
| 629 | } |
| 630 | |
| 631 | void test_SigIntcxx . . $ tst_StateSaverTest#test_SigInt(49f6e7a06ebc5aa8).() |
| 632 | { |
| 633 | QProcesscxx . . $ QProcess# testAppcxx . . $ QProcess#QProcess(749de1b6ae65bddd).; |
| 634 | testApp.startcxx . . $ QProcess#start(5e315ba9c811784d).("qmlscene"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-I"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053). LOMIRI_QML_IMPORT_PATHcxx . . $ `<built-in>:485:9`! <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "SimpleApp.qml"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 635 | testApp.waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 636 | |
| 637 | QTestcxx . . $ QTest/::qWaitcxx . . $ QTest/qWait(d4f767463ce0a6b3).(1000); |
| 638 | |
| 639 | // make sure we are not killing the parent |
| 640 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! < QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(5, 15, 0) |
| 641 | QVERIFY(testApp.pid() != QCoreApplication::applicationPid()); |
| 642 | #else |
| 643 | QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(testApp.processId() != QCoreApplication::applicationPid()); |
| 644 | #endif |
| 645 | // skip tests if the application PID is zero => the child app PID seems to be zero as well |
| 646 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! < QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(5, 15, 0) |
| 647 | if (!testApp.pid()) { |
| 648 | #else |
| 649 | if (!testApp.processIdcxx . . $ QProcess#processId(98833e9ab7de59a4).()) { |
| 650 | #endif |
| 651 | // kill child process |
| 652 | testApp.closecxx . . $ QProcess#close(49f6e7a06ebc5aa8).(); |
| 653 | QSKIPcxx . . $ `<external>/8602788698586413231/qtestcase.h:193:9`!("This test requires valid PID"); |
| 654 | } |
| 655 | // send SIGINT |
| 656 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! < QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(5, 15, 0) |
| 657 | ::kill(testApp.pid(), SIGINT); |
| 658 | #else |
| 659 | ::kill(testApp.processIdcxx . . $ QProcess#processId(98833e9ab7de59a4).(), SIGINTcxx . . $ `<external>/11773118241360591791/signum-generic.h:48:9`!); |
| 660 | #endif |
| 661 | testApp.waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 662 | |
| 663 | QStringcxx . . $ QString# fileName = stateFilecxx . . $ tst_StateSaverTest#stateFile(fd988a2ab94d906b).("SimpleApp"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 664 | QVERIFY2cxx . . $ `<external>/8602788698586413231/qtestcase.h:75:9`!(QFile(fileName).exists(), qPrintablecxx . . $ `<external>/15045578679651060896/qglobal.h:831:11`!(fileName)); |
| 665 | // clean the file |
| 666 | QFilecxx . . $ QFile#::removecxx . . $ QFile#remove(e1defb592416720d).(fileName); |
| 667 | } |
| 668 | }; |
| 669 | |
| 670 | QTEST_MAINcxx . . $ `<external>/4204159469433502174/qtest.h:508:9`!(tst_StateSaverTest) |
| 671 | |
| 672 | #include "tst_statesaver.moc"cxx . . $ `<file>/tests/unit/statesaver11/.moc/tst_statesaver.moc`/ |
| 673 | |
| 674 | |
| 675 |