If the shell profile already has a path that starts with

$KDEHOME, then use the path from the shell profile. Otherwise,
provide our own path.

Change suggested by Robert Knight after my last fix to always
save profiles in $KDEHOME


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=740989
wilder-portage
Matt Rogers 19 years ago
parent a692f2da1d
commit 8d9692170c
  1. 13
      src/Profile.cpp

@ -234,8 +234,17 @@ void Profile::registerName(Property property , const QString& name)
QString KDE4ProfileWriter::getPath(const Profile* info)
{
QString newPath;
// use the profile name + ".profile" and save it in $KDEHOME
newPath = KGlobal::dirs()->saveLocation("data","konsole/") + info->name() + ".profile";
if ( info->isPropertySet(Profile::Path) &&
info->path().startsWith(KGlobal::dirs()->saveLocation("data", "konsole/")) )
{
newPath = info->path();
}
else
{
// use the profile name + ".profile" and save it in $KDEHOME
newPath = KGlobal::dirs()->saveLocation("data","konsole/") + info->name() + ".profile";
}
kDebug(1211) << "Saving profile under name: " << newPath;

Loading…
Cancel
Save