forked from qt-creator/qt-creator
Squish: Update tst_designer_goto_slot for Qt>=5.10
Change-Id: I29b3788f2daed5ca27069cc8ab9d972bdcee3c02 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -192,6 +192,7 @@
|
||||
:Select a Git Commit.detailsText_QPlainTextEdit {name='detailsText' type='QPlainTextEdit' visible='1' window=':Select a Git Commit_Git::Internal::ChangeSelectionDialog'}
|
||||
:Select a Git Commit.workingDirectoryEdit_QLineEdit {type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':Select a Git Commit_Git::Internal::ChangeSelectionDialog'}
|
||||
:Select a Git Commit_Git::Internal::ChangeSelectionDialog {name='Git__Internal__ChangeSelectionDialog' type='Git::Internal::ChangeSelectionDialog' visible='1' windowTitle='Select a Git Commit'}
|
||||
:Select signal.signalList_QTreeView {container=':Go to slot.Select signal_QGroupBox' name='signalList' type='QTreeView' visible='1'}
|
||||
:Select signal.signalList_QTreeWidget {container=':Go to slot.Select signal_QGroupBox' name='signalList' type='QTreeWidget' visible='1'}
|
||||
:Send to Codepaster.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
:Send to Codepaster.Description:_QLabel {name='descriptionLabel' text='Description:' type='QLabel' visible='1' window=':Send to Codepaster_CodePaster::PasteView'}
|
||||
|
@@ -39,7 +39,8 @@ def main():
|
||||
":FormEditorStack_qdesigner_internal::FormWindow", 20, widgets[current], Qt.CopyAction)
|
||||
connections = []
|
||||
for record in testData.dataset("connections.tsv"):
|
||||
connections.append([testData.field(record, col) for col in ["widget", "signal", "slot"]])
|
||||
connections.append([testData.field(record, col) for col in ["widget", "baseclass",
|
||||
"signal", "slot"]])
|
||||
for con in connections:
|
||||
selectFromLocator("mainwindow.ui")
|
||||
openContextMenu(waitForObject(con[0]), 5, 5, 0)
|
||||
@@ -49,13 +50,21 @@ def main():
|
||||
waitFor("macHackActivateContextMenuItem('Go to slot...', con[0])", 6000)
|
||||
else:
|
||||
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
|
||||
waitForObjectItem(":Select signal.signalList_QTreeWidget", con[1])
|
||||
clickItem(":Select signal.signalList_QTreeWidget", con[1], 5, 5, 0, Qt.LeftButton)
|
||||
try:
|
||||
# Creator built with Qt <= 5.9
|
||||
signalWidgetObject = waitForObject(":Select signal.signalList_QTreeWidget", 5000)
|
||||
signalName = con[2]
|
||||
except:
|
||||
# Creator built with Qt >= 5.10
|
||||
signalWidgetObject = waitForObject(":Select signal.signalList_QTreeView")
|
||||
signalName = con[1] + "." + con[2]
|
||||
waitForObjectItem(signalWidgetObject, signalName)
|
||||
clickItem(signalWidgetObject, signalName, 5, 5, 0, Qt.LeftButton)
|
||||
clickButton(waitForObject(":Go to slot.OK_QPushButton"))
|
||||
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
|
||||
type(editor, "<Up>")
|
||||
type(editor, "<Up>")
|
||||
test.verify(waitFor('str(lineUnderCursor(editor)).strip() == con[2]', 1000),
|
||||
'Comparing line "%s" to expected "%s"' % (lineUnderCursor(editor), con[2]))
|
||||
test.verify(waitFor('str(lineUnderCursor(editor)).strip() == con[3]', 1000),
|
||||
'Comparing line "%s" to expected "%s"' % (lineUnderCursor(editor), con[3]))
|
||||
invokeMenuItem("File", "Save All")
|
||||
invokeMenuItem("File", "Exit")
|
||||
|
@@ -1,4 +1,4 @@
|
||||
"widget" "signal" "slot"
|
||||
":FormEditorStack.PushButton_QPushButton" "clicked()" "void MainWindow::on_pushButton_clicked()"
|
||||
":FormEditorStack.CheckBox_QCheckBox" "toggled(bool)" "void MainWindow::on_checkBox_toggled(bool checked)"
|
||||
":FormEditorStack.centralWidget_QDesignerWidget" "destroyed()" "void MainWindow::on_MainWindow_destroyed()"
|
||||
"widget" "baseclass" "signal" "slot"
|
||||
":FormEditorStack.PushButton_QPushButton" "QAbstractButton" "clicked()" "void MainWindow::on_pushButton_clicked()"
|
||||
":FormEditorStack.CheckBox_QCheckBox" "QAbstractButton" "toggled(bool)" "void MainWindow::on_checkBox_toggled(bool checked)"
|
||||
":FormEditorStack.centralWidget_QDesignerWidget" "QObject" "destroyed()" "void MainWindow::on_MainWindow_destroyed()"
|
||||
|
|
Reference in New Issue
Block a user