Don't run tests on unsupported frontends
If kddw wasn't compiled with QtQuick support then don't run the QtQuick tests.
This commit is contained in:
@@ -69,9 +69,7 @@ Q_ENUM_NS(MainWindowOptions)
|
||||
enum class FrontendType
|
||||
{
|
||||
QtWidgets = 1,
|
||||
QtQuick,
|
||||
FIRST = QtWidgets,
|
||||
LAST = QtQuick // keep pointing to last
|
||||
QtQuick
|
||||
};
|
||||
Q_ENUM_NS(FrontendType)
|
||||
|
||||
|
||||
@@ -119,10 +119,13 @@ void Platform::tests_deinitPlatform()
|
||||
std::vector<KDDockWidgets::FrontendType> Platform::frontendTypes()
|
||||
{
|
||||
std::vector<KDDockWidgets::FrontendType> types;
|
||||
types.reserve(int(FrontendType::LAST));
|
||||
for (int i = int(FrontendType::FIRST); i <= int(FrontendType::LAST); ++i) {
|
||||
types.push_back(FrontendType(i));
|
||||
}
|
||||
|
||||
#ifdef KDDW_FRONTEND_QTWIDGETS
|
||||
types.push_back(FrontendType::QtWidgets);
|
||||
#endif
|
||||
#ifdef KDDW_FRONTEND_QTQUICK
|
||||
types.push_back(FrontendType::QtQuick);
|
||||
#endif
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user