summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2024-06-26 15:40:37 +0200
committerSimon Rettberg2024-06-26 15:40:37 +0200
commit02ac5127533dd69c21f58fa18606b0153839a203 (patch)
tree59056dd478b8140bca09d737a7984a9c36ce0cbc /src
parentFix deprecation warnings (diff)
downloadslxgreeter-02ac5127533dd69c21f58fa18606b0153839a203.tar.gz
slxgreeter-02ac5127533dd69c21f58fa18606b0153839a203.tar.xz
slxgreeter-02ac5127533dd69c21f58fa18606b0153839a203.zip
Fix reading idp list file
Diffstat (limited to 'src')
-rw-r--r--src/global.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/global.cpp b/src/global.cpp
index 91704f3..ce166c6 100644
--- a/src/global.cpp
+++ b/src/global.cpp
@@ -4,12 +4,13 @@
#include <QModelIndex>
#include <QString>
#include <QEventLoop>
-#include <QDebug>
#include <QCoreApplication>
#include <QStringList>
#include <QCryptographicHash>
#include <QRegularExpression>
#include <QSet>
+#include <QTextStream>
+#include <QDebug>
bool Global::m_testMode = false;
@@ -152,8 +153,9 @@ QString Global::getCombinedIdpWhitelist()
QFile f(filePath);
if (!f.open(QFile::ReadOnly))
continue;
- while (f.canReadLine()) {
- list << QString::fromUtf8(f.readLine());
+ QTextStream in(&f);
+ while (!in.atEnd()) {
+ list.insert(in.readLine());
}
f.close();
}