Kdelibs4Migration
#include <Kdelibs4Migration>
Public Member Functions | |
Kdelibs4Migration () | |
Kdelibs4Migration (const Kdelibs4Migration &)=delete | |
~Kdelibs4Migration () | |
QString | kdeHome () const |
bool | kdeHomeFound () const |
QString | locateLocal (const char *type, const QString &filename) const |
Kdelibs4Migration & | operator= (const Kdelibs4Migration &)=delete |
QString | saveLocation (const char *type, const QString &suffix=QString()) const |
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).
Distributions that built kdelibs4 with a custom KDE home with the CMake option _KDE_DEFAULT_HOME_POSTFIX should use the same option here with _KDE4_DEFAULT_HOME_POSTFIX
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)
The following resources are supported:
- config
- data
- services
- servicetypes
- wallpaper
- emoticons
- templates
Use kdeHome() for anything else.
Class for migration of config files from kdelibs4
- Since
- 5.0
Definition at line 58 of file kdelibs4migration.h.
Constructor & Destructor Documentation
|
explicit |
Constructs a Kdelibs4Migration instance.
The constructor attempts to locate the user's "kdehome" from kdelibs4.
Definition at line 26 of file kdelibs4migration.cpp.
Kdelibs4Migration::~Kdelibs4Migration | ( | ) |
Destructor.
Definition at line 60 of file kdelibs4migration.cpp.
Member Function Documentation
QString Kdelibs4Migration::kdeHome | ( | ) | const |
Returns the kdehome that was found.
Don't use this method if you can use locateLocal or saveLocation
- Since
- 5.13
Definition at line 70 of file kdelibs4migration.cpp.
bool Kdelibs4Migration::kdeHomeFound | ( | ) | const |
Returns true if a "kdehome" was found.
Otherwise, there is nothing to migrate.
Definition at line 65 of file kdelibs4migration.cpp.
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.
Definition at line 75 of file kdelibs4migration.cpp.
QString Kdelibs4Migration::saveLocation | ( | const char * | type, |
const QString & | suffix = QString() |
||
) | const |
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.
Definition at line 104 of file kdelibs4migration.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 23:04:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.