Preparing to prerelease

* apply clangformat
* fix yahoo weather api
This commit is contained in:
Evgenii Alekseev 2016-04-05 00:24:37 +03:00
parent 7d1e035240
commit d9409c25f4
2 changed files with 9 additions and 7 deletions

View File

@ -69,8 +69,8 @@ void AWUpdateHelper::checkUpdates(const bool showAnyway)
bool AWUpdateHelper::checkVersion() bool AWUpdateHelper::checkVersion()
{ {
QSettings settings(m_genericConfig, QSettings::IniFormat); QSettings settings(m_genericConfig, QSettings::IniFormat);
QVersionNumber version QVersionNumber version = QVersionNumber::fromString(
= QVersionNumber::fromString(settings.value(QString("Version"), QString(VERSION)).toString()); settings.value(QString("Version"), QString(VERSION)).toString());
// update version // update version
settings.setValue(QString("Version"), QString(VERSION)); settings.setValue(QString("Version"), QString(VERSION));
settings.sync(); settings.sync();
@ -94,7 +94,8 @@ void AWUpdateHelper::showInfo(const QVersionNumber version)
{ {
qCDebug(LOG_AW) << "Version" << version; qCDebug(LOG_AW) << "Version" << version;
QString text = i18n("You are using the actual version %1", version.toString()); QString text
= i18n("You are using the actual version %1", version.toString());
if (!QString(COMMIT_SHA).isEmpty()) if (!QString(COMMIT_SHA).isEmpty())
text += QString(" (%1)").arg(QString(COMMIT_SHA)); text += QString(" (%1)").arg(QString(COMMIT_SHA));
return genMessageBox(i18n("No new version found"), text, QMessageBox::Ok) return genMessageBox(i18n("No new version found"), text, QMessageBox::Ok)
@ -127,7 +128,8 @@ void AWUpdateHelper::userReplyOnUpdates(QAbstractButton *button)
switch (ret) { switch (ret) {
case QMessageBox::Ok: case QMessageBox::Ok:
QDesktopServices::openUrl(QString(RELEASES) + m_foundVersion.toString()); QDesktopServices::openUrl(QString(RELEASES)
+ m_foundVersion.toString());
break; break;
case QMessageBox::Cancel: case QMessageBox::Cancel:
default: default:

View File

@ -23,9 +23,9 @@
#include "abstractextitem.h" #include "abstractextitem.h"
#define YAHOO_WEATHER_URL \ #define YAHOO_WEATHER_URL \
"https://query.yahooapis.com/v1/public/yql?format=json&q=select * from " \ "https://query.yahooapis.com/v1/public/yql?format=json&env=store://" \
"weather.forecast where u='c' and woeid in (select woeid from " \ "datatables.org/alltableswithkeys&q=select * from weather.forecast where " \
"geo.places(1) where text='%1, %2')" "u='c' and woeid in (select woeid from geo.places(1) where text='%1, %2')"
namespace Ui namespace Ui