diff options
author | saturneric <[email protected]> | 2023-11-07 07:18:06 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-11-07 07:18:06 +0000 |
commit | 3ad7fecdb6458fdd6f146bed19fe643c7f93e905 (patch) | |
tree | 522f7a5dd0389ad0771d01a50ea49ef646940894 /src/ui/widgets/TextEdit.cpp | |
parent | refactor: improve the code structure of core (diff) | |
download | GpgFrontend-3ad7fecdb6458fdd6f146bed19fe643c7f93e905.tar.gz GpgFrontend-3ad7fecdb6458fdd6f146bed19fe643c7f93e905.zip |
refactor: remove CommonUtils at core
Diffstat (limited to 'src/ui/widgets/TextEdit.cpp')
-rw-r--r-- | src/ui/widgets/TextEdit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/widgets/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp index 9c53b311..f27bab7c 100644 --- a/src/ui/widgets/TextEdit.cpp +++ b/src/ui/widgets/TextEdit.cpp @@ -482,7 +482,11 @@ void TextEdit::SlotPrint() { if (dlg->exec() != QDialog::Accepted) { return; } - document->print(&printer); + if (document != nullptr) { + document->print(&printer); + } else { + QMessageBox::warning(this, _("Warning"), _("No document to print")); + } // statusBar()->showMessage(_("Ready"), 2000); #endif |