mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-24 12:17:26 +01:00
fixing startTipDialogTest
This commit is contained in:
parent
1f36ea00cd
commit
38dd6420db
@ -41,9 +41,6 @@ startTipDialogTest::startTipDialogTest(QWidget *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
void startTipDialogTest::iniTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void startTipDialogTest::testDialogAppear()
|
||||
{
|
||||
@ -56,11 +53,23 @@ void startTipDialogTest::testDialogAppear()
|
||||
StartTipDialog *dialog = NULL;
|
||||
for(int i=0; i<10; i++)
|
||||
{
|
||||
dialog = dynamic_cast<StartTipDialog*>(app->activeWindow());
|
||||
if (dialog == NULL)
|
||||
QTest::qWait(1000);
|
||||
else
|
||||
break;
|
||||
qDebug() << "app->topLevelWidgets():";
|
||||
foreach (QWidget *widget, QApplication::topLevelWidgets())
|
||||
{
|
||||
if (dynamic_cast<StartTipDialog*>(widget) != NULL)
|
||||
{
|
||||
qDebug() << widget << "isHidden()=" << widget->isHidden();
|
||||
if (widget->objectName() == "StartTipDialog_q")
|
||||
dialog = dynamic_cast<StartTipDialog*>(widget);
|
||||
}
|
||||
}
|
||||
// qDebug() << "app->activeWindow()=" << app->activeWindow();
|
||||
// dialog = dynamic_cast<StartTipDialog*>(app->activeWindow());
|
||||
|
||||
qDebug() << "--";
|
||||
|
||||
if (dialog == NULL) QTest::qWait(1000);
|
||||
else break;
|
||||
}
|
||||
Q_ASSERT(dialog != NULL);
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ class startTipDialogTest : public QObject
|
||||
public:
|
||||
startTipDialogTest(QWidget *parent = 0);
|
||||
private slots:
|
||||
void iniTestCase();
|
||||
void testDialogAppear();
|
||||
void testDialogNotAppear();
|
||||
void cleanupTestCase();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user