Use a fixed sleep call instead of QTest::qWaitForWindowShown().

The latter seems to be broken and always seeps until it hits
the timeout (2s).
This commit is contained in:
Felix Geyer 2012-11-02 11:08:41 +01:00
parent 6b3fed1ce5
commit 9144765d56

View File

@ -35,6 +35,7 @@
#include "core/Entry.h" #include "core/Entry.h"
#include "core/Group.h" #include "core/Group.h"
#include "core/Metadata.h" #include "core/Metadata.h"
#include "core/Tools.h"
#include "crypto/Crypto.h" #include "crypto/Crypto.h"
#include "format/KeePass2Reader.h" #include "format/KeePass2Reader.h"
#include "gui/DatabaseTabWidget.h" #include "gui/DatabaseTabWidget.h"
@ -54,7 +55,7 @@ void TestGui::initTestCase()
m_mainWindow = new MainWindow(); m_mainWindow = new MainWindow();
m_tabWidget = m_mainWindow->findChild<DatabaseTabWidget*>("tabWidget"); m_tabWidget = m_mainWindow->findChild<DatabaseTabWidget*>("tabWidget");
m_mainWindow->show(); m_mainWindow->show();
QTest::qWaitForWindowShown(m_mainWindow); Tools::wait(50);
} }
void TestGui::testOpenDatabase() void TestGui::testOpenDatabase()