diff options
| author | 2017-02-09 04:37:26 -0500 | |
|---|---|---|
| committer | 2017-02-09 04:37:26 -0500 | |
| commit | c9d6debf9015b7853c3e061bbc64a555d85e2fcd (patch) | |
| tree | 53341bc57ae9fbad2beb5b6c08d97a68bee0ec8e /Plugins/DbSqliteCipher | |
| parent | d5caba2b1f36dc3b92fa705a06097d0597fa2ddd (diff) | |
| parent | d9aa870e5d509cc7309ab82dd102a937ab58613a (diff) | |
Merge tag 'upstream/3.1.1+dfsg1'
Upstream version 3.1.1+dfsg1
# gpg: Signature made Thu 09 Feb 2017 04:37:24 AM EST
# gpg: using RSA key 5001E1B09AA3744B
# gpg: issuer "unit193@ubuntu.com"
# gpg: Good signature from "Unit 193 <unit193@ubuntu.com>" [unknown]
# gpg: aka "Unit 193 <unit193@gmail.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8DB3 E586 865D 2B4A 2B18 5A5C 5001 E1B0 9AA3 744B
Diffstat (limited to 'Plugins/DbSqliteCipher')
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher.pro | 8 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_de.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_es.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_fr.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_it.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_pl.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_pt_BR.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_ru.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_sk.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/DbSqliteCipher_zh_CN.ts | 2 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/dbsqlitecipher.cpp | 37 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/dbsqlitecipher.h | 9 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/dbsqlitecipher.json | 4 | ||||
| -rw-r--r-- | Plugins/DbSqliteCipher/dbsqlitecipher.qrc | 3 |
14 files changed, 29 insertions, 50 deletions
diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher.pro b/Plugins/DbSqliteCipher/DbSqliteCipher.pro index 1d3a358..84ce065 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher.pro +++ b/Plugins/DbSqliteCipher/DbSqliteCipher.pro @@ -6,7 +6,7 @@ QT -= gui -include($$PWD/../../../sqlitestudio/SQLiteStudio3/plugins.pri) +include($$PWD/../../SQLiteStudio3/plugins.pri) TARGET = DbSqliteCipher TEMPLATE = lib @@ -56,14 +56,16 @@ QMAKE_CFLAGS_WARN_ON = -Wall -Wno-unused-parameter -Wno-sign-compare -Wno-unused DISTFILES += \ openssl_lic.txt -TRANSLATIONS += \ +TRANSLATIONS += DbSqliteCipher_de.ts \ + \ DbSqliteCipher_it.ts\ DbSqliteCipher_zh_CN.ts\ DbSqliteCipher_sk.ts\ - DbSqliteCipher_de.ts\ DbSqliteCipher_ru.ts\ DbSqliteCipher_pt_BR.ts\ DbSqliteCipher_fr.ts\ DbSqliteCipher_es.ts\ DbSqliteCipher_pl.ts + + diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_de.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_de.ts index ae1f413..5ad1aa6 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_de.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_de.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="de_DE"> +<TS version="2.1" language="de_DE"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_es.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_es.ts index a9a9a1e..93c4650 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_es.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_es.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="es_ES"> +<TS version="2.1" language="es_ES"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_fr.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_fr.ts index 7f3589b..2739070 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_fr.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_fr.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="fr_FR"> +<TS version="2.1" language="fr_FR"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_it.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_it.ts index 0dc373c..e9f5c57 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_it.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_it.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="it_IT"> +<TS version="2.1" language="it_IT"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_pl.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_pl.ts index 03545b6..545d2bd 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_pl.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_pl.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="pl_PL"> +<TS version="2.1" language="pl_PL"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_pt_BR.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_pt_BR.ts index db11c84..560e130 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_pt_BR.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_pt_BR.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="pt_BR"> +<TS version="2.1" language="pt_BR"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_ru.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_ru.ts index b4cd459..25300e3 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_ru.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_ru.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="ru_RU"> +<TS version="2.1" language="ru_RU"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_sk.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_sk.ts index 877e002..692e4a4 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_sk.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_sk.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="sk_SK"> +<TS version="2.1" language="sk_SK"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/DbSqliteCipher_zh_CN.ts b/Plugins/DbSqliteCipher/DbSqliteCipher_zh_CN.ts index 74e8336..bbc4eea 100644 --- a/Plugins/DbSqliteCipher/DbSqliteCipher_zh_CN.ts +++ b/Plugins/DbSqliteCipher/DbSqliteCipher_zh_CN.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="zh_CN"> +<TS version="2.1" language="zh_CN"> <context> <name>DbSqliteCipher</name> <message> diff --git a/Plugins/DbSqliteCipher/dbsqlitecipher.cpp b/Plugins/DbSqliteCipher/dbsqlitecipher.cpp index 13fa346..fd6c909 100644 --- a/Plugins/DbSqliteCipher/dbsqlitecipher.cpp +++ b/Plugins/DbSqliteCipher/dbsqlitecipher.cpp @@ -20,32 +20,6 @@ bool DbSqliteCipher::checkIfDbServedByPlugin(Db* db) const return (db && dynamic_cast<DbSqliteCipherInstance*>(db)); } -Db* DbSqliteCipher::getInstance(const QString& name, const QString& path, const QHash<QString, QVariant>& options, QString* errorMessage) -{ - UNUSED(errorMessage); - - if (!initValid) - return nullptr; - - Db* db = new DbSqliteCipherInstance(name, path, options); - - if (!db->openForProbing()) - { - delete db; - return nullptr; - } - - SqlQueryPtr results = db->exec("SELECT * FROM sqlite_master"); - if (results->isError()) - { - delete db; - return nullptr; - } - - db->closeQuiet(); - return db; -} - QList<DbPluginOption> DbSqliteCipher::getOptionsList() const { static const QStringList ciphers = {"aes-128-cbc", "aes-128-cfb", "aes-128-cfb1", "aes-128-cfb8", "aes-128-ctr", "aes-128-ecb", "aes-128-gcm", "aes-128-ofb", @@ -108,12 +82,6 @@ QList<DbPluginOption> DbSqliteCipher::getOptionsList() const return opts; } -QString DbSqliteCipher::generateDbName(const QVariant& baseValue) -{ - QFileInfo file(baseValue.toString()); - return file.baseName(); -} - bool DbSqliteCipher::init() { Q_INIT_RESOURCE(dbsqlitecipher); @@ -139,3 +107,8 @@ void DbSqliteCipher::deinit() SQLITESTUDIO->getExtraLicenseManager()->removeLicense(LICENSE_TITLE); Q_CLEANUP_RESOURCE(dbsqlitecipher); } + +Db *DbSqliteCipher::newInstance(const QString &name, const QString &path, const QHash<QString, QVariant> &options) +{ + return new DbSqliteCipherInstance(name, path, options); +} diff --git a/Plugins/DbSqliteCipher/dbsqlitecipher.h b/Plugins/DbSqliteCipher/dbsqlitecipher.h index ef2ffea..903acce 100644 --- a/Plugins/DbSqliteCipher/dbsqlitecipher.h +++ b/Plugins/DbSqliteCipher/dbsqlitecipher.h @@ -2,10 +2,10 @@ #define DBSQLITECIPHER_H #include "dbsqlitecipher_global.h" -#include "plugins/dbplugin.h" +#include "plugins/dbpluginstdfilebase.h" #include "plugins/genericplugin.h" -class DBSQLITECIPHERSHARED_EXPORT DbSqliteCipher : public GenericPlugin, public DbPlugin +class DBSQLITECIPHERSHARED_EXPORT DbSqliteCipher : public GenericPlugin, public DbPluginStdFileBase { Q_OBJECT SQLITESTUDIO_PLUGIN("dbsqlitecipher.json") @@ -15,9 +15,7 @@ class DBSQLITECIPHERSHARED_EXPORT DbSqliteCipher : public GenericPlugin, public QString getLabel() const; bool checkIfDbServedByPlugin(Db* db) const; - Db* getInstance(const QString& name, const QString& path, const QHash<QString, QVariant>& options, QString* errorMessage); QList<DbPluginOption> getOptionsList() const; - QString generateDbName(const QVariant& baseValue); bool init(); void deinit(); @@ -30,6 +28,9 @@ class DBSQLITECIPHERSHARED_EXPORT DbSqliteCipher : public GenericPlugin, public static const int DEF_KDF_ITER = 64000; static_char* DEF_CIPHER = "aes-256-cbc"; + protected: + Db *newInstance(const QString &name, const QString &path, const QHash<QString, QVariant> &options); + private: bool initValid = false; diff --git a/Plugins/DbSqliteCipher/dbsqlitecipher.json b/Plugins/DbSqliteCipher/dbsqlitecipher.json index 332f7c7..1227cc9 100644 --- a/Plugins/DbSqliteCipher/dbsqlitecipher.json +++ b/Plugins/DbSqliteCipher/dbsqlitecipher.json @@ -2,7 +2,7 @@ "type": "DbPlugin", "title": "SQLCipher", "description": "Provides support for databases encrypted with SQLCipher (https://www.zetetic.net/sqlcipher/). See 'About' dialog for SQLCipher license.", - "minAppVersion": 30100, - "version": 10100, + "minAppVersion": 30101, + "version": 10101, "author": "SalSoft" } diff --git a/Plugins/DbSqliteCipher/dbsqlitecipher.qrc b/Plugins/DbSqliteCipher/dbsqlitecipher.qrc index 4d595ef..9c41b50 100644 --- a/Plugins/DbSqliteCipher/dbsqlitecipher.qrc +++ b/Plugins/DbSqliteCipher/dbsqlitecipher.qrc @@ -4,3 +4,6 @@ <file>openssl_lic.txt</file> </qresource> </RCC> + + + |
