From 625e9a2547cf23671532f94c0935e6031e0b7f60 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sat, 12 Sep 2015 15:48:38 +0200 Subject: [PATCH] Make TestGui agnostic to added "&" in tab title. Fixes tests on OS X / Qt 5.5.0. --- tests/gui/TestGui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 39bdb5f17..cf9629fbb 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -436,8 +436,8 @@ void TestGui::testDatabaseLocking() triggerAction("actionLockDatabases"); - QCOMPARE(m_tabWidget->tabText(0), QString("&Save [locked]")); - QCOMPARE(m_tabWidget->tabText(1), QString("&basic [New database]*")); + QCOMPARE(m_tabWidget->tabText(0).remove('&'), QString("Save [locked]")); + QCOMPARE(m_tabWidget->tabText(1).remove('&'), QString("basic [New database]*")); QWidget* dbWidget = m_tabWidget->currentDatabaseWidget(); QWidget* unlockDatabaseWidget = dbWidget->findChild("unlockDatabaseWidget"); @@ -447,7 +447,7 @@ void TestGui::testDatabaseLocking() QTest::keyClicks(editPassword, "masterpw"); QTest::keyClick(editPassword, Qt::Key_Enter); - QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()), QString("&basic [New database]*")); + QCOMPARE(m_tabWidget->tabText(m_tabWidget->currentIndex()).remove('&'), QString("basic [New database]*")); } void TestGui::cleanupTestCase()