Skip to content
Snippets Groups Projects
Commit 8ca5b55a authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Prepare re-usage of batch editing...


...of the environment variables for the next run.

Change-Id: Iaf383dfa361971c75be0e180d72ab95c5df83ebe
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent a4e593c9
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,8 @@
:Restart required_QMessageBox {text='The language change will take effect after a restart of Qt Creator.' type='QMessageBox' unnamed='1' visible='1'}
:Revert to Saved.Proceed_QPushButton {text='Proceed' type='QPushButton' unnamed='1' visible='1' window=':Revert to Saved_QMessageBox'}
:Revert to Saved_QMessageBox {text?='You will lose your current changes if you proceed reverting*' type='QMessageBox' unnamed='1' visible='1'}
:RunSettingsEnvironmentDetails_Utils::DetailsButton {leftWidget=':RunSettingsUseBuildEnvironment_QLabel' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:RunSettingsUseBuildEnvironment_QLabel {text~='Us(e|ing) <b>Build Environment</b>' type='QLabel' unnamed='1' visible='1'}
:Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'}
:Symbol Server_Utils::CheckableMessageBox {type='Utils::CheckableMessageBox' unnamed='1' visible='1' windowTitle='Symbol Server'}
:User Interface.languageBox_QComboBox {container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'}
......
......@@ -17,9 +17,7 @@ def modifyRunSettingsForHookInto(projectName, kitCount, port):
switchToBuildOrRunSettingsFor(kitCount, 0, ProjectSettings.RUN)
result = __configureCustomExecutable__(projectName, port, mkspec, qtVersion)
if result:
clickButton(waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' text='Details' "
"type='Utils::DetailsButton' unnamed='1' visible='1' "
"leftWidget={type='QLabel' text~='Us(e|ing) <b>Build Environment</b>' unnamed='1' visible='1'}}"))
ensureChecked(":RunSettingsEnvironmentDetails_Utils::DetailsButton")
envVarsTableView = waitForObject("{type='QTableView' visible='1' unnamed='1'}")
model = envVarsTableView.model()
changingVars = []
......@@ -41,17 +39,23 @@ def modifyRunSettingsForHookInto(projectName, kitCount, port):
changingVars.append("SQUISH_LIBQTDIR=%s" % replacement)
else:
changingVars.append(varName)
#test.log("Unsetting %s for run" % varName)
clickButton(waitForObject("{text='Batch Edit...' type='QPushButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"))
editor = waitForObject("{type='TextEditor::SnippetEditorWidget' unnamed='1' visible='1' "
"window=':Edit Environment_ProjectExplorer::EnvironmentItemsDialog'}")
typeLines(editor, changingVars)
clickButton(waitForObject("{text='OK' type='QPushButton' unnamed='1' visible='1' "
"window=':Edit Environment_ProjectExplorer::EnvironmentItemsDialog'}"))
batchEditRunEnvironment(kitCount, 0, changingVars, True)
switchViewTo(ViewConstants.EDIT)
return result
def batchEditRunEnvironment(kitCount, currentTarget, modifications, alreadyOnRunSettings=False):
if not alreadyOnRunSettings:
switchViewTo(ViewConstants.PROJECTS)
switchToBuildOrRunSettingsFor(kitCount, currentTarget, ProjectSettings.RUN)
ensureChecked(":RunSettingsEnvironmentDetails_Utils::DetailsButton")
clickButton(waitForObject("{text='Batch Edit...' type='QPushButton' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"))
editor = waitForObject("{type='TextEditor::SnippetEditorWidget' unnamed='1' visible='1' "
"window=':Edit Environment_ProjectExplorer::EnvironmentItemsDialog'}")
typeLines(editor, modifications)
clickButton(waitForObject("{text='OK' type='QPushButton' unnamed='1' visible='1' "
"window=':Edit Environment_ProjectExplorer::EnvironmentItemsDialog'}"))
def modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, port):
switchViewTo(ViewConstants.PROJECTS)
switchToBuildOrRunSettingsFor(kitCount, 0, ProjectSettings.RUN, True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment