diff --git a/kcmkwin/CMakeLists.txt b/kcmkwin/CMakeLists.txt index 5e20b9132d..40acf5c892 100644 --- a/kcmkwin/CMakeLists.txt +++ b/kcmkwin/CMakeLists.txt @@ -4,9 +4,9 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FR # add_subdirectory( kwindecoration ) # add_subdirectory( kwinrules ) # add_subdirectory( kwincompositing ) -# if(KWIN_BUILD_SCREENEDGES) -# add_subdirectory( kwinscreenedges ) -# endif() +if(KWIN_BUILD_SCREENEDGES) + add_subdirectory( kwinscreenedges ) +endif() # if(KWIN_BUILD_SCRIPTING) # add_subdirectory( kwinscripts ) # endif() diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index cf49b4e4dd..309e10c4af 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -8,7 +8,16 @@ set( ) kde4_add_ui_files( kcm_kwinscreenedges_PART_SRCS main.ui ) kde4_add_plugin( kcm_kwinscreenedges ${kcm_kwinscreenedges_PART_SRCS} ) -target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} kworkspace ${KDE4_PLASMA_LIBS}) +target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} + Qt5::DBus + KF5::KCompletion + KF5::KConfigCore + KF5::KConfigWidgets + KF5::KI18n + KF5::KService + KF5::plasma + ${KDE4Support_LIBRARIES} + ) install( TARGETS kcm_kwinscreenedges DESTINATION ${PLUGIN_INSTALL_DIR} ) install( FILES kwinscreenedges.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/kcmkwin/kwinscreenedges/kwinscreenedges.desktop b/kcmkwin/kwinscreenedges/kwinscreenedges.desktop index e8551674b5..8c89767404 100644 --- a/kcmkwin/kwinscreenedges/kwinscreenedges.desktop +++ b/kcmkwin/kwinscreenedges/kwinscreenedges.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Exec=kcmshell4 kwinscreenedges +Exec=kcmshell5 kwinscreenedges Icon=preferences-desktop Type=Service X-KDE-ServiceTypes=KCModule diff --git a/kcmkwin/kwinscreenedges/main.cpp b/kcmkwin/kwinscreenedges/main.cpp index 4e0c31120a..dec66b2360 100644 --- a/kcmkwin/kwinscreenedges/main.cpp +++ b/kcmkwin/kwinscreenedges/main.cpp @@ -25,6 +25,8 @@ along with this program. If not, see . #include +#include +#include #include #include #include @@ -41,7 +43,7 @@ KWinScreenEdgesConfigForm::KWinScreenEdgesConfigForm(QWidget* parent) } KWinScreenEdgesConfig::KWinScreenEdgesConfig(QWidget* parent, const QVariantList& args) - : KCModule(KWinScreenEdgesConfigFactory::componentData(), parent, args) + : KCModule(parent, args) , m_config(KSharedConfig::openConfig("kwinrc")) { m_ui = new KWinScreenEdgesConfigForm(this); diff --git a/kcmkwin/kwinscreenedges/main.h b/kcmkwin/kwinscreenedges/main.h index d42271022f..571fd5f22d 100644 --- a/kcmkwin/kwinscreenedges/main.h +++ b/kcmkwin/kwinscreenedges/main.h @@ -49,14 +49,14 @@ public: explicit KWinScreenEdgesConfig(QWidget* parent, const QVariantList& args); ~KWinScreenEdgesConfig(); -public slots: +public Q_SLOTS: virtual void groupChanged(); virtual void save(); virtual void load(); virtual void defaults(); protected: virtual void showEvent(QShowEvent* e); -private slots: +private Q_SLOTS: void sanitizeCooldown(); private: KWinScreenEdgesConfigForm* m_ui; diff --git a/kcmkwin/kwinscreenedges/main.ui b/kcmkwin/kwinscreenedges/main.ui index 6985e8bf6f..9b7238481d 100644 --- a/kcmkwin/kwinscreenedges/main.ui +++ b/kcmkwin/kwinscreenedges/main.ui @@ -153,6 +153,9 @@ QFormLayout::AllNonFixedFieldsGrow + + 0 + diff --git a/kcmkwin/kwinscreenedges/monitor.cpp b/kcmkwin/kwinscreenedges/monitor.cpp index 72fcfa69a7..b9c5d625e8 100644 --- a/kcmkwin/kwinscreenedges/monitor.cpp +++ b/kcmkwin/kwinscreenedges/monitor.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "monitor.h" #include -#include +#include #include #include #include @@ -156,7 +156,7 @@ void Monitor::selectEdgeItem(int edge, int index) setEdge(edge, !popup_actions[ edge ][ 0 ]->isChecked()); QString actionText = popup_actions[ edge ][ index ]->text(); // remove accelerators added by KAcceleratorManager - actionText = KGlobal::locale()->removeAcceleratorMarker(actionText); + actionText = KLocalizedString::removeAcceleratorMarker(actionText); items[ edge ]->setToolTip(actionText); } @@ -180,7 +180,7 @@ void Monitor::popup(Corner* c, QPoint pos) selectEdgeItem(i, popup_actions[ i ].indexOf(a)); emit changed(); emit edgeSelectionChanged(i, popup_actions[ i ].indexOf(a)); - c->setToolTip(KGlobal::locale()->removeAcceleratorMarker(a->text())); + c->setToolTip(KLocalizedString::removeAcceleratorMarker(a->text())); } return; } diff --git a/kcmkwin/kwinscreenedges/monitor.h b/kcmkwin/kwinscreenedges/monitor.h index 68aa87fa93..919937da8b 100644 --- a/kcmkwin/kwinscreenedges/monitor.h +++ b/kcmkwin/kwinscreenedges/monitor.h @@ -22,7 +22,7 @@ along with this program. If not, see . #ifndef CCSM_MONITOR_H #define CCSM_MONITOR_H -#include +#include "screenpreviewwidget.h" #include #include @@ -68,7 +68,7 @@ public: BottomLeft, BottomRight }; -signals: +Q_SIGNALS: void changed(); void edgeSelectionChanged(int edge, int index); protected: