mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: do not expand environment variables if expansion is not to be done in KConfigGroup::readPathEntry()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a91b3422e3
commit
ef69e4639c
1 changed files with 6 additions and 2 deletions
|
@ -614,7 +614,8 @@ QString KConfigGroup::readEntryUntranslated(const char *key, const QString& aDef
|
|||
{
|
||||
Q_ASSERT_X(isValid(), "KConfigGroup::readEntryUntranslated", "accessing an invalid group");
|
||||
|
||||
QString result = config()->d_func()->lookupData(d->fullName(), key, KEntryMap::SearchFlags(), 0);
|
||||
bool expand = false;
|
||||
QString result = config()->d_func()->lookupData(d->fullName(), key, KEntryMap::SearchFlags(), &expand);
|
||||
if (result.isNull())
|
||||
return aDefault;
|
||||
return result;
|
||||
|
@ -764,7 +765,10 @@ QString KConfigGroup::readPathEntry(const char *key, const QString & aDefault) c
|
|||
if (aValue.isNull())
|
||||
aValue = aDefault;
|
||||
|
||||
return KShell::envExpand(aValue);
|
||||
if (expand)
|
||||
return KShell::envExpand(aValue);
|
||||
|
||||
return aValue;
|
||||
}
|
||||
|
||||
QStringList KConfigGroup::readPathEntry(const QString& pKey, const QStringList& aDefault) const
|
||||
|
|
Loading…
Add table
Reference in a new issue