fix the update dialog to not show blank lines for missing version numbers

This commit is contained in:
Brad Hefta-Gaub 2016-05-09 16:19:03 -07:00
parent 343bc2a747
commit 7bb21d3700

View file

@ -31,10 +31,12 @@ UpdateDialog::UpdateDialog(QQuickItem* parent) :
_releaseNotes = "";
for (int i = latestVersion; i > currentVersion; i--) {
QString releaseNotes = applicationUpdater.data()->getBuildData()[i]["releaseNotes"];
releaseNotes.remove("<br />");
releaseNotes.remove(QRegExp("^\n+"));
_releaseNotes += "\n" + QString().sprintf("%d", i) + "\n" + releaseNotes + "\n";
if (applicationUpdater.data()->getBuildData().contains(i)) {
QString releaseNotes = applicationUpdater.data()->getBuildData()[i]["releaseNotes"];
releaseNotes.remove("<br />");
releaseNotes.remove(QRegExp("^\n+"));
_releaseNotes += "\n" + QString().sprintf("%d", i) + "\n" + releaseNotes + "\n";
}
}
}