Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a70ff34d authored by Kurt Hindenburg's avatar Kurt Hindenburg

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
info.
Note that for the 2nd option "Use user specific location", the app
name will be used (e.g. /home/user/.cache/yakuake).

BUG: 369496
parent b4a6262a
......@@ -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