diff options
Diffstat (limited to 'tests/auto')
6 files changed, 23 insertions, 1 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 359bc3145..4d9f78917 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,5 +1,7 @@ TEMPLATE = subdirs SUBDIRS = quick -qtHaveModule(widgets): SUBDIRS += widgets +qtHaveModule(widgets):equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 2) { + SUBDIRS += widgets +} diff --git a/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp b/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp index 448f488f6..608b09396 100644 --- a/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp +++ b/tests/auto/widgets/qwebengineframe/tst_qwebengineframe.cpp @@ -45,6 +45,7 @@ public: bool eventFilter(QObject* watched, QEvent* event); public Q_SLOTS: + void initTestCase(); void init(); void cleanup(); @@ -115,6 +116,11 @@ bool tst_QWebEngineFrame::eventFilter(QObject* watched, QEvent* event) return QObject::eventFilter(watched, event); } +void tst_QWebEngineFrame::initTestCase() +{ + QWebEngineWidgets::initialize(); +} + void tst_QWebEngineFrame::init() { m_view = new QWebEngineView(); diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp index a5cbc6103..14008d075 100644 --- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp +++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp @@ -42,6 +42,7 @@ protected : } public Q_SLOTS: + void initTestCase(); void init(); void cleanup(); @@ -86,6 +87,11 @@ tst_QWebEngineHistory::~tst_QWebEngineHistory() { } +void tst_QWebEngineHistory::initTestCase() +{ + QWebEngineWidgets::initialize(); +} + void tst_QWebEngineHistory::init() { page = new QWebEnginePage(this); diff --git a/tests/auto/widgets/qwebenginehistoryinterface/tst_qwebenginehistoryinterface.cpp b/tests/auto/widgets/qwebenginehistoryinterface/tst_qwebenginehistoryinterface.cpp index 60c54e93e..180a0f2fe 100644 --- a/tests/auto/widgets/qwebenginehistoryinterface/tst_qwebenginehistoryinterface.cpp +++ b/tests/auto/widgets/qwebenginehistoryinterface/tst_qwebenginehistoryinterface.cpp @@ -34,6 +34,7 @@ public: virtual ~tst_QWebEngineHistoryInterface(); public Q_SLOTS: + void initTestCase(); void init(); void cleanup(); @@ -56,6 +57,11 @@ tst_QWebEngineHistoryInterface::~tst_QWebEngineHistoryInterface() { } +void tst_QWebEngineHistoryInterface::initTestCase() +{ + QWebEngineWidgets::initialize(); +} + void tst_QWebEngineHistoryInterface::init() { m_view = new QWebEngineView(); diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 9abc3ad0b..3c2bbb67b 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -228,6 +228,7 @@ void tst_QWebEnginePage::cleanupFiles() void tst_QWebEnginePage::initTestCase() { + QWebEngineWidgets::initialize(); cleanupFiles(); // In case there are old files from previous runs } diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index 4c238a074..a0bf36f60 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -63,6 +63,7 @@ private Q_SLOTS: // It is only called once. void tst_QWebEngineView::initTestCase() { + QWebEngineWidgets::initialize(); } // This will be called after the last test function is executed. |