From 546dd323048f4b0e8e98b234eeb9aa01d951653f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 19 Mar 2014 12:47:09 +0100 Subject: [PATCH] Dialog is now it statically links FrameSvgItem and Units.. they may become libplasmaquick eventually but for now is fine like that --- src/declarativeimports/core/CMakeLists.txt | 5 +-- src/plasmaquick/CMakeLists.txt | 41 +++++++++++++++++++ .../core => plasmaquick}/dialog.cpp | 2 +- .../core => plasmaquick}/dialog.h | 15 ++++++- .../core => plasmaquick}/dialogshadows.cpp | 0 .../core => plasmaquick}/dialogshadows_p.h | 0 6 files changed, 58 insertions(+), 5 deletions(-) rename src/{declarativeimports/core => plasmaquick}/dialog.cpp (99%) rename src/{declarativeimports/core => plasmaquick}/dialog.h (94%) rename src/{declarativeimports/core => plasmaquick}/dialogshadows.cpp (100%) rename src/{declarativeimports/core => plasmaquick}/dialogshadows_p.h (100%) diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt index fb518034f..1ff8fa55b 100644 --- a/src/declarativeimports/core/CMakeLists.txt +++ b/src/declarativeimports/core/CMakeLists.txt @@ -20,11 +20,9 @@ set(corebindings_SRCS corebindingsplugin.cpp datamodel.cpp datasource.cpp - dialogshadows.cpp # runnermodel.cpp svgitem.cpp framesvgitem.cpp - dialog.cpp tooltip.cpp tooltipdialog.cpp formats.cpp @@ -45,7 +43,8 @@ target_link_libraries(corebindingsplugin KF5::IconThemes KF5::Service #for kplugininfo.h KF5::WindowSystem - KF5::Plasma) + KF5::Plasma + KF5::PlasmaQuick) if(HAVE_X11) target_link_libraries(corebindingsplugin ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} ) diff --git a/src/plasmaquick/CMakeLists.txt b/src/plasmaquick/CMakeLists.txt index db39cc483..83af22eca 100644 --- a/src/plasmaquick/CMakeLists.txt +++ b/src/plasmaquick/CMakeLists.txt @@ -1,7 +1,26 @@ project(PlasmaQuick) +if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) + add_definitions(-DHAVE_XCB_COMPOSITE=1) + include_directories( + ${XCB_XCB_INCLUDE_DIR} + ${XCB_DAMAGE_INCLUDE_DIR} + ${XCB_COMPOSITE_INCLUDE_DIR} + ) +else() + add_definitions(-DHAVE_XCB_COMPOSITE=0) +endif() +if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_SHAPE_FOUND) + add_definitions(-DHAVE_XCB_SHAPE=1) + include_directories(${XCB_SHAPE_INCLUDE_DIR}) +else() + add_definitions(-DHAVE_XCB_SHAPE=0) +endif() + set(plasmaquick_LIB_SRC appletquickitem.cpp + dialog.cpp + dialogshadows.cpp view.cpp configmodel.cpp shellpluginloader.cpp @@ -9,6 +28,8 @@ set(plasmaquick_LIB_SRC packageurlinterceptor.cpp private/configcategory_p.cpp private/packages.cpp + ../declarativeimports/core/framesvgitem.cpp + ../declarativeimports/core/units.cpp ) add_library(KF5PlasmaQuick SHARED ${plasmaquick_LIB_SRC}) @@ -21,6 +42,7 @@ target_link_libraries(KF5PlasmaQuick KF5::WindowSystem KF5::KIOWidgets KF5::I18n + KF5::IconThemes KF5::Service KF5::CoreAddons KF5::XmlGui @@ -28,6 +50,25 @@ target_link_libraries(KF5PlasmaQuick KF5::Declarative ) +if(HAVE_X11) + target_link_libraries(KF5PlasmaQuick ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} ) + target_link_libraries(KF5PlasmaQuick Qt5::X11Extras) + + if(XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) + target_link_libraries(KF5PlasmaQuick + ${XCB_DAMAGE_LIBRARY} + ${XCB_COMPOSITE_LIBRARY} + ) + endif() + if(XCB_SHAPE_FOUND) + target_link_libraries(KF5PlasmaQuick ${XCB_SHAPE_LIBRARY}) + endif() + + if(HAVE_GLX) + target_link_libraries(KF5PlasmaQuick ${OPENGL_gl_LIBRARY}) + endif() +endif() + set_target_properties(KF5PlasmaQuick PROPERTIES VERSION ${PLASMA_VERSION_STRING} SOVERSION ${PLASMA_SOVERSION} diff --git a/src/declarativeimports/core/dialog.cpp b/src/plasmaquick/dialog.cpp similarity index 99% rename from src/declarativeimports/core/dialog.cpp rename to src/plasmaquick/dialog.cpp index 00245d503..d9378d6ce 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -20,7 +20,7 @@ ***************************************************************************/ #include "dialog.h" -#include "framesvgitem.h" +#include "../declarativeimports/core/framesvgitem.h" #include "dialogshadows_p.h" #include diff --git a/src/declarativeimports/core/dialog.h b/src/plasmaquick/dialog.h similarity index 94% rename from src/declarativeimports/core/dialog.h rename to src/plasmaquick/dialog.h index eaec27b90..234b5642b 100644 --- a/src/declarativeimports/core/dialog.h +++ b/src/plasmaquick/dialog.h @@ -31,6 +31,19 @@ #include +#include + +// +// W A R N I N G +// ------------- +// +// This file is not part of the public Plasma API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + class QQuickItem; class QScreen; @@ -44,7 +57,7 @@ class DialogPrivate; * * Exposed as `PlasmaCore.Dialog` in QML. */ -class Dialog : public QQuickWindow, public QQmlParserStatus +class PLASMAQUICK_EXPORT Dialog : public QQuickWindow, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) diff --git a/src/declarativeimports/core/dialogshadows.cpp b/src/plasmaquick/dialogshadows.cpp similarity index 100% rename from src/declarativeimports/core/dialogshadows.cpp rename to src/plasmaquick/dialogshadows.cpp diff --git a/src/declarativeimports/core/dialogshadows_p.h b/src/plasmaquick/dialogshadows_p.h similarity index 100% rename from src/declarativeimports/core/dialogshadows_p.h rename to src/plasmaquick/dialogshadows_p.h