提交 539b3990 编写于 作者: Y YueBiang

move impl of InitLabelText from header file to cpp

上级 4df17f7a
...@@ -139,6 +139,13 @@ UILabel::~UILabel() ...@@ -139,6 +139,13 @@ UILabel::~UILabel()
} }
} }
void UILabel::InitLabelText()
{
if (labelText_ == nullptr) {
labelText_ = new Text();
}
}
int16_t UILabel::GetWidth() int16_t UILabel::GetWidth()
{ {
InitLabelText(); InitLabelText();
......
...@@ -409,12 +409,7 @@ protected: ...@@ -409,12 +409,7 @@ protected:
Text* labelText_; Text* labelText_;
void RefreshLabel(); void RefreshLabel();
virtual void InitLabelText() virtual void InitLabelText();
{
if (labelText_ == nullptr) {
labelText_ = new Text();
}
}
private: private:
friend class LabelAnimator; friend class LabelAnimator;
......
...@@ -9,7 +9,11 @@ CONFIG += c++11 ...@@ -9,7 +9,11 @@ CONFIG += c++11
# any Qt feature that has been marked deprecated (the exact warnings # any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the # depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it. # 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 DEFINES += QT_COMPILER
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册