summaryrefslogtreecommitdiffstats
path: root/konqueror
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-05-24 19:53:58 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-05-24 19:56:00 +0900
commit31914f43c6a9a7bb59ab72099e7d8d949417ef66 (patch)
treee8b76779e8dd4b7934a63d1ee4cc1681007a5e31 /konqueror
parent6744b9d67f041d6888e2044a75116312e12cc734 (diff)
downloadtdebase-31914f43c6a9a7bb59ab72099e7d8d949417ef66.tar.gz
tdebase-31914f43c6a9a7bb59ab72099e7d8d949417ef66.zip
Fixed update of network links in user folder. This resolves bug 2903.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 00dfa3aec6f891f88ca73219d5d6859b67b3b651)
Diffstat (limited to 'konqueror')
-rw-r--r--konqueror/sidebar/trees/konq_sidebartree.cpp45
1 files changed, 21 insertions, 24 deletions
diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp b/konqueror/sidebar/trees/konq_sidebartree.cpp
index 0ce4c2049..514c28095 100644
--- a/konqueror/sidebar/trees/konq_sidebartree.cpp
+++ b/konqueror/sidebar/trees/konq_sidebartree.cpp
@@ -599,28 +599,26 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path
if ( isRoot )
{
- bool copyConfig = ( entries.count() == 0 && dirEntries.count() == 0 );
- if (!copyConfig)
- {
- // Check version number
- // Version 1 was the dirtree of KDE 2.0.x (no versioning at that time, so default)
- // Version 2 includes the history
- // Version 3 includes the bookmarks
- // Version 4 includes lan.desktop and floppy.desktop, Alex
- // Version 5 includes the audiocd browser
- // Version 6 includes the printmanager and lan browser
- const int currentVersion = 6;
- TQString key = TQString::fromLatin1("X-TDE-DirTreeVersionNumber");
- KSimpleConfig versionCfg( path + "/.directory" );
- int versionNumber = versionCfg.readNumEntry( key, 1 );
- kdDebug(1201) << "KonqSidebarTree::scanDir found version " << versionNumber << endl;
- if ( versionNumber < currentVersion )
- {
- versionCfg.writeEntry( key, currentVersion );
- versionCfg.sync();
- copyConfig = true;
- }
- }
+ bool copyConfig = false;
+ // Check version number
+ // Version 1 was the dirtree of KDE 2.0.x (no versioning at that time, so default)
+ // Version 2 includes the history
+ // Version 3 includes the bookmarks
+ // Version 4 includes lan.desktop and floppy.desktop, Alex
+ // Version 5 includes the audiocd browser
+ // Version 6 includes the printmanager and lan browser
+ // Version 7 includes update of network places
+ const int currentVersion = 7;
+ TQString key = TQString::fromLatin1("X-TDE-DirTreeVersionNumber");
+ KSimpleConfig versionCfg( path + "/.directory" );
+ int versionNumber = versionCfg.readNumEntry( key, 0 );
+ kdDebug(1201) << "KonqSidebarTree::scanDir found version " << versionNumber << endl;
+ if ( versionNumber < currentVersion )
+ {
+ versionCfg.writeEntry( key, currentVersion );
+ versionCfg.sync();
+ copyConfig = true;
+ }
if (copyConfig)
{
// We will copy over the configuration for the dirtree, from the global directory
@@ -655,8 +653,7 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path
for (; eIt != eEnd; ++eIt )
{
//kdDebug(1201) << "KonqSidebarTree::scanDir dirtree_dir contains " << *eIt << endl;
- if ( *eIt != "." && *eIt != ".."
- && !entries.contains( *eIt ) && !dirEntries.contains( *eIt ) )
+ if ( *eIt != "." && *eIt != "..")
{ // we don't have that one yet -> copy it.
TQString cp("cp -R -- ");
cp += TDEProcess::quote(dirtree_dir + *eIt);