use KAction from kde4support
it should buld again, usingkaction as type for kactioncollection
This commit is contained in:
parent
79256d9931
commit
f4de55af67
@ -27,6 +27,7 @@ find_package(Qt5Core REQUIRED NO_MODULE)
|
||||
find_package(Qt5Transitional MODULE)
|
||||
find_package(Qt5Quick REQUIRED NO_MODULE)
|
||||
find_package(Qt5X11Extras REQUIRED NO_MODULE)
|
||||
find_package(kde4support REQUIRED NO_MODULE)
|
||||
|
||||
if (Qt5_POSITION_INDEPENDENT_CODE)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
@ -22,8 +22,7 @@
|
||||
#include <QLatin1Literal>
|
||||
#include <QPixmap>
|
||||
#include <QSize>
|
||||
|
||||
#include <KStandardDirs>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <Plasma/Theme>
|
||||
|
||||
@ -37,7 +36,7 @@ QImage AppBackgroundProvider::requestImage(const QString &id, QSize *size, const
|
||||
Q_UNUSED(size)
|
||||
Q_UNUSED(requestedSize)
|
||||
QString search = QLatin1Literal("desktoptheme/") % Plasma::Theme::defaultTheme()->themeName() % QLatin1Literal("/appbackgrounds/") % id % ".png";
|
||||
search = KStandardDirs::locate("data", search);
|
||||
search = QStandardPaths::locate(QStandardPaths::GenericDataLocation, search);
|
||||
return QImage(search);
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <KStandardDirs>
|
||||
#include <KDebug>
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ QString FallbackComponent::filePath(const QString &key)
|
||||
resolved = m_basePath + path + key;
|
||||
} else {
|
||||
|
||||
resolved = KStandardDirs::locate("data", m_basePath + '/' + path + key);
|
||||
resolved = QStandardPaths::locate(QStandardPaths::GenericDataLocation, m_basePath + '/' + path + key);
|
||||
}
|
||||
|
||||
m_possiblePaths.insert(path + key, new QString(resolved));
|
||||
|
@ -6,4 +6,5 @@ target_link_libraries(fullmodelaccesstest
|
||||
${QT_QTGUI_LIBRARY}
|
||||
${QT_QTTEST_LIBRARY}
|
||||
${KDE4_KDECORE_LIBS}
|
||||
${kde4support_LIBRARY}
|
||||
)
|
||||
|
@ -132,7 +132,7 @@ kde4_add_library(plasma SHARED ${plasma_LIB_SRCS})
|
||||
|
||||
target_link_libraries(plasma ${QT_QTUITOOLS_LIBRARY}
|
||||
${QT_QTNETWORK_LIBRARY} ${QT_QTSQL_LIBRARY}
|
||||
${KDE4_KDEUI_LIBS} ${ThreadWeaver_LIBRARIES} ${KAuth_LIBRARIES} ${KWindowSystem_LIBRARIES} ${PLASMA_EXTRA_LIBS} ki18n)
|
||||
${KDE4_KDEUI_LIBS} ${ThreadWeaver_LIBRARIES} ${KAuth_LIBRARIES} ${KWindowSystem_LIBRARIES} ${PLASMA_EXTRA_LIBS} ki18n ${kde4support_LIBRARY})
|
||||
#FIXME gpgme++ is in kdepimlibs, neeeds to be elsewhere
|
||||
target_link_libraries(plasma kdeclarative ${KArchive_LIBRARIES})
|
||||
|
||||
|
@ -59,7 +59,6 @@
|
||||
#include "plasma.h"
|
||||
#include "scripting/appletscript.h"
|
||||
#include "paintutils.h"
|
||||
#include "abstractdialogmanager.h"
|
||||
#include "pluginloader.h"
|
||||
|
||||
#include "private/associatedapplicationmanager_p.h"
|
||||
|
@ -426,7 +426,7 @@ void CoronaPrivate::init()
|
||||
//some common actions
|
||||
actions.setConfigGroup("Shortcuts");
|
||||
|
||||
KAction *lockAction = actions.addAction("lock widgets");
|
||||
KAction *lockAction = actions.add<KAction>("lock widgets");
|
||||
QObject::connect(lockAction, SIGNAL(triggered(bool)), q, SLOT(toggleImmutability()));
|
||||
lockAction->setText(i18n("Lock Widgets"));
|
||||
lockAction->setAutoRepeat(true);
|
||||
@ -438,7 +438,7 @@ void CoronaPrivate::init()
|
||||
//FIXME this doesn't really belong here. desktop KCM maybe?
|
||||
//but should the shortcuts be per-app or really-global?
|
||||
//I don't know how to make kactioncollections use plasmarc
|
||||
KAction *action = actions.addAction("configure shortcuts");
|
||||
KAction *action = actions.add<KAction>("configure shortcuts");
|
||||
QObject::connect(action, SIGNAL(triggered()), q, SLOT(showShortcutConfig()));
|
||||
action->setText(i18n("Shortcut Settings"));
|
||||
action->setIcon(KDE::icon("configure-shortcuts"));
|
||||
|
@ -196,21 +196,21 @@ KActionCollection* AppletPrivate::defaultActions(QObject *parent)
|
||||
KActionCollection *actions = new KActionCollection(parent);
|
||||
actions->setConfigGroup("Shortcuts-Applet");
|
||||
|
||||
KAction *configAction = actions->addAction("configure");
|
||||
KAction *configAction = actions->add<KAction>("configure");
|
||||
configAction->setAutoRepeat(false);
|
||||
configAction->setText(i18n("Widget Settings"));
|
||||
configAction->setIcon(KDE::icon("configure"));
|
||||
configAction->setShortcut(KShortcut("alt+d, s"));
|
||||
configAction->setData(Plasma::ConfigureAction);
|
||||
|
||||
KAction *closeApplet = actions->addAction("remove");
|
||||
KAction *closeApplet = actions->add<KAction>("remove");
|
||||
closeApplet->setAutoRepeat(false);
|
||||
closeApplet->setText(i18n("Remove this Widget"));
|
||||
closeApplet->setIcon(KDE::icon("edit-delete"));
|
||||
closeApplet->setShortcut(KShortcut("alt+d, r"));
|
||||
closeApplet->setData(Plasma::DestructiveAction);
|
||||
|
||||
KAction *runAssociatedApplication = actions->addAction("run associated application");
|
||||
KAction *runAssociatedApplication = actions->add<KAction>("run associated application");
|
||||
runAssociatedApplication->setAutoRepeat(false);
|
||||
runAssociatedApplication->setText(i18n("Run the Associated Application"));
|
||||
runAssociatedApplication->setIcon(KDE::icon("system-run"));
|
||||
@ -241,7 +241,7 @@ void AppletPrivate::updateShortcuts()
|
||||
for (int i = 0; i < names.size(); ++i) {
|
||||
QAction *a = qactions.at(i);
|
||||
if (a) {
|
||||
actions->addAction(names.at(i), a);
|
||||
actions->add<KAction>(names.at(i), a);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <QBasicTimer>
|
||||
|
||||
#include <KAction>
|
||||
#include <kactioncollection.h>
|
||||
#include <kconfigskeleton.h>
|
||||
#include <kservice.h>
|
||||
|
@ -63,7 +63,7 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions, Containme
|
||||
}
|
||||
|
||||
//add our own actions
|
||||
KAction *appletBrowserAction = actions->addAction("add widgets");
|
||||
KAction *appletBrowserAction = actions->add<KAction>("add widgets");
|
||||
appletBrowserAction->setAutoRepeat(false);
|
||||
appletBrowserAction->setText(i18n("Add Widgets..."));
|
||||
appletBrowserAction->setIcon(KDE::icon("list-add"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user