From bd4eb52b0b183e0e4e4ae3888cff4bdcb51ca790 Mon Sep 17 00:00:00 2001 From: ubbo Date: Tue, 4 Jan 2011 00:53:11 +0000 Subject: some commenting git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@430 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- textedit.cpp | 59 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) (limited to 'textedit.cpp') diff --git a/textedit.cpp b/textedit.cpp index 7c1d4ce..a908d87 100644 --- a/textedit.cpp +++ b/textedit.cpp @@ -45,32 +45,6 @@ TextEdit::TextEdit() setAcceptDrops(false); } - -/*void TextEditor::closeEvent(QCloseEvent *event) -{ - int curIndex = tabWidget->count(); - bool answ = true; - - - while (curIndex >= 1 && answ == true) - { - answ = closeFile(); - - curIndex--; - } - - - if (answ == true) - { - writeSettings(); - event->accept(); - } - else - { - event->ignore(); - } -} -*/ void TextEdit::newTab() { QString header = "new " + @@ -278,6 +252,38 @@ void TextEdit::selectAll() curTextPage()->selectAll(); } +/*void TextEditor::closeEvent(QCloseEvent *event) +{ + int curIndex = tabWidget->count(); + bool answ = true; + + + while (curIndex >= 1 && answ == true) + { + answ = closeFile(); + + curIndex--; + } + + + if (answ == true) + { + writeSettings(); + event->accept(); + } + else + { + event->ignore(); + } +} +*/ + +/*! + Checks if there are unsaved documents, returns true if this is the case. + If it returns true, the close event is aborted. + TODO: rename to "hasUnsavedDocuments", + merge code from commented function above +*/ bool TextEdit::maybeSave() { EditorPage *page = curPage(); @@ -286,7 +292,6 @@ bool TextEdit::maybeSave() return true; } - // whats this supposed to do? it blocks closing program when all tabs closed /*if (page == 0) { return false; -- cgit v1.2.3