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(); QString changelogText = changelogStream.readAll();
temp.close(); temp.close();
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
ui->changelogTextEdit->setMarkdown(changelogText); ui->changelogText->setMarkdown(changelogText);
ui->changelogTextEdit->setTextInteractionFlags(ui->changelogTextEdit->textInteractionFlags() | ui->changelogText->setTextInteractionFlags(ui->changelogText->textInteractionFlags() | Qt::LinksAccessibleByMouse);
Qt::LinksAccessibleByMouse);
#else #else
ui->changelogTextEdit->setPlainText(changelogText); ui->changelogText->setPlainText(changelogText);
#endif #endif
} }

View File

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

View File

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