diff options
Diffstat (limited to 'pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch')
-rw-r--r-- | pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch b/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch index aac09dfe876b..a4d41e3e6f52 100644 --- a/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch +++ b/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch @@ -1,8 +1,8 @@ diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp -index 4b5983c..911c511 100644 +index 041e5ed..efb1324 100644 --- a/src/common/ConfigReader.cpp +++ b/src/common/ConfigReader.cpp -@@ -147,16 +147,13 @@ namespace SDDM { +@@ -148,17 +148,14 @@ namespace SDDM { // * m_path (classic fallback /etc/sddm.conf) QStringList files; @@ -13,18 +13,20 @@ index 4b5983c..911c511 100644 QDir dir(m_sysConfigDir); if (dir.exists()) { - latestModificationTime = std::max(latestModificationTime, QFileInfo(m_sysConfigDir).lastModified()); - foreach (const QFileInfo &file, dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware)) { + const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware); + for (const QFileInfo &file : dirFiles) { files << (file.absoluteFilePath()); - latestModificationTime = std::max(latestModificationTime, file.lastModified()); } } } -@@ -164,21 +161,14 @@ namespace SDDM { +@@ -166,22 +163,15 @@ namespace SDDM { //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()); - foreach (const QFileInfo &file, dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware)) { + const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware); + for (const QFileInfo &file : dirFiles) { files << (file.absoluteFilePath()); - latestModificationTime = std::max(latestModificationTime, file.lastModified()); } @@ -38,6 +40,6 @@ index 4b5983c..911c511 100644 - } - m_fileModificationTime = latestModificationTime; - - foreach (const QString &filepath, files) { + for (const QString &filepath : qAsConst(files)) { loadInternal(filepath); } |