Commit 7faed10b authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

[konsolesessions runner] Fix collecting dirs with profiles

QStandardPaths::locateAll() will just deliver the dirs existing at the time
of the call.
Instead we have to calculate all possible dirs with profiles from
QStandardPaths::standardLocations(), which also reports dirs not yet
created.
parent 408a69fd
......@@ -58,9 +58,9 @@ void KonsoleSessions::slotPrepare()
if (!m_sessionWatch) {
m_sessionWatch = new KDirWatch(this);
const QStringList sessiondirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("konsole"), QStandardPaths::LocateDirectory);
foreach (const QString &dir, sessiondirs) {
m_sessionWatch->addDir(dir);
const QStringList konsoleDataBaseDirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
for (const QString& konsoleDataBaseDir : konsoleDataBaseDirs) {
m_sessionWatch->addDir(konsoleDataBaseDir + QLatin1String("/konsole"));
}
connect(m_sessionWatch, &KDirWatch::dirty, this, &KonsoleSessions::loadSessions);
......
Supports Markdown
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