mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Make sure tmpDir is not empty.
This commit is contained in:
@@ -51,6 +51,7 @@ private:
|
|||||||
void TestQSaveFile::transactionalWrite()
|
void TestQSaveFile::transactionalWrite()
|
||||||
{
|
{
|
||||||
const QString dir = tmpDir();
|
const QString dir = tmpDir();
|
||||||
|
QVERIFY(!dir.isEmpty());
|
||||||
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
||||||
DirCleanup dirCleanup(dir, "outfile");
|
DirCleanup dirCleanup(dir, "outfile");
|
||||||
QFile::remove(targetFile);
|
QFile::remove(targetFile);
|
||||||
@@ -87,6 +88,7 @@ void TestQSaveFile::transactionalWrite()
|
|||||||
void TestQSaveFile::autoFlush()
|
void TestQSaveFile::autoFlush()
|
||||||
{
|
{
|
||||||
const QString dir = tmpDir();
|
const QString dir = tmpDir();
|
||||||
|
QVERIFY(!dir.isEmpty());
|
||||||
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
||||||
DirCleanup dirCleanup(dir, "outfile");
|
DirCleanup dirCleanup(dir, "outfile");
|
||||||
QFile::remove(targetFile);
|
QFile::remove(targetFile);
|
||||||
@@ -124,6 +126,7 @@ void TestQSaveFile::transactionalWriteNoPermissions()
|
|||||||
void TestQSaveFile::transactionalWriteCanceled()
|
void TestQSaveFile::transactionalWriteCanceled()
|
||||||
{
|
{
|
||||||
const QString dir = tmpDir();
|
const QString dir = tmpDir();
|
||||||
|
QVERIFY(!dir.isEmpty());
|
||||||
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
||||||
DirCleanup dirCleanup(dir, "outfile");
|
DirCleanup dirCleanup(dir, "outfile");
|
||||||
QFile::remove(targetFile);
|
QFile::remove(targetFile);
|
||||||
@@ -148,6 +151,7 @@ void TestQSaveFile::transactionalWriteCanceled()
|
|||||||
void TestQSaveFile::transactionalWriteErrorRenaming()
|
void TestQSaveFile::transactionalWriteErrorRenaming()
|
||||||
{
|
{
|
||||||
const QString dir = tmpDir();
|
const QString dir = tmpDir();
|
||||||
|
QVERIFY(!dir.isEmpty());
|
||||||
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
const QString targetFile = dir + QString::fromLatin1("/outfile");
|
||||||
DirCleanup dirCleanup(dir, "outfile");
|
DirCleanup dirCleanup(dir, "outfile");
|
||||||
QSaveFile file(targetFile);
|
QSaveFile file(targetFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user