port C++ code to Qt5

This commit is contained in:
wmayer
2016-12-13 14:22:59 +01:00
parent f844d5164f
commit 5096f55ccb
22 changed files with 176 additions and 13 deletions

View File

@@ -63,7 +63,11 @@ void TemplateTextField::execDialog()
if(uiCode == QDialog::Accepted) {
if (tmplte) {
newContent = ui->getFieldContent();
QString qsClean = Qt::escape(newContent); //Qt5 note: this becomes qsNewContent.toHtmlEscaped();
#if QT_VERSION >= 0x050000
QString qsClean = newContent.toHtmlEscaped();
#else
QString qsClean = Qt::escape(newContent);
#endif
std::string utf8Content = qsClean.toUtf8().constData();
tmplte->EditableTexts.setValue(fieldNameStr, utf8Content);
}