CMake/Tests/Qt4Deploy/testdeploy.cpp

30 lines
747 B
C++
Raw Permalink Normal View History

2012-01-21 03:30:35 +04:00
#include <QCoreApplication>
#include <QDebug>
#include <QLibraryInfo>
#include <QSqlDatabase>
#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();
qDebug() << "Plugin path:"
<< QLibraryInfo::location(QLibraryInfo::PluginsPath);
2012-01-21 03:30:35 +04:00
bool foundSqlite = false;
qDebug() << "Supported Database Drivers:";
foreach (const QString& sqlDriver, QSqlDatabase::drivers()) {
2012-01-21 03:30:35 +04:00
qDebug() << " " << sqlDriver;
if (sqlDriver == "QSQLITE")
2012-01-21 03:30:35 +04:00
foundSqlite = true;
}
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;
}