diff options
| author | 2017-02-09 04:36:04 -0500 | |
|---|---|---|
| committer | 2017-02-09 04:36:04 -0500 | |
| commit | d9aa870e5d509cc7309ab82dd102a937ab58613a (patch) | |
| tree | d92d03d76b5c390b335f1cfd761f1a0b59ec8496 /Plugins/DbSqlite2/dbsqlite2.cpp | |
| parent | 68ee4cbcbe424b95969c70346283a9f217f63825 (diff) | |
Imported Upstream version 3.1.1+dfsg1upstream/3.1.1+dfsg1
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 |
