Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/sqlcipher/tests/qsqlcipher-test.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2014 Christian Dávid <christian-david@web.de> | ||||
3 | * Copyright 2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or | ||||
6 | * modify it under the terms of the GNU General Public License as | ||||
7 | * published by the Free Software Foundation; either version 2 of | ||||
8 | * the License, or (at your option) any later version. | ||||
9 | * | ||||
10 | * This program is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | * GNU General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU General Public License | ||||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
17 | */ | ||||
18 | | ||||
19 | #ifndef SQLCIPHERDRIVERTEST_H | ||||
20 | #define SQLCIPHERDRIVERTEST_H | ||||
21 | | ||||
22 | #include <QObject> | ||||
23 | #include <QSqlDatabase> | ||||
24 | #include <QTemporaryFile> | ||||
25 | | ||||
26 | class qsqlciphertest : public QObject | ||||
27 | { | ||||
28 | Q_OBJECT | ||||
29 | private: | ||||
30 | int data(); | ||||
31 | | ||||
32 | private Q_SLOTS: | ||||
33 | void initTestCase(); | ||||
34 | void cleanupTestCase(); | ||||
35 | | ||||
36 | void isSQLCipherUsed(); | ||||
37 | void createEncryptedDatabase(); | ||||
38 | void createTable(); | ||||
39 | void writeData_data(); | ||||
40 | void writeData(); | ||||
41 | void reopenDatabase(); | ||||
42 | void countData(); | ||||
43 | void readData_data(); | ||||
44 | void readData(); | ||||
45 | | ||||
46 | private: | ||||
47 | QTemporaryFile m_file; | ||||
48 | QSqlDatabase m_db; | ||||
49 | }; | ||||
50 | | ||||
51 | #endif // SQLCIPHERDRIVERTEST_H |