Initialize static resources in the correct platform
Non-Qt platforms won't have to do this
This commit is contained in:
@@ -35,23 +35,11 @@
|
||||
using namespace KDDockWidgets;
|
||||
using namespace KDDockWidgets::Controllers;
|
||||
|
||||
static void initKDDockWidgetResources()
|
||||
{
|
||||
#if defined(KDDOCKWIDGETS_STATICLIB) || defined(QT_STATIC)
|
||||
Q_INIT_RESOURCE(kddockwidgets_resources);
|
||||
#if defined(KDDOCKWIDGETS_QTQUICK)
|
||||
Q_INIT_RESOURCE(kddockwidgets_qtquick);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
DockRegistry::DockRegistry(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
qApp->installEventFilter(this);
|
||||
m_connection = Platform::instance()->focusedViewChanged.connect(&DockRegistry::onFocusedViewChanged, this);
|
||||
|
||||
initKDDockWidgetResources();
|
||||
}
|
||||
|
||||
DockRegistry::~DockRegistry()
|
||||
|
||||
@@ -41,6 +41,11 @@ Platform_qtquick::Platform_qtquick()
|
||||
|
||||
void Platform_qtquick::init()
|
||||
{
|
||||
#if defined(KDDOCKWIDGETS_STATICLIB) || defined(QT_STATIC)
|
||||
Q_INIT_RESOURCE(kddockwidgets_resources);
|
||||
Q_INIT_RESOURCE(kddockwidgets_qtquick);
|
||||
#endif
|
||||
|
||||
KDDockWidgets::registerQmlTypes();
|
||||
QQuickWindow::setDefaultAlphaBuffer(true);
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ Platform_qtwidgets::Platform_qtwidgets()
|
||||
|
||||
void Platform_qtwidgets::init()
|
||||
{
|
||||
#if defined(KDDOCKWIDGETS_STATICLIB) || defined(QT_STATIC)
|
||||
Q_INIT_RESOURCE(kddockwidgets_resources);
|
||||
#endif
|
||||
|
||||
#ifdef DOCKS_DEVELOPER_MODE
|
||||
if (qEnvironmentVariableIntValue("KDDOCKWIDGETS_SHOW_DEBUG_WINDOW") == 1) {
|
||||
auto dv = new Debug::DebugWindow();
|
||||
|
||||
Reference in New Issue
Block a user