Merge remote-tracking branch 'origin/2.5'

Conflicts:
	share/share.qbs

Change-Id: Ia64573d1a69b9063fee32496a3f0a00926a3dadd
This commit is contained in:
Eike Ziller
2012-04-03 10:03:52 +02:00
19 changed files with 1027 additions and 731 deletions

View File

@@ -52,6 +52,7 @@ Project {
"src/plugins/mercurial/mercurial.qbs", "src/plugins/mercurial/mercurial.qbs",
"src/plugins/perforce/perforce.qbs", "src/plugins/perforce/perforce.qbs",
"src/plugins/projectexplorer/projectexplorer.qbs", "src/plugins/projectexplorer/projectexplorer.qbs",
"src/plugins/qmldesigner/qmldesigner.qbs",
"src/plugins/qmljseditor/qmljseditor.qbs", "src/plugins/qmljseditor/qmljseditor.qbs",
"src/plugins/qmljsinspector/qmljsinspector.qbs", "src/plugins/qmljsinspector/qmljsinspector.qbs",
"src/plugins/qmljstools/qmljstools.qbs", "src/plugins/qmljstools/qmljstools.qbs",
@@ -151,6 +152,7 @@ Project {
qbs.installDir: 'bin' qbs.installDir: 'bin'
files: "bin/qtcreator.sh" files: "bin/qtcreator.sh"
fileTags: "install" fileTags: "install"
qbs.installDir: "bin"
} }
Group { Group {

View File

@@ -1673,26 +1673,22 @@ class Dumper:
if self.useDynamicType and tryDynamic: if self.useDynamicType and tryDynamic:
dtypeName = dynamicTypeName(value.cast(type)) self.putItem(expensiveUpcast(value), False)
else: return
dtypeName = typeName
format = self.formats.get(self.currentIName) format = self.formats.get(self.currentIName)
if format is None: if format is None:
format = self.typeformats.get(stripForFormat(dtypeName)) format = self.typeformats.get(stripForFormat(typeName))
if self.useFancy and (format is None or format >= 1): if self.useFancy and (format is None or format >= 1):
self.putAddress(value.address) self.putAddress(value.address)
self.putType(dtypeName) self.putType(typeName)
if dtypeName in qqDumpers: if typeName in qqDumpers:
if tryDynamic: qqDumpers[typeName](self, value)
qqDumpers[dtypeName](self, expensiveUpcast(value))
else:
qqDumpers[dtypeName](self, value)
return return
nsStrippedType = self.stripNamespaceFromType(dtypeName)\ nsStrippedType = self.stripNamespaceFromType(typeName)\
.replace("::", "__") .replace("::", "__")
# The following block is only needed for D. # The following block is only needed for D.
@@ -1727,7 +1723,7 @@ class Dumper:
fields = extractFields(type) fields = extractFields(type)
#fields = type.fields() #fields = type.fields()
self.putType(dtypeName) self.putType(typeName)
self.putAddress(value.address) self.putAddress(value.address)
self.putValue("{...}") self.putValue("{...}")

File diff suppressed because it is too large Load Diff

View File

@@ -121,7 +121,7 @@ namespace {
To do this, you register your action via the To do this, you register your action via the
registerAction methods, get the action container for a specific ID (like specified in registerAction methods, get the action container for a specific ID (like specified in
the Core::Constants namespace) with a call of the Core::Constants namespace) with a call of
actionContainer(const QString&) and add your command to this container. actionContainer(const Id&) and add your command to this container.
Following the example adding "My Action" to the "Tools" menu would be done by Following the example adding "My Action" to the "Tools" menu would be done by
\code \code
@@ -171,7 +171,7 @@ namespace {
\brief Makes an \a action known to the system under the specified string \a id. \brief Makes an \a action known to the system under the specified string \a id.
Returns a command object that represents the action in the application and is Returns a command object that represents the action in the application and is
owned by the ActionManager. You can registered several actions with the owned by the ActionManager. You can register several actions with the
same \a id as long as the \a context is different. In this case same \a id as long as the \a context is different. In this case
a trigger of the actual action is forwarded to the registered QAction a trigger of the actual action is forwarded to the registered QAction
for the currently active context. for the currently active context.
@@ -180,7 +180,7 @@ namespace {
*/ */
/*! /*!
\fn Command *ActionManager::registerShortcut(QShortcut *shortcut, const QString &id, const Context &context, bool scriptable) \fn Command *ActionManager::registerShortcut(QShortcut *shortcut, const Id &id, const Context &context, bool scriptable)
\brief Makes a \a shortcut known to the system under the specified string \a id. \brief Makes a \a shortcut known to the system under the specified string \a id.
Returns a command object that represents the shortcut in the application and is Returns a command object that represents the shortcut in the application and is

View File

@@ -399,6 +399,7 @@ void TaskWindow::showTask(unsigned int id)
QModelIndex sourceIdx = d->m_model->index(sourceRow, 0); QModelIndex sourceIdx = d->m_model->index(sourceRow, 0);
QModelIndex filterIdx = d->m_filter->mapFromSource(sourceIdx); QModelIndex filterIdx = d->m_filter->mapFromSource(sourceIdx);
d->m_listview->setCurrentIndex(filterIdx); d->m_listview->setCurrentIndex(filterIdx);
popup(false);
} }
void TaskWindow::openTask(unsigned int id) void TaskWindow::openTask(unsigned int id)

View File

@@ -5890,12 +5890,16 @@ namespace bug6933 {
class Base class Base
{ {
public: public:
Base() : a(21) {}
virtual ~Base() {} virtual ~Base() {}
int a; int a;
}; };
class Derived : public Base class Derived : public Base
{ {
public:
Derived() : b(42) {}
int b;
}; };
void test6933() void test6933()
@@ -5905,6 +5909,7 @@ namespace bug6933 {
BREAK_HERE; BREAK_HERE;
// Expand b b.bug6933::Base // Expand b b.bug6933::Base
// Check b.[bug6933::Base].[vptr] // Check b.[bug6933::Base].[vptr]
// Check b.b 42 int.
// Continue. // Continue.
dummyStatement(&d, b); dummyStatement(&d, b);
} }

View File

@@ -225,3 +225,37 @@ def verifyProperties(properties, expectedProps):
else: else:
result[key] = None result[key] = None
return result return result
def getEditorForFileSuffix(curFile):
cppEditorSuffixes = ["cpp", "cc", "CC", "h", "H", "cp", "cxx", "C", "c++", "inl", "moc", "qdoc",
"tcc", "tpp", "t++", "c", "cu", "m", "mm", "hh", "hxx", "h++", "hpp", "hp"]
qmlEditorSuffixes = ["qml", "qmlproject", "js", "qs", "qtt"]
proEditorSuffixes = ["pro", "pri", "prf"]
suffix = __getFileSuffix__(curFile)
if suffix in cppEditorSuffixes:
editor = waitForObject("{type='CppEditor::Internal::CPPEditorWidget' unnamed='1' "
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
elif suffix in qmlEditorSuffixes:
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' "
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
elif suffix in proEditorSuffixes:
editor = waitForObject("{type='Qt4ProjectManager::Internal::ProFileEditorWidget' unnamed='1' "
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
else:
test.log("Trying PlainTextEditor (file suffix: %s)" % suffix)
try:
editor = waitForObject("{type='TextEditor::PlainTextEditorWidget' unnamed='1' "
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}", 3000)
except:
test.fatal("Unsupported file suffix for file '%s'" % curFile)
editor = None
return editor
# helper that determines the file suffix of the given fileName
# (doesn't matter if fileName contains the path as well)
def __getFileSuffix__(fileName):
suffix = os.path.basename(fileName).rsplit(".", 1)
if len(suffix) == 1:
return None
else:
return suffix[1]

View File

@@ -299,6 +299,7 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP, availableTargets
def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None, sType=None, userDefinedType=None): def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None, sType=None, userDefinedType=None):
global processStarted, processExited global processStarted, processExited
processStarted = processExited = False processStarted = processExited = False
overrideInstallLazySignalHandler()
installLazySignalHandler("{type='ProjectExplorer::ApplicationLaucher'}", "processStarted()", "__handleProcessStarted__") installLazySignalHandler("{type='ProjectExplorer::ApplicationLaucher'}", "processStarted()", "__handleProcessStarted__")
installLazySignalHandler("{type='ProjectExplorer::ApplicationLaucher'}", "processExited(int)", "__handleProcessExited__") installLazySignalHandler("{type='ProjectExplorer::ApplicationLaucher'}", "processExited(int)", "__handleProcessExited__")
runButton = waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}", 20000) runButton = waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}", 20000)
@@ -315,7 +316,7 @@ def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None
test.fatal("Couldn't start application - leaving test") test.fatal("Couldn't start application - leaving test")
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
return False return False
if os.getenv("SYSTEST_QMLVIEWER_NO_HOOK_INTO", "0") == "1": if sType == SubprocessType.QT_QUICK_UI and os.getenv("SYSTEST_QMLVIEWER_NO_HOOK_INTO", "0") == "1":
withHookInto = False withHookInto = False
if withHookInto and not validType(sType, userDefinedType): if withHookInto and not validType(sType, userDefinedType):
if function != None: if function != None:
@@ -341,6 +342,7 @@ def validType(sType, userDef):
def __closeSubprocessByPushingStop__(sType): def __closeSubprocessByPushingStop__(sType):
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
waitForObject(":Qt Creator.Stop_QToolButton", 5000)
playButton = verifyEnabled(":Qt Creator.ReRun_QToolButton", False) playButton = verifyEnabled(":Qt Creator.ReRun_QToolButton", False)
stopButton = verifyEnabled(":Qt Creator.Stop_QToolButton") stopButton = verifyEnabled(":Qt Creator.Stop_QToolButton")
if stopButton.enabled: if stopButton.enabled:

View File

@@ -0,0 +1,36 @@
# appends to line, by typing <typeWhat> after <insertAfterLine> text into <codeArea> widget
def appendToLine(codeArea, insertAfterLine, typeWhat):
if not placeCursorToLine(codeArea, insertAfterLine):
return False
type(codeArea, typeWhat)
return True
# checks if error is properly reported, returns True if succeeded and False if not.
# Current implementation is focused on allowing different compilers, and it is enough if one of the expected messages
# is found in issues view. warnIfMoreIssues should warn if there are more than one issue, no matter how many
# expected texts are in array (because they are alternatives).
def checkSyntaxError(issuesView, expectedTextsArray, warnIfMoreIssues = True):
issuesModel = issuesView.model()
# wait for issues
waitFor("issuesModel.rowCount() > 0", 5000)
# warn if more issues reported
if(warnIfMoreIssues and issuesModel.rowCount() > 1):
test.warning("More than one expected issues reported")
# iterate issues and check if there exists "Unexpected token" message
for row in range(issuesModel.rowCount()):
# enum Roles { File = Qt::UserRole, Line, MovedLine, Description, FileNotFound, Type, Category, Icon, Task_t };
index = issuesModel.index(row, 0)
description = str(index.data(Qt.UserRole + 3).toString())
type = str(index.data(Qt.UserRole + 5).toString())
# check if at least one of expected texts found in issue text
for expectedText in expectedTextsArray:
if expectedText in description:
# check if it is error and warn if not - returns False which leads to fail
if type is not "1":
test.warning("Expected error text found, but is not of type: 'error'")
return False
else:
return True
return False

View File

@@ -181,9 +181,10 @@ def cleanUpUserFiles(pathsToProFiles=None):
def invokeMenuItem(menu, item, subItem = None): def invokeMenuItem(menu, item, subItem = None):
menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu) menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu)
waitFor("menuObject.visible", 1000)
activateItem(menuObject) activateItem(menuObject)
itemObject = waitForObjectItem(objectMap.realName(menuObject), item) itemObject = waitForObjectItem(objectMap.realName(menuObject), item)
waitFor("menuObject.visible", 1000) waitFor("itemObject.enabled", 2000)
activateItem(itemObject) activateItem(itemObject)
if subItem != None: if subItem != None:
sub = itemObject.menu() sub = itemObject.menu()
@@ -194,8 +195,11 @@ def logApplicationOutput():
# make sure application output is shown # make sure application output is shown
ensureChecked("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' " ensureChecked("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}") "window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}")
try:
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000) output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
test.log("Application Output:\n%s" % output.plainText) test.log("Application Output:\n%s" % output.plainText)
except:
test.fail("Could not find any Application Output - did the project run?")
# get the output from a given cmdline call # get the output from a given cmdline call
def getOutputFromCmdline(cmdline): def getOutputFromCmdline(cmdline):

View File

@@ -0,0 +1 @@
QT_PLATFORM_PLUGIN=nonesuch

View File

@@ -0,0 +1,17 @@
:New Qt Quick Application.Add to version control:_QLabel {name='addToVersionControlLabel' text='Add to version control:' type='QLabel' visible='1'}
:Next_QPushButton {name='__qt__passive_wizardbutton1' text~='(Next.*|Continue)' type='QPushButton' visible='1'}
:Qt Creator.Build Project_Core::Internal::FancyToolButton {text='Build Project' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
:Qt Creator.Project.Menu.Project_QMenu {name='Project.Menu.Project' type='QMenu' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::IssuesPaneToggleButton {type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1'}
:Qt Creator_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:addToVersionControlComboBox_QComboBox {buddy=':New Qt Quick Application.Add to version control:_QLabel' name='addToVersionControlComboBox' type='QComboBox' visible='1'}
:scrollArea.Edit build configuration:_QComboBox {container=':Qt Creator.scrollArea_QScrollArea' leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QLabel {container=':Qt Creator.scrollArea_QScrollArea' text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}

View File

@@ -0,0 +1,10 @@
AUT=qtcreator
CLASS=
CLASSPATH=
ENVVARS=envvars
HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
TEST_CASES=tst_SCOM01 tst_SCOM02 tst_SCOM04 tst_SCOM05
VERSION=2
WRAPPERS=Qt

View File

@@ -0,0 +1,25 @@
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
# entry of test
def main():
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
# build it - on all (except Qt 4.7.0 (would fail)) build configurations
for config in iterateBuildConfigs(1, 0, "(?!.*4\.7\.0.*)"):
selectBuildConfig(1, 0, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":Qt Creator.Build Project_Core::Internal::FancyToolButton"))
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
# check output if build successful
ensureChecked(waitForObject(":Qt Creator_Core::Internal::OutputPaneToggleButton"))
compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
if not test.verify(str(compileOutput.plainText).endswith("exited normally."),
"Verifying building of simple qt quick application."):
test.log(compileOutput.plainText)
# exit qt creator
invokeMenuItem("File", "Exit")
# no cleanup needed, as whole testing directory gets properly removed after test finished

View File

@@ -0,0 +1,25 @@
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
# entry of test
def main():
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
# create syntax error in qml file
doubleClickItem(":Qt Creator_Utils::NavigationTreeView", "SampleApp.QML.qml/SampleApp.main\\.qml", 5, 5, 0, Qt.LeftButton)
if not appendToLine(waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"), "Text {", "SyntaxError"):
invokeMenuItem("File", "Exit")
return
# save all to invoke qml parsing
invokeMenuItem("File", "Save All")
# open issues list view
ensureChecked(waitForObject(":Qt Creator_Core::Internal::IssuesPaneToggleButton"))
issuesView = waitForObject(":Qt Creator.Issues_QListView")
# verify that error is properly reported
test.verify(checkSyntaxError(issuesView, ["Unexpected token"], True),
"Verifying QML syntax error while parsing simple qt quick application.")
# exit qt creator
invokeMenuItem("File", "Exit")
# no cleanup needed, as whole testing directory gets properly removed after test finished

View File

@@ -0,0 +1,36 @@
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
# entry of test
def main():
# expected error texts - for different compilers
expectedErrorAlternatives = ["'SyntaxError' was not declared in this scope",
"'SyntaxError' : undeclared identifier"]
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
# create syntax error in cpp file
doubleClickItem(":Qt Creator_Utils::NavigationTreeView", "SampleApp.Sources.main\\.cpp", 5, 5, 0, Qt.LeftButton)
if not appendToLine(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget"), "viewer.showExpanded();", "SyntaxError"):
invokeMenuItem("File", "Exit")
return
# save all
invokeMenuItem("File", "Save All")
# build it - on all (except Qt 4.7.0 (would fail)) build configurations
for config in iterateBuildConfigs(1, 0, "(?!.*4\.7\.0.*)"):
selectBuildConfig(1, 0, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":Qt Creator.Build Project_Core::Internal::FancyToolButton"))
# wait until build finished
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
# open issues list view
ensureChecked(waitForObject(":Qt Creator_Core::Internal::IssuesPaneToggleButton"))
issuesView = waitForObject(":Qt Creator.Issues_QListView")
# verify that error is properly reported
test.verify(checkSyntaxError(issuesView, expectedErrorAlternatives, False),
"Verifying cpp syntax error while building simple qt quick application.")
# exit qt creator
invokeMenuItem("File", "Exit")
# no cleanup needed, as whole testing directory gets properly removed after test finished

View File

@@ -0,0 +1,44 @@
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
def verifyChangeProject(projectName):
# select project
projItem = waitForObjectItem(":Qt Creator_Utils::NavigationTreeView", projectName)
openItemContextMenu(waitForObject(":Qt Creator_Utils::NavigationTreeView"), projectName, 5, 5, 0)
activateItem(waitForObjectItem(":Qt Creator.Project.Menu.Project_QMenu", "Set as Active Project"))
waitFor("projItem.font.bold==True",3000)
# check if bold is right project
test.verify(projItem.font.bold == True,
"Simple Qt Quick App - multiple projects - verifying if properly set to project: " + projectName)
def main():
projectName1 = "SampleApp1"
projectName2 = "SampleApp2"
startApplication("qtcreator" + SettingsPath)
# create qt quick application 1
createNewQtQuickApplication(tempDir(), projectName1)
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 5000)
# create qt quick application 2
createNewQtQuickApplication(tempDir(), projectName2)
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 5000)
# change to project 1
verifyChangeProject(projectName1)
# change to project 2
verifyChangeProject(projectName2)
# build project 2
clickButton(waitForObject(":Qt Creator.Build Project_Core::Internal::FancyToolButton"))
# wait for build to complete
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
# check output if build successful
ensureChecked(waitForObject(":Qt Creator_Core::Internal::OutputPaneToggleButton"))
outputLog = str(waitForObject(":Qt Creator.Compile Output_Core::OutputWindow").plainText)
# verify that project was built successfully
test.verify(outputLog.endswith("exited normally."),
"Verifying building of simple qt quick application while multiple projects are open.")
# verify that proper project (project 2) was build
test.verify(projectName2 in outputLog and projectName1 not in outputLog,
"Verifying that proper project " + projectName2 + " was built.")
# exit qt creator
invokeMenuItem("File", "Exit")
# no cleanup needed, as whole testing directory gets properly removed after test finished

View File

@@ -10,21 +10,23 @@ def charactersInFile(filename):
return len(content) return len(content)
def main(): def main():
filesAndEditors = {srcPath + "/creator/README" : "TextEditor::PlainTextEditorWidget", files = [srcPath + "/creator/README", srcPath + "/creator/qtcreator.pri",
srcPath + "/creator/qtcreator.pri" : "Qt4ProjectManager::Internal::ProFileEditorWidget", srcPath + "/creator/doc/snippets/qml/list-of-transitions.qml"]
srcPath + "/creator/doc/snippets/qml/list-of-transitions.qml" : "QmlJSEditor::QmlJSTextEditorWidget"} for currentFile in files:
for currentFile in filesAndEditors:
if not neededFilePresent(currentFile): if not neededFilePresent(currentFile):
return return
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
for currentFile in filesAndEditors: for currentFile in files:
test.log("Opening file %s" % currentFile) test.log("Opening file %s" % currentFile)
size = charactersInFile(currentFile) size = charactersInFile(currentFile)
invokeMenuItem("File", "Open File or Project...") invokeMenuItem("File", "Open File or Project...")
selectFromFileDialog(currentFile) selectFromFileDialog(currentFile)
editor = waitForObject("{type='%s' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}" editor = getEditorForFileSuffix(currentFile)
% filesAndEditors[currentFile], 20000) if editor == None:
test.fatal("Could not get the editor for '%s'" % currentFile,
"Skipping this file for now.")
continue
JIRA.performWorkaroundIfStillOpen(6918, JIRA.Bug.CREATOR, editor) JIRA.performWorkaroundIfStillOpen(6918, JIRA.Bug.CREATOR, editor)
for key in ["<Up>", "<Down>", "<Left>", "<Right>"]: for key in ["<Up>", "<Down>", "<Left>", "<Right>"]:
test.log("Selecting everything") test.log("Selecting everything")