Spreadsheet: Use QStringLiteral

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-09 18:20:52 +01:00
parent e2f018ceeb
commit 240912e470
7 changed files with 29 additions and 33 deletions

View File

@@ -133,13 +133,13 @@ SheetView::SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWi
ui->cells->setPalette(palette);
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(
QString::fromLatin1("Spreadsheet_BackgroundColor"));
QStringLiteral("Spreadsheet_BackgroundColor"));
if (!bgList.empty()) {
bgList[0]->setCurrentColor(palette.color(QPalette::Base));
}
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(
QString::fromLatin1("Spreadsheet_ForegroundColor"));
QStringLiteral("Spreadsheet_ForegroundColor"));
if (!fgList.empty()) {
fgList[0]->setCurrentColor(palette.color(QPalette::Text));
}
@@ -299,7 +299,7 @@ void SheetView::printPdf()
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: