diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2012-01-20 23:30:35 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2012-02-23 22:48:47 (GMT) |
commit | 672e3bb70f46cbc1203974fccc561760a6be8b96 (patch) | |
tree | 9c5bfefa3b50566b182d591a71ed8dc51f6d9de5 /Tests/Qt4Deploy/testdeploy.cpp | |
parent | 4853e1effddd36c37d8e2fb4962f039c0d08af80 (diff) | |
download | CMake-672e3bb70f46cbc1203974fccc561760a6be8b96.zip CMake-672e3bb70f46cbc1203974fccc561760a6be8b96.tar.gz CMake-672e3bb70f46cbc1203974fccc561760a6be8b96.tar.bz2 |
Add test for DeployQt4.cmake
Diffstat (limited to 'Tests/Qt4Deploy/testdeploy.cpp')
-rw-r--r-- | Tests/Qt4Deploy/testdeploy.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/Qt4Deploy/testdeploy.cpp b/Tests/Qt4Deploy/testdeploy.cpp new file mode 100644 index 0000000..bcf77a2 --- /dev/null +++ b/Tests/Qt4Deploy/testdeploy.cpp @@ -0,0 +1,29 @@ +#include <QCoreApplication> +#include <QImageReader> +#include <QSqlDatabase> +#include <QLibraryInfo> +#include <QDebug> + +int main(int argc, char** argv) +{ + QCoreApplication app(argc, argv); + + qDebug() << "App path:" << app.applicationDirPath(); + qDebug() << "Plugin path:" << QLibraryInfo::location(QLibraryInfo::PluginsPath); + + bool foundSqlite = false; + + qDebug() << "Supported Database Drivers:"; + foreach(const QString &sqlDriver, QSqlDatabase::drivers()) + { + qDebug() << " " << sqlDriver; + if(sqlDriver == "QSQLITE") + foundSqlite = true; + } + + if(foundSqlite) + qDebug() << "Found sqlite support from plugin."; + else + qDebug() << "Could not find sqlite support from plugin."; + return foundSqlite ? 0 : 1; +} |