| 19 | #include <QSqlRecord> |
| 20 | |
| 21 | void ImportSqlDatabaseTest::initTestCase() { |
| 22 | CommonMetaTest::initTestCase(); |
| 23 | |
| 24 | // prepare the database connection |
| 25 | QString m_configPath(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).constFirst() + QStringLiteral("sql_connections")); |
| 26 | KConfig config(m_configPath, KConfig::SimpleConfig); |
| 27 | KConfigGroup group = config.group(QStringLiteral("chinook")); |
| 28 | group.writeEntry("Driver", QStringLiteral("QSQLITE")); |
| 29 | group.writeEntry("DatabaseName", QFINDTESTDATA(QLatin1String("data/chinook.db"))); |
| 30 | } |
| 31 | |
| 32 | // ############################################################################## |
| 33 | // ######################## import from a table ################################ |