Changeset View
Changeset View
Standalone View
Standalone View
tests/auto/importertest.cpp
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Line(s) | |||||
207 | void ImporterTest::testAutoRenameFormat() | 207 | void ImporterTest::testAutoRenameFormat() | ||
208 | { | 208 | { | ||
209 | QStringList dates = QStringList() | 209 | QStringList dates = QStringList() | ||
210 | << "1979-02-23_10-20-00" | 210 | << "1979-02-23_10-20-00" | ||
211 | << "2006-04-01_11-30-15" | 211 | << "2006-04-01_11-30-15" | ||
212 | << "2009-10-01_21-15-27"; | 212 | << "2009-10-01_21-15-27"; | ||
213 | QCOMPARE(dates.count(), mDocumentList.count()); | 213 | QCOMPARE(dates.count(), mDocumentList.count()); | ||
214 | 214 | | |||
215 | QUrl destUrl = QUrl::fromLocalFile(mTempDir->path() + "foo"); | 215 | QUrl destUrl = QUrl::fromLocalFile(mTempDir->path() + "/foo"); | ||
216 | 216 | | |||
217 | Importer importer(nullptr); | 217 | Importer importer(nullptr); | ||
218 | importer.setAutoRenameFormat("{date}_{time}.{ext}"); | 218 | importer.setAutoRenameFormat("{date}_{time}.{ext}"); | ||
219 | QList<QUrl> list = mDocumentList; | 219 | QList<QUrl> list = mDocumentList; | ||
220 | 220 | | |||
221 | QEventLoop loop; | 221 | QEventLoop loop; | ||
222 | connect(&importer, &Importer::importFinished, &loop, &QEventLoop::quit); | 222 | connect(&importer, &Importer::importFinished, &loop, &QEventLoop::quit); | ||
223 | importer.start(list, destUrl); | 223 | importer.start(list, destUrl); | ||
Show All 25 Lines |