Gui: Use QStringLiteral

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-09 18:33:01 +01:00
parent 24ac19e261
commit 8d2d0a47f4
83 changed files with 519 additions and 520 deletions

View File

@@ -169,7 +169,7 @@ void MDIView::onRelabel(Gui::Document *pDoc)
}
else {
cap = QString::fromUtf8(pDoc->getDocument()->Label.getValue());
cap = QString::fromLatin1("%1[*]").arg(cap);
cap = QStringLiteral("%1[*]").arg(cap);
setWindowTitle(cap);
}
}
@@ -258,7 +258,7 @@ void MDIView::print()
void MDIView::printPdf()
{
QString filename = FileDialog::getSaveFileName(this, tr("Export PDF"), QString(),
QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF file")));
QStringLiteral("%1 (*.pdf)").arg(tr("PDF file")));
if (!filename.isEmpty()) {
QPrinter printer(QPrinter::ScreenResolution);
// setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/