Coding style fixes.

This commit is contained in:
Felix Geyer committed 2012-07-08 10:29:38 +02:00
1 parent fb4367f9ef
commit 98df309d28
2 files changed
+7 -5

No files matched your search

+4 -2
View File
@@ -109,13 +109,15 @@ void TestQSaveFile::autoFlush()
void TestQSaveFile::transactionalWriteNoPermissions()
{
#ifdef Q_OS_UNIX
if (::geteuid() == 0)
if (::geteuid() == 0) {
QSKIP("not valid running this test as root", SkipAll);
}
// You can write into /dev/zero, but you can't create a /dev/zero.XXXXXX temp file.
QSaveFile file("/dev/zero");
if (!QDir("/dev").exists())
if (!QDir("/dev").exists()) {
QSKIP("/dev doesn't exist on this system", SkipAll);
}
QVERIFY(!file.open(QIODevice::WriteOnly));
QCOMPARE(static_cast<int>(file.error()), static_cast<int>(QFile::OpenError));