Difference between revisions of "Plasma/PortingTolibplasma2"

Line 51: Line 51:
 
* importLayout(const KConfigBase &config) was removed in favor of importLayout(const KConfigGroup &config)
 
* importLayout(const KConfigBase &config) was removed in favor of importLayout(const KConfigGroup &config)
 
* addContainmentDelayed was removed; all containments are now initialized in the same manner (with an internal delay; an implementation detail). Replace all uses of addContainmentDelayed with addContainment.
 
* addContainmentDelayed was removed; all containments are now initialized in the same manner (with an internal delay; an implementation detail). Replace all uses of addContainmentDelayed with addContainment.
 +
* addAction, enableAction and action were removed, use actions() to get to the KActionCollection directly
  
 
==DataEngine==
 
==DataEngine==

Revision as of 15:48, 25 February 2013

AbstractRunner

  • init() is now virtual; does not need to be a slot
  • mimeDataForMatch is now virtual; does not need to be a slot
  • mimeDataForMatch is now passed the QueryMatch by reference rather than as a pointer

AbstractToolBox

  • protected Q_SLOTS that were used as virtual methods (restore, save, reposition) are now proper virtuals

Applet

  • listAppletInfoForMimetype becomes listAppletInfoForMimeType
  • The BackgroundHints enumeration is now part of the Plasma namespace and no longer a flag but a plain enumeration.
  • config(const QString &name) has been removed as redundant to KConfigGroup(&config(), name)
  • removed screenGeometry()
  • removed all geometry functions: size(), geometry(), transform(), zValue(), raise(), lower()
  • addAction and action were removed, use actions() to get to the KActionCollection directly
  • addAssociatedWidget and removeAssociated widget were removed as they are no longer necessary for shortcuts

Containment

  • listContainmentsForMimetype becomes listContainmentsForMimeType
  • context() was removed
  • setActivity(QString) and activity() now use activity IDs rather than names
  • zoomRequested signal was removed
  • QGraphicsItem *toolBoxItem() was removed
  • geometry functions removed: resize() setMinimumSize(), setMaximumSize()
  • removed acceptDrops() / setAcceptDrops()
  • enableAction was removed; use KActionCollection directly
  • addAssociatedWidget and removeAssociated widget were removed as they are no longer necessary for shortcuts

ContainmentActions

  • doesn't have Q_PROPERTIES or Q_INVOKABLES anymore, don't rely on those in client code
  • paste method is removed; instead, look for an action named "drop-current-data" via containment()->action
  • popupPosition is gone -> all screen visibility is handled by the GSS
  • isInitialized() is gone -> if needed, track this in the class itself
  • event(QEvent *) is replaced by triggerableContextAction, performNextAction and performPreviousAction
  • ContainmentActionsSource enum type, getter and setter gone. All containment actions are global by their containment type, so all panels have the same config, all desktop have the same config
  • name(), pluginName() and icon() gone; use pluginInfo() instead that has all this information
  • use ContainmentActions::config() instead of Containment::containmentActionsConfig()
  • createConfigurationInterface() is now void and uses a QWindow* as parameter
  • configAccepted() gone: management of ok/apply/cancel buttons and config save has to be done by the plugin itself
  • init() gone. plugins can do all their initialization in ctor now
  • concept of configurationRequired gone. was not used and plugins can still have a configure plugin among their actions
  • dataEngine() gone: was not used and DataEngineConsumer is public now, so is easy for plugins to use a dataengine if needed
  • triggerableContextAction() gone: if the plugin has only one action executed directly, will have only one item as contextualActions()
  • ContainmentActionsPluginConfig class gone from API: users of the library should never access it

Context

  • Plasma::Context has been removed; the Activity DataEngines or KActivity* classes should be used instead.

Corona

  • layoutContainment is now virtual (no actual porting required; it is still a protected slot)
  • importLayout(const KConfigBase &config) was removed in favor of importLayout(const KConfigGroup &config)
  • addContainmentDelayed was removed; all containments are now initialized in the same manner (with an internal delay; an implementation detail). Replace all uses of addContainmentDelayed with addContainment.
  • addAction, enableAction and action were removed, use actions() to get to the KActionCollection directly

DataEngine

  • source queue limit feature no longer available (no one used it)

DataEngineManager

  • made private API; users of DataEngineManager should now use DataEngineConsumer

DataContainer

  • added bool isUsed()
  • removed protected checkUsage()

Dialog

  • removed from libplasma
  • will have to be reimplemented in QML bindings in PlasmaCore
  • means will be visible from QML, not from the C++ part

Extenders

  • removed; rarely used, many problems with the implementation, may be brought back via QML Component

PackageMetadata

  • PackageMetadata was removed. It is replaced everywhere with KPluginInfo, except in AccessManager where a new class, RemoteObjectDescription, is used.

PackageStructure

  • setMimetypes -> setMimeTypes
  • setDefaultMimetypes -> setDefaultMimeTypes
  • mimetypes(const char*) -> mimeTypes(const char*)
  • sePrefix/prefix were removed in preference of the multi-path setPrefixPaths/prefixPaths

Plasma Namespace

  • ContextConstraint is no longer a member of the Plasma::Constraint enumeration
  • ZoomDirection, ZoomLevel and ScalingFactor were removed

PopupApplet

  • Removed from libplasma
  • Every applet will have to be able to collapse in a popup

Service

  • parametersFromDescription now returns an unsorted QHash rather than a QMap
  • createJob now takes a QHash instead of a QMap
  • jobFinished signal was removed; connect to jobs individually instead

ServiceJob

  • QMaps have been replaced with QHashes

ScrollWidget

  • registerAsScrollWidget and unregisterAsScrollWidget removed

ToolTipContent

  • setWidowToPreview/windowToPreview was removed; instead, use setWindowsToPreview/windowsToPreview which support more than one window id being passed in

Wallpaper

  • listWallpapersForMimetype becomes listWallpapersForMimeType

WindowEffects

  • moved to libkwindowsystem (a tier one Framework)
  • overrideShadow is gone as it was rendered obsolete with new window manager development and had become a no-op

This page was last edited on 25 February 2013, at 15:48. Content is available under Creative Commons License SA 4.0 unless otherwise noted.