mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kfile: add the leading directory to recent directories for files and URLs from KFileWidgetPrivate::addToRecent()
continuation from:
978cf7f0dd
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
eef26737e5
commit
3e01296579
1 changed files with 18 additions and 6 deletions
|
@ -2399,6 +2399,12 @@ void KFileWidgetPrivate::addToRecent()
|
|||
QStringList::ConstIterator it = files.begin();
|
||||
for ( ; it != files.end() && atmost > 0; ++it ) {
|
||||
KRecentDocument::add( *it );
|
||||
if (!fileClass.isEmpty()) {
|
||||
const QString itdir = KUrl(*it).directory();
|
||||
if (!itdir.isEmpty()) {
|
||||
KRecentDirs::add(fileClass, itdir);
|
||||
}
|
||||
}
|
||||
atmost--;
|
||||
}
|
||||
} else {
|
||||
|
@ -2408,6 +2414,12 @@ void KFileWidgetPrivate::addToRecent()
|
|||
for ( ; it != urls.end() && atmost > 0; ++it ) {
|
||||
if ( (*it).isValid() ) {
|
||||
KRecentDocument::add( *it );
|
||||
if (!fileClass.isEmpty()) {
|
||||
const QString itdir = it->directory();
|
||||
if (!itdir.isEmpty()) {
|
||||
KRecentDirs::add(fileClass, itdir);
|
||||
}
|
||||
}
|
||||
atmost--;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue