| 29 | } |
| 30 | |
| 31 | void TestUiController::showErrorMessage() |
| 32 | { |
| 33 | IUiController* c = ICore::self()->uiController(); |
| 34 | |
| 35 | // must be shown otherwise resize has no effect |
| 36 | c->activeMainWindow()->showMaximized(); |
| 37 | QTest::qWait(1000); |
| 38 | |
| 39 | int initialWidth = c->activeMainWindow()->width(); |
| 40 | for(int i = 0; i < 10; ++i) { |
| 41 | c->showErrorMessage(QString(500, 'c'), 1); |
| 42 | QTest::qWait(10); |
| 43 | QCOMPARE(c->activeMainWindow()->size().width(), initialWidth); |
| 44 | } |
| 45 | |
| 46 | QTest::qWait(1050); |
| 47 | c->showErrorMessage(QString(50000, 'c'), 1); |
| 48 | QTest::qWait(10); |
| 49 | QCOMPARE(c->activeMainWindow()->size().width(), initialWidth); |
| 50 | } |
| 51 | |
| 52 | #include "moc_test_uicontroller.cpp" |
nothing calls this directly
no test coverage detected