aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/TextEdit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-15 12:07:25 +0000
committersaturneric <[email protected]>2024-01-15 12:07:25 +0000
commitca8bdd4cc269e61ce3c8b06b4bfca5a512468110 (patch)
treecf8a325bfa9285730739d4d7d7bca1e82a59f8aa /src/ui/widgets/TextEdit.cpp
parentchore: remove qt5 support (diff)
downloadGpgFrontend-ca8bdd4cc269e61ce3c8b06b4bfca5a512468110.tar.gz
GpgFrontend-ca8bdd4cc269e61ce3c8b06b4bfca5a512468110.zip
fix: clean up useless code and make life easier
Diffstat (limited to 'src/ui/widgets/TextEdit.cpp')
-rw-r--r--src/ui/widgets/TextEdit.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/ui/widgets/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp
index 0c5fb631..1f1f0242 100644
--- a/src/ui/widgets/TextEdit.cpp
+++ b/src/ui/widgets/TextEdit.cpp
@@ -183,26 +183,7 @@ bool TextEdit::save_file(const QString& fileName) {
PlainTextEditorPage* page = SlotCurPageTextEdit();
if (page == nullptr) return false;
- if (page->WillCharsetChange()) {
- auto result = QMessageBox::warning(
- this, _("Save"),
- QString("<p>") +
- _("After saving, the encoding of the current file will be "
- "converted to UTF-8 and the line endings will be changed to "
- "LF. ") +
- "</p>" + "<p>" +
- _("If this is not the result you expect, please use \"save "
- "as\".") +
- "</p>",
- QMessageBox::Save | QMessageBox::Cancel, QMessageBox::Cancel);
-
- if (result == QMessageBox::Cancel) {
- return false;
- }
- }
-
QFile file(fileName);
-
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream output_stream(&file);
QApplication::setOverrideCursor(Qt::WaitCursor);