Date: Mon, 27 Jul 2009 22:00:46 GMT From: Jonathan Anderson <jona@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166658 for review Message-ID: <200907272200.n6RM0kDf048306@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166658 Change 166658 by jona@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());
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907272200.n6RM0kDf048306>