Index: kstyle/CMakeLists.txt =================================================================== --- kstyle/CMakeLists.txt +++ kstyle/CMakeLists.txt @@ -25,6 +25,7 @@ set(BREEZE_HAVE_X11 FALSE) endif() + set(BREEZE_HAVE_QTQUICK FALSE) set(BREEZE_HAVE_KWAYLAND FALSE) ### KStyle @@ -32,7 +33,7 @@ else() - find_package(Qt5 REQUIRED CONFIG COMPONENTS Widgets DBus Quick) + find_package(Qt5 REQUIRED CONFIG COMPONENTS Widgets DBus) find_package(KF5 REQUIRED COMPONENTS I18n Config @@ -40,6 +41,9 @@ ConfigWidgets WindowSystem) + find_package(Qt5 COMPONENTS Quick) + set(BREEZE_HAVE_QTQUICK ${Qt5_Quick_FOUND}) + find_package( KF5FrameworkIntegration CONFIG ) set_package_properties(KF5FrameworkIntegration PROPERTIES DESCRIPTION "KF5 Framework Integration" @@ -155,7 +159,10 @@ kconfig_add_kcfg_files(breeze_PART_SRCS breezestyleconfigdata.kcfgc) add_library(breeze MODULE ${breeze_PART_SRCS}) - target_link_libraries(breeze Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus Qt5::Quick) + target_link_libraries(breeze Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus) + if( Qt5_Quick_FOUND ) + target_link_libraries(breeze Qt5::Quick) + endif() target_link_libraries(breeze KF5::ConfigCore KF5::ConfigWidgets KF5::GuiAddons KF5::WindowSystem) target_link_libraries(breeze breezecommon) Index: kstyle/breezestyle.cpp =================================================================== --- kstyle/breezestyle.cpp +++ kstyle/breezestyle.cpp @@ -7158,7 +7158,7 @@ //____________________________________________________________________ bool Style::isQtQuickControl( const QStyleOption* option, const QWidget* widget ) const { - #if QT_VERSION >= 0x050000 + #if QT_VERSION >= 0x050000 && BREEZE_HAVE_QTQUICK const bool is = (widget == nullptr) && option && option->styleObject && option->styleObject->inherits( "QQuickItem" ); if ( is ) _windowManager->registerQuickItem( static_cast( option->styleObject ) ); return is; Index: kstyle/breezewindowmanager.h =================================================================== --- kstyle/breezewindowmanager.h +++ kstyle/breezewindowmanager.h @@ -33,7 +33,7 @@ #include #include -#if !BREEZE_USE_KDE4 +#if BREEZE_HAVE_QTQUICK #include #endif @@ -68,7 +68,7 @@ //* register widget void registerWidget( QWidget* ); - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK //* register quick item void registerQuickItem( QQuickItem* ); #endif @@ -286,7 +286,7 @@ /** Weak pointer is used in case the target gets deleted while drag is in progress */ WeakPointer _target; - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK WeakPointer _quickTarget; #endif Index: kstyle/breezewindowmanager.cpp =================================================================== --- kstyle/breezewindowmanager.cpp +++ kstyle/breezewindowmanager.cpp @@ -79,7 +79,7 @@ #include #endif -#if QT_VERSION >= 0x050000 +#if BREEZE_HAVE_QTQUICK // needed to enable dragging from QQuickWindows #include #include @@ -319,7 +319,7 @@ } - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK //_____________________________________________________________ void WindowManager::registerQuickItem( QQuickItem* item ) { @@ -390,7 +390,7 @@ case QEvent::MouseMove: if ( object == _target.data() - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK || object == _quickTarget.data() #endif ) return mouseMoveEvent( object, event ); @@ -398,7 +398,7 @@ case QEvent::MouseButtonRelease: if ( _target - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK || _quickTarget #endif ) return mouseReleaseEvent( object, event ); @@ -426,8 +426,10 @@ { startDrag( _target.data()->window(), _globalDragPoint ); } #else if( _target ) startDrag( _target.data()->window()->windowHandle(), _globalDragPoint ); + #if BREEZE_HAVE_QTQUICK else if( _quickTarget ) startDrag( _quickTarget.data()->window(), _globalDragPoint ); #endif + #endif } else { @@ -450,7 +452,7 @@ if( isLocked() ) return false; else setLocked( true ); - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK // check QQuickItem - we can immediately start drag, because QQuickWindow's contentItem // only receives mouse events that weren't handled by children if( auto item = qobject_cast( object ) ) @@ -837,7 +839,7 @@ } _target.clear(); - #if !BREEZE_USE_KDE4 + #if BREEZE_HAVE_QTQUICK _quickTarget.clear(); #endif if( _dragTimer.isActive() ) _dragTimer.stop(); Index: kstyle/config-breeze.h.cmake =================================================================== --- kstyle/config-breeze.h.cmake +++ kstyle/config-breeze.h.cmake @@ -25,6 +25,9 @@ /* Define to 1 if breeze is compiled against KDE4 */ #cmakedefine01 BREEZE_USE_KDE4 +/* Define to 1 if QtQuick is available */ +#cmakedefine01 BREEZE_HAVE_QTQUICK + /* Define to 1 if FrameworkIntegration/Kstyle libraries are found */ #cmakedefine01 BREEZE_HAVE_KSTYLE