diff options
author | Simon Rettberg | 2024-06-26 15:40:37 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-06-26 15:40:37 +0200 |
commit | 02ac5127533dd69c21f58fa18606b0153839a203 (patch) | |
tree | 59056dd478b8140bca09d737a7984a9c36ce0cbc | |
parent | Fix deprecation warnings (diff) | |
download | slxgreeter-02ac5127533dd69c21f58fa18606b0153839a203.tar.gz slxgreeter-02ac5127533dd69c21f58fa18606b0153839a203.tar.xz slxgreeter-02ac5127533dd69c21f58fa18606b0153839a203.zip |
Fix reading idp list file
-rw-r--r-- | src/global.cpp | 8 |
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(); } |