aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-18 23:44:28 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-18 23:44:28 +0000
commita4514401e906aa3b699a4d3ff3c9d6d6e53cbf0e (patch)
tree9aedb5f8af7fdae7b9d97ef0b948d546128c3ef1
parentsaving is nearly done, but only the first document is handled (diff)
downloadgpg4usb-a4514401e906aa3b699a4d3ff3c9d6d6e53cbf0e.tar.gz
gpg4usb-a4514401e906aa3b699a4d3ff3c9d6d6e53cbf0e.zip
now saving multiple documents is nearly fine, but asking to save every single document should be removed
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@441 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--textedit.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/textedit.cpp b/textedit.cpp
index d34b035..183c108 100644
--- a/textedit.cpp
+++ b/textedit.cpp
@@ -350,16 +350,16 @@ bool TextEdit::maybeSaveAnyTab()
EditorPage *ep = qobject_cast<EditorPage *> (tabWidget->widget(i));
if(ep->getTextPage()->document()->isModified()) {
QString docname = tabWidget->tabText(i);
- // remove * before name of modified doc
+ // remove * before name of modified doc (has to be placed after saving)
docname.remove(0,2);
unsavedDocs.insert(i, docname);
}
}
-
+ qDebug() << unsavedDocs.size();
/*
* no unsaved documents
*/
- if (unsavedDocs.size() == 1) {
+ if (unsavedDocs.size() == 0) {
return true;
}
/*
@@ -410,11 +410,11 @@ bool TextEdit::maybeSaveAnyTab()
allsaved=false;
}
qDebug() << "handling for save" << tabId;
- if (allsaved) {
- return true;
- } else {
- return false;
- }
+ }
+ if (allsaved) {
+ return true;
+ } else {
+ return false;
}
}
}