diff ui/mainwindow.cpp @ 1153:0495f9187c4b

(issue36) read_and_verify_list expects utf8 filenames.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 18 Sep 2014 12:53:40 +0200
parents 6ec64a30fd5f
children 98e0712e790b
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Thu Sep 18 15:44:21 2014 +0200
+++ b/ui/mainwindow.cpp	Thu Sep 18 12:53:40 2014 +0200
@@ -194,7 +194,7 @@
     QString availableFileName = mSettings.value("List/available").toString();
     QString installedFileName = mSettings.value("List/installed").toString();
     if (!availableFileName.isEmpty()) {
-        mListToInstall.readList(availableFileName.toLocal8Bit().constData());
+        mListToInstall.readList(availableFileName.toUtf8().constData());
         if (!mListToInstall.isValid()) {
             mCurState = TransferError;
             // Probably a bug when Qt fileName is encoded and cFileName
@@ -211,7 +211,7 @@
     }
 
     if (!installedFileName.isEmpty()) {
-        mInstalledList.readList(installedFileName.toLocal8Bit().constData());
+        mInstalledList.readList(installedFileName.toUtf8().constData());
         if (!mInstalledList.isValid()) {
             // Probably a bug when Qt fileName is encoded and cFileName
             // fails because of this. This needs a unit test!
@@ -276,6 +276,7 @@
 
         /* Retry the download again in 10 - 20 minutes */
         QTimer::singleShot(600000 + (qrand() % 60000), this, SLOT(checkUpdates()));
+        qDebug() << "Failed to verify list.";
     } else {
     if (mTrayIcon->isAlternative()) {
         mCurMessage = tr("An updated certificate list is available.");

http://wald.intevation.org/projects/trustbridge/