Commit 0bd19275 authored by Kurt Hindenburg's avatar Kurt Hindenburg

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
parent 6d9d49aa
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment