KDECore
kautosavefile.cpp
Go to the documentation of this file.
151 QList<KAutoSaveFile *> KAutoSaveFile::staleFiles(const KUrl &filename, const QString &applicationName)
200 const QStringList files = KGlobal::dirs()->findAllResources("stale", appName + QLatin1String("/*"));
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
virtual void releaseLock()
Closes the autosave file resource and removes the lock file.
Definition: kautosavefile.cpp:105
void setManagedFile(const KUrl &filename)
Sets the URL of the file managed by KAutoSaveFile.
Definition: kautosavefile.cpp:97
bool addResourceType(const char *type, const QString &relativename, bool priority=true)
Adds suffixes for types.
Definition: kstandarddirs.cpp:393
virtual bool open(OpenMode openmode)
Opens the autosave file and locks it if it wasn't already locked.
Definition: kautosavefile.cpp:115
static QList< KAutoSaveFile * > allStaleFiles(const QString &applicationName=QString())
Returns all stale autosave files left behind by crashed or otherwise gone instances of this applicati...
Definition: kautosavefile.cpp:190
QString fileName() const
int size() const
void setFileName(const QString &name)
Automatically remove a lock when a lock is detected that is stale for more than staleTime() seconds...
Definition: klockfile.h:84
static QList< KAutoSaveFile * > staleFiles(const KUrl &filename, const QString &applicationName=QString())
Checks for stale autosave files for filename.
Definition: kautosavefile.cpp:151
void chop(int n)
KAutoSaveFile(const KUrl &filename, QObject *parent=0)
Constructs a KAutoSaveFile for file filename.
Definition: kautosavefile.cpp:71
void setProtocol(const QString &proto)
Sets the protocol for the URL (i.e., file, http, etc.)
Definition: kurl.cpp:677
~KAutoSaveFile()
Destroys the KAutoSaveFile object, removes the autosave file and drops the lock being held (if any)...
Definition: kautosavefile.cpp:86
void append(const T &value)
Definition: kstandarddirs.h:191
QChar fromLatin1(char c)
bool isEmpty() const
KUrl managedFile() const
Retrieves the URL of the file managed by KAutoSaveFile.
Definition: kautosavefile.cpp:92
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
QCoreApplication * instance()
Definition: kaboutdata.h:33
QString fromPercentEncoding(const QByteArray &input)
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
QString right(int n) const
virtual void close()
QByteArray toLatin1() const
QString mid(int position, int n) const
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
Returns the filename of the path.
Definition: kurl.cpp:1283
static QString locateLocal(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
This function is much like locate.
Definition: kstandarddirs.cpp:2091
QByteArray toPercentEncoding(const QString &input, const QByteArray &exclude, const QByteArray &include)
QString left(int n) const
QString fromLatin1(const char *str, int size)
Return immediately, do not wait for the lock to become available.
Definition: klockfile.h:77
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
Tries to find all resources with the specified type.
Definition: kstandarddirs.cpp:900
QString name() const
applicationName
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 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:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.