Ticket #50183: patch-reenable-kf5-support.diff

File patch-reenable-kf5-support.diff, 4.3 KB (added by RJVB (René Bertin), 9 years ago)
  • qt5/CMakeLists.txt

    diff --git qt5/CMakeLists.txt qt5/CMakeLists.txt
    index 837d9c2..0e9f5fa 100644
    if(QTC_QT5_ENABLE_QTQUICK2) 
    33else()
    44  set(QTC_QT5_MODULES Qt5Core Qt5Gui Qt5Widgets Qt5Svg Qt5DBus)
    55endif()
     6if(QTC_QT5_ENABLE_KDE)
     7  set(QTC_QT5_MODULES ${QTC_QT5_MODULES} Qt5PrintSupport)
     8endif()
    69
    710if(ENABLE_QT5 AND NOT ENABLE_QT5_DEFINED)
    811  # ENABLE_QT5 is not defined on the command line
    if(ENABLE_QT5) 
    6669      I18n
    6770      KDELibs4Support
    6871      KIO
     72      GuiAddons
     73      IconThemes
    6974      WidgetsAddons
    7075      XmlGui)
    7176
    72     # add_definitions(-DQTC_QT5_ENABLE_KDE)
     77    add_definitions(-DQTC_QT5_ENABLE_KDE)
    7378    include(KDEInstallDirs)
    7479    include(KDECMakeSettings)
    7580    include(KDECompilerSettings)
  • qt5/style/CMakeLists.txt

    diff --git qt5/style/CMakeLists.txt qt5/style/CMakeLists.txt
    index 7f65f8c..de4e257 100644
    add_dependencies(qtcurve-qt5 qtc_qt5_check_on_hdr qtc_qt5_check_x_on_hdr 
    6767  qtc_qt5_dialog_error_hdr qtc_qt5_dialog_information_hdr
    6868  qtc_qt5_dialog_warning_hdr)
    6969target_link_libraries(qtcurve-qt5 ${QTC_QT5_LINK_LIBS} qtcurve-utils)
     70target_link_libraries(qtcurve-qt5
     71    KF5::GuiAddons
     72    KF5::IconThemes
     73    KF5::KDELibs4Support
     74)
    7075install(TARGETS qtcurve-qt5 LIBRARY DESTINATION ${QTCURVE_STYLE_DIR})
    7176
    7277if(QTC_QT5_ENABLE_KDE)
  • qt5/style/qtcurve.cpp

    diff --git qt5/style/qtcurve.cpp qt5/style/qtcurve.cpp
    index febcfcf..89de3b6 100644
     
    7474#ifdef QTC_QT5_ENABLE_KDE
    7575#include <KDE/KApplication>
    7676#include <KDE/KAboutData>
     77#include <KDE/KGlobal>
    7778#include <KDE/KGlobalSettings>
    7879#include <KDE/KConfig>
    7980#include <KDE/KConfigGroup>
    void Style::init(bool initial) 
    364365
    365366#ifdef QTC_QT5_ENABLE_KDE
    366367    if (initial) {
    367         if (KGlobal::hasMainComponent()) {
    368             m_componentData = KGlobal::mainComponent();
    369         } else {
    370             QString name(QApplication::applicationName());
     368        QString name(QApplication::applicationName());
    371369
    372             if(name.isEmpty())
    373                 name = qAppName();
     370        if(name.isEmpty())
     371            name = qAppName();
    374372
    375             if(name.isEmpty())
    376                 name = "QtApp";
    377         }
     373        if(name.isEmpty())
     374            name = "QtApp";
    378375    }
    379376#endif
    380377
  • qt5/style/qtcurve_api.cpp

    diff --git qt5/style/qtcurve_api.cpp qt5/style/qtcurve_api.cpp
    index 87a927f..02637d3 100644
     
    6767
    6868#include <QDebug>
    6969
     70#ifdef QTC_QT5_ENABLE_KDE
     71#include <QPrintDialog>
     72#include <KDE/KApplication>
     73#include <KDE/KGlobal>
     74#include <KDE/KGlobalSettings>
     75#include <KDE/KIconLoader>
     76#include <KDE/KIcon>
     77#include <KDE/KTitleWidget>
     78#include <KDE/KTabBar>
     79#include <KDE/KFileDialog>
     80#include <KDE/KAboutApplicationDialog>
     81#endif
     82
     83#include <qtcurve-utils/color.h>
     84
    7085namespace QtCurve {
    7186
    7287void
    Style::styleHint(StyleHint hint, const QStyleOption *option, 
    18831898        if (hint >= SH_CustomBase && widget) {
    18841899            if (widget->objectName() == "CE_CapacityBar") {
    18851900                if (opts.boldProgress) {
    1886                     setBold(const_cast<QWidget*>widget);
     1901                    setBold(const_cast<QWidget*>(widget));
    18871902                }
    18881903                return CE_QtC_KCapacityBar;
    18891904            }
    Style::styleHint(StyleHint hint, const QStyleOption *option, 
    18951910
    18961911QPalette Style::standardPalette() const
    18971912{
    1898 #ifndef QTC_QT5_ENABLE_KDE
    18991913    return QCommonStyle::standardPalette();
    1900 #else
    1901     return KGlobalSettings::createApplicationPalette(
    1902         KSharedConfig::openConfig(m_componentData));
    1903 #endif
    19041914}
    19051915
    19061916void
  • qt5/style/qtcurve_p.h

    diff --git qt5/style/qtcurve_p.h qt5/style/qtcurve_p.h
    index bfc7502..91e21c2 100644
     
    3232#include <QWidget>
    3333#include <QSplitter>
    3434#include <QStatusBar>
     35#ifdef QTC_QT5_ENABLE_KDE
     36#include <kiconeffect.h>
     37#endif
    3538
    3639class QToolBar;
    3740
  • qt5/style/qtcurve_primitive.cpp

    diff --git qt5/style/qtcurve_primitive.cpp qt5/style/qtcurve_primitive.cpp
    index b5a3204..51653c7 100644
     
    4242#include "utils.h"
    4343#include <common/config_file.h>
    4444
     45#ifdef QTC_QT5_ENABLE_KDE
     46#include <KDE/KIcon>
     47#include <KDE/KTitleWidget>
     48#endif
     49
    4550namespace QtCurve {
    4651bool
    4752Style::drawPrimitiveIndicatorTabClose(PrimitiveElement,