profilesmodel.cpp | profilesmodel.cpp | |||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
#include <QStandardPaths> | #include <QStandardPaths> | |||
#include <QUrl> | #include <QUrl> | |||
ProfilesModel::ProfilesModel(QObject *parent) | ProfilesModel::ProfilesModel(QObject *parent) | |||
: QAbstractListModel(parent) | : QAbstractListModel(parent) | |||
{ | { | |||
} | } | |||
void ProfilesModel::init() | void ProfilesModel::init() | |||
{ | { | |||
// NOTE: KDirWatch is very thread sensitive and must be initialized on | ||||
the correct thread | ||||
// i.e. it cannot be movedToThread at the time of writing | ||||
m_dirWatch = new KDirWatch(this); | m_dirWatch = new KDirWatch(this); | |||
const QStringList dataLocations = QStandardPaths::standardLocations(QSt andardPaths::GenericDataLocation); | const QStringList dataLocations = QStandardPaths::standardLocations(QSt andardPaths::GenericDataLocation); | |||
for (const QString &dataDir : dataLocations) { | for (const QString &dataDir : dataLocations) { | |||
if (m_appName == QLatin1String("konsole")) { | if (m_appName == QLatin1String("konsole")) { | |||
m_dirWatch->addDir(dataDir + QLatin1Char('/') + m_appName); | m_dirWatch->addDir(dataDir + QLatin1Char('/') + m_appName); | |||
} else { | } else { | |||
m_dirWatch->addDir(dataDir + QLatin1Char('/') + m_appName + QLa tin1String("/sessions")); | m_dirWatch->addDir(dataDir + QLatin1Char('/') + m_appName + QLa tin1String("/sessions")); | |||
} | } | |||
} | } | |||
connect(m_dirWatch, &KDirWatch::dirty, this, &ProfilesModel::loadProfil es); | connect(m_dirWatch, &KDirWatch::dirty, this, &ProfilesModel::loadProfil es); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |