Skip to content

Commit

Permalink
Added message in log if no update is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertKrajewski committed May 16, 2015
1 parent 0785860 commit 2b9914c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mymainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ void MyMainWindow::removeOldSettings()

void MyMainWindow::checkForUpdate()
{
int currentVersion = 20100;

QNetworkAccessManager manager;
QNetworkRequest request( QUrl("http://sync-my-l2p.de/images/version.txt"));
QEventLoop newLoop;
Expand All @@ -157,7 +159,7 @@ void MyMainWindow::checkForUpdate()
return;
}
QString replyMessage(reply->readAll());
if( replyMessage.toInt() > 20100 )
if( replyMessage.toInt() > currentVersion )
{
// Aufhübschen der Versionsnummer
replyMessage.insert(4, ".");
Expand All @@ -169,6 +171,10 @@ void MyMainWindow::checkForUpdate()
tr("Auf der offiziellen Webseite ist eine neue Version verfügbar!\n"
"Diese Nachricht kannst du in den Optionen deaktiveren."));
}
else
{
QLOG_INFO() << tr("Diese Version ist aktuell") << " (" << currentVersion << ")";
}
}

/// Tabs Pointer auf die Geschwistertabs übergeben
Expand Down

0 comments on commit 2b9914c

Please sign in to comment.