提交 3a402b58 编写于 作者: G guanzengkun

Description: Fixed the typo of graphic-ui destroy, from m7996 (gitee)...

Description: Fixed the typo of graphic-ui destroy, from m7996 (gitee) https://gitee.com/openharmony/graphic_ui/pulls/110
IssueNo: https://gitee.com/openharmony/graphic_ui/issues/I6OVUD
Feature or Bugfix: Feature
Binary Source:No
Signed-off-by: Nguanzengkun <guanzengkun@huawei.com>
上级 e75b1cc0
......@@ -37,7 +37,7 @@ public:
{
bool ret = true;
if (dialog_ != nullptr) {
dialog_->DestoryWindow();
dialog_->DestroyWindow();
dialog_->isShowing_ = false;
}
if (onClickListener_ != nullptr) {
......@@ -62,7 +62,7 @@ public:
if ((dialog_ != nullptr) && (dialog_->dialogLayer_ != nullptr) &&
!dialog_->dialogLayer_->GetRect().IsContains(event.GetCurrentPos())) {
if (dialog_->enableAutoCancel_) {
dialog_->DestoryWindow();
dialog_->DestroyWindow();
dialog_->isShowing_ = false;
}
if (dialog_->onCancelListener_ != nullptr) {
......@@ -141,7 +141,7 @@ UIDialog::~UIDialog()
delete line2_;
line2_ = nullptr;
}
if ((windowRootView_ != nullptr) && !RootView::DestoryWindowRootView(windowRootView_)) {
if ((windowRootView_ != nullptr) && !RootView::DestroyWindowRootView(windowRootView_)) {
windowRootView_ = nullptr;
}
if (dialogClickListener_ != nullptr) {
......@@ -617,10 +617,10 @@ void UIDialog::EnableAutoCancel(bool enable)
enableAutoCancel_ = enable;
}
void UIDialog::DestoryWindow()
void UIDialog::DestroyWindow()
{
if (window_ != nullptr) {
Window::DestoryWindow(window_);
Window::DestroyWindow(window_);
window_ = nullptr;
}
}
......
......@@ -31,7 +31,7 @@ Window* Window::CreateWindow(const WindowConfig& config)
return window;
}
void Window::DestoryWindow(Window* window)
void Window::DestroyWindow(Window* window)
{
if (window != nullptr) {
WindowImpl* windowImpl = reinterpret_cast<WindowImpl*>(window);
......
......@@ -97,7 +97,7 @@ public:
* @since 1.0
* @version 1.0
*/
static bool DestoryWindowRootView(RootView* rootView)
static bool DestroyWindowRootView(RootView* rootView)
{
if (rootView == RootView::GetInstance()) {
return false;
......
......@@ -215,7 +215,7 @@ private:
void Layout();
void LayoutButton();
void CreateDialogWindow();
void DestoryWindow();
void DestroyWindow();
bool isShowing_;
bool enableAutoCancel_;
......
......@@ -122,7 +122,7 @@ public:
* @since 1.0
* @version 1.0
*/
static void DestoryWindow(Window* window);
static void DestroyWindow(Window* window);
/**
* @brief Binds the <b>RootView</b> to this window.
......
......@@ -142,7 +142,7 @@ HWTEST_F(HardwareAccelerationTest, HardwareFill_001, TestSize.Level1)
TaskManager::GetInstance()->TaskHandler();
EXPECT_EQ(g_testDevice->fillIn_, true);
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
#endif
......@@ -173,7 +173,7 @@ HWTEST_F(HardwareAccelerationTest, HardwareBlend_001, TestSize.Level0)
TaskManager::GetInstance()->TaskHandler();
EXPECT_EQ(g_testDevice->blendIn_, true);
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
#endif
......@@ -206,7 +206,7 @@ HWTEST_F(HardwareAccelerationTest, HardwareBlend_002, TestSize.Level1)
TaskManager::GetInstance()->TaskHandler();
EXPECT_EQ(g_testDevice->blendIn_, true);
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
#endif
......@@ -243,7 +243,7 @@ HWTEST_F(HardwareAccelerationTest, HardwareTransform_001, TestSize.Level0)
TaskManager::GetInstance()->TaskHandler();
EXPECT_EQ(g_testDevice->transformIn_, true);
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
#endif
......@@ -285,7 +285,7 @@ HWTEST_F(HardwareAccelerationTest, HardwareTransform_002, TestSize.Level1)
EXPECT_EQ(g_testDevice->fillIn_, false);
EXPECT_EQ(g_testDevice->blendIn_, false);
EXPECT_EQ(g_testDevice->transformIn_, false);
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
#endif
} // namespace OHOS
......@@ -204,7 +204,7 @@ void EventInjectorTest::TearDownTestCase(void)
{
isRepeat_ = false;
pthread_join(mainTaskThread_, nullptr);
Window::DestoryWindow(window_);
Window::DestroyWindow(window_);
DeleteChildren(layout_);
layout_ = nullptr;
......
......@@ -55,9 +55,9 @@ public:
}
}
static void DestoryWindow(RootView* rootView)
static void DestroyWindow(RootView* rootView)
{
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
#endif // ENABLE_WINDOW
};
......@@ -179,8 +179,8 @@ HWTEST_F(ViewBoundsTest, ViewBoundsOnPostDraw001, TestSize.Level0)
rootView->RemoveAll();
delete view1;
delete vg1;
ViewBoundsTest::DestoryWindow(rootView);
RootView::DestoryWindowRootView(rootView);
ViewBoundsTest::DestroyWindow(rootView);
RootView::DestroyWindowRootView(rootView);
}
/**
......@@ -230,13 +230,13 @@ HWTEST_F(ViewBoundsTest, ViewBoundsOnPostDraw002, TestSize.Level0)
rootView1->RemoveAll();
delete view1;
delete vg1;
ViewBoundsTest::DestoryWindow(rootView1);
RootView::DestoryWindowRootView(rootView1);
ViewBoundsTest::DestroyWindow(rootView1);
RootView::DestroyWindowRootView(rootView1);
rootView2->RemoveAll();
delete view2;
delete vg2;
ViewBoundsTest::DestoryWindow(rootView2);
RootView::DestoryWindowRootView(rootView2);
ViewBoundsTest::DestroyWindow(rootView2);
RootView::DestroyWindowRootView(rootView2);
}
#endif // ENABLE_WINDOW
} // namespace OHOS
......
......@@ -48,9 +48,9 @@ public:
}
}
static void DestoryWindow(RootView* rootView)
static void DestroyWindow(RootView* rootView)
{
Window::DestoryWindow(rootView->GetBoundWindow());
Window::DestroyWindow(rootView->GetBoundWindow());
}
};
......@@ -103,8 +103,8 @@ HWTEST_F(RenderTest, Graphic_RenderTest_Test_Measuer_001, TestSize.Level0)
rootView->RemoveAll();
delete view1;
delete vg1;
RenderTest::DestoryWindow(rootView);
RootView::DestoryWindowRootView(rootView);
RenderTest::DestroyWindow(rootView);
RootView::DestroyWindowRootView(rootView);
}
/**
......@@ -136,7 +136,7 @@ HWTEST_F(RenderTest, Graphic_RenderTest_Test_Measuer_02, TestSize.Level0)
rootView->RemoveAll();
delete view1;
delete vg1;
RenderTest::DestoryWindow(rootView);
RootView::DestoryWindowRootView(rootView);
RenderTest::DestroyWindow(rootView);
RootView::DestroyWindowRootView(rootView);
}
} // namespace OHOS
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册