aboutsummaryrefslogtreecommitdiffstats
path: root/quitdialog.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-17 23:27:07 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-17 23:27:07 +0000
commit8f3b9765f438834b386fbbc6ba016492e51db2f5 (patch)
treef4a9ffe9798ce5171040d0fbc2f33817bb738270 /quitdialog.cpp
parentadded quitdialog with checklist for documents to save, but there has to be so... (diff)
downloadgpg4usb-8f3b9765f438834b386fbbc6ba016492e51db2f5.tar.gz
gpg4usb-8f3b9765f438834b386fbbc6ba016492e51db2f5.zip
saving is nearly done, but only the first document is handled
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@440 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'quitdialog.cpp')
-rwxr-xr-xquitdialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/quitdialog.cpp b/quitdialog.cpp
index e599f6b..38cf14e 100755
--- a/quitdialog.cpp
+++ b/quitdialog.cpp
@@ -47,10 +47,10 @@ QuitDialog::QuitDialog(QWidget *parent, QHash<int, QString> unsavedDocs, QString
mFileList->setEditTriggers(QAbstractItemView::NoEditTriggers);
mFileList->setFocusPolicy(Qt::NoFocus);
mFileList->horizontalHeader()->setStretchLastSection( true );
-
// fill the table
- while (i.hasNext()) {
- i.next();
+ i.toBack(); //jump to the end of list to fill the table backwards
+ while (i.hasPrevious()) {
+ i.previous();
mFileList->setRowCount(mFileList->rowCount()+1);
// checkbox in front of filename
@@ -119,7 +119,7 @@ QList <int> QuitDialog::getTabIdsToSave()
QList <int> tabIdsToSave;
for (int i = 0; i < mFileList->rowCount(); i++) {
if (mFileList->item(i, 0)->checkState() == Qt::Checked) {
- qDebug() << mFileList->item(i, 2)->text();
+ qDebug() << "tabidtosave: " << mFileList->item(i, 2)->text();
tabIdsToSave << mFileList->item(i, 2)->text().toInt();
}
}