Skip to content

Commit

Permalink
enabled the new dock system by default
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPudashkin committed May 26, 2021
1 parent 79647db commit cefe57a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 31 deletions.
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ set(JACK_LONGNAME "JACK (Jack Audio Connection Kit)")
set(JACK_MIN_VERSION "0.98.0")
option(BUILD_JACK "Build with support for ${JACK_LONGNAME} audio backend. JACK >= ${JACK_MIN_VERSION} will be needed." OFF)

option(KDAB_DOCKWIDGETS "Build KDAB dockwidgets" OFF)

if (BUILD_PORTABLEAPPS)
set(WIN_PORTABLE 1)
endif (BUILD_PORTABLEAPPS)
Expand Down Expand Up @@ -225,15 +223,16 @@ add_subdirectory(src/framework/global) # should be first to work pch
add_subdirectory(thirdparty/qzip)
add_subdirectory(src)

if (KDAB_DOCKWIDGETS)
if (NOT BUILD_SHARED_LIBS)
set(KDDockWidgets_STATIC ON CACHE BOOL "Build static versions of the libraries" FORCE)
endif(NOT BUILD_SHARED_LIBS)
###########################################
# Setup the KDDockWidgets lib
###########################################
if (NOT BUILD_SHARED_LIBS)
set(KDDockWidgets_STATIC ON CACHE BOOL "Build static versions of the libraries" FORCE)
endif(NOT BUILD_SHARED_LIBS)

set(KDDockWidgets_QTQUICK ON CACHE BOOL "Build for QtQuick instead of QtWidgets" FORCE)
set(KDDockWidgets_EXAMPLES OFF CACHE BOOL "Build the examples" FORCE)
add_subdirectory(thirdparty/KDDockWidgets)
endif(KDAB_DOCKWIDGETS)
set(KDDockWidgets_QTQUICK ON CACHE BOOL "Build for QtQuick instead of QtWidgets" FORCE)
set(KDDockWidgets_EXAMPLES OFF CACHE BOOL "Build the examples" FORCE)
add_subdirectory(thirdparty/KDDockWidgets)

###########################################
# Setup Packaging
Expand Down
2 changes: 0 additions & 2 deletions build/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@

#cmakedefine APP_UPDATABLE

#cmakedefine KDAB_DOCKWIDGETS

#define USE_BSP true

// does not work on windows/mac:
Expand Down
6 changes: 1 addition & 5 deletions src/appshell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ set(MODULE appshell)
set(MODULE_QRC appshell.qrc)
set(MODULE_QML_IMPORT ${CMAKE_CURRENT_LIST_DIR}/qml)

if (KDAB_DOCKWIDGETS)
include(${CMAKE_CURRENT_LIST_DIR}/view/dockwindow_kdab/dockwindow.cmake)
else()
include(${CMAKE_CURRENT_LIST_DIR}/view/dockwindow/dockwindow.cmake)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/view/dockwindow_kdab/dockwindow.cmake)

set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/appshellmodule.cpp
Expand Down
15 changes: 5 additions & 10 deletions src/appshell/appshell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@
#ifndef Q_OS_WASM
#include <QThreadPool>
#endif
#ifdef KDAB_DOCKWIDGETS
#include "view/dockwindow_kdab/docksetup.h"
#else
#include "view/dockwindow/docksetup.h"
#endif

#include "log.h"
#include "modularity/ioc.h"
Expand Down Expand Up @@ -150,16 +146,15 @@ int AppShell::run(int argc, char** argv)
QQmlApplicationEngine* engine = new QQmlApplicationEngine();

dock::DockSetup::setup(engine);
#if defined(KDAB_DOCKWIDGETS) && defined(Q_OS_WIN)

#if defined(Q_OS_WIN)
const QString mainQmlFile = "/kdab/platform/win/Main.qml";
#elif defined(KDAB_DOCKWIDGETS) && defined(Q_OS_MACOS)
#elif defined(Q_OS_MACOS)
const QString mainQmlFile = "/kdab/platform/mac/Main.qml";
#elif defined(KDAB_DOCKWIDGETS) && defined(Q_OS_LINUX)
#elif defined(Q_OS_LINUX)
const QString mainQmlFile = "/kdab/platform/linux/Main.qml";
#elif Q_OS_WASM
#elif defined(Q_OS_WASM)
const QString mainQmlFile = "/Main.wasm.qml";
#else
const QString mainQmlFile = "/Main.qml";
#endif
//! NOTE Move ownership to UiEngine
ui::UiEngine::instance()->moveQQmlEngine(engine);
Expand Down
4 changes: 0 additions & 4 deletions src/appshell/appshellmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@
#include "view/preferences/commonaudioapiconfigurationmodel.h"
#include "view/framelesswindow/framelesswindowmodel.h"

#ifdef KDAB_DOCKWIDGETS
#include "view/dockwindow_kdab/docksetup.h"
#else
#include "view/dockwindow/docksetup.h"
#endif

using namespace mu::appshell;
using namespace mu::framework;
Expand Down

0 comments on commit cefe57a

Please sign in to comment.