diff options
author | Dominik Kapusta <dominik.kapusta@teleca.com> | 2010-04-08 13:25:56 +0200 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2010-04-16 09:23:29 +0300 |
commit | 1cbbf0b8649992ebfc469c50d634c2a4f6ac0966 (patch) | |
tree | f19d01b7d7c7126fd6c3e7d49230d659ef562351 /tests/ut_mapplicationpage | |
parent | f134974507d0bebf422f232a11acbd65cb699d6b (diff) |
Fixes: NB#161484 - wrong application title in the application switcher
RevBy: Mike Fabian, Daniel d'Andrada
Details: set application window title with every update of the
application page title.
Fix for translations with multiple length variants included - the
longest length variant is being set as window title.
Regression test case attached.
Diffstat (limited to 'tests/ut_mapplicationpage')
-rw-r--r-- | tests/ut_mapplicationpage/ut_mapplicationpage.cpp | 20 | ||||
-rw-r--r-- | tests/ut_mapplicationpage/ut_mapplicationpage.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/ut_mapplicationpage/ut_mapplicationpage.cpp b/tests/ut_mapplicationpage/ut_mapplicationpage.cpp index eda35f5e..92d3cf23 100644 --- a/tests/ut_mapplicationpage/ut_mapplicationpage.cpp +++ b/tests/ut_mapplicationpage/ut_mapplicationpage.cpp @@ -223,4 +223,24 @@ void Ut_MApplicationPage::testSettingAllComponentsDisplayMode() QCOMPARE(m_subject->componentDisplayMode(MApplicationPage::EscapeButton), MApplicationPageModel::Show); } +void Ut_MApplicationPage::testUpdatingWindowTitleWithChangingPageTitle() +{ + QString title("Test title"); + QString title2("Another test title"); + QString title3("Multiple length variants title\0x9cMult. length var. title"); + QString title3_longest("Multiple length variants title"); + QString title4; + + m_subject->appear(); + + m_subject->setTitle(title); + QCOMPARE(appWin->windowTitle(), title); + m_subject->setTitle(title2); + QCOMPARE(appWin->windowTitle(), title2); + m_subject->setTitle(title3); + QCOMPARE(appWin->windowTitle(), title3_longest); + m_subject->setTitle(title4); + QCOMPARE(appWin->windowTitle(), title4); +} + QTEST_APPLESS_MAIN(Ut_MApplicationPage) diff --git a/tests/ut_mapplicationpage/ut_mapplicationpage.h b/tests/ut_mapplicationpage/ut_mapplicationpage.h index 28dca4dc..1846c709 100644 --- a/tests/ut_mapplicationpage/ut_mapplicationpage.h +++ b/tests/ut_mapplicationpage/ut_mapplicationpage.h @@ -54,6 +54,7 @@ private slots: void testSettingComponentsDisplayModes(); void testSettingMultipleComponentsDisplayModes(); void testSettingAllComponentsDisplayMode(); + void testUpdatingWindowTitleWithChangingPageTitle(); private: MApplicationPage *m_subject; |