remove the args Applet injects to hide that impl detail from subclasses
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812568
This commit is contained in:
parent
f478ae1ca4
commit
05d6ec6401
104
CMakeLists.txt
104
CMakeLists.txt
@ -177,65 +177,61 @@ install(FILES
|
||||
|
||||
|
||||
install(FILES
|
||||
includes/AbstractRunner
|
||||
includes/AnimationDriver
|
||||
includes/Animator
|
||||
includes/Applet
|
||||
includes/AppletBrowser
|
||||
includes/ConfigXml
|
||||
includes/Corona
|
||||
includes/Containment
|
||||
includes/Dialog
|
||||
includes/Plasma
|
||||
includes/Package
|
||||
includes/PackageStructure
|
||||
includes/Theme
|
||||
includes/DataContainer
|
||||
includes/DataEngine
|
||||
includes/DataEngineManager
|
||||
includes/RunnerContext
|
||||
includes/RunnerManager
|
||||
includes/QueryMatch
|
||||
includes/Service
|
||||
includes/ServiceJob
|
||||
includes/Svg
|
||||
includes/PanelSvg
|
||||
includes/UiLoader
|
||||
includes/PackageMetadata
|
||||
includes/View
|
||||
includes/Delegate
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma)
|
||||
|
||||
install(FILES
|
||||
includes/Label
|
||||
includes/LineEdit
|
||||
includes/PushButton
|
||||
includes/RadioButton
|
||||
includes/WebContent
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma)
|
||||
|
||||
includes/AbstractRunner
|
||||
includes/AnimationDriver
|
||||
includes/Animator
|
||||
includes/Applet
|
||||
includes/AppletBrowser
|
||||
includes/AppletScript
|
||||
includes/CheckBox
|
||||
includes/ComboBox
|
||||
includes/ConfigXml
|
||||
includes/Containment
|
||||
includes/Corona
|
||||
includes/DataContainer
|
||||
includes/DataEngine
|
||||
includes/DataEngineManager
|
||||
includes/DataEngineScript
|
||||
includes/Delegate
|
||||
includes/Dialog
|
||||
includes/GroupBox
|
||||
includes/Label
|
||||
includes/LineEdit
|
||||
includes/Package
|
||||
includes/PackageMetadata
|
||||
includes/PackageStructure
|
||||
includes/PanelSvg
|
||||
includes/Plasma
|
||||
includes/PushButton
|
||||
includes/QueryMatch
|
||||
includes/RadioButton
|
||||
includes/RunnerContext
|
||||
includes/RunnerManager
|
||||
includes/RunnerScript
|
||||
includes/ScriptEngine
|
||||
includes/Service
|
||||
includes/ServiceJob
|
||||
includes/Svg
|
||||
includes/TextEdit
|
||||
includes/Theme
|
||||
includes/UiLoader
|
||||
includes/View
|
||||
includes/WebContent
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma)
|
||||
|
||||
if(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
|
||||
install(FILES
|
||||
includes/GLApplet
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma)
|
||||
install(FILES
|
||||
includes/GLApplet
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma)
|
||||
endif(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
|
||||
|
||||
install(FILES
|
||||
includes/ScriptEngine
|
||||
includes/DataEngineScript
|
||||
includes/RunnerScript
|
||||
includes/AppletScript
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Plasma/Scripting)
|
||||
|
||||
|
||||
install(FILES
|
||||
servicetypes/plasma-animator.desktop
|
||||
servicetypes/plasma-applet.desktop
|
||||
servicetypes/plasma-containment.desktop
|
||||
servicetypes/plasma-dataengine.desktop
|
||||
servicetypes/plasma-packagestructure.desktop
|
||||
servicetypes/plasma-runner.desktop
|
||||
servicetypes/plasma-animator.desktop
|
||||
servicetypes/plasma-applet.desktop
|
||||
servicetypes/plasma-containment.desktop
|
||||
servicetypes/plasma-dataengine.desktop
|
||||
servicetypes/plasma-packagestructure.desktop
|
||||
servicetypes/plasma-runner.desktop
|
||||
servicetypes/plasma-scriptengine.desktop
|
||||
DESTINATION ${SERVICETYPES_INSTALL_DIR})
|
||||
|
||||
|
12
applet.cpp
12
applet.cpp
@ -94,6 +94,18 @@ Applet::Applet(QObject* parentObject, const QVariantList& args)
|
||||
d(new Private(KService::serviceByStorageId(args.count() > 0 ? args[0].toString() : QString()),
|
||||
args.count() > 1 ? args[1].toInt() : 0, this))
|
||||
{
|
||||
// now remove those first two items since those are managed by Applet and subclasses shouldn't
|
||||
// need to worry about them. yes, it violates the constness of this var, but it lets us add
|
||||
// or remove items later while applets can just pretend that their args always start at 0
|
||||
QVariantList &mutableArgs = const_cast<QVariantList&>(args);
|
||||
if (!mutableArgs.isEmpty()) {
|
||||
mutableArgs.removeFirst();
|
||||
|
||||
if (!mutableArgs.isEmpty()) {
|
||||
mutableArgs.removeFirst();
|
||||
}
|
||||
}
|
||||
|
||||
setParent(parentObject);
|
||||
// WARNING: do not access config() OR globalConfig() in this method!
|
||||
// that requires a scene, which is not available at this point
|
||||
|
@ -1 +1 @@
|
||||
#include "../../../plasma/scripting/appletscript.h"
|
||||
#include "../../plasma/scripting/appletscript.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "../../../plasma/scripting/dataenginescript.h"
|
||||
#include "../../plasma/scripting/dataenginescript.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "../../../plasma/widgets/pushbutton.h"
|
||||
#include "../../plasma/widgets/pushbutton.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "../../../plasma/scripting/runnerscript.h"
|
||||
#include "../../plasma/scripting/runnerscript.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "../../../plasma/scripting/scriptengine.h"
|
||||
#include "../../plasma/scripting/scriptengine.h"
|
||||
|
Loading…
Reference in New Issue
Block a user