diff options
author | Jonathan White <support@dmapps.us> | 2019-10-21 01:23:11 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2019-10-21 01:56:41 +0300 |
commit | 1e694271a3c6c233736301dcb2f1a7ced081fc3f (patch) | |
tree | 1fa647b44bf8427cc6d4cdd50fe38aee82b242dd /tests/util/TemporaryFile.h | |
parent | 744b4abce801440ff4e143fb2bb416b3d7a91e07 (diff) |
Improve Database and CLI tests
Diffstat (limited to 'tests/util/TemporaryFile.h')
-rw-r--r-- | tests/util/TemporaryFile.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/util/TemporaryFile.h b/tests/util/TemporaryFile.h index 1fca110a5..3c1cc6aa0 100644 --- a/tests/util/TemporaryFile.h +++ b/tests/util/TemporaryFile.h @@ -20,31 +20,20 @@ #include <QTemporaryFile> -#ifdef Q_OS_WIN -/** - * QTemporaryFile does not actually close a file when close() is - * called, which causes the file to be locked on Windows. - * This class extends a QFile with the extra functionality - * of a QTemporaryFile to circumvent this problem. - */ class TemporaryFile : public QFile -#else -class TemporaryFile : public QTemporaryFile -#endif { Q_OBJECT -#ifdef Q_OS_WIN public: TemporaryFile(); explicit TemporaryFile(const QString& templateName); explicit TemporaryFile(QObject* parent); TemporaryFile(const QString& templateName, QObject* parent); - ~TemporaryFile() override = default; + ~TemporaryFile() override; using QFile::open; bool open(); -#endif + bool copyFromFile(const QString& otherFileName); }; #endif // KEEPASSXC_TEMPORARYFILE_H |