PERFORCE change 166658 for review

Jonathan Anderson jona at FreeBSD.org
Mon Jul 27 22:00:56 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=166658

Change 166658 by jona at jona-trustedbsd-belle-vmware on 2009/07/27 22:00:41

	Handle the case of a powerbox not returning any files

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_qt/TextEditor.cpp#5 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_qt/TextEditor.cpp#5 (text+ko) ====

@@ -93,6 +93,16 @@
 		return;
 	}
 
+	if(fdcount == 0) return;
+	else if(fdcount != 1)
+	{
+		QMessageBox::critical(this,
+		                      tr("Powerbox Error"),
+		                      tr("Received ") + QString::number(fdcount)
+		                       + tr(" files; expected 1"));
+		return;
+	}
+
 	QFile file(this);
 	file.open(fd, QFile::ReadWrite | QFile::Unbuffered);
 	ui.text->setPlainText(file.readAll());


More information about the p4-projects mailing list