History

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

Brad Hefta-Gaub committed 10 years ago

Commit 7bb21d31 parent 343bc2a1 file · +6 −4Browse files

Showing the changes to interface/src/ui/UpdateDialog.cpp (1 of 1 file). Show all

Unified · Split

interface/src/ui/UpdateDialog.cpp+6−4
@@ -31,10 +31,12 @@ UpdateDialog::UpdateDialog(QQuickItem* parent) : · 30 unmodified lines
3131
3232 _releaseNotes = "";
3333 for (int i = latestVersion; i > currentVersion; i--) {
34− QString releaseNotes = applicationUpdater.data()->getBuildData()[i]["releaseNotes"];
35− releaseNotes.remove("<br />");
36− releaseNotes.remove(QRegExp("^\n+"));
37− _releaseNotes += "\n" + QString().sprintf("%d", i) + "\n" + releaseNotes + "\n";
34+ if (applicationUpdater.data()->getBuildData().contains(i)) {
35+ QString releaseNotes = applicationUpdater.data()->getBuildData()[i]["releaseNotes"];
36+ releaseNotes.remove("<br />");
37+ releaseNotes.remove(QRegExp("^\n+"));
38+ _releaseNotes += "\n" + QString().sprintf("%d", i) + "\n" + releaseNotes + "\n";
39+ }
3840 }
3941 }
4042