From 6debc3df5e8302d715223a5c5c10cdfd24f07e81 Mon Sep 17 00:00:00 2001 From: gambas Date: Sun, 17 Jan 2021 00:10:14 +0100 Subject: [PATCH] ComboBox: PlaceHolder property does not crash anymore on read-only ComboBox. [GB.QT4] * BUG: ComboBox: PlaceHolder property does not crash anymore on read-only ComboBox. [GB.QT5] * BUG: ComboBox: PlaceHolder property does not crash anymore on read-only ComboBox. --- gb.qt4/src/CTextBox.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gb.qt4/src/CTextBox.cpp b/gb.qt4/src/CTextBox.cpp index e2e9dfb6b..526d0b425 100644 --- a/gb.qt4/src/CTextBox.cpp +++ b/gb.qt4/src/CTextBox.cpp @@ -123,10 +123,12 @@ END_PROPERTY BEGIN_PROPERTY(TextBox_Placeholder) + GET_TEXT_BOX(); + if (READ_PROPERTY) - RETURN_NEW_STRING(TEXTBOX->placeholderText()); + RETURN_NEW_STRING(textbox->placeholderText()); else - TEXTBOX->setPlaceholderText(QSTRING_PROP()); + textbox->setPlaceholderText(QSTRING_PROP()); END_PROPERTY