mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Coding style fixes.
This commit is contained in:
parent
fb4367f9ef
commit
98df309d28
@ -109,13 +109,15 @@ void TestQSaveFile::autoFlush()
|
|||||||
void TestQSaveFile::transactionalWriteNoPermissions()
|
void TestQSaveFile::transactionalWriteNoPermissions()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
if (::geteuid() == 0)
|
if (::geteuid() == 0) {
|
||||||
QSKIP("not valid running this test as root", SkipAll);
|
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.
|
// You can write into /dev/zero, but you can't create a /dev/zero.XXXXXX temp file.
|
||||||
QSaveFile file("/dev/zero");
|
QSaveFile file("/dev/zero");
|
||||||
if (!QDir("/dev").exists())
|
if (!QDir("/dev").exists()) {
|
||||||
QSKIP("/dev doesn't exist on this system", SkipAll);
|
QSKIP("/dev doesn't exist on this system", SkipAll);
|
||||||
|
}
|
||||||
|
|
||||||
QVERIFY(!file.open(QIODevice::WriteOnly));
|
QVERIFY(!file.open(QIODevice::WriteOnly));
|
||||||
QCOMPARE(static_cast<int>(file.error()), static_cast<int>(QFile::OpenError));
|
QCOMPARE(static_cast<int>(file.error()), static_cast<int>(QFile::OpenError));
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TESTQSAVEFILE_H
|
#ifndef KEEPASSX_TESTQSAVEFILE_H
|
||||||
#define TESTQSAVEFILE_H
|
#define KEEPASSX_TESTQSAVEFILE_H
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
|
|
||||||
@ -36,4 +36,4 @@ private:
|
|||||||
QString tmpDir();
|
QString tmpDir();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TESTQSAVEFILE_H
|
#endif // KEEPASSX_TESTQSAVEFILE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user