diff --git a/frameworks/components/ui_label.cpp b/frameworks/components/ui_label.cpp index 6d7c417911c501e708b44cbfa5cc46b6c0952fd5..da4a65aad233341841c0956a34f4029e04879631 100644 --- a/frameworks/components/ui_label.cpp +++ b/frameworks/components/ui_label.cpp @@ -139,6 +139,13 @@ UILabel::~UILabel() } } +void UILabel::InitLabelText() +{ + if (labelText_ == nullptr) { + labelText_ = new Text(); + } +} + int16_t UILabel::GetWidth() { InitLabelText(); diff --git a/interfaces/kits/components/ui_label.h b/interfaces/kits/components/ui_label.h index 66d64bb4670d51a8bfda6686df6b645bada2553c..be12f180b20c301fd335524db913fc0cfddcb7cf 100755 --- a/interfaces/kits/components/ui_label.h +++ b/interfaces/kits/components/ui_label.h @@ -409,12 +409,7 @@ protected: Text* labelText_; void RefreshLabel(); - virtual void InitLabelText() - { - if (labelText_ == nullptr) { - labelText_ = new Text(); - } - } + virtual void InitLabelText(); private: friend class LabelAnimator; diff --git a/tools/qt/simulator/libui/libui.pro b/tools/qt/simulator/libui/libui.pro index 16429fdbb6c7dedc6e1ff1d7abd33b2a0c08c1ef..530cab677e4db9b973b90ec27bb35c60a10d4231 100644 --- a/tools/qt/simulator/libui/libui.pro +++ b/tools/qt/simulator/libui/libui.pro @@ -9,7 +9,11 @@ CONFIG += c++11 # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS +DEFINES += QT_DEPRECATED_WARNINGS \ + "ENABLE_SHAPING=0" \ + "ENABLE_ICU=0" \ + "ENABLE_VECTOR_FONT=1" \ + "ENABLE_BITMAP_FONT=0" DEFINES += QT_COMPILER