summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-09-16 10:43:52 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2020-09-30 11:52:10 +0200
commit6403d3afd868bbdffddc52d8be0a56081637adf9 (patch)
tree71114d43e8f305aa5f34d9c98631ae27f7cfcba8 /tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp
parent23178283ecc10207cc5742aee9ded42d7cb60c8e (diff)
Use less pointers in tst_loadsignals
Make QWebEngineView a member of tst_LoadSignals. Also stop recreating it for every test. Task-number: QTBUG-65223 Change-Id: I2ed7c12559e56e23302813eb6f33c1e26a9d8748 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp')
-rw-r--r--tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp
index 81329338c..ac38e2ed2 100644
--- a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp
+++ b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp
@@ -26,6 +26,8 @@
**
****************************************************************************/
+#include "../util.h"
+
#include <QCoreApplication>
#include <QSignalSpy>
#include <QStandardPaths>
@@ -100,14 +102,6 @@ private:
QSet<QWebEngineDownloadItem *> m_finishedDownloads;
};
-class ScopedConnection {
-public:
- ScopedConnection(QMetaObject::Connection connection) : m_connection(std::move(connection)) {}
- ~ScopedConnection() { QObject::disconnect(m_connection); }
-private:
- QMetaObject::Connection m_connection;
-};
-
Q_DECLARE_METATYPE(tst_QWebEngineDownloadItem::UserAction)
Q_DECLARE_METATYPE(tst_QWebEngineDownloadItem::FileAction)