cmake/Tests/Qt4Deploy/testdeploy.cpp

30 lines
747 B
C++
Raw Normal View History

2012-04-19 19:04:21 +03:00
#include <QCoreApplication>
#include <QDebug>
2016-07-09 11:21:54 +02:00
#include <QLibraryInfo>
#include <QSqlDatabase>
2012-04-19 19:04:21 +03:00
#include <QStringList>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
qDebug() << "App path:" << app.applicationDirPath();
2016-07-09 11:21:54 +02:00
qDebug() << "Plugin path:"
<< QLibraryInfo::location(QLibraryInfo::PluginsPath);
2012-04-19 19:04:21 +03:00
bool foundSqlite = false;
qDebug() << "Supported Database Drivers:";
2016-07-09 11:21:54 +02:00
foreach (const QString& sqlDriver, QSqlDatabase::drivers()) {
2012-04-19 19:04:21 +03:00
qDebug() << " " << sqlDriver;
2016-07-09 11:21:54 +02:00
if (sqlDriver == "QSQLITE")
2012-04-19 19:04:21 +03:00
foundSqlite = true;
}
2016-07-09 11:21:54 +02:00
if (foundSqlite)
2012-04-19 19:04:21 +03:00
qDebug() << "Found sqlite support from plugin.";
else
qDebug() << "Could not find sqlite support from plugin.";
return foundSqlite ? 0 : 1;
}