diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-09-27 10:27:30 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-10-04 09:26:51 +0000 |
commit | c50da2ff2d54c0251e5ff68361ee3a9822b205a4 (patch) | |
tree | 4e425ae7a1581c88cbd366b6631770eed15865e9 /tests/auto/qml/qqmlengine | |
parent | 2e51c28aa180b14681963f3e0136704870741718 (diff) |
QQmlEngine: add signal for offlineStoragePath
That might be helpful if someone wishes to heed the advise in the
documentation, and to always call mkdir (in a slot) on
offlineStoragePath change).
Change-Id: I3970b2ff9104f4966fddf67b02754e123a87c6cd
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlengine')
-rw-r--r-- | tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index 5c8a7cb324..bc961ef0a3 100644 --- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -315,7 +315,9 @@ void tst_qqmlengine::offlineStoragePath() QCOMPARE(QDir::fromNativeSeparators(engine.offlineStoragePath()), dir.path()); + QSignalSpy offlineStoragePathSpy(&engine, &QQmlEngine::offlineStoragePathChanged); engine.setOfflineStoragePath(QDir::homePath()); + QCOMPARE(offlineStoragePathSpy.count(), 1); QCOMPARE(engine.offlineStoragePath(), QDir::homePath()); } |