mirror of
https://github.com/KDE/konsole.git
synced 2026-05-07 22:26:17 -04:00
Allow --profile=full path to work again.
After 8240973baf, using full paths in
--profile didn't work. This fixes that issue.
It will save the full profile path for favorites and shortcuts if the
profile is not under the normal KDE konsole area.
CCBUG: 283102
This commit is contained in:
@@ -473,7 +473,16 @@ void ProfileManager::saveShortcuts()
|
||||
QString profileName;
|
||||
if (fileInfo.isAbsolute())
|
||||
{
|
||||
profileName = fileInfo.fileName();
|
||||
// Check to see if file is under KDE's data locations. If not,
|
||||
// store full path.
|
||||
QString location = KGlobal::dirs()->locate("data",
|
||||
"konsole/"+fileInfo.fileName());
|
||||
if (location.isEmpty())
|
||||
{
|
||||
profileName = iter.value().profilePath;
|
||||
} else {
|
||||
profileName = fileInfo.fileName();
|
||||
}
|
||||
} else {
|
||||
profileName = iter.value().profilePath;
|
||||
}
|
||||
@@ -550,7 +559,16 @@ void ProfileManager::saveFavorites()
|
||||
|
||||
if (fileInfo.isAbsolute())
|
||||
{
|
||||
profileName = fileInfo.fileName();
|
||||
// Check to see if file is under KDE's data locations. If not,
|
||||
// store full path.
|
||||
QString location = KGlobal::dirs()->locate("data",
|
||||
"konsole/"+fileInfo.fileName());
|
||||
if (location.isEmpty())
|
||||
{
|
||||
profileName = profile->path();
|
||||
} else {
|
||||
profileName = fileInfo.fileName();
|
||||
}
|
||||
} else {
|
||||
profileName = profile->path();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user