From 8f3b9765f438834b386fbbc6ba016492e51db2f5 Mon Sep 17 00:00:00 2001 From: nils Date: Mon, 17 Jan 2011 23:27:07 +0000 Subject: 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 --- quitdialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'quitdialog.cpp') 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 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 QuitDialog::getTabIdsToSave() QList 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(); } } -- cgit v1.2.3