2015-10-07 04:45:50 +01:00
|
|
|
diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
|
2020-11-04 12:16:10 +00:00
|
|
|
index 041e5ed..efb1324 100644
|
2015-10-07 04:45:50 +01:00
|
|
|
--- a/src/common/ConfigReader.cpp
|
|
|
|
+++ b/src/common/ConfigReader.cpp
|
2020-11-04 12:16:10 +00:00
|
|
|
@@ -148,17 +148,14 @@ namespace SDDM {
|
2017-10-12 05:01:42 +01:00
|
|
|
// * m_path (classic fallback /etc/sddm.conf)
|
2015-10-07 04:45:50 +01:00
|
|
|
|
2017-10-12 05:01:42 +01:00
|
|
|
QStringList files;
|
|
|
|
- QDateTime latestModificationTime = QFileInfo(m_path).lastModified();
|
|
|
|
|
|
|
|
if (!m_sysConfigDir.isEmpty()) {
|
|
|
|
//include the configDir in modification time so we also reload on any files added/removed
|
|
|
|
QDir dir(m_sysConfigDir);
|
|
|
|
if (dir.exists()) {
|
|
|
|
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_sysConfigDir).lastModified());
|
2020-11-04 12:16:10 +00:00
|
|
|
const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
|
|
|
|
for (const QFileInfo &file : dirFiles) {
|
2017-10-12 05:01:42 +01:00
|
|
|
files << (file.absoluteFilePath());
|
|
|
|
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-04 12:16:10 +00:00
|
|
|
@@ -166,22 +163,15 @@ namespace SDDM {
|
2017-10-12 05:01:42 +01:00
|
|
|
//include the configDir in modification time so we also reload on any files added/removed
|
|
|
|
QDir dir(m_configDir);
|
|
|
|
if (dir.exists()) {
|
|
|
|
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_configDir).lastModified());
|
2020-11-04 12:16:10 +00:00
|
|
|
const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
|
|
|
|
for (const QFileInfo &file : dirFiles) {
|
2017-10-12 05:01:42 +01:00
|
|
|
files << (file.absoluteFilePath());
|
|
|
|
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
files << m_path;
|
|
|
|
|
|
|
|
- if (latestModificationTime <= m_fileModificationTime) {
|
2015-10-07 04:45:50 +01:00
|
|
|
- return;
|
|
|
|
- }
|
2017-10-12 05:01:42 +01:00
|
|
|
- m_fileModificationTime = latestModificationTime;
|
|
|
|
-
|
2020-11-04 12:16:10 +00:00
|
|
|
for (const QString &filepath : qAsConst(files)) {
|
2017-10-12 05:01:42 +01:00
|
|
|
loadInternal(filepath);
|
|
|
|
}
|