From 1abe32996c970bf33bb9e0a5a7dbb04576b0703c Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 18 Sep 2013 11:54:08 +0200 Subject: [PATCH] Squish: Fix getToolTipForViewTab() Shortcuts will change when order of modes changes. Change-Id: I9ee71cefebd4f2404976a7728fd1c4b500efc0f9 Reviewed-by: Christian Stenger --- tests/system/shared/classes.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index d7ba25101e9..43aa5836129 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -112,21 +112,22 @@ class ViewConstants: @staticmethod def getToolTipForViewTab(viewTab): if viewTab == ViewConstants.WELCOME: - return ur'Switch to Welcome mode (Ctrl\+|\u2303)1' + toolTip = ur'Switch to Welcome mode (Ctrl\+|\u2303)%d' elif viewTab == ViewConstants.EDIT: - return ur'Switch to Edit mode (Ctrl\+|\u2303)2' + toolTip = ur'Switch to Edit mode (Ctrl\+|\u2303)%d' elif viewTab == ViewConstants.DESIGN: - return ur'Switch to Design mode (Ctrl\+|\u2303)3' + toolTip = ur'Switch to Design mode (Ctrl\+|\u2303)%d' elif viewTab == ViewConstants.DEBUG: - return ur'Switch to Debug mode (Ctrl\+|\u2303)4' + toolTip = ur'Switch to Debug mode (Ctrl\+|\u2303)%d' elif viewTab == ViewConstants.PROJECTS: - return ur'Switch to Projects mode (Ctrl\+|\u2303)5' + toolTip = ur'Switch to Projects mode (Ctrl\+|\u2303)%d' elif viewTab == ViewConstants.ANALYZE: - return ur'Switch to Analyze mode (Ctrl\+|\u2303)6' + toolTip = ur'Switch to Analyze mode (Ctrl\+|\u2303)%d' elif viewTab == ViewConstants.HELP: - return ur'Switch to Help mode (Ctrl\+|\u2303)7' + toolTip = ur'Switch to Help mode (Ctrl\+|\u2303)%d' else: return None + return toolTip % (viewTab + 1) class SubprocessType: QT_WIDGET=0