fix(tests): wait until ModFolderModel has updated
This commit is contained in:
parent
8856c8cd62
commit
32217a774f
@ -32,8 +32,11 @@ slots:
|
|||||||
{
|
{
|
||||||
QString folder = source;
|
QString folder = source;
|
||||||
QTemporaryDir tempDir;
|
QTemporaryDir tempDir;
|
||||||
|
QEventLoop loop;
|
||||||
ModFolderModel m(tempDir.path(), true);
|
ModFolderModel m(tempDir.path(), true);
|
||||||
|
connect(&m, &ModFolderModel::updateFinished, &loop, &QEventLoop::quit);
|
||||||
m.installMod(folder);
|
m.installMod(folder);
|
||||||
|
loop.exec();
|
||||||
verify(tempDir.path());
|
verify(tempDir.path());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,8 +44,11 @@ slots:
|
|||||||
{
|
{
|
||||||
QString folder = source + '/';
|
QString folder = source + '/';
|
||||||
QTemporaryDir tempDir;
|
QTemporaryDir tempDir;
|
||||||
|
QEventLoop loop;
|
||||||
ModFolderModel m(tempDir.path(), true);
|
ModFolderModel m(tempDir.path(), true);
|
||||||
|
connect(&m, &ModFolderModel::updateFinished, &loop, &QEventLoop::quit);
|
||||||
m.installMod(folder);
|
m.installMod(folder);
|
||||||
|
loop.exec();
|
||||||
verify(tempDir.path());
|
verify(tempDir.path());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user