mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 03:00:50 -04:00
Improve Database and CLI tests
This commit is contained in:
parent
744b4abce8
commit
1e694271a3
9 changed files with 127 additions and 91 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue