Add KDDockWidgets::initPlatform()
Instead of using the static variable, which is initialized before having QApplication. Will allow us to remove the QTimer from Platform init
This commit is contained in:
33
src/KDDockWidgets.cpp
Normal file
33
src/KDDockWidgets.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
This file is part of KDDockWidgets.
|
||||
|
||||
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
||||
Author: Sérgio Martins <sergio.martins@kdab.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
Contact KDAB at <info@kdab.com> for commercial licensing options.
|
||||
*/
|
||||
|
||||
|
||||
#include "KDDockWidgets.h"
|
||||
|
||||
#include "qtwidgets/Platform_qtwidgets.h"
|
||||
#include "qtquick/Platform_qtquick.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
void KDDockWidgets::initFrontend(FrontendType type)
|
||||
{
|
||||
if (Platform::instance())
|
||||
return;
|
||||
|
||||
switch (type) {
|
||||
case FrontendType::QtWidgets:
|
||||
new Platform_qtwidgets();
|
||||
break;
|
||||
case FrontendType::QtQuick:
|
||||
// new Platform_qtquick(); // TODOv2
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user