Remove old qt code

new round of removal following the report of @benj5378  .

.
This commit is contained in:
Andrea
2025-03-05 09:46:35 +01:00
parent fdd21e95b0
commit 5464ada40c
14 changed files with 33 additions and 98 deletions

View File

@@ -110,11 +110,9 @@ DlgProjectInformationImp::DlgProjectInformationImp(App::Document* doc, QWidget*
// When saving the text to XML the newlines get lost. So we store also the newlines as '\n'.
// See also accept().
QString comment = QString::fromUtf8(doc->Comment.getValue());
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
QStringList lines = comment.split(QLatin1String("\\n"), Qt::KeepEmptyParts);
#else
QStringList lines = comment.split(QLatin1String("\\n"), QString::KeepEmptyParts);
#endif
QString text = lines.join(QLatin1String("\n"));
ui->textEditComment->setPlainText( text );
connect(ui->pushButtonOpenURL, &QPushButton::clicked,
@@ -151,11 +149,8 @@ void DlgProjectInformationImp::accept()
// Replace newline escape sequence through '\\n' string
QStringList lines = ui->textEditComment->toPlainText().split
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
(QLatin1String("\n"), Qt::KeepEmptyParts);
#else
(QLatin1String("\n"), QString::KeepEmptyParts);
#endif
QString text = lines.join(QLatin1String("\\n"));
_doc->Comment.setValue(text.isEmpty() ? QByteArray() : text.toUtf8());