Commit 0f16d66c authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

For KParts, read Scrollback File Location from konsolerc

Apps using KonsolePart will now use Konsole's setting for the
scrollback file location.  There is also a check in the apprc for this
Note that for the 2nd option "Use user specific location", the app
name will be used (e.g. /home/user/.cache/yakuake).

BUG: 369496
(cherry picked from commit a70ff34d)
parent d4f85d65
......@@ -70,7 +70,17 @@ HistoryFile::HistoryFile() :
// This has the down-side that users must restart to
// load changes.
if (!historyFileLocation.exists()) {
KConfigGroup configGroup(KSharedConfig::openConfig(), "FileLocation");
KSharedConfigPtr appConfig = KSharedConfig::openConfig();
if (qApp->applicationName() != QLatin1String("konsole")) {
// Check if "kpart"rc has "FileLocation" group; AFAIK
// only possible if user manually added it. If not
// found, use konsole's config.
if (!appConfig->hasGroup("FileLocation")) {
appConfig = KSharedConfig::openConfig(QStringLiteral("konsolerc"));
KConfigGroup configGroup = appConfig->group("FileLocation");
if (configGroup.readEntry("scrollbackUseCacheLocation", false)) {
*historyFileLocation() = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
} else if (configGroup.readEntry("scrollbackUseSpecifiedLocation", false)) {
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