Added Platform::frontendTypes()
Needed by the tests
This commit is contained in:
@@ -65,7 +65,9 @@ Q_ENUM_NS(MainWindowOptions)
|
||||
enum class FrontendType
|
||||
{
|
||||
QtWidgets = 1,
|
||||
QtQuick
|
||||
QtQuick,
|
||||
FIRST = QtWidgets,
|
||||
LAST = QtQuick // keep pointing to last
|
||||
};
|
||||
Q_ENUM_NS(FrontendType)
|
||||
|
||||
|
||||
@@ -37,3 +37,15 @@ bool Platform::hasActivePopup() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**static*/
|
||||
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));
|
||||
}
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,13 @@
|
||||
|
||||
#include "docks_export.h"
|
||||
#include "ViewWrapper.h"
|
||||
#include "KDDockWidgets.h"
|
||||
|
||||
#include "kdbindings/signal.h"
|
||||
|
||||
#include <QEvent>
|
||||
|
||||
#include <vector>
|
||||
#include <memory.h>
|
||||
|
||||
namespace KDDockWidgets {
|
||||
@@ -70,6 +73,10 @@ public:
|
||||
virtual QSize screenSizeFor(View *) const = 0;
|
||||
|
||||
#ifdef DOCKS_DEVELOPER_MODE
|
||||
|
||||
/// @brief list the list of frontend types supported by this build
|
||||
static std::vector<KDDockWidgets::FrontendType> frontendTypes();
|
||||
|
||||
/// @brief Waits for the specified window to be active (have the keyboard focus)
|
||||
/// Window::isActive() should return true
|
||||
/// @sa Window::isActive()
|
||||
|
||||
Reference in New Issue
Block a user