KDECore
kdesktopfile.cpp
Go to the documentation of this file.
62 : KConfig(*new KDesktopFilePrivate("apps", fileName)) // TODO KDE5: default to xdgdata-apps instead of apps
166 kWarning() << "Access to '" << path << "' denied because of 'run_desktop_files' restriction." << endl;
176 kWarning() << "Access to '" << path << "' denied, not owned by root, executable flag not set." << endl;
bool tryExec() const
Checks whether the TryExec field contains a binary which is found on the local system.
Definition: kdesktopfile.cpp:282
QString name() const
Returns the filename used to store the configuration.
Definition: kconfig.cpp:503
Definition: kmacroexpander_unix.cpp:34
QString readComment() const
Returns the value of the "Comment=" entry.
Definition: kdesktopfile.cpp:198
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
bool hasGroup(const QString &group) const
Returns true if the specified group is known about.
Definition: kconfigbase.cpp:29
bool hasApplicationType() const
Checks whether there is an entry "Type=Application".
Definition: kdesktopfile.cpp:267
KDesktopFile(const char *resourceType, const QString &fileName)
Constructs a KDesktopFile object.
Definition: kdesktopfile.cpp:53
QStringList sortOrder() const
Returns the entry of the "SortOrder=" entry.
Definition: kdesktopfile.cpp:354
bool noDisplay() const
Whether the entry should be suppressed in menus.
Definition: kdesktopfile.cpp:391
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
static bool isAuthorizedDesktopFile(const QString &path)
Checks whether the user is authorized to run this desktop file.
Definition: kdesktopfile.cpp:137
KConfig * copyTo(const QString &file, KConfig *config=0) const
Copies all entries from this config object to a new config object that will save itself to file...
Definition: kconfig.cpp:486
bool hasMimeTypeType() const
Checks whether there is an entry "Type=MimeType".
Definition: kdesktopfile.cpp:272
QString fromLocal8Bit(const char *str, int size)
bool hasDeviceType() const
Checks whether there is an entry "Type=FSDevice".
Definition: kdesktopfile.cpp:277
KDesktopFile * copyTo(const QString &file) const
Copies all entries from this config object to a new KDesktopFile object that will save itself to file...
Definition: kdesktopfile.cpp:372
bool isEmpty() const
bool isEmpty() const
QString relativeLocation(const char *type, const QString &absPath)
Converts an absolute path to a path relative to a certain resource.
Definition: kstandarddirs.cpp:1551
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
Definition: kconfig_p.h:42
bool hasLinkType() const
Checks whether there is a "Type=Link" entry.
Definition: kdesktopfile.cpp:262
iterator end()
QStringList resourceDirs(const char *type) const
This function is used internally by almost all other function as it serves and fills the directories ...
Definition: kstandarddirs.cpp:1069
QStringList readActions() const
Returns a list of the "Actions=" entries.
Definition: kdesktopfile.cpp:241
bool isRelativePath(const QString &path)
QString readGenericName() const
Returns the value of the "GenericName=" entry.
Definition: kdesktopfile.cpp:204
QString mid(int position, int n) const
static bool isDesktopFile(const QString &path)
Checks whether this is really a desktop file.
Definition: kdesktopfile.cpp:131
static QString locateLocal(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
This function is much like locate.
Definition: kstandarddirs.cpp:2091
static QString locateLocal(const QString &path)
Returns the location where changes for the .desktop file path should be written to.
Definition: kdesktopfile.cpp:79
void reparseConfiguration()
Updates the state of this object to match the persistent storage.
Definition: kconfig.cpp:557
typedef ConstIterator
uint ownerId() const
const KComponentData & mainComponent()
Returns the global component data.
Definition: kglobal.cpp:145
int length() const
bool hasActionGroup(const QString &group) const
Returns true if the action group exists, false otherwise.
Definition: kdesktopfile.cpp:257
bool authorize(const QString &genericAction)
Returns whether a certain action is authorized.
Definition: kauthorized.cpp:215
QString fromLatin1(const char *str, int size)
KConfigGroup actionGroup(const QString &group)
Sets the desktop action group.
Definition: kdesktopfile.cpp:247
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
Returns the URL as string, with all escape sequences intact, encoded in a given charset.
Definition: kurl.cpp:1035
QString readDocPath() const
Returns the value of the "X-DocPath=" Or "DocPath=" entry.
Definition: kdesktopfile.cpp:363
iterator begin()
static QString realPath(const QString &dirname)
Expands all symbolic links and resolves references to '/.
Definition: kstandarddirs.cpp:914
Definition: kconfigini_p.h:30
QString decodeName(const QByteArray &localFileName)
bool isExecutable() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.