From f92b8486afb99643476d166bf56dcd323c93ab3d Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@nokia.com>
Date: Mon, 27 Feb 2012 20:36:13 +0100
Subject: [PATCH] Squish: Working around QTCREATORBUG-7002

Change-Id: If575398e4ea9f7dcd4b31ebdf49708f2b2dcbc15
Reviewed-by: Bill King <bill.king@nokia.com>
---
 tests/system/shared/classes.py     | 5 ++++-
 tests/system/shared/project.py     | 1 +
 tests/system/shared/workarounds.py | 8 +++++++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index 5e2d5ac143d..5957ac610fe 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -12,6 +12,7 @@ class QtQuickConstants:
         SYMBIAN = 4
         MAEMO5 = 8
         HARMATTAN = 16
+        EMBEDDED_LINUX = 32
 
     @staticmethod
     def getStringForComponents(components):
@@ -38,6 +39,8 @@ class QtQuickConstants:
             return "Qt Simulator"
         elif target==QtQuickConstants.Targets.HARMATTAN:
             return "Harmattan"
+        elif target==QtQuickConstants.Targets.EMBEDDED_LINUX:
+            return "Embedded Linux"
         else:
             return None
 
@@ -45,7 +48,7 @@ class QtQuickConstants:
     def getAllTargets():
         return [QtQuickConstants.Targets.DESKTOP, QtQuickConstants.Targets.HARMATTAN,
                 QtQuickConstants.Targets.MAEMO5, QtQuickConstants.Targets.SIMULATOR,
-                QtQuickConstants.Targets.SYMBIAN]
+                QtQuickConstants.Targets.SYMBIAN, QtQuickConstants.Targets.EMBEDDED_LINUX]
 
     @staticmethod
     def getAllTargetStrings():
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index e29baf35ce1..10f75d97353 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -436,6 +436,7 @@ def __getSupportedPlatforms__(text, getAsStrings=False):
         test.warning("Returning None (__getSupportedPlatforms__())",
                      "Parsed text: '%s'" % text)
         return None, None
+    JIRA.performWorkaroundIfStillOpen(7002, JIRA.Bug.CREATOR, result)
     if getAsStrings:
         result = QtQuickConstants.getTargetsAsStrings(result)
     return result, version
diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py
index 315b085560e..e8247ff7a9f 100644
--- a/tests/system/shared/workarounds.py
+++ b/tests/system/shared/workarounds.py
@@ -171,7 +171,8 @@ class JIRA:
                             'QTCREATORBUG-6853':self._workaroundCreator6853_,
                             'QTCREATORBUG-6918':self._workaroundCreator_MacEditorFocus_,
                             'QTCREATORBUG-6953':self._workaroundCreator_MacEditorFocus_,
-                            'QTCREATORBUG-6994':self._workaroundCreator6994_
+                            'QTCREATORBUG-6994':self._workaroundCreator6994_,
+                            'QTCREATORBUG-7002':self._workaroundCreator7002_
                             }
         # helper function - will be called if no workaround for the requested bug is deposited
         def _exitFatal_(self, bugType, number):
@@ -191,3 +192,8 @@ class JIRA:
         def _workaroundCreator_MacEditorFocus_(self, *args):
             editor = args[0]
             nativeMouseClick(editor.mapToGlobal(QPoint(50, 50)).x, editor.mapToGlobal(QPoint(50, 50)).y, Qt.LeftButton)
+
+        def _workaroundCreator7002_(self, *args):
+            if platform.system() in ("Linux", "Darwin"):
+                result = args[0]
+                result.append(QtQuickConstants.Targets.EMBEDDED_LINUX)
-- 
GitLab