diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-12-10 21:30:01 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-12-10 21:30:13 +0100 |
commit | 9ad1ef0e55981046f750fdb39f564b74663bc03a (patch) | |
tree | 8a2a8f9d2c449c5fa543800ab4ca9a6f46d58889 /rbutil | |
parent | 52d437b33ed95e7a10e022f62cbd7c18f4fbc433 (diff) |
rbutil: Fix encoding for themes info data.
The themes info data uses utf-8 encoding, while QSettings defaults to
ASCII and uses escape sequences, resulting in non-ASCII characters being
garbled. Use the correct encoding.
Change-Id: Ibee58b51926f6d7c3885dead0b42579e21bfb1db
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index daa910d6bf..3b713c145f 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp @@ -116,6 +116,7 @@ void ThemesInstallWindow::downloadDone(bool error) themesInfo.open(); QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); + iniDetails.setIniCodec(QTextCodec::codecForName("UTF-8")); QStringList tl = iniDetails.childGroups(); LOG_INFO() << "Theme site result:" << iniDetails.value("error/code").toString() @@ -189,6 +190,7 @@ void ThemesInstallWindow::updateSize(void) long size = 0; // sum up size for all selected themes QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); + iniDetails.setIniCodec(QTextCodec::codecForName("UTF-8")); int items = ui.listThemes->selectedItems().size(); for(int i = 0; i < items; i++) { iniDetails.beginGroup(ui.listThemes->selectedItems() @@ -207,6 +209,7 @@ void ThemesInstallWindow::updateDetails(QListWidgetItem* cur, QListWidgetItem* p return; QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); + iniDetails.setIniCodec(QTextCodec::codecForName("UTF-8")); QCoreApplication::processEvents(); ui.themeDescription->setText(tr("fetching details for %1") |