mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kio: KRecentDocument optimization
the bug report was related to the resources system that Katie does not support Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4600904f5b
commit
d4ab9eae6c
1 changed files with 3 additions and 13 deletions
|
@ -68,18 +68,9 @@ QStringList KRecentDocument::recentDocuments()
|
|||
d.mkdir(recentDocumentDirectory());
|
||||
}
|
||||
|
||||
const QStringList list = d.entryList();
|
||||
QStringList fullList;
|
||||
|
||||
foreach (const QString &it, list) {
|
||||
QString pathDesktop;
|
||||
if (it.startsWith(":")) {
|
||||
// FIXME: Remove when Qt will be fixed
|
||||
// http://bugreports.qt.nokia.com/browse/QTBUG-11223
|
||||
pathDesktop = KRecentDocument::recentDocumentDirectory() + it;
|
||||
} else {
|
||||
pathDesktop = d.absoluteFilePath(it);
|
||||
}
|
||||
foreach (const QString &it, d.entryList()) {
|
||||
const QString pathDesktop = d.absoluteFilePath(it);
|
||||
KDesktopFile tmpDesktopFile(pathDesktop);
|
||||
KUrl urlDesktopFile(tmpDesktopFile.desktopGroup().readPathEntry("URL", QString()));
|
||||
if (urlDesktopFile.isLocalFile() && !QFile::exists(urlDesktopFile.toLocalFile())) {
|
||||
|
@ -167,9 +158,8 @@ void KRecentDocument::add(const KUrl &url, const QString &desktopEntryName)
|
|||
|
||||
void KRecentDocument::clear()
|
||||
{
|
||||
const QStringList list = recentDocuments();
|
||||
QDir dir;
|
||||
foreach(const QString &it, list) {
|
||||
foreach(const QString &it, recentDocuments()) {
|
||||
kDebug(s_krecentdocumentarea) << "clearing" << it;
|
||||
dir.remove(it);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue