MCPcopy Create free account
hub / github.com/KDE/kdevelop / showErrorMessage

Method showErrorMessage

kdevplatform/shell/tests/test_uicontroller.cpp:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void 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"

Callers

nothing calls this directly

Calls 4

uiControllerMethod · 0.80
QStringClass · 0.50
activeMainWindowMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected