Commit 46bcfe65 authored by Robert Loehning's avatar Robert Loehning
Browse files

Squish: Removed code using Madde plugin



We don't have a Madde plugin anymore

Change-Id: Ic7a9fc33cdd967b642521655123c4b04158786fa
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 71080c8b
......@@ -322,8 +322,7 @@ def createNewNonQtProject(workingDir=None, projectName=None, target=Targets.DESK
# parameter target can be an OR'd value of Targets
# parameter availableTargets should be the result of __createProjectOrFileSelectType__()
# or use None as a fallback
def __chooseTargets__(targets=Targets.DESKTOP_474_GCC, availableTargets=None,
isMaddeDisabled=True):
def __chooseTargets__(targets=Targets.DESKTOP_474_GCC, availableTargets=None):
if availableTargets != None:
available = availableTargets
else:
......@@ -333,10 +332,9 @@ def __chooseTargets__(targets=Targets.DESKTOP_474_GCC, availableTargets=None,
if platform.system() in ('Windows', 'Microsoft'):
available.remove(Targets.EMBEDDED_LINUX)
available.append(Targets.DESKTOP_480_MSVC2010)
if isMaddeDisabled:
for target in filter(lambda x: x in available,
(Targets.MAEMO5, Targets.HARMATTAN)):
available.remove(target)
for target in filter(lambda x: x in available,
(Targets.MAEMO5, Targets.HARMATTAN)):
available.remove(target)
checkedTargets = []
for current in available:
mustCheck = targets & current == current
......
......@@ -373,7 +373,7 @@ def __checkParentAccess__(filePath):
# this function checks for all configured Qt versions inside
# options dialog and returns a dict holding the kits as keys
# and a list of information of its configured Qt
def getConfiguredKits(isMaddeDisabled=True):
def getConfiguredKits():
def __retrieveQtVersionName__(target, version):
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
return treeWidget.currentItem().text(0)
......@@ -393,8 +393,8 @@ def getConfiguredKits(isMaddeDisabled=True):
iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName)
# merge defined target names with their configured Qt versions and devices
for kit, qtVersion in kitsWithQtVersionName.iteritems():
if isMaddeDisabled and kit in ('Fremantle', 'Harmattan') and qtVersion == 'None':
test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit)
if kit in ('Fremantle', 'Harmattan') and qtVersion == 'None':
test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit)
elif qtVersion in qtVersionNames:
result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]
else:
......
......@@ -33,6 +33,7 @@ import re
def main():
global tmpSettingsDir
global textChanged
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection")
qmlFile = os.path.join("qml", "textselection.qml")
if not neededFilePresent(os.path.join(sourceExample, qmlFile)):
......@@ -44,19 +45,7 @@ def main():
overrideInstallLazySignalHandler()
installLazySignalHandler(":frame.templateDescription_QTextBrowser",
"textChanged()","__handleTextChanged__")
performTest(templateDir, qmlFile, True)
enableMaddePlugin()
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
copySettingsToTmpDir(tmpSettingsDir, ['QtCreator.ini'])
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
performTest(templateDir, qmlFile, False)
invokeMenuItem("File", "Exit")
def performTest(templateDir, qmlFile, isMaddeDisabled):
global textChanged
kits = getConfiguredKits(isMaddeDisabled)
kits = getConfiguredKits()
test.log("Collecting potential project types...")
availableProjectTypes = []
invokeMenuItem("File", "New File or Project...")
......@@ -69,7 +58,7 @@ def performTest(templateDir, qmlFile, isMaddeDisabled):
maddeTargets = Targets.getTargetsAsStrings([Targets.MAEMO5, Targets.HARMATTAN])
maddeInTargets = len(set(targets) & set(maddeTargets)) > 0
test.verify(comboBox.enabled, "Verifying whether combobox is enabled.")
test.compare(maddeInTargets, not isMaddeDisabled, "Verifying if kits are configured.")
test.verify(not maddeInTargets, "Verify there are no leftovers of Madde")
test.compare(comboBox.currentText, "Desktop Templates")
selectFromCombo(comboBox, "All Templates")
for category in [item.replace(".", "\\.") for item in dumpItems(catModel, projects)]:
......@@ -133,17 +122,7 @@ def performTest(templateDir, qmlFile, isMaddeDisabled):
test.fail("Found unexpected additional kit(s) %s on 'Kit Selection' page."
% str(availableCheckboxes))
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))
def enableMaddePlugin():
invokeMenuItem("Help", "About Plugins...")
pluginsTW = waitForObject(":Installed Plugins.categoryWidget_QTreeWidget")
devSupport = ("{container=':Installed Plugins.categoryWidget_QTreeWidget' "
"column='0' text='Device Support' type='QModelIndex'}")
# children position + 1 because children will be counted beginning with 0
maddePos = dumpItems(pluginsTW.model(), waitForObject(devSupport)).index('Madde') + 1
mouseClick(waitForObject("{column='1' container=%s text='' type='QModelIndex' "
"occurrence='%d'}" % (devSupport, maddePos)), 5, 5, 0, Qt.LeftButton)
clickButton(":Installed Plugins.Close_QPushButton")
invokeMenuItem("File", "Exit")
def __handleTextChanged__(*args):
global textChanged
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment