diff options
| author | 2017-02-09 04:37:26 -0500 | |
|---|---|---|
| committer | 2017-02-09 04:37:26 -0500 | |
| commit | c9d6debf9015b7853c3e061bbc64a555d85e2fcd (patch) | |
| tree | 53341bc57ae9fbad2beb5b6c08d97a68bee0ec8e /Plugins/DbSqlite2/dbsqlite2.cpp | |
| 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/DbSqlite2/dbsqlite2.cpp')
| -rw-r--r-- | Plugins/DbSqlite2/dbsqlite2.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/Plugins/DbSqlite2/dbsqlite2.cpp b/Plugins/DbSqlite2/dbsqlite2.cpp index 8047c7e..93871ae 100644 --- a/Plugins/DbSqlite2/dbsqlite2.cpp +++ b/Plugins/DbSqlite2/dbsqlite2.cpp @@ -7,37 +7,14 @@ DbSqlite2::DbSqlite2() { } -Db* DbSqlite2::getInstance(const QString& name, const QString& path, const QHash<QString, QVariant>& options, QString* errorMessage) -{ - UNUSED(errorMessage); - Db* db = new DbSqlite2Instance(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> DbSqlite2::getOptionsList() const { return QList<DbPluginOption>(); } -QString DbSqlite2::generateDbName(const QVariant& baseValue) +Db *DbSqlite2::newInstance(const QString &name, const QString &path, const QHash<QString, QVariant> &options) { - QFileInfo file(baseValue.toString()); - return file.baseName(); + return new DbSqlite2Instance(name, path, options); } QString DbSqlite2::getLabel() const |
