a extra line at the end of credits.txt caused the crash (could be just in Windows). This patch is a half measure though; perhaps it would be better to code it such that it avoids empty spaces at the end?
Diff Detail
Diff Detail
- Repository
- R37 Krita
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
That assert doesn't fire for me, but I guess that this diff would be a better solution:
diff --git a/libs/ui/dialogs/kis_about_application.cpp b/libs/ui/dialogs/kis_about_application.cpp
index be63486..d36d440 100644
- a/libs/ui/dialogs/kis_about_application.cpp
+++ b/libs/ui/dialogs/kis_about_application.cpp
@@ -108,10 +108,9 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
Q_ASSERT(fileCredits.exists()); fileCredits.open(QIODevice::ReadOnly);
- Q_FOREACH (const QByteArray &credit, fileCredits.readAll().split('\n')) {
- if (!credit.isEmpty()) {
+ Q_FOREACH (const QByteArray &credit, QString::fromUtf8(fileCredits.readAll()).split('\n', QString::SkipEmptyParts)) {
+ if (credit.contains(":")) {
QList<QByteArray> creditSplit = credit.split(':');
- Q_ASSERT(creditSplit.size() == 2); credits.append(QString::fromUtf8(creditSplit.at(0))); credits.append(" (<i>" + QString::fromUtf8(creditSplit.at(1)) + "</i>)"); credits.append(", ");
lines 1-17/17 (END)
Comment Actions
The diff didn't render nicely in the comments, but I can see what you change in the commit log. That would be a much better solution. (y)
Comment Actions
I guess this can be closed since 69498052017786c80af686ce44a0f9621155209e was commited