Rename and change type of changelog field

This commit is contained in:
Paweł Kotiuk
2021-12-23 16:45:24 +01:00
parent 5a5800b6aa
commit 0f7ff22023
3 changed files with 6 additions and 7 deletions

View File

@@ -94,11 +94,10 @@ void AboutDialog::fillInfoTextBrowser()
QString changelogText = changelogStream.readAll();
temp.close();
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
ui->changelogTextEdit->setMarkdown(changelogText);
ui->changelogTextEdit->setTextInteractionFlags(ui->changelogTextEdit->textInteractionFlags() |
Qt::LinksAccessibleByMouse);
ui->changelogText->setMarkdown(changelogText);
ui->changelogText->setTextInteractionFlags(ui->changelogText->textInteractionFlags() | Qt::LinksAccessibleByMouse);
#else
ui->changelogTextEdit->setPlainText(changelogText);
ui->changelogText->setPlainText(changelogText);
#endif
}

View File

@@ -342,7 +342,7 @@ p, li { white-space: pre-wrap; }
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QTextEdit" name="changelogTextEdit">
<widget class="QTextBrowser" name="changelogText">
<property name="readOnly">
<bool>true</bool>
</property>

View File

@@ -58,8 +58,8 @@ void TestAboutDialog::infoTextBrowserEmpty()
void TestAboutDialog::changelogPlainEmpty()
{
QPlainTextEdit* changelogTextEdit = aboutDialog.findChild<QPlainTextEdit*>("changelogTextEdit");
QVERIFY2(!changelogTextEdit->toPlainText().isEmpty(), "changelogTextEdit is empty");
QPlainTextEdit* changelogText = aboutDialog.findChild<QPlainTextEdit*>("changelogText");
QVERIFY2(!changelogText->toPlainText().isEmpty(), "changelogText is empty");
}
void TestAboutDialog::textBrowserDevsEmpty()