Merge pull request #7852 from ZappoMan/fixUpdateDialogFormatting

fix the update dialog to not show blank lines for missing version numbers
This commit is contained in:
Brad Hefta-Gaub 2016-05-10 08:18:38 -07:00
commit 466b535e4e

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";
}
}
}