mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
e58158c3cd
commit
c363423718
22 changed files with 118 additions and 43 deletions
|
|
@ -29,7 +29,7 @@ INIFile::INIFile()
|
|||
QString INIFile::unescape(QString orig)
|
||||
{
|
||||
QString out;
|
||||
QChar prev = 0;
|
||||
QChar prev = QChar::Null;
|
||||
for(auto c: orig)
|
||||
{
|
||||
if(prev == '\\')
|
||||
|
|
@ -42,7 +42,7 @@ QString INIFile::unescape(QString orig)
|
|||
out += '#';
|
||||
else
|
||||
out += c;
|
||||
prev = 0;
|
||||
prev = QChar::Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -52,7 +52,7 @@ QString INIFile::unescape(QString orig)
|
|||
continue;
|
||||
}
|
||||
out += c;
|
||||
prev = 0;
|
||||
prev = QChar::Null;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
|
|
@ -117,7 +117,9 @@ bool INIFile::loadFile(QString fileName)
|
|||
bool INIFile::loadFile(QByteArray file)
|
||||
{
|
||||
QTextStream in(file);
|
||||
#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
|
||||
in.setCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
QStringList lines = in.readAll().split('\n');
|
||||
for (int i = 0; i < lines.count(); i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue