From 3c0a026c7873f8c3a8f5eedf5fe64075bfd1b98c Mon Sep 17 00:00:00 2001 From: Alexander Gusak Date: Sun, 31 Jul 2011 03:11:14 +0300 Subject: [PATCH] Fixed last update check time encoding during saving to/loading from settings. --- qt/update_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp index b68c111689..fa04a22df6 100644 --- a/qt/update_dialog.cpp +++ b/qt/update_dialog.cpp @@ -64,7 +64,7 @@ namespace qt string timeString; if (!Settings::Get(LAST_CHECK_TIME_KEY, timeString)) timeString = "Never checked"; - m_label = new QLabel(QString(QObject::tr(LAST_UPDATE_CHECK)) + timeString.c_str(), this); + m_label = new QLabel(QString(QObject::tr(LAST_UPDATE_CHECK)) + QString::fromUtf8(timeString.c_str()), this); m_updateButton = new QPushButton(QObject::tr(CHECK_FOR_UPDATE), this); m_updateButton->setDefault(false); @@ -260,7 +260,7 @@ namespace qt // } QString labelText(LAST_UPDATE_CHECK); QString const textDate = QDateTime::currentDateTime().toString(); - Settings::Set(LAST_CHECK_TIME_KEY, string(textDate.toLocal8Bit().data())); + Settings::Set(LAST_CHECK_TIME_KEY, string(textDate.toUtf8().data())); m_label->setText(labelText.append(textDate)); m_updateButton->setText(CHECK_FOR_UPDATE); m_updateButton->setDisabled(false);