gui: PreviewGeneratorPlainText: Don't add header if we have nothing to show
此提交包含在:
@ -246,6 +246,8 @@ QString PreviewGeneratorPlainText::generateLineBasedPreviewText(QTextStream &in,
|
|||||||
totalWordCountMap[it->first] = totalWordCountMap.value(it->first, 0) + it->second;
|
totalWordCountMap[it->first] = totalWordCountMap.value(it->first, 0) + it->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!resultText.isEmpty())
|
||||||
|
{
|
||||||
if(isTruncated)
|
if(isTruncated)
|
||||||
{
|
{
|
||||||
header += "(truncated) ";
|
header += "(truncated) ";
|
||||||
@ -256,7 +258,9 @@ QString PreviewGeneratorPlainText::generateLineBasedPreviewText(QTextStream &in,
|
|||||||
}
|
}
|
||||||
header += "<hr>";
|
header += "<hr>";
|
||||||
|
|
||||||
return header + resultText;
|
resultText = header + resultText;
|
||||||
|
}
|
||||||
|
return resultText;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<PreviewResult> PreviewGeneratorPlainText::generate(RenderConfig config, QString documentPath,
|
QSharedPointer<PreviewResult> PreviewGeneratorPlainText::generate(RenderConfig config, QString documentPath,
|
||||||
|
新增問題並參考
封鎖使用者