diff options
author | saturneric <[email protected]> | 2024-01-16 13:35:59 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-16 13:35:59 +0000 |
commit | 620ae9e7c1a8b2db2515c080416cb592066e5fec (patch) | |
tree | 900f3e55118aa2a5049d99dd743d3e595016fc7b /src/ui/dialog/QuitDialog.cpp | |
parent | fix: make task and threading system safer (diff) | |
download | GpgFrontend-620ae9e7c1a8b2db2515c080416cb592066e5fec.tar.gz GpgFrontend-620ae9e7c1a8b2db2515c080416cb592066e5fec.zip |
refactor: remove libgettext from project
Diffstat (limited to 'src/ui/dialog/QuitDialog.cpp')
-rwxr-xr-x | src/ui/dialog/QuitDialog.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ui/dialog/QuitDialog.cpp b/src/ui/dialog/QuitDialog.cpp index c02f5898..6dd5674e 100755 --- a/src/ui/dialog/QuitDialog.cpp +++ b/src/ui/dialog/QuitDialog.cpp @@ -32,7 +32,7 @@ namespace GpgFrontend::UI { QuitDialog::QuitDialog(QWidget* parent, const QHash<int, QString>& unsavedDocs) : GeneralDialog("quit_dialog", parent) { - setWindowTitle(_("Unsaved Files")); + setWindowTitle(tr("Unsaved Files")); setModal(true); discarded_ = false; @@ -75,15 +75,14 @@ QuitDialog::QuitDialog(QWidget* parent, const QHash<int, QString>& unsavedDocs) /* * Warnbox with icon and text */ - auto pixmap = QPixmap(":error.png"); + auto pixmap = QPixmap(":/icons/error.png"); pixmap = pixmap.scaled(50, 50, Qt::KeepAspectRatio, Qt::SmoothTransformation); auto* warn_icon = new QLabel(); warn_icon->setPixmap(pixmap); - const auto info = - QString(_("%1 files contain unsaved information.<br/>Save the " - "changes before closing?")) - .arg(row); + const auto info = tr("%1 files contain unsaved information.<br/>Save the " + "changes before closing?") + .arg(row); auto* warn_label = new QLabel(info); auto* warn_box_layout = new QHBoxLayout(); warn_box_layout->addWidget(warn_icon); @@ -95,10 +94,10 @@ QuitDialog::QuitDialog(QWidget* parent, const QHash<int, QString>& unsavedDocs) /* * Two labels on top and under the filelist */ - auto* check_label = new QLabel(_("Check the files you want to save:")); + auto* check_label = new QLabel(tr("Check the files you want to save:")); auto* note_label = new QLabel( - "<b>" + QString(_("Note")) + ":</b>" + - _("If you don't save these files, all changes are lost.") + "<br/>"); + "<b>" + tr("Note") + ":</b>" + + tr("If you don't save these files, all changes are lost.") + "<br/>"); /* * Buttonbox |