summaryrefslogtreecommitdiffstats
path: root/src/global.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/global.cpp')
-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();
}