mirror of https://gitee.com/cxasm/notepad--.git
!75 fix: 处理 Markdown 预览在 Qt5.14 版本以下的编译错误
Merge pull request !75 from zinface/fix-lower-5.14-markdown-preview-bug
This commit is contained in:
commit
a99b34d2ed
|
@ -14,5 +14,15 @@ MarkdownView::~MarkdownView()
|
||||||
|
|
||||||
void MarkdownView::viewMarkdown(QString& text)
|
void MarkdownView::viewMarkdown(QString& text)
|
||||||
{
|
{
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
QString tips = QString(
|
||||||
|
"NOTE: Your Qt version is lower than 5.14, so you can't preview Markdown for the time being."
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"%1").arg(text);
|
||||||
|
ui.textEdit->setPlainText(tips);
|
||||||
|
#else
|
||||||
ui.textEdit->setMarkdown(text);
|
ui.textEdit->setMarkdown(text);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue