aboutsummaryrefslogtreecommitdiffstats
path: root/textedit.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-04 00:53:11 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-04 00:53:11 +0000
commitbd4eb52b0b183e0e4e4ae3888cff4bdcb51ca790 (patch)
treed0f50c2426874417275accc886914072bbdd94c9 /textedit.cpp
parentrevert qdebug that sneaked in (diff)
downloadgpg4usb-bd4eb52b0b183e0e4e4ae3888cff4bdcb51ca790.tar.gz
gpg4usb-bd4eb52b0b183e0e4e4ae3888cff4bdcb51ca790.zip
some commenting
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@430 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'textedit.cpp')
-rw-r--r--textedit.cpp59
1 files changed, 32 insertions, 27 deletions
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;