diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index 6e5e95a..b0db31e 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -566,10 +566,6 @@ CMainWindow::CMainWindow(QWidget *parent) : // Now create the dock manager and its content d->DockManager = new CDockManager(this); - // uncomment the following line to have the old style where the dock - // area close button closes the active tab - // CDockManager::setConfigFlags({CDockManager::DockAreaHasCloseButton - // | CDockManager::DockAreaCloseButtonClosesTab}); connect(d->PerspectiveComboBox, SIGNAL(activated(const QString&)), d->DockManager, SLOT(openPerspective(const QString&))); diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 1618cd9..3cda957 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -55,6 +55,20 @@ #include "DockingStateReader.h" +/** + * Initializes the resources specified by the .qrc file with the specified base + * name. Normally, when resources are built as part of the application, the + * resources are loaded automatically at startup. The Q_INIT_RESOURCE() macro + * is necessary on some platforms for resources stored in a static library. + * Because GCC caues a linker error if we put Q_INIT_RESOURCE into the + * loadStyleSheet() function, we place it into a function outside of the ads + * namespace + */ +static void initResource() +{ + Q_INIT_RESOURCE(ads); +} + namespace ads { @@ -148,6 +162,7 @@ DockManagerPrivate::DockManagerPrivate(CDockManager* _public) : //============================================================================ void DockManagerPrivate::loadStylesheet() { + initResource(); QString Result; #ifdef Q_OS_LINUX QFile StyleSheetFile(":ads/stylesheets/default_linux.css");