From 3b066410382621523c6cf3517d280edd68adc20d Mon Sep 17 00:00:00 2001 From: liuyuxiang-bear Date: Mon, 28 Mar 2022 21:20:38 +0800 Subject: [PATCH] Description: modify code problems IssueNo: https://gitee.com/openharmony/graphic_ui/issues/I5001O Feature or Bugfix: Bugfix Binary Source:No Signed-off-by: benb365 --- README.md | 2 +- frameworks/animator/easing_equation.cpp | 2 +- frameworks/common/image_decode_ability.cpp | 2 +- frameworks/common/input_device_manager.cpp | 2 +- frameworks/components/text_adapter.cpp | 2 +- frameworks/components/ui_abstract_clock.cpp | 2 +- .../components/ui_abstract_scroll_bar.h | 3 +- frameworks/components/ui_arc_label.cpp | 2 +- frameworks/components/ui_axis.cpp | 2 +- frameworks/components/ui_dialog.cpp | 6 +- frameworks/components/ui_label.cpp | 2 +- frameworks/components/ui_list.cpp | 2 +- frameworks/components/ui_repeat_button.cpp | 2 +- frameworks/components/ui_surface_view.cpp | 6 +- frameworks/components/ui_texture_mapper.cpp | 2 +- frameworks/components/ui_toggle_button.cpp | 4 +- frameworks/components/ui_video.cpp | 2 +- frameworks/default_resource/check_box_res.cpp | 6 +- frameworks/dfx/key_event_injector.cpp | 2 +- frameworks/dfx/key_event_injector.h | 2 +- frameworks/dfx/ui_screenshot.cpp | 2 +- frameworks/dfx/ui_view_bounds.cpp | 2 +- frameworks/dock/focus_manager.cpp | 2 +- frameworks/dock/ohos/ohos_input_device.cpp | 2 +- frameworks/dock/screen_device.h | 4 +- frameworks/dock/screen_device_proxy.h | 1 + frameworks/draw/draw_curve.h | 2 +- frameworks/draw/draw_rect.cpp | 2 +- frameworks/draw/draw_rect.h | 4 +- frameworks/draw/draw_triangle.cpp | 2 +- frameworks/font/ui_font.cpp | 4 +- frameworks/font/ui_font_builder.cpp | 2 +- frameworks/font/ui_font_cache.h | 2 +- frameworks/font/ui_multi_font_manager.h | 2 +- frameworks/font/ui_text_shaping.h | 2 +- frameworks/imgdecode/file_img_decoder.h | 6 +- frameworks/imgdecode/image_load.cpp | 2 +- frameworks/imgdecode/image_load.h | 2 +- frameworks/layout/flex_layout.cpp | 2 +- frameworks/layout/grid_layout.cpp | 2 +- frameworks/layout/list_layout.cpp | 2 +- frameworks/themes/theme.cpp | 2 +- frameworks/themes/theme_manager.cpp | 2 +- frameworks/window/window.cpp | 2 +- frameworks/window/window_impl.cpp | 3 +- frameworks/window/window_impl.h | 3 +- interfaces/innerkits/dock/focus_manager.h | 2 +- .../innerkits/dock/rotate_input_device.h | 4 +- interfaces/innerkits/dock/vibrator_manager.h | 2 +- .../engines/gfx/gfx_engine_manager.h | 1 + interfaces/innerkits/font/ui_font_bitmap.h | 2 +- interfaces/innerkits/font/ui_font_builder.h | 3 +- interfaces/kits/common/screen.h | 2 +- interfaces/kits/common/task.h | 2 +- interfaces/kits/common/text.h | 2 +- interfaces/kits/components/abstract_adapter.h | 2 +- interfaces/kits/components/root_view.h | 1 + interfaces/kits/components/text_adapter.h | 3 +- .../kits/components/ui_abstract_scroll.h | 4 +- interfaces/kits/components/ui_analog_clock.h | 2 +- interfaces/kits/components/ui_arc_label.h | 6 +- interfaces/kits/components/ui_button.h | 7 +- interfaces/kits/components/ui_checkbox.h | 3 +- interfaces/kits/components/ui_dialog.h | 2 +- .../kits/components/ui_image_animator.h | 2 +- interfaces/kits/components/ui_image_view.h | 1 + interfaces/kits/components/ui_list.h | 4 +- interfaces/kits/components/ui_picker.h | 1 + interfaces/kits/components/ui_radio_button.h | 2 +- interfaces/kits/components/ui_repeat_button.h | 8 +- interfaces/kits/components/ui_slider.h | 2 +- interfaces/kits/components/ui_swipe_view.h | 2 +- interfaces/kits/components/ui_time_picker.h | 4 +- interfaces/kits/components/ui_toggle_button.h | 2 +- interfaces/kits/components/ui_video.h | 4 +- interfaces/kits/components/ui_view.h | 2 +- interfaces/kits/components/ui_view_group.h | 4 +- interfaces/kits/dfx/event_injector.h | 1 + interfaces/kits/dfx/ui_screenshot.h | 1 + interfaces/kits/dfx/ui_view_bounds.h | 2 +- interfaces/kits/events/event.h | 1 + interfaces/kits/events/rotate_event.h | 4 +- interfaces/kits/font/ui_font_header.h | 2 +- interfaces/kits/layout/flex_layout.h | 3 +- interfaces/kits/layout/grid_layout.h | 2 +- interfaces/kits/themes/theme.h | 2 +- interfaces/kits/window/window.h | 2 +- .../include/test_case_list_adapter.h | 2 +- test/framework/include/ui_test.h | 2 +- test/framework/include/ui_test_group.h | 2 +- test/framework/src/test_case_list_adapter.cpp | 2 +- .../uitest/test_animator/ui_test_animator.cpp | 2 +- test/uitest/test_animator/ui_test_animator.h | 2 +- .../ui_test_anti_aliasing.cpp | 2 +- .../test_arc_label/ui_test_arc_label.cpp | 2 +- test/uitest/test_button/ui_test_button.cpp | 80 +++++++++++-------- .../test_chart/ui_test_chart_pillar.cpp | 2 +- test/uitest/test_clip/ui_test_clip.cpp | 2 +- test/uitest/test_clip/ui_test_clip.h | 2 +- test/uitest/test_dialog/ui_test_dialog.cpp | 4 +- test/uitest/test_dialog/ui_test_dialog.h | 2 +- .../ui_test_focus_manager.cpp | 2 +- .../ui_test_focus_manager.h | 2 +- test/uitest/test_font/ui_test_font.h | 1 + test/uitest/test_image/ui_test_image.h | 3 + .../ui_test_image_animator.h | 1 + test/uitest/test_label/ui_test_label.cpp | 2 +- .../test_layout/ui_auto_test_basic_layout.cpp | 2 +- .../test_layout/ui_auto_test_basic_layout.h | 2 +- .../test_layout/ui_test_advanced_layout.cpp | 2 +- .../test_layout/ui_test_advanced_layout.h | 1 + .../test_layout/ui_test_basic_layout.cpp | 2 +- .../uitest/test_layout/ui_test_basic_layout.h | 1 + .../ui_test_circle_progress.cpp | 2 +- test/uitest/test_qrcode/ui_test_qrcode.h | 2 +- .../test_render/ui_auto_test_render.cpp | 2 +- test/uitest/test_render/ui_auto_test_render.h | 2 +- .../test_screenshot/ui_test_screenshot.cpp | 8 +- .../test_screenshot/ui_test_screenshot.h | 2 +- .../ui_test_texture_mapper.cpp | 2 +- .../ui_test_texture_mapper.h | 3 +- .../test_transform/ui_test_transform.cpp | 2 +- .../uitest/test_transform/ui_test_transform.h | 1 + .../ui_test_analog_clock.cpp | 2 +- .../ui_test_analog_clock.h | 2 +- test/uitest/test_ui_list/ui_test_ui_list.cpp | 2 +- .../test_vector_font/ui_test_vector_font.h | 1 + .../ui_test_view_scale_rotate.cpp | 2 +- .../ui_test_view_scale_rotate.h | 1 + test/unittest/animator/animator_unit_test.cpp | 2 +- .../animator/interpolation_unit_test.cpp | 2 +- .../common/focus_manager_unit_test.cpp | 2 +- .../hardware_acceleration_unit_test.cpp | 2 +- test/unittest/common/screen_unit_test.cpp | 2 +- test/unittest/common/text_unit_test.cpp | 2 +- .../components/ui_arc_label_unit_test.cpp | 2 +- .../unittest/components/ui_axis_unit_test.cpp | 2 +- .../components/ui_box_progress_unit_test.cpp | 2 +- .../components/ui_button_unit_test.cpp | 2 +- .../components/ui_chart_unit_test.cpp | 2 +- .../components/ui_checkbox_unit_test.cpp | 2 +- .../ui_circle_progress_unit_test.cpp | 2 +- .../components/ui_dialog_unit_test.cpp | 2 +- .../components/ui_digital_clock_unit_test.cpp | 2 +- .../components/ui_image_unit_test.cpp | 2 +- .../components/ui_label_button_unit_test.cpp | 2 +- .../components/ui_label_unit_test.cpp | 2 +- .../unittest/components/ui_list_unit_test.cpp | 2 +- .../components/ui_radio_button_unit_test.cpp | 2 +- .../components/ui_repeat_button_unit_test.cpp | 2 +- .../components/ui_slider_unit_test.cpp | 2 +- .../components/ui_surface_view_unit_test.cpp | 2 +- .../components/ui_swipe_view_unit_test.cpp | 2 +- .../components/ui_time_picker_unit_test.cpp | 2 +- .../components/ui_toggle_button_unit_test.cpp | 2 +- .../components/ui_video_unit_test.cpp | 2 +- .../components/ui_view_group_unit_test.cpp | 2 +- .../unittest/dfx/event_injector_unit_test.cpp | 2 +- test/unittest/dfx/view_bounds_unit_test.cpp | 2 +- test/unittest/events/event_unit_test.cpp | 2 +- test/unittest/events/key_event_unit_test.cpp | 2 +- .../unittest/events/press_event_unit_test.cpp | 2 +- .../events/release_event_unit_test.cpp | 2 +- .../events/virtual_device_event_unit_test.cpp | 2 +- test/unittest/font/ui_font_unit_test.cpp | 2 +- .../unittest/layout/flex_layout_unit_test.cpp | 2 +- .../unittest/layout/grid_layout_unit_test.cpp | 2 +- .../unittest/layout/list_layout_unit_test.cpp | 2 +- .../rotate/ui_rotate_input_unit_test.cpp | 4 +- .../themes/theme_manager_unit_test.cpp | 2 +- .../qt/simulator/drivers/display/gui_thread.h | 2 +- tools/qt/simulator/drivers/display/monitor.h | 1 + tools/qt/simulator/drivers/indev/key_input.h | 2 +- tools/qt/simulator/third_party/zlib/unistd.h | 2 +- tools/qt/simulator/uitest/main_widget.h | 1 + 175 files changed, 263 insertions(+), 220 deletions(-) diff --git a/README.md b/README.md index 9c49409..334c0e2 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ For details about how to use components and APIs of graphics, see the examples p ## Repositories Involved -[Graphic subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/graphics-subsystem.md) +[Graphic subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/graphics.md) [graphic_wms](https://gitee.com/openharmony/graphic_wms/blob/master/README.md) diff --git a/frameworks/animator/easing_equation.cpp b/frameworks/animator/easing_equation.cpp index ce5cc43..a48b121 100644 --- a/frameworks/animator/easing_equation.cpp +++ b/frameworks/animator/easing_equation.cpp @@ -251,4 +251,4 @@ int16_t EasingEquation::SineEaseInOut(int16_t startPos, int16_t endPos, uint16_t } return SineEaseOut(halfStep, endPos, curTime - halfTime, halfTime); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/common/image_decode_ability.cpp b/frameworks/common/image_decode_ability.cpp index 912b994..041d6b8 100644 --- a/frameworks/common/image_decode_ability.cpp +++ b/frameworks/common/image_decode_ability.cpp @@ -21,4 +21,4 @@ ImageDecodeAbility& ImageDecodeAbility::GetInstance() static ImageDecodeAbility instance; return instance; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/common/input_device_manager.cpp b/frameworks/common/input_device_manager.cpp index 5672eb1..c7c21c9 100644 --- a/frameworks/common/input_device_manager.cpp +++ b/frameworks/common/input_device_manager.cpp @@ -69,4 +69,4 @@ void InputDeviceManager::Clear() { deviceList_.Clear(); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/text_adapter.cpp b/frameworks/components/text_adapter.cpp index 1297bee..b7ae749 100644 --- a/frameworks/components/text_adapter.cpp +++ b/frameworks/components/text_adapter.cpp @@ -222,4 +222,4 @@ uint16_t TextAdapter::GetCount() return 0; } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_abstract_clock.cpp b/frameworks/components/ui_abstract_clock.cpp index 872486a..9486faa 100644 --- a/frameworks/components/ui_abstract_clock.cpp +++ b/frameworks/components/ui_abstract_clock.cpp @@ -55,4 +55,4 @@ void UIAbstractClock::UpdateClock(bool clockInit) { Invalidate(); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_abstract_scroll_bar.h b/frameworks/components/ui_abstract_scroll_bar.h index 04b9bfb..a6644d9 100644 --- a/frameworks/components/ui_abstract_scroll_bar.h +++ b/frameworks/components/ui_abstract_scroll_bar.h @@ -25,7 +25,7 @@ class UIAbstractScrollBar : public HeapBase { public: UIAbstractScrollBar(); - virtual ~UIAbstractScrollBar() {}; + virtual ~UIAbstractScrollBar() {} virtual void SetPosition(int16_t x, int16_t y, int16_t width, int16_t height) {} @@ -55,6 +55,7 @@ public: { return opacity_; } + protected: uint8_t opacity_ = OPA_TRANSPARENT; float scrollProgress_ = 0; diff --git a/frameworks/components/ui_arc_label.cpp b/frameworks/components/ui_arc_label.cpp index 98e9a73..3fb45b6 100644 --- a/frameworks/components/ui_arc_label.cpp +++ b/frameworks/components/ui_arc_label.cpp @@ -210,4 +210,4 @@ void UIArcLabel::MeasureArcTextInfo() arcTextInfo_.direct, orientation_); } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_axis.cpp b/frameworks/components/ui_axis.cpp index 8227ed9..c5c78f0 100644 --- a/frameworks/components/ui_axis.cpp +++ b/frameworks/components/ui_axis.cpp @@ -197,4 +197,4 @@ void UIYAxis::DrawAxisMark(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea index++; } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_dialog.cpp b/frameworks/components/ui_dialog.cpp index 060c4b0..143ed1c 100644 --- a/frameworks/components/ui_dialog.cpp +++ b/frameworks/components/ui_dialog.cpp @@ -28,7 +28,7 @@ namespace OHOS { class UIDialogLabelButton : public UILabelButton { public: - UIDialogLabelButton(UIDialog* dialog) + explicit UIDialogLabelButton(UIDialog* dialog) { dialog_ = dialog; } @@ -51,7 +51,7 @@ private: class UIDialogClickListener : public UIView::OnClickListener { public: - UIDialogClickListener(UIDialog* dialog) + explicit UIDialogClickListener(UIDialog* dialog) { dialog_ = dialog; } @@ -691,4 +691,4 @@ ColorType UIDialog::GetButtonColor(DialogButtonType buttonType) const } #endif // ENABLE_DEBUG } // namespace OHOS -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/frameworks/components/ui_label.cpp b/frameworks/components/ui_label.cpp index db50d4c..97a9a45 100644 --- a/frameworks/components/ui_label.cpp +++ b/frameworks/components/ui_label.cpp @@ -380,4 +380,4 @@ void UILabel::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) labelText_->OnDraw(gfxDstBuffer, invalidatedArea, GetOrigRect(), GetContentRect(), offsetX_, style, ellipsisIndex_, opa); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_list.cpp b/frameworks/components/ui_list.cpp index 05ab8a9..aada647 100644 --- a/frameworks/components/ui_list.cpp +++ b/frameworks/components/ui_list.cpp @@ -863,7 +863,7 @@ void UIList::CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDista } } -/* this is a temporary impementation just used for list and will be replaced later, +/* this is a temporary implementation just used for list and will be replaced later, we assume size of all items in scroll are equal for now. */ void UIList::FixDistance(int16_t& distanceX, int16_t& distanceY) { diff --git a/frameworks/components/ui_repeat_button.cpp b/frameworks/components/ui_repeat_button.cpp index 79f5947..e437658 100644 --- a/frameworks/components/ui_repeat_button.cpp +++ b/frameworks/components/ui_repeat_button.cpp @@ -60,4 +60,4 @@ void UIRepeatButton::SetEvent(const ClickEvent& event) { event_ = event; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_surface_view.cpp b/frameworks/components/ui_surface_view.cpp index 1bb86d5..b0b1d03 100644 --- a/frameworks/components/ui_surface_view.cpp +++ b/frameworks/components/ui_surface_view.cpp @@ -131,7 +131,7 @@ Surface* UISurfaceView::GetSurface() const bool UISurfaceView::OnPreDraw(Rect& invalidatedArea) const { - // need fill transpant color + // need fill transparent color return false; } @@ -150,9 +150,9 @@ void UISurfaceView::Draw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) reinterpret_cast(acquireBuffer->GetVirAddr())); surface_->ReleaseBuffer(acquireBuffer); } else { - // fill with transpant color + // fill with transparent color DrawUtils::GetInstance()->DrawTranspantArea(gfxDstBuffer, GetRect(), invalidatedArea); } } } // namespace OHOS -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/frameworks/components/ui_texture_mapper.cpp b/frameworks/components/ui_texture_mapper.cpp index cc8374c..dcde1b8 100644 --- a/frameworks/components/ui_texture_mapper.cpp +++ b/frameworks/components/ui_texture_mapper.cpp @@ -91,4 +91,4 @@ void UITextureMapper::Callback() Rotate(rotateCur_, pivot_); } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_toggle_button.cpp b/frameworks/components/ui_toggle_button.cpp index 0782e7c..e9fba41 100644 --- a/frameworks/components/ui_toggle_button.cpp +++ b/frameworks/components/ui_toggle_button.cpp @@ -95,7 +95,7 @@ void UIToggleButton::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedAre Rect contentRect = GetContentRect(); Rect trunc = invalidatedArea; bool isIntersect = trunc.Intersect(trunc, contentRect); - if (isIntersect == false) { + if (!isIntersect) { return; } Style styleUnSelect = StyleDefault::GetBackgroundTransparentStyle(); @@ -144,4 +144,4 @@ void UIToggleButton::OnStop(UIView& view) Invalidate(); } #endif -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/components/ui_video.cpp b/frameworks/components/ui_video.cpp index fd54aed..c700967 100644 --- a/frameworks/components/ui_video.cpp +++ b/frameworks/components/ui_video.cpp @@ -717,4 +717,4 @@ void UIVideo::SliderAnimatorCallback::Callback(UIView* view) } } // namespace OHOS -#endif // VERSION_LITE \ No newline at end of file +#endif // VERSION_LITE diff --git a/frameworks/default_resource/check_box_res.cpp b/frameworks/default_resource/check_box_res.cpp index ae5be9a..c38922d 100644 --- a/frameworks/default_resource/check_box_res.cpp +++ b/frameworks/default_resource/check_box_res.cpp @@ -1351,7 +1351,7 @@ ImageInfo* GetCheckBoxOnInfo() { /* 56 : check box width */ g_checkBoxOn.header.width = 56; - /* 56 : check box heigh */ + /* 56 : check box height */ g_checkBoxOn.header.height = 56; /* 5 : check box cf format */ g_checkBoxOn.header.colorMode = ARGB8888; @@ -1367,7 +1367,7 @@ ImageInfo* GetCheckBoxOffInfo() { /* 56 : check box width */ g_checkBoxOff.header.width = 56; - /* 56 : check box heigh */ + /* 56 : check box height */ g_checkBoxOff.header.height = 56; /* 5 : check box cf format */ g_checkBoxOff.header.colorMode = ARGB8888; @@ -1376,4 +1376,4 @@ ImageInfo* GetCheckBoxOffInfo() g_checkBoxOff.data = CHECK_BOX_OFF_MAP; return &g_checkBoxOff; } -} \ No newline at end of file +} diff --git a/frameworks/dfx/key_event_injector.cpp b/frameworks/dfx/key_event_injector.cpp index 095690a..bf8f73a 100644 --- a/frameworks/dfx/key_event_injector.cpp +++ b/frameworks/dfx/key_event_injector.cpp @@ -79,4 +79,4 @@ uint8_t KeyEventInjector::GetLeftSize() const return MAX_LIST_SIZE - dataList_.Size(); } } -#endif // ENABLE_DEBUG \ No newline at end of file +#endif // ENABLE_DEBUG diff --git a/frameworks/dfx/key_event_injector.h b/frameworks/dfx/key_event_injector.h index 53da79b..3a68b76 100644 --- a/frameworks/dfx/key_event_injector.h +++ b/frameworks/dfx/key_event_injector.h @@ -38,4 +38,4 @@ private: } #endif // ENABLE_DEBUG -#endif // GRAPHIC_LITE_KEY_EVENT_INJECTOR \ No newline at end of file +#endif // GRAPHIC_LITE_KEY_EVENT_INJECTOR diff --git a/frameworks/dfx/ui_screenshot.cpp b/frameworks/dfx/ui_screenshot.cpp index dfb63c7..c5a68a1 100644 --- a/frameworks/dfx/ui_screenshot.cpp +++ b/frameworks/dfx/ui_screenshot.cpp @@ -169,4 +169,4 @@ bool UIScreenshot::ScreenshotToFile(const char* path) return true; } } // namespace OHOS -#endif // ENABLE_DEBUG \ No newline at end of file +#endif // ENABLE_DEBUG diff --git a/frameworks/dfx/ui_view_bounds.cpp b/frameworks/dfx/ui_view_bounds.cpp index 16af9f9..5f1de93 100644 --- a/frameworks/dfx/ui_view_bounds.cpp +++ b/frameworks/dfx/ui_view_bounds.cpp @@ -34,4 +34,4 @@ void UIViewBounds::SetShowState(bool show) } } } // namespace OHOS -#endif // ENABLE_DEBUG \ No newline at end of file +#endif // ENABLE_DEBUG diff --git a/frameworks/dock/focus_manager.cpp b/frameworks/dock/focus_manager.cpp index 89bf0a5..eb0b22a 100644 --- a/frameworks/dock/focus_manager.cpp +++ b/frameworks/dock/focus_manager.cpp @@ -260,4 +260,4 @@ bool FocusManager::GetNextFocus(UIView* focusedView, UIView*& candidate, UIViewG return childFocusable; } } -#endif \ No newline at end of file +#endif diff --git a/frameworks/dock/ohos/ohos_input_device.cpp b/frameworks/dock/ohos/ohos_input_device.cpp index adc8a15..5054708 100644 --- a/frameworks/dock/ohos/ohos_input_device.cpp +++ b/frameworks/dock/ohos/ohos_input_device.cpp @@ -25,4 +25,4 @@ bool OHOSInputDevice::Read(DeviceData& data) return false; } } -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/frameworks/dock/screen_device.h b/frameworks/dock/screen_device.h index 4e652aa..24bb2e9 100644 --- a/frameworks/dock/screen_device.h +++ b/frameworks/dock/screen_device.h @@ -131,7 +131,7 @@ public: * @param srcLineNumber Indicates the number of source memory rows * @param srcColorMode Indicates the source memory color format * @param color 32-bit XRGB8888 value - * (valid when the source memory is in a format with only alph information such as A1) + * (valid when the source memory is in a format with only alpha information such as A1) * @param opa Indicates the transparency * @param dst Indicates the start address of destination memory * @param dstStride Indicates the number of bytes in a single row of destination memory @@ -166,7 +166,7 @@ public: * @param transformMatrix Indicates the transformation matrix * @param opa Indicates the transparency * @param color 32-bit XRGB8888 value - * (valid when the source memory is in a format with only alph information such as A1) + * (valid when the source memory is in a format with only alpha information such as A1) * @param mask Indicates the masking rectangle, and the content beyond the rectangle is not drawn * @param dst Indicates the start address of destination memory * @param dstStride Indicates the number of bytes in a single row of destination memory diff --git a/frameworks/dock/screen_device_proxy.h b/frameworks/dock/screen_device_proxy.h index 863040d..283d5c2 100644 --- a/frameworks/dock/screen_device_proxy.h +++ b/frameworks/dock/screen_device_proxy.h @@ -194,6 +194,7 @@ public: bool GetScreenBitmapBuffer(uint8_t* dest, uint32_t size); ; + private: ScreenDeviceProxy() {} virtual ~ScreenDeviceProxy() {} diff --git a/frameworks/draw/draw_curve.h b/frameworks/draw/draw_curve.h index 018d1f0..cfe321e 100644 --- a/frameworks/draw/draw_curve.h +++ b/frameworks/draw/draw_curve.h @@ -30,4 +30,4 @@ private: static constexpr uint16_t INTERPOLATION_RANGE = 1024; }; } // namespace OHOS -#endif // GRAPHIC_LITE_DRAW_CURVE_H \ No newline at end of file +#endif // GRAPHIC_LITE_DRAW_CURVE_H diff --git a/frameworks/draw/draw_rect.cpp b/frameworks/draw/draw_rect.cpp index 757246f..b0f1c0d 100644 --- a/frameworks/draw/draw_rect.cpp +++ b/frameworks/draw/draw_rect.cpp @@ -726,4 +726,4 @@ void DrawRect::DrawRectRadiusBiggerThanBorderCon4(BufferInfo& gfxDstBuffer, cons Rect bottomBorderRect(col3X + 1, row5Y, col4X - 1, row6Y); DrawUtils::GetInstance()->DrawColorArea(gfxDstBuffer, bottomBorderRect, dirtyRect, style.borderColor_, opa); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/draw/draw_rect.h b/frameworks/draw/draw_rect.h index 1d48472..d3efb6a 100644 --- a/frameworks/draw/draw_rect.h +++ b/frameworks/draw/draw_rect.h @@ -26,8 +26,8 @@ namespace OHOS { /** @brief Class for drawing rectangle. */ class DrawRect : public HeapBase { public: - DrawRect() {}; - ~DrawRect() {}; + DrawRect() {} + ~DrawRect() {} static void Draw(BufferInfo& gfxDstBuffer, const Rect& rect, const Rect& dirtyRect, const Style& style, OpacityType opaScale); diff --git a/frameworks/draw/draw_triangle.cpp b/frameworks/draw/draw_triangle.cpp index e4c2a47..7aae920 100644 --- a/frameworks/draw/draw_triangle.cpp +++ b/frameworks/draw/draw_triangle.cpp @@ -123,4 +123,4 @@ DrawTriangle::Edge DrawTriangle::InitEdge(const Point& startP, const Point& endP edge.dPoint.y = MATH_ABS(edge.dPoint.y); return edge; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/font/ui_font.cpp b/frameworks/font/ui_font.cpp index d87dec4..b8582ef 100644 --- a/frameworks/font/ui_font.cpp +++ b/frameworks/font/ui_font.cpp @@ -28,9 +28,9 @@ namespace OHOS { bool UIFont::setFontAllocFlag_ = false; -UIFont::UIFont() : instance_(nullptr), defaultInstance_(nullptr){}; +UIFont::UIFont() : instance_(nullptr), defaultInstance_(nullptr){} -UIFont::~UIFont(){}; +UIFont::~UIFont(){} UIFont* UIFont::GetInstance() { diff --git a/frameworks/font/ui_font_builder.cpp b/frameworks/font/ui_font_builder.cpp index 902cae7..27188e4 100644 --- a/frameworks/font/ui_font_builder.cpp +++ b/frameworks/font/ui_font_builder.cpp @@ -88,4 +88,4 @@ LangTextParam* UIFontBuilder::GetLangTextDefaultParamTable() } return langTextDefaultParamTable_; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/font/ui_font_cache.h b/frameworks/font/ui_font_cache.h index fc9b2b0..4230ddf 100644 --- a/frameworks/font/ui_font_cache.h +++ b/frameworks/font/ui_font_cache.h @@ -70,4 +70,4 @@ private: ListHead lruList_ = {}; }; } // namespace OHOS -#endif /* UI_FONT_CACHE_H */ \ No newline at end of file +#endif /* UI_FONT_CACHE_H */ diff --git a/frameworks/font/ui_multi_font_manager.h b/frameworks/font/ui_multi_font_manager.h index 0db40d9..042a05d 100644 --- a/frameworks/font/ui_multi_font_manager.h +++ b/frameworks/font/ui_multi_font_manager.h @@ -82,4 +82,4 @@ private: }; } #endif -#endif \ No newline at end of file +#endif diff --git a/frameworks/font/ui_text_shaping.h b/frameworks/font/ui_text_shaping.h index 0718fb7..d189542 100644 --- a/frameworks/font/ui_text_shaping.h +++ b/frameworks/font/ui_text_shaping.h @@ -54,4 +54,4 @@ public: }; // class UITextShaping } // namespace OHOS #endif // ENABLE_SHAPING -#endif // GRAPHIC_LITE_TEXT_SHAPING_H \ No newline at end of file +#endif // GRAPHIC_LITE_TEXT_SHAPING_H diff --git a/frameworks/imgdecode/file_img_decoder.h b/frameworks/imgdecode/file_img_decoder.h index 0e64842..534f106 100644 --- a/frameworks/imgdecode/file_img_decoder.h +++ b/frameworks/imgdecode/file_img_decoder.h @@ -56,8 +56,8 @@ public: RetCode ReadToCache(ImgResDsc& dsc); private: - FileImgDecoder() {}; - ~FileImgDecoder() {}; + FileImgDecoder() {} + ~FileImgDecoder() {} bool IsImgValidMode(uint8_t colorMode) { @@ -75,4 +75,4 @@ private: FileImgDecoder& operator=(FileImgDecoder&&) = delete; }; } -#endif \ No newline at end of file +#endif diff --git a/frameworks/imgdecode/image_load.cpp b/frameworks/imgdecode/image_load.cpp index 9df7ef7..8f641b2 100644 --- a/frameworks/imgdecode/image_load.cpp +++ b/frameworks/imgdecode/image_load.cpp @@ -205,4 +205,4 @@ bool ImageLoad::GetImageInfo(int32_t fd, uint32_t size, ImageInfo& imageInfo) UIFree(buffer); return ret; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/imgdecode/image_load.h b/frameworks/imgdecode/image_load.h index b4193a9..fd2dea9 100644 --- a/frameworks/imgdecode/image_load.h +++ b/frameworks/imgdecode/image_load.h @@ -41,4 +41,4 @@ private: static bool UnzipImage(uint8_t* imageBuffer, uint32_t size, ImageInfo& imageInfo); }; } // namespace OHOS -#endif // GRAPHIC_LITE_IMAGE_LOAD_H \ No newline at end of file +#endif // GRAPHIC_LITE_IMAGE_LOAD_H diff --git a/frameworks/layout/flex_layout.cpp b/frameworks/layout/flex_layout.cpp index 4361448..f0dc4bc 100644 --- a/frameworks/layout/flex_layout.cpp +++ b/frameworks/layout/flex_layout.cpp @@ -502,4 +502,4 @@ void FlexLayout::LayoutVertical() delete[] columnsChildNum; } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/layout/grid_layout.cpp b/frameworks/layout/grid_layout.cpp index 415102a..de707ae 100644 --- a/frameworks/layout/grid_layout.cpp +++ b/frameworks/layout/grid_layout.cpp @@ -115,4 +115,4 @@ void GridLayout::LayoutVertical() } } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/layout/list_layout.cpp b/frameworks/layout/list_layout.cpp index 5ca4c13..a5ee8e8 100644 --- a/frameworks/layout/list_layout.cpp +++ b/frameworks/layout/list_layout.cpp @@ -47,4 +47,4 @@ void ListLayout::OnChildChanged() SetWidth(rect.GetWidth() + rect.GetLeft()); } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/themes/theme.cpp b/frameworks/themes/theme.cpp index 4818ece..efb488f 100644 --- a/frameworks/themes/theme.cpp +++ b/frameworks/themes/theme.cpp @@ -60,4 +60,4 @@ void Theme::InitSliderStyle() { sliderKnobStyle_ = StyleDefault::GetPickerBackgroundStyle(); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/themes/theme_manager.cpp b/frameworks/themes/theme_manager.cpp index b8fe842..5c2b60a 100644 --- a/frameworks/themes/theme_manager.cpp +++ b/frameworks/themes/theme_manager.cpp @@ -26,4 +26,4 @@ void ThemeManager::SetCurrent(Theme* theme) { theme_ = theme; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/window/window.cpp b/frameworks/window/window.cpp index 9d62edc..b68feaa 100644 --- a/frameworks/window/window.cpp +++ b/frameworks/window/window.cpp @@ -41,4 +41,4 @@ void Window::DestoryWindow(Window* window) delete windowImpl; } } -} \ No newline at end of file +} diff --git a/frameworks/window/window_impl.cpp b/frameworks/window/window_impl.cpp index f79a643..c83d23e 100644 --- a/frameworks/window/window_impl.cpp +++ b/frameworks/window/window_impl.cpp @@ -213,7 +213,8 @@ void WindowImpl::UpdateHalDisplayBuffer() if (surface == nullptr) { return; } - surface->Lock((void**)&gfxAlloc_.virAddr, (void**)&gfxAlloc_.phyAddr, &gfxAlloc_.stride); + surface->Lock(reinterpret_cast(&gfxAlloc_.virAddr), + reinterpret_cast(&gfxAlloc_.phyAddr), &gfxAlloc_.stride); } } diff --git a/frameworks/window/window_impl.h b/frameworks/window/window_impl.h index 7729c13..1a52f7f 100644 --- a/frameworks/window/window_impl.h +++ b/frameworks/window/window_impl.h @@ -50,6 +50,7 @@ public: void RemoveFromDisplay(); BufferInfo* GetBufferInfo(); + private: void UpdateHalDisplayBuffer(); @@ -68,4 +69,4 @@ private: AllocationInfo gfxAlloc_; }; } -#endif \ No newline at end of file +#endif diff --git a/interfaces/innerkits/dock/focus_manager.h b/interfaces/innerkits/dock/focus_manager.h index c09bc74..1a6512e 100644 --- a/interfaces/innerkits/dock/focus_manager.h +++ b/interfaces/innerkits/dock/focus_manager.h @@ -106,4 +106,4 @@ private: }; } // namespace OHOS #endif -#endif // GRAPHIC_LITE_FOCUS_MANAGER_H \ No newline at end of file +#endif // GRAPHIC_LITE_FOCUS_MANAGER_H diff --git a/interfaces/innerkits/dock/rotate_input_device.h b/interfaces/innerkits/dock/rotate_input_device.h index b9dddd1..707a8e8 100644 --- a/interfaces/innerkits/dock/rotate_input_device.h +++ b/interfaces/innerkits/dock/rotate_input_device.h @@ -27,7 +27,7 @@ public: /** @brief Constructor */ RotateInputDevice(); /** @brief Destructor */ - virtual ~RotateInputDevice(){}; + virtual ~RotateInputDevice(){} void SetRotateInputThreshold(int16_t threshold) { @@ -43,4 +43,4 @@ protected: } // namespace OHOS #endif // GRAPHIC_LITE_ROTATE_INPUT_DEVICE_H -#endif \ No newline at end of file +#endif diff --git a/interfaces/innerkits/dock/vibrator_manager.h b/interfaces/innerkits/dock/vibrator_manager.h index 22df186..a108b0e 100644 --- a/interfaces/innerkits/dock/vibrator_manager.h +++ b/interfaces/innerkits/dock/vibrator_manager.h @@ -65,4 +65,4 @@ private: }; } // namespace OHOS #endif -#endif // GRAPHIC_LITE_VIBRATOR_MANAGER_H \ No newline at end of file +#endif // GRAPHIC_LITE_VIBRATOR_MANAGER_H diff --git a/interfaces/innerkits/engines/gfx/gfx_engine_manager.h b/interfaces/innerkits/engines/gfx/gfx_engine_manager.h index ff0ee64..ece0574 100644 --- a/interfaces/innerkits/engines/gfx/gfx_engine_manager.h +++ b/interfaces/innerkits/engines/gfx/gfx_engine_manager.h @@ -173,6 +173,7 @@ public: } baseEngine_ = gfxEngine; } + protected: static BaseGfxEngine* baseEngine_; uint16_t width_ = HORIZONTAL_RESOLUTION; diff --git a/interfaces/innerkits/font/ui_font_bitmap.h b/interfaces/innerkits/font/ui_font_bitmap.h index a521db3..688fa55 100644 --- a/interfaces/innerkits/font/ui_font_bitmap.h +++ b/interfaces/innerkits/font/ui_font_bitmap.h @@ -69,4 +69,4 @@ private: int32_t dynamicFontFd_; }; } // namespce OHOS -#endif // UI_FONT_BITMAP_H \ No newline at end of file +#endif // UI_FONT_BITMAP_H diff --git a/interfaces/innerkits/font/ui_font_builder.h b/interfaces/innerkits/font/ui_font_builder.h index d10ee69..f6dd7a2 100644 --- a/interfaces/innerkits/font/ui_font_builder.h +++ b/interfaces/innerkits/font/ui_font_builder.h @@ -44,6 +44,7 @@ public: UITextLanguageFontParam* uiTextLangFontsTable_; LangTextParam* langTextDefaultParamTable_; + private: UIFontBuilder(); ~UIFontBuilder() {} @@ -52,4 +53,4 @@ private: uint16_t totalTextId_; }; } -#endif // GRAPHIC_LITE_UI_FONT_BUILDER_H \ No newline at end of file +#endif // GRAPHIC_LITE_UI_FONT_BUILDER_H diff --git a/interfaces/kits/common/screen.h b/interfaces/kits/common/screen.h index c0c5d78..8bd47fa 100644 --- a/interfaces/kits/common/screen.h +++ b/interfaces/kits/common/screen.h @@ -92,4 +92,4 @@ private: virtual ~Screen() {} }; } // namespace OHOS -#endif // GRAPHIC_LITE_SCREEN_H \ No newline at end of file +#endif // GRAPHIC_LITE_SCREEN_H diff --git a/interfaces/kits/common/task.h b/interfaces/kits/common/task.h index d6af9fa..d3ab103 100644 --- a/interfaces/kits/common/task.h +++ b/interfaces/kits/common/task.h @@ -122,4 +122,4 @@ protected: uint32_t lastRun_; /* last run time */ }; } // namespace OHOS -#endif // GRAPHIC_LITE_TASK_H \ No newline at end of file +#endif // GRAPHIC_LITE_TASK_H diff --git a/interfaces/kits/common/text.h b/interfaces/kits/common/text.h index 537735c..d32ebbb 100644 --- a/interfaces/kits/common/text.h +++ b/interfaces/kits/common/text.h @@ -380,4 +380,4 @@ private: uint8_t verticalAlign_ : 4; // UITextLanguageAlignment }; } // namespace OHOS -#endif // GRAPHIC_LITE_TEXT_H \ No newline at end of file +#endif // GRAPHIC_LITE_TEXT_H diff --git a/interfaces/kits/components/abstract_adapter.h b/interfaces/kits/components/abstract_adapter.h index d34f301..69a4a85 100644 --- a/interfaces/kits/components/abstract_adapter.h +++ b/interfaces/kits/components/abstract_adapter.h @@ -87,7 +87,7 @@ public: * @version 1.0 */ virtual UIView* GetView(UIView* inView, int16_t index) = 0; - + virtual void DeleteView(UIView*& view) { delete view; diff --git a/interfaces/kits/components/root_view.h b/interfaces/kits/components/root_view.h index d3b9000..6aea35d 100644 --- a/interfaces/kits/components/root_view.h +++ b/interfaces/kits/components/root_view.h @@ -291,6 +291,7 @@ public: * @version 6.0 */ void RestoreDrawContext(); + private: friend class RenderManager; friend class UIViewGroup; diff --git a/interfaces/kits/components/text_adapter.h b/interfaces/kits/components/text_adapter.h index bd247d1..7340131 100644 --- a/interfaces/kits/components/text_adapter.h +++ b/interfaces/kits/components/text_adapter.h @@ -177,7 +177,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual uint16_t GetCount() override; + uint16_t GetCount() override; /** * @brief Sets the width of UILabel constructed by the adapter. @@ -253,6 +253,7 @@ public: { formatter_ = formatter; } + protected: virtual UILabel* GetTextView(UIView* inView, int16_t index); virtual UILabel* CreateUILabel(UIView* inView); diff --git a/interfaces/kits/components/ui_abstract_scroll.h b/interfaces/kits/components/ui_abstract_scroll.h index 2b72123..a43a38c 100644 --- a/interfaces/kits/components/ui_abstract_scroll.h +++ b/interfaces/kits/components/ui_abstract_scroll.h @@ -402,7 +402,7 @@ protected: endValueY_ = 0; } - virtual void Callback(UIView* view) override; + void Callback(UIView* view) override; uint16_t curtTime_; uint16_t dragTimes_; @@ -446,7 +446,7 @@ protected: void StartAnimator(int16_t dragDistanceX, int16_t dragDistanceY); - virtual void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY){}; + virtual void CalculateReboundDistance(int16_t& dragDistanceX, int16_t& dragDistanceY){} int16_t GetMaxDelta() const; diff --git a/interfaces/kits/components/ui_analog_clock.h b/interfaces/kits/components/ui_analog_clock.h index a7a9941..f8ef157 100644 --- a/interfaces/kits/components/ui_analog_clock.h +++ b/interfaces/kits/components/ui_analog_clock.h @@ -315,7 +315,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void OnPostDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override; + void OnPostDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override; /** * @brief Sets the working mode for this analog clock. diff --git a/interfaces/kits/components/ui_arc_label.h b/interfaces/kits/components/ui_arc_label.h index bbd10ce..e6d7b3e 100644 --- a/interfaces/kits/components/ui_arc_label.h +++ b/interfaces/kits/components/ui_arc_label.h @@ -119,7 +119,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void SetStyle(Style& style) override + void SetStyle(Style& style) override { UIView::SetStyle(style); } @@ -344,7 +344,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override; + void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override; /** * @brief Stores the attribute information about this arc text to draw. @@ -374,7 +374,7 @@ protected: void RefreshArcLabel(); private: - virtual void ReMeasure() override; + void ReMeasure() override; void MeasureArcTextInfo(); void DrawArcText(BufferInfo& gfxDstBuffer, const Rect& mask, OpacityType opaScale); diff --git a/interfaces/kits/components/ui_button.h b/interfaces/kits/components/ui_button.h index 3ffca18..2b65109 100644 --- a/interfaces/kits/components/ui_button.h +++ b/interfaces/kits/components/ui_button.h @@ -67,7 +67,7 @@ public: * @since 1.0 * @version 1.0 */ - UIButton(const char* id) : UIButton() + explicit UIButton(const char* id) : UIButton() { id_ = id; } @@ -313,7 +313,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual Rect GetContentRect() override + Rect GetContentRect() override { Rect contentRect; Style* style = buttonStyles_[state_]; @@ -340,7 +340,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void SetStyle(Style& style) override + void SetStyle(Style& style) override { UIView::SetStyle(style); } @@ -412,6 +412,7 @@ public: enableAnimation_ = enable; } #endif + protected: Image* defaultImgSrc_; Image* triggeredImgSrc_; diff --git a/interfaces/kits/components/ui_checkbox.h b/interfaces/kits/components/ui_checkbox.h index d1e58a7..f8b6d92 100644 --- a/interfaces/kits/components/ui_checkbox.h +++ b/interfaces/kits/components/ui_checkbox.h @@ -54,6 +54,7 @@ class UICheckBox : public UIView, public AnimatorCallback { #else class UICheckBox : public UIView { #endif + public: /** * @brief Enumerates the states of a check box. @@ -84,7 +85,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual ~UICheckBox() {}; + virtual ~UICheckBox() {} /** * @brief Represents a listener for changes of a check box. diff --git a/interfaces/kits/components/ui_dialog.h b/interfaces/kits/components/ui_dialog.h index f30c9fe..b4fc8a5 100644 --- a/interfaces/kits/components/ui_dialog.h +++ b/interfaces/kits/components/ui_dialog.h @@ -245,4 +245,4 @@ private: }; } #endif // GRAPHIC_LITE_UI_DIALOG_H -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/interfaces/kits/components/ui_image_animator.h b/interfaces/kits/components/ui_image_animator.h index 1fb6aa1..abdf96f 100644 --- a/interfaces/kits/components/ui_image_animator.h +++ b/interfaces/kits/components/ui_image_animator.h @@ -436,7 +436,7 @@ protected: virtual ~ImageAnimatorCallback() {} - virtual void Callback(UIView* view) override; + void Callback(UIView* view) override; void Reset() { diff --git a/interfaces/kits/components/ui_image_view.h b/interfaces/kits/components/ui_image_view.h index 6cabf9a..290f50e 100644 --- a/interfaces/kits/components/ui_image_view.h +++ b/interfaces/kits/components/ui_image_view.h @@ -307,6 +307,7 @@ protected: TransformMap* drawTransMap_ = nullptr; Matrix4* contentMatrix_ = nullptr; bool transMapInvalid_ = true; + private: void ReMeasure() override; #if (ENABLE_GIF == 1) diff --git a/interfaces/kits/components/ui_list.h b/interfaces/kits/components/ui_list.h index 5ca9b6e..5f3c757 100644 --- a/interfaces/kits/components/ui_list.h +++ b/interfaces/kits/components/ui_list.h @@ -187,7 +187,7 @@ public: * @since 1.0 * @version 1.0 */ - UIList(uint8_t direction); + explicit UIList(uint8_t direction); /** * @brief A destructor used to delete the UIList instance. @@ -236,7 +236,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void MoveChildByOffset(int16_t x, int16_t y) override; + void MoveChildByOffset(int16_t x, int16_t y) override; /** * @brief Scrolls to change the index of the first row or column of the current view. diff --git a/interfaces/kits/components/ui_picker.h b/interfaces/kits/components/ui_picker.h index 011402a..a1d0a83 100644 --- a/interfaces/kits/components/ui_picker.h +++ b/interfaces/kits/components/ui_picker.h @@ -536,6 +536,7 @@ protected: TextAdapter* textAdapter_; uint16_t maxCount_; PickerListScrollListener* listListener_; + private: friend class PickerListScrollListener; bool RefreshValues(const char* value[], uint16_t count); diff --git a/interfaces/kits/components/ui_radio_button.h b/interfaces/kits/components/ui_radio_button.h index 1f79ee8..5bb0d18 100644 --- a/interfaces/kits/components/ui_radio_button.h +++ b/interfaces/kits/components/ui_radio_button.h @@ -62,7 +62,7 @@ public: * * @brief Default constructor */ - UIRadioButton(const char* name); + explicit UIRadioButton(const char* name); /** * @brief A destructor used to delete the UIRadioButton instance. diff --git a/interfaces/kits/components/ui_repeat_button.h b/interfaces/kits/components/ui_repeat_button.h index 45308f6..530ebaf 100644 --- a/interfaces/kits/components/ui_repeat_button.h +++ b/interfaces/kits/components/ui_repeat_button.h @@ -111,7 +111,7 @@ public: * @param [in] event click event. * @return Returns true if the event is consumed; returns false otherwise. */ - virtual bool OnClickEvent(const ClickEvent& event) override; + bool OnClickEvent(const ClickEvent& event) override; /** * @fn void UIRepeatButton::OnReleaseEvent(const ReleaseEvent& event) @@ -120,7 +120,7 @@ public: * * @param [in] event release event. */ - virtual bool OnReleaseEvent(const ReleaseEvent& event) override; + bool OnReleaseEvent(const ReleaseEvent& event) override; /** * @fn void UIRepeatButton::OnLongPressEvent(const ReleaseEvent& event) @@ -129,7 +129,7 @@ public: * * @param [in] event long press event. */ - virtual bool OnLongPressEvent(const LongPressEvent& event) override; + bool OnLongPressEvent(const LongPressEvent& event) override; /** * @fn void UIRepeatButton::HandleTickEvent() @@ -145,7 +145,7 @@ private: static UIRepeatButton* repeatButton_; uint32_t timerRepeatID_; - virtual void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override; + void OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea) override; inline void SetEvent(const ClickEvent& event); }; } // namespace OHOS diff --git a/interfaces/kits/components/ui_slider.h b/interfaces/kits/components/ui_slider.h index 7574b5e..e7916f4 100644 --- a/interfaces/kits/components/ui_slider.h +++ b/interfaces/kits/components/ui_slider.h @@ -336,7 +336,7 @@ protected: private: static constexpr uint8_t MAX_ROTATE_FACTOR = 128; - + int16_t knobWidth_; bool knobStyleAllocFlag_; Style* knobStyle_; diff --git a/interfaces/kits/components/ui_swipe_view.h b/interfaces/kits/components/ui_swipe_view.h index 904e48d..f28d3a5 100644 --- a/interfaces/kits/components/ui_swipe_view.h +++ b/interfaces/kits/components/ui_swipe_view.h @@ -149,7 +149,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void Remove(UIView* view) override; + void Remove(UIView* view) override; /** * @brief Sets the index for the current tab. diff --git a/interfaces/kits/components/ui_time_picker.h b/interfaces/kits/components/ui_time_picker.h index d055915..ac24f17 100644 --- a/interfaces/kits/components/ui_time_picker.h +++ b/interfaces/kits/components/ui_time_picker.h @@ -298,14 +298,14 @@ public: private: class UIPickerListener : public UIPicker::SelectedListener { public: - UIPickerListener(UITimePicker* timePicker) + explicit UIPickerListener(UITimePicker* timePicker) { timePicker_ = timePicker; } ~UIPickerListener() {} - virtual void OnPickerStoped(UIPicker& picker) override + void OnPickerStoped(UIPicker& picker) override { if (timePicker_ != nullptr) { timePicker_->TimeSelectedCallback(); diff --git a/interfaces/kits/components/ui_toggle_button.h b/interfaces/kits/components/ui_toggle_button.h index b0b9413..22d3a12 100644 --- a/interfaces/kits/components/ui_toggle_button.h +++ b/interfaces/kits/components/ui_toggle_button.h @@ -108,7 +108,7 @@ public: protected: void CalculateSize() override; #if DEFAULT_ANIMATION - virtual void Callback(UIView* view) override; + void Callback(UIView* view) override; void OnStop(UIView& view) override; #endif diff --git a/interfaces/kits/components/ui_video.h b/interfaces/kits/components/ui_video.h index c04ff29..8610cd7 100644 --- a/interfaces/kits/components/ui_video.h +++ b/interfaces/kits/components/ui_video.h @@ -242,7 +242,7 @@ public: * @since 5.0 * @version 3.0 */ - virtual ~VideoPlayerListener() {}; + virtual ~VideoPlayerListener() {} /** * @brief Called when the playback is complete. @@ -495,4 +495,4 @@ private: } // namespace OHOS #endif // VERSION_LITE -#endif // GRAPHIC_LITE_UI_VIDEO_H \ No newline at end of file +#endif // GRAPHIC_LITE_UI_VIDEO_H diff --git a/interfaces/kits/components/ui_view.h b/interfaces/kits/components/ui_view.h index 7e0b14f..3b4074c 100644 --- a/interfaces/kits/components/ui_view.h +++ b/interfaces/kits/components/ui_view.h @@ -426,7 +426,7 @@ public: * @since 1.0 * @version 1.0 */ - UIView(const char* id) : UIView() + explicit UIView(const char* id) : UIView() { id_ = id; } diff --git a/interfaces/kits/components/ui_view_group.h b/interfaces/kits/components/ui_view_group.h index dcde2af..4161a9a 100644 --- a/interfaces/kits/components/ui_view_group.h +++ b/interfaces/kits/components/ui_view_group.h @@ -123,7 +123,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void GetTargetView(const Point& point, UIView** last) override; + void GetTargetView(const Point& point, UIView** last) override; /** * @brief Obtains the current view and target view based on specified coordinates. The obtained current view @@ -138,7 +138,7 @@ public: * @since 5.0 * @version 3.0 */ - virtual void GetTargetView(const Point& point, UIView** current, UIView** target) override; + void GetTargetView(const Point& point, UIView** current, UIView** target) override; /** * @brief Moves all child views. diff --git a/interfaces/kits/dfx/event_injector.h b/interfaces/kits/dfx/event_injector.h index bb67377..0fef732 100644 --- a/interfaces/kits/dfx/event_injector.h +++ b/interfaces/kits/dfx/event_injector.h @@ -170,6 +170,7 @@ public: */ void SetWindowId(uint8_t windowId); #endif + private: EventInjector() : pointEventInjector_(nullptr), keyEventInjector_(nullptr) {} virtual ~EventInjector(); diff --git a/interfaces/kits/dfx/ui_screenshot.h b/interfaces/kits/dfx/ui_screenshot.h index 6d35b6a..08bd091 100644 --- a/interfaces/kits/dfx/ui_screenshot.h +++ b/interfaces/kits/dfx/ui_screenshot.h @@ -75,6 +75,7 @@ public: * @version 1.0 */ bool ScreenshotToFile(const char* path); + private: UIScreenshotListener* screenshotListener_; diff --git a/interfaces/kits/dfx/ui_view_bounds.h b/interfaces/kits/dfx/ui_view_bounds.h index 030b876..4abee1e 100644 --- a/interfaces/kits/dfx/ui_view_bounds.h +++ b/interfaces/kits/dfx/ui_view_bounds.h @@ -83,4 +83,4 @@ private: }; } // namespace OHOS #endif // ENABLE_DEBUG -#endif // GRAPHIC_LITE_UI_VIEW_BOUNDS_H \ No newline at end of file +#endif // GRAPHIC_LITE_UI_VIEW_BOUNDS_H diff --git a/interfaces/kits/events/event.h b/interfaces/kits/events/event.h index 560f46e..04464e9 100644 --- a/interfaces/kits/events/event.h +++ b/interfaces/kits/events/event.h @@ -104,6 +104,7 @@ public: { timeStamp_ = timeStamp; } + protected: TimeType timeStamp_; Point curPos_; diff --git a/interfaces/kits/events/rotate_event.h b/interfaces/kits/events/rotate_event.h index e9b20c2..9ef1ede 100644 --- a/interfaces/kits/events/rotate_event.h +++ b/interfaces/kits/events/rotate_event.h @@ -59,7 +59,7 @@ public: */ RotateEvent(int16_t rotate) : rotate_(static_cast(rotate * ROTATE_SENSITIVITY)) {} // Rotation direction - ~RotateEvent() {}; + ~RotateEvent() {} /** * @brief Obtains the number reported by a RotateEvent. @@ -77,4 +77,4 @@ private: int16_t rotate_; }; } // namespace OHOS -#endif // GRAPHIC_LITE_ROTATE_EVENT_H \ No newline at end of file +#endif // GRAPHIC_LITE_ROTATE_EVENT_H diff --git a/interfaces/kits/font/ui_font_header.h b/interfaces/kits/font/ui_font_header.h index 9510d78..e71ad2c 100644 --- a/interfaces/kits/font/ui_font_header.h +++ b/interfaces/kits/font/ui_font_header.h @@ -378,4 +378,4 @@ struct FileCommonHeader { }; #pragma pack() } // namespace OHOS -#endif /* UI_FONT_HEADER_H */ \ No newline at end of file +#endif /* UI_FONT_HEADER_H */ diff --git a/interfaces/kits/layout/flex_layout.h b/interfaces/kits/layout/flex_layout.h index 940c3a4..37048cf 100644 --- a/interfaces/kits/layout/flex_layout.h +++ b/interfaces/kits/layout/flex_layout.h @@ -110,7 +110,8 @@ public: * @since 1.0 * @version 1.0 */ - virtual void LayoutChildren(bool needInvalidate = false) override; + void LayoutChildren(bool needInvalidate = false) override; + private: void LayoutHorizontal(); void LayoutVertical(); diff --git a/interfaces/kits/layout/grid_layout.h b/interfaces/kits/layout/grid_layout.h index 6dbbb2a..5d1364d 100644 --- a/interfaces/kits/layout/grid_layout.h +++ b/interfaces/kits/layout/grid_layout.h @@ -90,7 +90,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual void LayoutChildren(bool needInvalidate = false) override; + void LayoutChildren(bool needInvalidate = false) override; private: void LayoutHorizontal(); diff --git a/interfaces/kits/themes/theme.h b/interfaces/kits/themes/theme.h index 4fb9173..456d00f 100644 --- a/interfaces/kits/themes/theme.h +++ b/interfaces/kits/themes/theme.h @@ -73,7 +73,7 @@ public: * @since 1.0 * @version 1.0 */ - virtual ~Theme(){}; + virtual ~Theme(){} /** * @brief Obtains the basic style. diff --git a/interfaces/kits/window/window.h b/interfaces/kits/window/window.h index f6ef612..8baaf1e 100644 --- a/interfaces/kits/window/window.h +++ b/interfaces/kits/window/window.h @@ -223,4 +223,4 @@ public: virtual int32_t GetWindowId() = 0; }; } -#endif \ No newline at end of file +#endif diff --git a/test/framework/include/test_case_list_adapter.h b/test/framework/include/test_case_list_adapter.h index f09a318..00796bf 100644 --- a/test/framework/include/test_case_list_adapter.h +++ b/test/framework/include/test_case_list_adapter.h @@ -40,4 +40,4 @@ private: UILabel* testCaseLabel_; }; } // namespace OHOS -#endif // TEST_CASE_LIST_ADAPTER_H \ No newline at end of file +#endif // TEST_CASE_LIST_ADAPTER_H diff --git a/test/framework/include/ui_test.h b/test/framework/include/ui_test.h index 59e3453..bb67206 100644 --- a/test/framework/include/ui_test.h +++ b/test/framework/include/ui_test.h @@ -112,4 +112,4 @@ protected: int16_t positionY_ = 0; }; } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/test/framework/include/ui_test_group.h b/test/framework/include/ui_test_group.h index bc0b072..4dc7da4 100644 --- a/test/framework/include/ui_test_group.h +++ b/test/framework/include/ui_test_group.h @@ -38,4 +38,4 @@ private: static List testCaseList_; }; } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/test/framework/src/test_case_list_adapter.cpp b/test/framework/src/test_case_list_adapter.cpp index 207f175..3eb552b 100644 --- a/test/framework/src/test_case_list_adapter.cpp +++ b/test/framework/src/test_case_list_adapter.cpp @@ -198,4 +198,4 @@ int16_t TestCaseListAdapter::GetItemHeightWithMargin(int16_t index) { return TESTCASE_BUTTON_HEIGHT + STYLE_BORDER_WIDTH_VALUE * 2; // 2: two borders on both sides } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_animator/ui_test_animator.cpp b/test/uitest/test_animator/ui_test_animator.cpp index 1ed1751..ea8a000 100644 --- a/test/uitest/test_animator/ui_test_animator.cpp +++ b/test/uitest/test_animator/ui_test_animator.cpp @@ -307,4 +307,4 @@ void UITestAnimator::OnFPSChanged(float newFPS) fpsLabel_->SetText(reinterpret_cast(buf)); fpsLabel_->Invalidate(); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_animator/ui_test_animator.h b/test/uitest/test_animator/ui_test_animator.h index 496f928..b6c9b80 100644 --- a/test/uitest/test_animator/ui_test_animator.h +++ b/test/uitest/test_animator/ui_test_animator.h @@ -72,7 +72,7 @@ protected: class UITestAnimator : public UITest, public UIView::OnClickListener, public SysInfo::OnFPSChangedListener { public: UITestAnimator() {} - ~UITestAnimator(){}; + ~UITestAnimator(){} void SetUp() override; void TearDown() override; const UIView* GetTestView() override; diff --git a/test/uitest/test_anti_aliasing/ui_test_anti_aliasing.cpp b/test/uitest/test_anti_aliasing/ui_test_anti_aliasing.cpp index 9962ec2..615448b 100644 --- a/test/uitest/test_anti_aliasing/ui_test_anti_aliasing.cpp +++ b/test/uitest/test_anti_aliasing/ui_test_anti_aliasing.cpp @@ -164,4 +164,4 @@ void UITestAntiAliasing::UIKit_Anti_Aliasing_Test_Line_001() group->Add(canvas); container_->Add(group); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_arc_label/ui_test_arc_label.cpp b/test/uitest/test_arc_label/ui_test_arc_label.cpp index 5e49b89..facec55 100644 --- a/test/uitest/test_arc_label/ui_test_arc_label.cpp +++ b/test/uitest/test_arc_label/ui_test_arc_label.cpp @@ -197,4 +197,4 @@ void UITestArcLabel::UIKit_UIArcLabel_Test_Align_003() positionY_ += RADIUS + GAP + TITLE_HEIGHT; } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_button/ui_test_button.cpp b/test/uitest/test_button/ui_test_button.cpp index 3dacd0f..149a7f7 100644 --- a/test/uitest/test_button/ui_test_button.cpp +++ b/test/uitest/test_button/ui_test_button.cpp @@ -174,7 +174,10 @@ const UIView* UITestBUTTON::GetTestView() return container_; } -UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX, int16_t posY, int16_t width, int16_t height, +UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX, + int16_t posY, + int16_t width, + int16_t height, UICheckBox::OnChangeListener** listener, UIViewType type, const char* name) @@ -202,7 +205,7 @@ UIViewGroup* UITestBUTTON::CreateButtonGroup(int16_t posX, int16_t posY, int16_t } group->Add(checkBox); checkBox->SetOnChangeListener(*listener); - checkBox->SetPosition(100, 0, width, height); // 100: posX 0: posY + checkBox->SetPosition(100, 0, width, height); // 100: posX 0: posY if (checkBox->GetState() == UICheckBox::SELECTED) { label1->SetText("ON"); } else { @@ -243,14 +246,14 @@ void UITestBUTTON::UIKit_Radio_Button_Test_001() label->SetText("radiobutton功能"); label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE); // 40: posX 160 posY 100 width 100 height - UIViewGroup* group = CreateButtonGroup(40, 160, 100, 100, &radioChangeListener_, - UIViewType::UI_RADIO_BUTTON, "bb"); + UIViewGroup* group = + CreateButtonGroup(40, 160, 100, 100, &radioChangeListener_, UIViewType::UI_RADIO_BUTTON, "bb"); // 250: posX 160 posY 100 width 100 height - UIViewGroup* group1 = CreateButtonGroup(250, 160, 100, 100, &radioChangeListener1_, - UIViewType::UI_RADIO_BUTTON, "bb"); + UIViewGroup* group1 = + CreateButtonGroup(250, 160, 100, 100, &radioChangeListener1_, UIViewType::UI_RADIO_BUTTON, "bb"); // 500: posX 160 posY 100 width 100 height - UIViewGroup* group2 = CreateButtonGroup(500, 160, 100, 100, &radioChangeListener2_, - UIViewType::UI_RADIO_BUTTON, "bb"); + UIViewGroup* group2 = + CreateButtonGroup(500, 160, 100, 100, &radioChangeListener2_, UIViewType::UI_RADIO_BUTTON, "bb"); container_->Add(group); container_->Add(group1); container_->Add(group2); @@ -269,14 +272,13 @@ void UITestBUTTON::UIKit_Toggle_Button_Test_001() label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE); // 40: posX 300 posY 100 width 100 height - UIViewGroup* group = CreateButtonGroup(40, 300, 100, 100, &toggleChangeListener_, - UIViewType::UI_TOGGLE_BUTTON); + UIViewGroup* group = CreateButtonGroup(40, 300, 100, 100, &toggleChangeListener_, UIViewType::UI_TOGGLE_BUTTON); // 250: posX 300 posY 100 width 100 height - UIViewGroup* group1 = CreateButtonGroup(250, 300, 100, 100, &toggleChangeListener1_, - UIViewType::UI_TOGGLE_BUTTON); + UIViewGroup* group1 = + CreateButtonGroup(250, 300, 100, 100, &toggleChangeListener1_, UIViewType::UI_TOGGLE_BUTTON); // 500: posX 300 posY 100 width 100 height - UIViewGroup* group2 = CreateButtonGroup(500, 300, 100, 100, &toggleChangeListener2_, - UIViewType::UI_TOGGLE_BUTTON); + UIViewGroup* group2 = + CreateButtonGroup(500, 300, 100, 100, &toggleChangeListener2_, UIViewType::UI_TOGGLE_BUTTON); container_->Add(group); container_->Add(group1); container_->Add(group2); @@ -561,7 +563,7 @@ public: uiView_->SetHeight(height_); uiView_->SetVisible(visible_); uiView_->SetTouchable(touchable_); - ((UIButton*)uiView_)->Invalidate(); + (reinterpret_cast(uiView_))->Invalidate(); return true; } @@ -577,9 +579,9 @@ private: #if DEFAULT_ANIMATION class TestBtnAnimationListener : public UIView::OnClickListener { public: - TestBtnAnimationListener(UIView* uiView, bool enableAnimation) - : uiView_(uiView), - enableAnimation_(enableAnimation) {} + TestBtnAnimationListener(UIView* uiView, bool enableAnimation) : uiView_(uiView), enableAnimation_(enableAnimation) + { + } ~TestBtnAnimationListener() {} @@ -637,56 +639,63 @@ void UITestBUTTON::UIKit_Button_Test_002(UIScrollView* container, UIButton* butt UILabelButton* button8 = GetTestUIButton("隐藏", 430, 940, button); // 430: x-coordinate, 940: y-coordinate if (clickEnableVisiableListener_ == nullptr) { clickEnableVisiableListener_ = - static_cast(new TestBtnOnClickVisableListener((UIView*)button, false)); + static_cast( + new TestBtnOnClickVisableListener(reinterpret_cast(button), false)); } button8->SetOnClickListener(clickEnableVisiableListener_); UILabelButton* button9 = GetTestUIButton("显示", 430, 990, button); // 430: x-coordinate, 990: y-coordinate if (clickDisableVisiableListener_ == nullptr) { clickDisableVisiableListener_ = - static_cast(new TestBtnOnClickVisableListener((UIView*)button, true)); + static_cast( + new TestBtnOnClickVisableListener(reinterpret_cast(button), true)); } button9->SetOnClickListener(clickDisableVisiableListener_); UILabelButton* button10 = GetTestUIButton("可触摸 ", 520, 940, button); // 520: x-coordinate, 940: y-coordinate if (clickEnableTouchableListener_ == nullptr) { clickEnableTouchableListener_ = - static_cast(new TestBtnOnClickTouchableListener((UIView*)button, true)); + static_cast( + new TestBtnOnClickTouchableListener(reinterpret_cast(button), true)); } button10->SetOnClickListener(clickEnableTouchableListener_); UILabelButton* button11 = GetTestUIButton("不可触摸", 520, 990, button); // 520: x-coordinate, 990: y-coordinate if (clickDisableTouchableListener_ == nullptr) { clickDisableTouchableListener_ = - static_cast(new TestBtnOnClickTouchableListener((UIView*)button, false)); + static_cast( + new TestBtnOnClickTouchableListener(reinterpret_cast(button), false)); } button11->SetOnClickListener(clickDisableTouchableListener_); UILabelButton* button12 = GetTestUIButton("变白", 160, 1040, button); // 160: x-coordinate, 1040: y-coordinate if (clickColorToWhiteListener_ == nullptr) { clickColorToWhiteListener_ = static_cast( - new TestBtnOnClickChangeColorListener((UIView*)button, 0xFF, 0xFF, 0xFF)); + new TestBtnOnClickChangeColorListener(reinterpret_cast(button), 0xFF, 0xFF, 0xFF)); } button12->SetOnClickListener(clickColorToWhiteListener_); UILabelButton* button13 = GetTestUIButton("变红", 160, 1090, button); // 160: x-coordinate, 1090: y-coordinate if (clickColorToRedListener_ == nullptr) { clickColorToRedListener_ = - static_cast(new TestBtnOnClickChangeColorListener((UIView*)button, 0xFF, 0, 0)); + static_cast( + new TestBtnOnClickChangeColorListener(reinterpret_cast(button), 0xFF, 0, 0)); } button13->SetOnClickListener(clickColorToRedListener_); UILabelButton* button14 = GetTestUIButton("色彩还原", 250, 1040, button); // 250: x-coordinate, 1040: y-coordinate if (clickRevetColorListener_ == nullptr) { clickRevetColorListener_ = - static_cast(new TestBtnOnClickRevertColorListener((UIView*)button)); + static_cast( + new TestBtnOnClickRevertColorListener(reinterpret_cast(button))); } button14->SetOnClickListener(clickRevetColorListener_); UILabelButton* button15 = GetTestUIButton("全部还原", 250, 1090, button); // 250: x-coordinate, 1090: y-coordinate if (clickRevetToOriginListener_ == nullptr) { clickRevetToOriginListener_ = - static_cast(new TestBtnOnClickRevertToOriginStateListener((UIView*)button)); + static_cast( + new TestBtnOnClickRevertToOriginStateListener(reinterpret_cast(button))); } button15->SetOnClickListener(clickRevetToOriginListener_); @@ -703,14 +712,15 @@ void UITestBUTTON::UIKit_Button_Test_002(UIScrollView* container, UIButton* butt UILabelButton* button16 = GetTestUIButton("开启动效", 340, 1040, button); // 340: x-coordinate, 1040: y-coordinate if (enableAnimationListener_ == nullptr) { enableAnimationListener_ = - static_cast(new TestBtnAnimationListener((UIView*)button, true)); + static_cast( + new TestBtnAnimationListener(reinterpret_cast(button), true)); } button16->SetOnClickListener(enableAnimationListener_); UILabelButton* button17 = GetTestUIButton("关闭动效", 340, 1090, button); // 340: x-coordinate, 1090: y-coordinate if (disableAnimationListener_ == nullptr) { - disableAnimationListener_ = - static_cast(new TestBtnAnimationListener((UIView*)button, false)); + disableAnimationListener_ = static_cast( + new TestBtnAnimationListener(reinterpret_cast(button), false)); } button17->EnableButtonAnimation(false); button17->SetOnClickListener(disableAnimationListener_); @@ -749,7 +759,8 @@ void UITestBUTTON::UIKit_Button_Test_001() UILabelButton* button4 = GetTestUIButton("左移", 250, 940, button); // 250: x-coordinate, 940: y-coordinate if (clickLeftListener_ == nullptr) { clickLeftListener_ = static_cast(new TestBtnOnClickPositionChangeListener( - (UIView*)button, TestBtnOnClickPositionChangeListener::MoveType::MOVE_LEFT, CHANGE_SIZE)); + reinterpret_cast(button), + TestBtnOnClickPositionChangeListener::MoveType::MOVE_LEFT, CHANGE_SIZE)); } button4->SetOnClickListener(clickLeftListener_); @@ -757,7 +768,8 @@ void UITestBUTTON::UIKit_Button_Test_001() button5->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE); if (clickRightListener_ == nullptr) { clickRightListener_ = static_cast(new TestBtnOnClickPositionChangeListener( - (UIView*)button, TestBtnOnClickPositionChangeListener::MoveType::MOVE_RIGHT, CHANGE_SIZE)); + reinterpret_cast(button), + TestBtnOnClickPositionChangeListener::MoveType::MOVE_RIGHT, CHANGE_SIZE)); } button5->SetOnClickListener(clickRightListener_); @@ -765,14 +777,16 @@ void UITestBUTTON::UIKit_Button_Test_001() button6->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE); if (clickUpListener_ == nullptr) { clickUpListener_ = static_cast(new TestBtnOnClickPositionChangeListener( - (UIView*)button, TestBtnOnClickPositionChangeListener::MoveType::MOVE_TOP, CHANGE_SIZE)); + reinterpret_cast(button), + TestBtnOnClickPositionChangeListener::MoveType::MOVE_TOP, CHANGE_SIZE)); } button6->SetOnClickListener(clickUpListener_); UILabelButton* button7 = GetTestUIButton("下移", 340, 990, button); // 340: x-coordinate, 990: y-coordinate if (clickDownListener_ == nullptr) { clickDownListener_ = static_cast(new TestBtnOnClickPositionChangeListener( - (UIView*)button, TestBtnOnClickPositionChangeListener::MoveType::MOVE_BOTTOM, CHANGE_SIZE)); + reinterpret_cast(button), + TestBtnOnClickPositionChangeListener::MoveType::MOVE_BOTTOM, CHANGE_SIZE)); } button7->SetOnClickListener(clickDownListener_); diff --git a/test/uitest/test_chart/ui_test_chart_pillar.cpp b/test/uitest/test_chart/ui_test_chart_pillar.cpp index 17d76b5..053b56b 100644 --- a/test/uitest/test_chart/ui_test_chart_pillar.cpp +++ b/test/uitest/test_chart/ui_test_chart_pillar.cpp @@ -222,4 +222,4 @@ void UITestChartPillar::SetLastPos(UIView* view) lastX_ = view->GetX(); lastY_ = view->GetY() + view->GetHeight(); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_clip/ui_test_clip.cpp b/test/uitest/test_clip/ui_test_clip.cpp index 2a6e37d..ee1639b 100644 --- a/test/uitest/test_clip/ui_test_clip.cpp +++ b/test/uitest/test_clip/ui_test_clip.cpp @@ -106,7 +106,7 @@ bool UITestClip::OnClick(UIView& view, const ClickEvent& event) ClipImage(imageView2_, path); imageView2_->Invalidate(); } - + return true; } diff --git a/test/uitest/test_clip/ui_test_clip.h b/test/uitest/test_clip/ui_test_clip.h index 5f83848..4aa3739 100644 --- a/test/uitest/test_clip/ui_test_clip.h +++ b/test/uitest/test_clip/ui_test_clip.h @@ -69,4 +69,4 @@ private: UIScrollView* container_ = nullptr; }; } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/test/uitest/test_dialog/ui_test_dialog.cpp b/test/uitest/test_dialog/ui_test_dialog.cpp index d6e1a60..7419bb5 100644 --- a/test/uitest/test_dialog/ui_test_dialog.cpp +++ b/test/uitest/test_dialog/ui_test_dialog.cpp @@ -76,7 +76,7 @@ private: class TestUIDialogOnCancelListener : public UIView::OnClickListener { public: - TestUIDialogOnCancelListener(UILabel* label) + explicit TestUIDialogOnCancelListener(UILabel* label) { dialog_ = nullptr; label_ = label; @@ -490,4 +490,4 @@ bool UITestDialog::ClickExpand(UIView &view, const ClickEvent& event) return true; } } // namespace OHOS -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/test/uitest/test_dialog/ui_test_dialog.h b/test/uitest/test_dialog/ui_test_dialog.h index 7c4ec24..4450671 100644 --- a/test/uitest/test_dialog/ui_test_dialog.h +++ b/test/uitest/test_dialog/ui_test_dialog.h @@ -69,4 +69,4 @@ private: }; } // namespace OHOS #endif // UI_TEST_DIALOG_H -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/test/uitest/test_focus_manager/ui_test_focus_manager.cpp b/test/uitest/test_focus_manager/ui_test_focus_manager.cpp index 51c4d28..752ebf1 100644 --- a/test/uitest/test_focus_manager/ui_test_focus_manager.cpp +++ b/test/uitest/test_focus_manager/ui_test_focus_manager.cpp @@ -394,4 +394,4 @@ UILabelButton* UITestFocusManager::SetUpButton(const char* title, int16_t x, int return btn; } } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/test/uitest/test_focus_manager/ui_test_focus_manager.h b/test/uitest/test_focus_manager/ui_test_focus_manager.h index 2362ffa..422846e 100644 --- a/test/uitest/test_focus_manager/ui_test_focus_manager.h +++ b/test/uitest/test_focus_manager/ui_test_focus_manager.h @@ -55,4 +55,4 @@ private: }; } // namespace OHOS #endif -#endif // UI_TEST_FOCUS_MANAGER_H \ No newline at end of file +#endif // UI_TEST_FOCUS_MANAGER_H diff --git a/test/uitest/test_font/ui_test_font.h b/test/uitest/test_font/ui_test_font.h index a5435ef..12bdf57 100644 --- a/test/uitest/test_font/ui_test_font.h +++ b/test/uitest/test_font/ui_test_font.h @@ -110,6 +110,7 @@ public: */ void UIKitFontMultiLanguage002(); #endif // ENABLE_MULTI_FONT + private: UIScrollView* container_ = nullptr; void InnerTestTitle(const char* title); diff --git a/test/uitest/test_image/ui_test_image.h b/test/uitest/test_image/ui_test_image.h index d8f15fb..29b36ab 100644 --- a/test/uitest/test_image/ui_test_image.h +++ b/test/uitest/test_image/ui_test_image.h @@ -32,6 +32,7 @@ class UITestImage : public UITest, public OHOS::UIView::OnClickListener { #else class UITestImage : public UITest { #endif + public: UITestImage() {} ~UITestImage() {} @@ -57,6 +58,7 @@ public: #endif void UIKit_UIImage_Test_Uncompress_001(); void UIKit_UIImage_Test_Resize_001(); + private: const char* GetCharByImageSrcType(ImageSrcType srcType) const; #if (ENABLE_GIF == 1) @@ -74,6 +76,7 @@ private: UILabelButton* gifToBin03_ = nullptr; UILabelButton* gifToBin04_ = nullptr; #endif + private: UILabel* AddLable(int16_t x, int16_t y, const char* data); UIImageView* AddImageView(const Rect rect, const char* src, bool autoEnable, UIImageView::ImageResizeMode mode); diff --git a/test/uitest/test_image_animator/ui_test_image_animator.h b/test/uitest/test_image_animator/ui_test_image_animator.h index c831dd6..99af376 100644 --- a/test/uitest/test_image_animator/ui_test_image_animator.h +++ b/test/uitest/test_image_animator/ui_test_image_animator.h @@ -50,6 +50,7 @@ public: label_->SetVisible(true); label_->Invalidate(); } + private: UILabel* label_ = nullptr; UIViewGroup* viewGroup_ = nullptr; diff --git a/test/uitest/test_label/ui_test_label.cpp b/test/uitest/test_label/ui_test_label.cpp index 6d30b35..6189b1d 100644 --- a/test/uitest/test_label/ui_test_label.cpp +++ b/test/uitest/test_label/ui_test_label.cpp @@ -277,4 +277,4 @@ void UITestLabel::ExpandClick(UIView& view, const ClickEvent& event) const uiLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_layout/ui_auto_test_basic_layout.cpp b/test/uitest/test_layout/ui_auto_test_basic_layout.cpp index 4822de6..54e298d 100644 --- a/test/uitest/test_layout/ui_auto_test_basic_layout.cpp +++ b/test/uitest/test_layout/ui_auto_test_basic_layout.cpp @@ -189,4 +189,4 @@ void UIAutoTestBasicLayout::UIKitBasicLayoutTestBottomToSibling001() const const char* fileName = "ui_test_basic_layout_bottom_to_sibling_001.bmp"; CompareByBinary(fileName); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_layout/ui_auto_test_basic_layout.h b/test/uitest/test_layout/ui_auto_test_basic_layout.h index 8299e75..2184bc9 100644 --- a/test/uitest/test_layout/ui_auto_test_basic_layout.h +++ b/test/uitest/test_layout/ui_auto_test_basic_layout.h @@ -46,4 +46,4 @@ public: void UIKitBasicLayoutTestBottomToSibling001() const; }; } // namespace OHOS -#endif // UI_AUTO_TEST_BASIC_LAYOUT_H \ No newline at end of file +#endif // UI_AUTO_TEST_BASIC_LAYOUT_H diff --git a/test/uitest/test_layout/ui_test_advanced_layout.cpp b/test/uitest/test_layout/ui_test_advanced_layout.cpp index 08dc683..a9b29e1 100644 --- a/test/uitest/test_layout/ui_test_advanced_layout.cpp +++ b/test/uitest/test_layout/ui_test_advanced_layout.cpp @@ -285,4 +285,4 @@ bool UITestAdvancedLayout::OnClick(UIView& view, const ClickEvent& event) } return true; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_layout/ui_test_advanced_layout.h b/test/uitest/test_layout/ui_test_advanced_layout.h index 0114c6f..b080999 100644 --- a/test/uitest/test_layout/ui_test_advanced_layout.h +++ b/test/uitest/test_layout/ui_test_advanced_layout.h @@ -43,6 +43,7 @@ public: bool OnClick(UIView& view, const ClickEvent& event) override; void OnClickButton(const UIView& view); + private: UIScrollView* container_ = nullptr; GridLayout* flexController_ = nullptr; diff --git a/test/uitest/test_layout/ui_test_basic_layout.cpp b/test/uitest/test_layout/ui_test_basic_layout.cpp index 86f83aa..3d1bd52 100644 --- a/test/uitest/test_layout/ui_test_basic_layout.cpp +++ b/test/uitest/test_layout/ui_test_basic_layout.cpp @@ -246,4 +246,4 @@ bool UITestBasicLayout::OnClick(UIView& view, const ClickEvent& event) uiViewGroupFrame_->Invalidate(); return true; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_layout/ui_test_basic_layout.h b/test/uitest/test_layout/ui_test_basic_layout.h index c72f976..e6a7ea7 100644 --- a/test/uitest/test_layout/ui_test_basic_layout.h +++ b/test/uitest/test_layout/ui_test_basic_layout.h @@ -62,6 +62,7 @@ public: bool OnClick(UIView& view, const ClickEvent& event) override; void OnClickButton(UIView& view); void InitSetUpButton(); + private: UIScrollView* container_ = nullptr; GridLayout* layout_ = nullptr; diff --git a/test/uitest/test_progress_bar/ui_test_circle_progress.cpp b/test/uitest/test_progress_bar/ui_test_circle_progress.cpp index f4192c1..b00da8f 100644 --- a/test/uitest/test_progress_bar/ui_test_circle_progress.cpp +++ b/test/uitest/test_progress_bar/ui_test_circle_progress.cpp @@ -470,4 +470,4 @@ bool UITestCircleProgress::OnClick(UIView& view, const ClickEvent& event) container_->Invalidate(); return true; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_qrcode/ui_test_qrcode.h b/test/uitest/test_qrcode/ui_test_qrcode.h index d9d89b9..eecb7a0 100644 --- a/test/uitest/test_qrcode/ui_test_qrcode.h +++ b/test/uitest/test_qrcode/ui_test_qrcode.h @@ -45,4 +45,4 @@ private: UIViewGroup* CreateTestCaseGroup(const char* title) const; }; } // namespace OHOS -#endif // UI_TEST_QRCODE_H \ No newline at end of file +#endif // UI_TEST_QRCODE_H diff --git a/test/uitest/test_render/ui_auto_test_render.cpp b/test/uitest/test_render/ui_auto_test_render.cpp index 8f4b38a..5c02aac 100644 --- a/test/uitest/test_render/ui_auto_test_render.cpp +++ b/test/uitest/test_render/ui_auto_test_render.cpp @@ -38,7 +38,7 @@ void UIAutoTestRender::UIKitRenderTestRender001() const void UIAutoTestRender::UIKitRenderTestRenderMeasure001() const { - ClickViewById(UI_TEST_RENDER_UPDATA_BUTTON_ID_01); + ClickViewById(UI_TEST_RENDER_UPDATA_BUTTON_ID_01); const char* fileName = "ui_test_render_measure_001.bmp"; CompareByBinary(fileName); } diff --git a/test/uitest/test_render/ui_auto_test_render.h b/test/uitest/test_render/ui_auto_test_render.h index 2feb97d..6886732 100644 --- a/test/uitest/test_render/ui_auto_test_render.h +++ b/test/uitest/test_render/ui_auto_test_render.h @@ -31,4 +31,4 @@ public: void UIKitRenderTestRenderMeasure001() const; }; } // namespace OHOS -#endif // GRAPHIC_LITE_UI_AUTO_TEST_RENDER_H \ No newline at end of file +#endif // GRAPHIC_LITE_UI_AUTO_TEST_RENDER_H diff --git a/test/uitest/test_screenshot/ui_test_screenshot.cpp b/test/uitest/test_screenshot/ui_test_screenshot.cpp index d681773..1cccb03 100644 --- a/test/uitest/test_screenshot/ui_test_screenshot.cpp +++ b/test/uitest/test_screenshot/ui_test_screenshot.cpp @@ -52,7 +52,7 @@ const UIView* UITestScreenshot::GetTestView() class TestScreenshotOnClickListener : public UIView::OnClickListener { public: - TestScreenshotOnClickListener(UIView* uiView) : uiView_(uiView) {} + explicit TestScreenshotOnClickListener(UIView* uiView) : uiView_(uiView) {} ~TestScreenshotOnClickListener() {} bool OnClick(UIView& view, const ClickEvent& event) override { @@ -67,7 +67,7 @@ private: class TestSetScreenshotOnClickListener : public UIView::OnClickListener { public: - TestSetScreenshotOnClickListener(UIView* uiView) : uiView_(uiView) {} + explicit TestSetScreenshotOnClickListener(UIView* uiView) : uiView_(uiView) {} ~TestSetScreenshotOnClickListener() {} bool OnClick(UIView& view, const ClickEvent& event) override { @@ -100,7 +100,7 @@ void UITestScreenshot::UIKit_SCREENSHOT_TEST_001() labelButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, BUTTON_LABEL_SIZE); if (clickLeftListener_ == nullptr) { clickLeftListener_ = static_cast( - new TestScreenshotOnClickListener((UIView*)labelButton)); + new TestScreenshotOnClickListener(reinterpret_cast(labelButton))); } labelButton->SetOnClickListener(clickLeftListener_); UILabel* label2 = GetTitleLabel("显示截屏图片 "); @@ -132,4 +132,4 @@ void UITestScreenshot::UIKit_SCREENSHOT_TEST_001() labelButton2->SetOnClickListener(clickRightListener_); } } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/test/uitest/test_screenshot/ui_test_screenshot.h b/test/uitest/test_screenshot/ui_test_screenshot.h index b254d2e..e29f7eb 100644 --- a/test/uitest/test_screenshot/ui_test_screenshot.h +++ b/test/uitest/test_screenshot/ui_test_screenshot.h @@ -58,4 +58,4 @@ private: }; // namespace OHOS } #endif // ENABLE_DEBUG -#endif // UI_TEST_SCREENSHOT_H \ No newline at end of file +#endif // UI_TEST_SCREENSHOT_H diff --git a/test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp b/test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp index 5b89890..cfbbcbb 100644 --- a/test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp +++ b/test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp @@ -270,4 +270,4 @@ bool UITestTextureMapper::ExpandClick(UIView& view, const ClickEvent& event) } return true; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_texture_mapper/ui_test_texture_mapper.h b/test/uitest/test_texture_mapper/ui_test_texture_mapper.h index bf0c62e..3ec13b0 100644 --- a/test/uitest/test_texture_mapper/ui_test_texture_mapper.h +++ b/test/uitest/test_texture_mapper/ui_test_texture_mapper.h @@ -53,6 +53,7 @@ public: label_.SetVisible(true); label_.Invalidate(); } + private: UILabel label_; UIViewGroup* viewGroup_ = nullptr; @@ -61,7 +62,7 @@ private: class UITestTextureMapper : public UITest, public UIView::OnClickListener { public: UITestTextureMapper() {} - ~UITestTextureMapper() {}; + ~UITestTextureMapper() {} void SetUp() override; void TearDown() override; const UIView* GetTestView() override; diff --git a/test/uitest/test_transform/ui_test_transform.cpp b/test/uitest/test_transform/ui_test_transform.cpp index 9cab2f6..3922b9b 100644 --- a/test/uitest/test_transform/ui_test_transform.cpp +++ b/test/uitest/test_transform/ui_test_transform.cpp @@ -306,4 +306,4 @@ void UITestRadioButton::SetListener(UICheckBox::OnChangeListener* listener) } listener_ = listener; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_transform/ui_test_transform.h b/test/uitest/test_transform/ui_test_transform.h index d342a9b..ac4f647 100644 --- a/test/uitest/test_transform/ui_test_transform.h +++ b/test/uitest/test_transform/ui_test_transform.h @@ -53,6 +53,7 @@ public: void UIKit_Transform_Test_Translate_003(); void SetScaleMode(ImageScaleMode mode); + private: void AddRadioGroup(); UILabel* AddLable(int16_t x, int16_t y, const char* data); diff --git a/test/uitest/test_ui_analog_clock/ui_test_analog_clock.cpp b/test/uitest/test_ui_analog_clock/ui_test_analog_clock.cpp index eb47453..e505834 100644 --- a/test/uitest/test_ui_analog_clock/ui_test_analog_clock.cpp +++ b/test/uitest/test_ui_analog_clock/ui_test_analog_clock.cpp @@ -378,4 +378,4 @@ void UITestAnalogClock::CreateButtons002(UIViewGroup* group, UIImageView* curFac } button5->SetOnClickListener(clickMoveBottomListener1_); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_ui_analog_clock/ui_test_analog_clock.h b/test/uitest/test_ui_analog_clock/ui_test_analog_clock.h index 248f58a..9f43405 100644 --- a/test/uitest/test_ui_analog_clock/ui_test_analog_clock.h +++ b/test/uitest/test_ui_analog_clock/ui_test_analog_clock.h @@ -26,7 +26,7 @@ namespace OHOS { class ClockAnimatorCallback : public AnimatorCallback { public: explicit ClockAnimatorCallback(UIAnalogClock* clock) : clock_(clock) {} - ~ClockAnimatorCallback() {}; + ~ClockAnimatorCallback() {} virtual void Callback(UIView* view) { count_++; diff --git a/test/uitest/test_ui_list/ui_test_ui_list.cpp b/test/uitest/test_ui_list/ui_test_ui_list.cpp index b017b2a..00b13f0 100644 --- a/test/uitest/test_ui_list/ui_test_ui_list.cpp +++ b/test/uitest/test_ui_list/ui_test_ui_list.cpp @@ -492,4 +492,4 @@ void UITestUIList::SetLastPos(UIView* view) lastX_ = view->GetX(); lastY_ = view->GetY() + view->GetHeight(); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_vector_font/ui_test_vector_font.h b/test/uitest/test_vector_font/ui_test_vector_font.h index fc40611..cc60588 100644 --- a/test/uitest/test_vector_font/ui_test_vector_font.h +++ b/test/uitest/test_vector_font/ui_test_vector_font.h @@ -73,6 +73,7 @@ public: */ void Font_FontEngine_MultiLanguage_Test_RO_Lang_001(); #endif + private: UIScrollView* container_ = nullptr; void InnerTestTitle(const char* title); diff --git a/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp b/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp index 3a1f4f6..751e55b 100644 --- a/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp +++ b/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp @@ -210,4 +210,4 @@ void UITestViewScaleRotate::UIKit_View_Scale_Rotate_Test_Group_007() button->SetText("test ViewGroup"); group1_->Add(button); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.h b/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.h index 4ec5a91..4d4963f 100644 --- a/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.h +++ b/test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.h @@ -51,6 +51,7 @@ public: void UIKit_View_Scale_Rotate_Test_UICircleProgress_005(); void UIKit_View_Scale_Rotate_Test_UIDigitalClock_006(); void UIKit_View_Scale_Rotate_Test_Group_007(); + private: const int16_t GROUP_WIDHT = 454; const int16_t GROUP_HEIGHT = 300; diff --git a/test/unittest/animator/animator_unit_test.cpp b/test/unittest/animator/animator_unit_test.cpp index 32e9f0c..9781c85 100644 --- a/test/unittest/animator/animator_unit_test.cpp +++ b/test/unittest/animator/animator_unit_test.cpp @@ -226,4 +226,4 @@ HWTEST_F(AnimatorTest, AnimatorManagerAddAndRemove_001, TestSize.Level0) delete callback; delete view; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/animator/interpolation_unit_test.cpp b/test/unittest/animator/interpolation_unit_test.cpp index 8d5ee31..8bb61bc 100644 --- a/test/unittest/animator/interpolation_unit_test.cpp +++ b/test/unittest/animator/interpolation_unit_test.cpp @@ -68,4 +68,4 @@ HWTEST_F(InterpolationTest, GetBezierY_001, TestSize.Level0) ret = Interpolation::GetBezierY(0.9f, U1, U2, U3, U4); // 0.9f:current change rate; EXPECT_NEAR(0.949, ret, PRECISION); // 0.949:current change rate; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/common/focus_manager_unit_test.cpp b/test/unittest/common/focus_manager_unit_test.cpp index cdf19ef..d480671 100644 --- a/test/unittest/common/focus_manager_unit_test.cpp +++ b/test/unittest/common/focus_manager_unit_test.cpp @@ -143,4 +143,4 @@ HWTEST_F(FocusManagerTest, RequestFocusByDirection_001, TestSize.Level0) EXPECT_EQ(focusedView, label1_); } } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/test/unittest/common/hardware_acceleration_unit_test.cpp b/test/unittest/common/hardware_acceleration_unit_test.cpp index d5037d6..9f582cd 100644 --- a/test/unittest/common/hardware_acceleration_unit_test.cpp +++ b/test/unittest/common/hardware_acceleration_unit_test.cpp @@ -288,4 +288,4 @@ HWTEST_F(HardwareAccelerationTest, HardwareTransform_002, TestSize.Level1) Window::DestoryWindow(rootView->GetBoundWindow()); } #endif -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/common/screen_unit_test.cpp b/test/unittest/common/screen_unit_test.cpp index e3a90e0..933876c 100644 --- a/test/unittest/common/screen_unit_test.cpp +++ b/test/unittest/common/screen_unit_test.cpp @@ -47,4 +47,4 @@ HWTEST_F(ScreenTest, ScreenGetHeight_001, TestSize.Level1) { EXPECT_EQ(Screen::GetInstance().GetHeight(), VERTICAL_RESOLUTION); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/common/text_unit_test.cpp b/test/unittest/common/text_unit_test.cpp index 606433c..9ccbfde 100644 --- a/test/unittest/common/text_unit_test.cpp +++ b/test/unittest/common/text_unit_test.cpp @@ -119,4 +119,4 @@ HWTEST_F(TextTest, TextSetExpand_001, TestSize.Level1) text_->SetExpandHeight(true); EXPECT_EQ(text_->IsExpandHeight(), true); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_arc_label_unit_test.cpp b/test/unittest/components/ui_arc_label_unit_test.cpp index 51fbb10..77df814 100644 --- a/test/unittest/components/ui_arc_label_unit_test.cpp +++ b/test/unittest/components/ui_arc_label_unit_test.cpp @@ -214,4 +214,4 @@ HWTEST_F(UIArcLabelTest, UIArcLabelGetDirect_001, TestSize.Level1) } EXPECT_EQ(arcLabel_->GetDirect(), UITextLanguageDirect(0)); } -} \ No newline at end of file +} diff --git a/test/unittest/components/ui_axis_unit_test.cpp b/test/unittest/components/ui_axis_unit_test.cpp index f69996b..cb62d55 100644 --- a/test/unittest/components/ui_axis_unit_test.cpp +++ b/test/unittest/components/ui_axis_unit_test.cpp @@ -146,4 +146,4 @@ HWTEST_F(UIAxisTest, UIYAxisSetDataRange_002, TestSize.Level1) } EXPECT_EQ(axisY_->SetDataRange(LARGER_VALUE, SMALLER_VALUE), false); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_box_progress_unit_test.cpp b/test/unittest/components/ui_box_progress_unit_test.cpp index 1a66316..c701cbc 100644 --- a/test/unittest/components/ui_box_progress_unit_test.cpp +++ b/test/unittest/components/ui_box_progress_unit_test.cpp @@ -198,4 +198,4 @@ HWTEST_F(UIBoxProgressTest, UIBoxProgressSetHeight_001, TestSize.Level1) EXPECT_EQ(boxProgress_->GetHeight(), HEIGHT); EXPECT_EQ(boxProgress_->GetValidHeight(), HEIGHT); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_button_unit_test.cpp b/test/unittest/components/ui_button_unit_test.cpp index 801d141..85893db 100644 --- a/test/unittest/components/ui_button_unit_test.cpp +++ b/test/unittest/components/ui_button_unit_test.cpp @@ -337,4 +337,4 @@ HWTEST_F(UIButtonTest, UIButtonSetStateForStyle_001, TestSize.Level1) button_->SetStateForStyle(UIButton::ButtonState::PRESSED); EXPECT_EQ(button_->GetStyle(STYLE_BACKGROUND_COLOR), Color::Green().full); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_chart_unit_test.cpp b/test/unittest/components/ui_chart_unit_test.cpp index de76ef4..b0e9d39 100644 --- a/test/unittest/components/ui_chart_unit_test.cpp +++ b/test/unittest/components/ui_chart_unit_test.cpp @@ -488,4 +488,4 @@ HWTEST_F(UIChartDataSerialTest, UIChartClearDataSerial_001, TestSize.Level1) ret = chart_->DeleteDataSerial(chartDataSerial_); EXPECT_EQ(ret, false); } -} \ No newline at end of file +} diff --git a/test/unittest/components/ui_checkbox_unit_test.cpp b/test/unittest/components/ui_checkbox_unit_test.cpp index 4e664e8..bc6b586 100644 --- a/test/unittest/components/ui_checkbox_unit_test.cpp +++ b/test/unittest/components/ui_checkbox_unit_test.cpp @@ -94,4 +94,4 @@ HWTEST_F(UICheckBoxTest, UICheckBoxSetState_001, TestSize.Level0) checkBox_->SetState(UICheckBox::UICheckBoxState::UNSELECTED); EXPECT_EQ(checkBox_->GetState(), UICheckBox::UICheckBoxState::UNSELECTED); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_circle_progress_unit_test.cpp b/test/unittest/components/ui_circle_progress_unit_test.cpp index 5472558..a9184bd 100644 --- a/test/unittest/components/ui_circle_progress_unit_test.cpp +++ b/test/unittest/components/ui_circle_progress_unit_test.cpp @@ -142,4 +142,4 @@ HWTEST_F(UICircleProgressTest, UICircleProgressSetStartAngle_001, TestSize.Level circleProgress_->SetEndAngle(endAngle); EXPECT_EQ(circleProgress_->GetEndAngle(), endAngle); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_dialog_unit_test.cpp b/test/unittest/components/ui_dialog_unit_test.cpp index d894d3f..9958a5a 100644 --- a/test/unittest/components/ui_dialog_unit_test.cpp +++ b/test/unittest/components/ui_dialog_unit_test.cpp @@ -225,4 +225,4 @@ HWTEST_F(UIDialogTest, UIDialog_001, TestSize.Level0) } } // namespace OHOS #endif // ENABLE_DEBUG -#endif // ENABLE_WINDOW \ No newline at end of file +#endif // ENABLE_WINDOW diff --git a/test/unittest/components/ui_digital_clock_unit_test.cpp b/test/unittest/components/ui_digital_clock_unit_test.cpp index 4765a03..c60503f 100644 --- a/test/unittest/components/ui_digital_clock_unit_test.cpp +++ b/test/unittest/components/ui_digital_clock_unit_test.cpp @@ -174,4 +174,4 @@ HWTEST_F(UIDigitalClockTest, UIDigitalClockSetTime12Hour_002, TestSize.Level1) EXPECT_EQ(digitalClock_->GetCurrentMinute(), CURRENT_MINUTE); EXPECT_EQ(digitalClock_->GetCurrentSecond(), CURRENT_SECOND); } -} \ No newline at end of file +} diff --git a/test/unittest/components/ui_image_unit_test.cpp b/test/unittest/components/ui_image_unit_test.cpp index c4b15d0..1aa57bc 100644 --- a/test/unittest/components/ui_image_unit_test.cpp +++ b/test/unittest/components/ui_image_unit_test.cpp @@ -479,4 +479,4 @@ HWTEST_F(UIImageViewTest, UIImageViewSetTransformAlgorithm_001, TestSize.Level0) imageView_->SetTransformAlgorithm(algorithm); EXPECT_EQ(imageView_->GetTransformAlgorithm(), algorithm); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_label_button_unit_test.cpp b/test/unittest/components/ui_label_button_unit_test.cpp index 753a2fd..f7b8017 100644 --- a/test/unittest/components/ui_label_button_unit_test.cpp +++ b/test/unittest/components/ui_label_button_unit_test.cpp @@ -204,4 +204,4 @@ HWTEST_F(UILabelButtonTest, UILabelButtonSetFontId_001, TestSize.Level0) EXPECT_EQ(labelBtn_->GetFontId(), 0); } } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_label_unit_test.cpp b/test/unittest/components/ui_label_unit_test.cpp index 6c9e777..4a9ad32 100644 --- a/test/unittest/components/ui_label_unit_test.cpp +++ b/test/unittest/components/ui_label_unit_test.cpp @@ -224,4 +224,4 @@ HWTEST_F(UILabelTest, UILabelSetFont_001, TestSize.Level1) EXPECT_EQ(label_->GetFontId(), fontId); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_list_unit_test.cpp b/test/unittest/components/ui_list_unit_test.cpp index 6a5f3d6..b29a182 100644 --- a/test/unittest/components/ui_list_unit_test.cpp +++ b/test/unittest/components/ui_list_unit_test.cpp @@ -174,4 +174,4 @@ HWTEST_F(UIListTest, UIListSetAutoAlignTime_001, TestSize.Level1) list_->SetAutoAlignTime(alignTime); EXPECT_EQ(alignTime, list_->GetAutoAlignTime()); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_radio_button_unit_test.cpp b/test/unittest/components/ui_radio_button_unit_test.cpp index 8b86787..b1a43f3 100644 --- a/test/unittest/components/ui_radio_button_unit_test.cpp +++ b/test/unittest/components/ui_radio_button_unit_test.cpp @@ -140,4 +140,4 @@ HWTEST_F(UIRadioButtonTest, UIRadioButtonSetName_001, TestSize.Level0) delete radioBtn4; delete radioBtn5; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_repeat_button_unit_test.cpp b/test/unittest/components/ui_repeat_button_unit_test.cpp index fb2f18d..caee784 100644 --- a/test/unittest/components/ui_repeat_button_unit_test.cpp +++ b/test/unittest/components/ui_repeat_button_unit_test.cpp @@ -75,4 +75,4 @@ HWTEST_F(UIRepeatButtonTest, UIRepeatButtonSetInterval_001, TestSize.Level0) repeatBtn_->SetInterval(interval); EXPECT_EQ(repeatBtn_->GetInterval(), interval); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_slider_unit_test.cpp b/test/unittest/components/ui_slider_unit_test.cpp index c95d1b6..6bd9f20 100644 --- a/test/unittest/components/ui_slider_unit_test.cpp +++ b/test/unittest/components/ui_slider_unit_test.cpp @@ -91,4 +91,4 @@ HWTEST_F(UISliderTest, UISliderSetKnobStyle_001, TestSize.Level0) slider_->SetKnobStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full); EXPECT_EQ(slider_->GetKnobStyle().bgColor_.full, Color::Gray().full); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_surface_view_unit_test.cpp b/test/unittest/components/ui_surface_view_unit_test.cpp index 7f9da96..fa0cfed 100644 --- a/test/unittest/components/ui_surface_view_unit_test.cpp +++ b/test/unittest/components/ui_surface_view_unit_test.cpp @@ -180,4 +180,4 @@ HWTEST_F(UISurfaceViewTest, UISurfaceViewSetVisible_001, TestSize.Level1) surface_->SetVisible(!visible); EXPECT_EQ(surface_->IsVisible(), !visible); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_swipe_view_unit_test.cpp b/test/unittest/components/ui_swipe_view_unit_test.cpp index d5e0561..05d68ef 100644 --- a/test/unittest/components/ui_swipe_view_unit_test.cpp +++ b/test/unittest/components/ui_swipe_view_unit_test.cpp @@ -313,4 +313,4 @@ HWTEST_F(UISwipeViewTest, Graphic_UISwipeView_Test_SetAlignMode_001, TestSize.Le swipeView_->SetAlignMode(UISwipeView::ALIGN_LEFT); EXPECT_EQ(swipeView_->GetAlignMode(), UISwipeView::ALIGN_LEFT); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_time_picker_unit_test.cpp b/test/unittest/components/ui_time_picker_unit_test.cpp index f13a28b..df41599 100644 --- a/test/unittest/components/ui_time_picker_unit_test.cpp +++ b/test/unittest/components/ui_time_picker_unit_test.cpp @@ -92,4 +92,4 @@ HWTEST_F(UITimePickerTest, UITimePickerSetHeight_001, TestSize.Level0) timePicker_->SetHeight(height); EXPECT_EQ(timePicker_->GetHeight(), height); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_toggle_button_unit_test.cpp b/test/unittest/components/ui_toggle_button_unit_test.cpp index 76dc156..190f7ec 100644 --- a/test/unittest/components/ui_toggle_button_unit_test.cpp +++ b/test/unittest/components/ui_toggle_button_unit_test.cpp @@ -77,4 +77,4 @@ HWTEST_F(UIToggleButtonTest, UIToggleButtonSetState_001, TestSize.Level0) toggleBtn_->SetState(false); EXPECT_EQ(toggleBtn_->GetState(), false); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_video_unit_test.cpp b/test/unittest/components/ui_video_unit_test.cpp index d0c03d7..8955c77 100644 --- a/test/unittest/components/ui_video_unit_test.cpp +++ b/test/unittest/components/ui_video_unit_test.cpp @@ -454,4 +454,4 @@ HWTEST_F(UIVideoTest, UIVideoReset_001, TestSize.Level0) delete video_; video_ = nullptr; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/components/ui_view_group_unit_test.cpp b/test/unittest/components/ui_view_group_unit_test.cpp index edda3c4..e3e0357 100644 --- a/test/unittest/components/ui_view_group_unit_test.cpp +++ b/test/unittest/components/ui_view_group_unit_test.cpp @@ -158,4 +158,4 @@ HWTEST_F(UIViewGroupTest, UIViewGroupGetViewType_001, TestSize.Level1) } EXPECT_EQ(viewGroup_->GetViewType(), UI_VIEW_GROUP); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/dfx/event_injector_unit_test.cpp b/test/unittest/dfx/event_injector_unit_test.cpp index 36fdd62..5e7165a 100644 --- a/test/unittest/dfx/event_injector_unit_test.cpp +++ b/test/unittest/dfx/event_injector_unit_test.cpp @@ -433,4 +433,4 @@ HWTEST_F(EventInjectorTest, Graphic_EventInjectorTest_Test_UnregisterEventInject EXPECT_EQ(UNREGISTER_KEY_FLAG, FLAG1); } } // namespace OHOS -#endif // ENABLE_DEBUG \ No newline at end of file +#endif // ENABLE_DEBUG diff --git a/test/unittest/dfx/view_bounds_unit_test.cpp b/test/unittest/dfx/view_bounds_unit_test.cpp index b348fe1..d1167f4 100644 --- a/test/unittest/dfx/view_bounds_unit_test.cpp +++ b/test/unittest/dfx/view_bounds_unit_test.cpp @@ -240,4 +240,4 @@ HWTEST_F(ViewBoundsTest, ViewBoundsOnPostDraw002, TestSize.Level0) } #endif // ENABLE_WINDOW } // namespace OHOS -#endif // ENABLE_DEBUG \ No newline at end of file +#endif // ENABLE_DEBUG diff --git a/test/unittest/events/event_unit_test.cpp b/test/unittest/events/event_unit_test.cpp index fd26911..2698d41 100644 --- a/test/unittest/events/event_unit_test.cpp +++ b/test/unittest/events/event_unit_test.cpp @@ -79,4 +79,4 @@ HWTEST_F(EventTest, EventSetTimeStamp_001, TestSize.Level0) event_->SetTimeStamp(TIME_STAMP); EXPECT_EQ(event_->GetTimeStamp(), TIME_STAMP); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/events/key_event_unit_test.cpp b/test/unittest/events/key_event_unit_test.cpp index 085f98a..2f79cc8 100644 --- a/test/unittest/events/key_event_unit_test.cpp +++ b/test/unittest/events/key_event_unit_test.cpp @@ -78,4 +78,4 @@ HWTEST_F(KeyEventTest, KeyEventGetState_001, TestSize.Level0) } EXPECT_EQ(keyEvent_->GetState(), STATE); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/events/press_event_unit_test.cpp b/test/unittest/events/press_event_unit_test.cpp index 036ec47..9477690 100644 --- a/test/unittest/events/press_event_unit_test.cpp +++ b/test/unittest/events/press_event_unit_test.cpp @@ -62,4 +62,4 @@ HWTEST_F(PressEventTest, PressEventConstructor_001, TestSize.Level0) EXPECT_EQ(pressEvent_->GetCurrentPos().x, INIT_POS.x); EXPECT_EQ(pressEvent_->GetCurrentPos().y, INIT_POS.y); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/events/release_event_unit_test.cpp b/test/unittest/events/release_event_unit_test.cpp index 2b4875e..2880853 100644 --- a/test/unittest/events/release_event_unit_test.cpp +++ b/test/unittest/events/release_event_unit_test.cpp @@ -58,4 +58,4 @@ HWTEST_F(ReleaseEventTest, ReleaseEventConstructor_001, TestSize.Level0) EXPECT_EQ(releaseEvent_->GetCurrentPos().x, INIT_POS.x); EXPECT_EQ(releaseEvent_->GetCurrentPos().y, INIT_POS.y); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/events/virtual_device_event_unit_test.cpp b/test/unittest/events/virtual_device_event_unit_test.cpp index f1560af..4c9692a 100644 --- a/test/unittest/events/virtual_device_event_unit_test.cpp +++ b/test/unittest/events/virtual_device_event_unit_test.cpp @@ -77,4 +77,4 @@ HWTEST_F(VirtualDeviceEventTest, VirtualDeviceEventConstructor_002, TestSize.Lev } EXPECT_EQ(virtualDeviceEvent_->GetState(), VALUE); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/font/ui_font_unit_test.cpp b/test/unittest/font/ui_font_unit_test.cpp index 2ffe23c..67023f6 100644 --- a/test/unittest/font/ui_font_unit_test.cpp +++ b/test/unittest/font/ui_font_unit_test.cpp @@ -309,4 +309,4 @@ HWTEST_F(UIFontTest, Graphic_Font_Test_UnregisterFontInfo_002, TestSize.Level0) uint8_t ret = UIFont::GetInstance()->UnregisterFontInfo(fontsTable, 0); EXPECT_EQ(ret, 0); } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/layout/flex_layout_unit_test.cpp b/test/unittest/layout/flex_layout_unit_test.cpp index 1929b2c..8d94b6a 100644 --- a/test/unittest/layout/flex_layout_unit_test.cpp +++ b/test/unittest/layout/flex_layout_unit_test.cpp @@ -418,4 +418,4 @@ HWTEST_F(FlexLayoutTest, FlexLayout_010, TestSize.Level1) delete view3; delete view4; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/layout/grid_layout_unit_test.cpp b/test/unittest/layout/grid_layout_unit_test.cpp index 5208400..7857dfc 100644 --- a/test/unittest/layout/grid_layout_unit_test.cpp +++ b/test/unittest/layout/grid_layout_unit_test.cpp @@ -222,4 +222,4 @@ HWTEST_F(GridLayoutTest, GridLayout_004, TestSize.Level1) delete view3; delete view4; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/layout/list_layout_unit_test.cpp b/test/unittest/layout/list_layout_unit_test.cpp index 2b4420d..d9ae14e 100644 --- a/test/unittest/layout/list_layout_unit_test.cpp +++ b/test/unittest/layout/list_layout_unit_test.cpp @@ -131,4 +131,4 @@ HWTEST_F(ListLayoutTest, ListLayout_002, TestSize.Level1) delete view1; delete view2; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/test/unittest/rotate/ui_rotate_input_unit_test.cpp b/test/unittest/rotate/ui_rotate_input_unit_test.cpp index 783fd2b..40d0c31 100644 --- a/test/unittest/rotate/ui_rotate_input_unit_test.cpp +++ b/test/unittest/rotate/ui_rotate_input_unit_test.cpp @@ -30,8 +30,8 @@ public: UIRotateInputTest() {} virtual ~UIRotateInputTest() {} - static void SetUpTestCase(){}; - static void TearDownTestCase(){}; + static void SetUpTestCase(){} + static void TearDownTestCase(){} }; /** diff --git a/test/unittest/themes/theme_manager_unit_test.cpp b/test/unittest/themes/theme_manager_unit_test.cpp index 660e0b2..ad33fbf 100644 --- a/test/unittest/themes/theme_manager_unit_test.cpp +++ b/test/unittest/themes/theme_manager_unit_test.cpp @@ -44,4 +44,4 @@ HWTEST_F(ThemeManagerTest, ThemeManagerSetCurrent_001, TestSize.Level0) delete theme; } -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/tools/qt/simulator/drivers/display/gui_thread.h b/tools/qt/simulator/drivers/display/gui_thread.h index 4a5bccc..9740fc9 100644 --- a/tools/qt/simulator/drivers/display/gui_thread.h +++ b/tools/qt/simulator/drivers/display/gui_thread.h @@ -25,7 +25,7 @@ namespace OHOS { class GUIThread : public QThread { Q_OBJECT public: - GUIThread(QObject* parent); + explicit GUIThread(QObject* parent); virtual ~GUIThread(); void run() override; void Quit(); diff --git a/tools/qt/simulator/drivers/display/monitor.h b/tools/qt/simulator/drivers/display/monitor.h index e1b61da..352d4c6 100644 --- a/tools/qt/simulator/drivers/display/monitor.h +++ b/tools/qt/simulator/drivers/display/monitor.h @@ -24,6 +24,7 @@ namespace OHOS { class Monitor : public QObject, public BaseGfxEngine { Q_OBJECT + public: Monitor() : defaultColor_ (0x44) {} virtual ~Monitor() {} diff --git a/tools/qt/simulator/drivers/indev/key_input.h b/tools/qt/simulator/drivers/indev/key_input.h index 98a0681..e6f16a5 100644 --- a/tools/qt/simulator/drivers/indev/key_input.h +++ b/tools/qt/simulator/drivers/indev/key_input.h @@ -38,4 +38,4 @@ private: }; #endif // USE_KEY } // namespace OHOS -#endif // GRAPHIC_LITE_KEY_INPUT_H \ No newline at end of file +#endif // GRAPHIC_LITE_KEY_INPUT_H diff --git a/tools/qt/simulator/third_party/zlib/unistd.h b/tools/qt/simulator/third_party/zlib/unistd.h index ae717cb..694171a 100644 --- a/tools/qt/simulator/third_party/zlib/unistd.h +++ b/tools/qt/simulator/third_party/zlib/unistd.h @@ -15,4 +15,4 @@ #ifndef _UNISTD_H #define _UNISTD_H // Stub header for zlib project in qt -#endif \ No newline at end of file +#endif diff --git a/tools/qt/simulator/uitest/main_widget.h b/tools/qt/simulator/uitest/main_widget.h index f5b4573..8dd9879 100644 --- a/tools/qt/simulator/uitest/main_widget.h +++ b/tools/qt/simulator/uitest/main_widget.h @@ -44,6 +44,7 @@ QT_END_NAMESPACE namespace OHOS { class MainWidget : public QWidget { Q_OBJECT + public: MainWidget(QWidget* parent = nullptr); ~MainWidget(); -- GitLab