changeset 214:aab742690bee

Fix check for selected items and wait for bytes written. According to the documentation closing the write channel should suffice. But in testing it did not sent over everything.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 26 Mar 2014 17:17:19 +0100
parents 3ebebd055d3a
children 292e2cb60ef0
files ui/listupdatedialog.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ui/listupdatedialog.cpp	Thu Mar 27 09:08:44 2014 +0100
+++ b/ui/listupdatedialog.cpp	Wed Mar 26 17:17:19 2014 +0100
@@ -17,7 +17,6 @@
     QDialog(parent),
     mCertificateList(listToInstall)
 {
-    qDebug() << "I am a happy list update dialog";
     setupGUI();
 }
 
@@ -128,7 +127,7 @@
     /* Items to install */
     for (int i = 0; i < mCertListWidget->count(); i++) {
         QListWidgetItem *item = mCertListWidget->item(i);
-        if (!item->checkState() == Qt::Checked &&
+        if (item->checkState() 1= Qt::Checked &&
             item->data(Qt::UserRole).toString().startsWith("I:")) {
             continue;
         }
@@ -139,7 +138,7 @@
     /* Items to remove */
     for (int i = 0; i < mCertListWidget->count(); i++) {
         QListWidgetItem *item = mCertListWidget->item(i);
-        if (!item->checkState() == Qt::Checked &&
+        if (!item->checkState() != Qt::Checked &&
             item->data(Qt::UserRole).toString().startsWith("R:")) {
             continue;
         }
@@ -147,6 +146,7 @@
         installerProcess.write("\r\n");
     }
 
+    installerProcess.waitForBytesWritten();
     installerProcess.closeWriteChannel();
     installerProcess.waitForFinished();
 

http://wald.intevation.org/projects/trustbridge/