From 6403d3afd868bbdffddc52d8be0a56081637adf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 16 Sep 2020 10:43:52 +0200 Subject: 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 --- .../qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp') 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 #include #include @@ -100,14 +102,6 @@ private: QSet 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) -- cgit v1.2.3