summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <kurt.hindenburg@gmail.com>2012-01-28 16:49:19 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2012-01-28 16:49:19 (GMT)
commit0bd1927585fe043e2a9a97adbe188f59747e5f83 (patch)
tree56efa1121f002fa3f44452897c89715abd09c86d
parent6d9d49aafb358293326f4edca393c7f2dfc9602a (diff)
Select right profile name in saveFavorites()
Do not use "profile->name()" for retrieve profile name, but take it from profile path. When a profile name is changed (ex. test -> test2): profile->path() (/home/xxxx/.../test.profile) profile->name() (test2.profile) Thanks to Francesco Cecconi (francesco.cecconi@gmail.com ) for patch BUG: 292637 REVIEW: 103807 FIXED-IN: 4.9
-rw-r--r--src/SessionManager.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp
index 266201a..2576ab8 100644
--- a/src/SessionManager.cpp
+++ b/src/SessionManager.cpp
@@ -727,7 +727,19 @@ void SessionManager::saveFavorites()
Q_ASSERT(_profiles.contains(profile) && profile);
- paths << profile->name() + ".profile";
+ QFileInfo fileInfo(profile->path());
+ QString profileName;
+
+ if (fileInfo.isAbsolute())
+ {
+ profileName = fileInfo.fileName();
+ }
+ else
+ {
+ profileName = profile->path();
+ }
+
+ paths << profileName;
}
favoriteGroup.writeEntry("Favorites", paths);