2012-01-21 03:30:35 +04:00
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QDebug>
|
2016-04-29 17:53:13 +03:00
|
|
|
#include <QLibraryInfo>
|
|
|
|
#include <QSqlDatabase>
|
2012-02-29 18:55:31 +04:00
|
|
|
#include <QStringList>
|
2012-01-21 03:30:35 +04:00
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
QCoreApplication app(argc, argv);
|
|
|
|
|
|
|
|
qDebug() << "App path:" << app.applicationDirPath();
|
2016-05-16 17:34:04 +03:00
|
|
|
qDebug() << "Plugin path:"
|
|
|
|
<< QLibraryInfo::location(QLibraryInfo::PluginsPath);
|
2012-01-21 03:30:35 +04:00
|
|
|
|
|
|
|
bool foundSqlite = false;
|
|
|
|
|
|
|
|
qDebug() << "Supported Database Drivers:";
|
2016-05-16 17:34:04 +03:00
|
|
|
foreach (const QString& sqlDriver, QSqlDatabase::drivers()) {
|
2012-01-21 03:30:35 +04:00
|
|
|
qDebug() << " " << sqlDriver;
|
2016-05-16 17:34:04 +03:00
|
|
|
if (sqlDriver == "QSQLITE")
|
2012-01-21 03:30:35 +04:00
|
|
|
foundSqlite = true;
|
|
|
|
}
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
if (foundSqlite)
|
2012-01-21 03:30:35 +04:00
|
|
|
qDebug() << "Found sqlite support from plugin.";
|
|
|
|
else
|
|
|
|
qDebug() << "Could not find sqlite support from plugin.";
|
|
|
|
return foundSqlite ? 0 : 1;
|
|
|
|
}
|