[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/konqueror/client
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2004-07-26 17:07:57
Message-ID: 20040726170757.07197B67 () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

Dollar expansion in KConfig apparently works only with readEntry().
CCMAIL: 85991-done@bugs.kde.org


  M +8 -3      kfmclient.cc   1.117


--- kdebase/konqueror/client/kfmclient.cc  #1.116:1.117
@@ -174,6 +174,8 @@ extern "C" int kdemain( int argc, char *
 static bool startNewKonqueror( QString url, QString mimetype, const QString& profile )
 {
-    if( url.isEmpty() && !profile.isEmpty())
+    if( url.isEmpty())
     {
+        if( profile.isEmpty())
+            return true;
         QString profilepath = locate( "data", QString::fromLatin1("konqueror/profiles/") + profile );
         if( profilepath.isEmpty())
@@ -181,4 +183,5 @@ static bool startNewKonqueror( QString u
         KConfig cfg( profilepath, true );
         cfg.setDollarExpansion( true );
+        cfg.setGroup( "Profile" );
         QMap< QString, QString > entries = cfg.entryMap( QString::fromLatin1( "Profile" ));
         QRegExp urlregexp( QString::fromLatin1( "^View[0-9]*_URL$" ));
@@ -188,6 +191,8 @@ static bool startNewKonqueror( QString u
              ++it )
         {
-            if( urlregexp.search( it.key()) >= 0 && !(*it).isEmpty())
-                urls << *it;
+            // don't read value from map, dollar expansion is needed
+            QString value = cfg.readEntry( it.key());
+            if( urlregexp.search( it.key()) >= 0 && !value.isEmpty())
+                urls << value;
         }
         if( urls.count() != 1 )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic