summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-08 09:56:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-10 10:07:28 +0200
commit19885d9395a8481f93ca667c07a306368f2cab79 (patch)
tree8328a31cfbf5c3cc31ee39610de5cbad5aae1e8c /vcl
parent68b6004fe9df184bcbaf46dd53abfec228219df6 (diff)
-Werror,-Wunused-but-set-variable (Clang 13 trunk)
26ee34d1332e164cf938fcf78902df7d0cc3fe8f "uitest: add logging for UI actions" had added the original > return "Action on element: " + mxWindow->get_id() + " with action : " + aActionName; That commit had stated > The long term goal for this logging is that it generates content in a > DSL for the UI testing. The generated file can then be interpreted by > the UI testing and replay the interaction with the UI. > > For now the plan is to have a readable output of what happens in the UI > layer that allows to quickly transform it to a UI test. Later, 5578bc99542953b6318a117a4e4b99f12964d9d2 "uitest: Some new features in ui_logger project", apparently as part of working on such a Python-from-DSL code generator, commented out the original return statement. The comment at <https://gerrit.libreoffice.org/c/core/+/116811/ 1#message-867650d186ade924cd38240ebbf8603222adac6d> "Lets assume this was commented out in error" has instructions how to test that (the generated test.log is in the UserInstallation rather than in instdir, though), and the comment at <https://gerrit.libreoffice.org/c/core/+/116811/ 1#message-36bf2eab1110bf51ccaaa1014188b841beb32041> suggests returning just aActionName instead of the dressed-up, human-readable "Action on element ..." However, when I tried out those instructions, the dsl_core.py generation failed (with an arpeggio.NoMatch exception) both when just returning aActionName and when returning the full dressed-up, human-readable "Action on element ..." But it also generally failed if WindowUIObject::get_action returns an empty string (i.e., the status quo), with e.g. > AttributeError: 'CloseDialog' object has no attribute 'uno_command_name' apparently due to some > Close Dialog lines in my generated test.log. So it appears that dsl_core.py is unfinished work in progress, which does not work properly regardless of what WindowUIObject::get_action returns. Coming back to the original commit that produced "readable output of what happens in the UI layer", it is thus probably best to leave it at that output for now, and reinstate the original full dressed-up, human-readable "Action on element ..." That addresses the -Werror,-Wunused-but-set-variable. If anybody wants to fix that dsl_core.py generation, that can happen in later commits. Change-Id: Ie1123df53d9505fc5f039405f666977550f967d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116811 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/uitest/uiobject.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index f04e8c54cc95..3c3d224024f4 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -582,8 +582,7 @@ OUString WindowUIObject::get_action(VclEventId nEvent) const
default:
aActionName = OUString::number(static_cast<int>(nEvent));
}
- return "";
- //return "Action on element: " + mxWindow->get_id() + " with action : " + aActionName;
+ return "Action on element: " + mxWindow->get_id() + " with action : " + aActionName;
}
std::unique_ptr<UIObject> WindowUIObject::create(vcl::Window* pWindow)