biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / display-managers / sddm / sddm-ignore-config-mtime.patch
bloba4d41e3e6f520152a18ce8137d18433caeebb26a
1 diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
2 index 041e5ed..efb1324 100644
3 --- a/src/common/ConfigReader.cpp
4 +++ b/src/common/ConfigReader.cpp
5 @@ -148,17 +148,14 @@ namespace SDDM {
6 // * m_path (classic fallback /etc/sddm.conf)
8 QStringList files;
9 - QDateTime latestModificationTime = QFileInfo(m_path).lastModified();
11 if (!m_sysConfigDir.isEmpty()) {
12 //include the configDir in modification time so we also reload on any files added/removed
13 QDir dir(m_sysConfigDir);
14 if (dir.exists()) {
15 - latestModificationTime = std::max(latestModificationTime, QFileInfo(m_sysConfigDir).lastModified());
16 const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
17 for (const QFileInfo &file : dirFiles) {
18 files << (file.absoluteFilePath());
19 - latestModificationTime = std::max(latestModificationTime, file.lastModified());
23 @@ -166,22 +163,15 @@ namespace SDDM {
24 //include the configDir in modification time so we also reload on any files added/removed
25 QDir dir(m_configDir);
26 if (dir.exists()) {
27 - latestModificationTime = std::max(latestModificationTime, QFileInfo(m_configDir).lastModified());
28 const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
29 for (const QFileInfo &file : dirFiles) {
30 files << (file.absoluteFilePath());
31 - latestModificationTime = std::max(latestModificationTime, file.lastModified());
36 files << m_path;
38 - if (latestModificationTime <= m_fileModificationTime) {
39 - return;
40 - }
41 - m_fileModificationTime = latestModificationTime;
43 for (const QString &filepath : qAsConst(files)) {
44 loadInternal(filepath);