KDE 5.0 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

Kdelibs4Migration Class Reference

from PyKDE5.kcoreaddons import *

Detailed Description

Kdelibs4Migration provides support for locating config files and application data files saved by kdelibs 4 in the user's home directory ($KDEHOME, i.e. typically ~/.kde).

The purpose is to be able to let the application migrate these files to the KF5/Qt5 location for these files (QStandardPaths).

Files from the "config" resource (as saved by KConfig) should be migrated to QStandardPaths.writableLocation(QStandardPaths.ConfigLocation)

Files from the "data" resource should be migrated to a subdirectory of QStandardPaths.writableLocation(QStandardPaths.DataLocation)

Class for migration of config files from kdelibs4

Since:
5.0


Methods

 __init__ (self)
bool kdeHomeFound (self)
QString locateLocal (self, QString type, QString filename)
QString saveLocation (self, QString type, QString suffix=QString())

Method Documentation

__init__ (   self )

Constructs a Kdelibs4Migration instance. The constructor attempts to locate the user's "kdehome" from kdelibs4.

bool kdeHomeFound (   self )

Returns true if a "kdehome" was found. Otherwise, there is nothing to migrate.

QString locateLocal (  self,
QString  type,
QString  filename
)

Finds a local file in a resource. This API is inspired by KStandardDirs.locateLocal for ease of porting.

Parameters:
type  The type of wanted resource.
filename  A relative filename of the resource.

QString saveLocation (  self,
QString  type,
QString  suffix=QString()
)

Finds a location to save files into for the given type in the user's home directory.

Parameters:
type  The type of location to return.
suffix  A subdirectory name.

  • Full Index

Modules

  • karchive
  • kcoreaddons
  • kguiaddons
  • kitemmodels
  • kitemviews
  • kplotting
  • kwidgetsaddons
  • solid
  • sonnet
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal