QEventDispatcher: test with glib disabled too
Change-Id: I05f09e720170c77a567ffea31dfe06a658f1df2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
a4394b7241
commit
47bc742c48
@ -11,7 +11,23 @@ if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
|
||||
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
|
||||
endif()
|
||||
|
||||
qt_internal_add_test(tst_qeventdispatcher
|
||||
SOURCES
|
||||
tst_qeventdispatcher.cpp
|
||||
)
|
||||
set(test_names "tst_qeventdispatcher")
|
||||
if(QT_FEATURE_glib AND UNIX)
|
||||
list(APPEND test_names "tst_qeventdispatcher_no_glib")
|
||||
endif()
|
||||
|
||||
foreach(test ${test_names})
|
||||
qt_internal_add_test(${test}
|
||||
NO_BATCH
|
||||
SOURCES
|
||||
tst_qeventdispatcher.cpp
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if (TARGET tst_qeventdispatcher_no_glib)
|
||||
qt_internal_extend_target(tst_qeventdispatcher_no_glib
|
||||
DEFINES
|
||||
DISABLE_GLIB
|
||||
tst_QEventDispatcher=tst_QEventDispatcher_no_glib
|
||||
)
|
||||
endif()
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#ifdef QT_GUI_LIB
|
||||
# include <QtGui/QGuiApplication>
|
||||
# define tst_QEventDispatcher tst_QGuiEventDispatcher
|
||||
#else
|
||||
# include <QtCore/QCoreApplication>
|
||||
#endif
|
||||
@ -12,6 +11,13 @@
|
||||
#include <QTimer>
|
||||
#include <QThreadPool>
|
||||
|
||||
#ifdef DISABLE_GLIB
|
||||
static bool glibDisabled = []() {
|
||||
qputenv("QT_NO_GLIB", "1");
|
||||
return true;
|
||||
}();
|
||||
#endif
|
||||
|
||||
enum {
|
||||
PreciseTimerInterval = 10,
|
||||
CoarseTimerInterval = 200,
|
||||
|
@ -11,9 +11,30 @@ if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
|
||||
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
|
||||
endif()
|
||||
|
||||
qt_internal_add_test(tst_qguieventdispatcher
|
||||
SOURCES
|
||||
../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
set(test_names "tst_qguieventdispatcher")
|
||||
if(QT_FEATURE_glib AND UNIX)
|
||||
list(APPEND test_names "tst_qguieventdispatcher_no_glib")
|
||||
endif()
|
||||
|
||||
foreach(test ${test_names})
|
||||
qt_internal_add_test(${test}
|
||||
NO_BATCH
|
||||
SOURCES
|
||||
../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
)
|
||||
endforeach()
|
||||
|
||||
qt_internal_extend_target(tst_qguieventdispatcher
|
||||
DEFINES
|
||||
tst_QEventDispatcher=tst_qguieventdispatcher
|
||||
)
|
||||
|
||||
if (TARGET tst_qeventdispatcher_no_glib)
|
||||
qt_internal_extend_target(tst_qguieventdispatcher_no_glib
|
||||
DEFINES
|
||||
DISABLE_GLIB
|
||||
tst_QEventDispatcher=tst_qguieventdispatcher_no_glib
|
||||
)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user