Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix TestResourceCacheDb on Windows. Close the database file before removing it.

Elena Sagalaeva394cddb0fbce
diff --git a/libs/resources/tests/TestResourceCacheDb.cpp b/libs/resources/tests/TestResourceCacheDb.cpp
index 3ff4f95ba5..dad58f8e94 100644
--- a/libs/resources/tests/TestResourceCacheDb.cpp
+++ b/libs/resources/tests/TestResourceCacheDb.cpp
@@ -100,6 +100,7 @@ void TestResourceCacheDb::testMetaData()
void TestResourceCacheDb::cleanupTestCase()
{
+ QSqlDatabase::database().close();
QDir dbLocation(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
bool res = QFile(dbLocation.path() + "/" + KisResourceCacheDb::resourceCacheDbFilename).remove();
Q_ASSERT(res);