testdeploy.cpp 747 B

1234567891011121314151617181920212223242526272829
  1. #include <QCoreApplication>
  2. #include <QDebug>
  3. #include <QLibraryInfo>
  4. #include <QSqlDatabase>
  5. #include <QStringList>
  6. int main(int argc, char** argv)
  7. {
  8. QCoreApplication app(argc, argv);
  9. qDebug() << "App path:" << app.applicationDirPath();
  10. qDebug() << "Plugin path:"
  11. << QLibraryInfo::location(QLibraryInfo::PluginsPath);
  12. bool foundSqlite = false;
  13. qDebug() << "Supported Database Drivers:";
  14. foreach (const QString& sqlDriver, QSqlDatabase::drivers()) {
  15. qDebug() << " " << sqlDriver;
  16. if (sqlDriver == "QSQLITE")
  17. foundSqlite = true;
  18. }
  19. if (foundSqlite)
  20. qDebug() << "Found sqlite support from plugin.";
  21. else
  22. qDebug() << "Could not find sqlite support from plugin.";
  23. return foundSqlite ? 0 : 1;
  24. }