mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 21:19:24 +02:00
Qt: fixed using of plain text in dialogs.
git-svn-id: trunk@65158 -
This commit is contained in:
parent
8ebbe335cf
commit
cfa20195b1
@ -19617,7 +19617,7 @@ begin
|
|||||||
AParent := QApplication_activeWindow;
|
AParent := QApplication_activeWindow;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Widget := CreateWidget(AParent);
|
Widget := CreateWidget(AParent);
|
||||||
{$IFDEF QTDIALOGSUSEHTMLTEXT}
|
{$IFNDEF QTDIALOGSUSEHTMLTEXT}
|
||||||
TextFormat := QtPlainText;
|
TextFormat := QtPlainText;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
setProperty(Widget, 'lclwidget', Int64(PtrUInt(Self)));
|
setProperty(Widget, 'lclwidget', Int64(PtrUInt(Self)));
|
||||||
|
@ -5259,6 +5259,9 @@ var
|
|||||||
//OkStr: WideString;
|
//OkStr: WideString;
|
||||||
AParent: QWidgetH;
|
AParent: QWidgetH;
|
||||||
DialogType, DefButton, DefIcon : Cardinal;
|
DialogType, DefButton, DefIcon : Cardinal;
|
||||||
|
{$IFNDEF QTDIALOGSUSEHTMLTEXT}
|
||||||
|
AQtString: QStringH;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
Str := lpText;
|
Str := lpText;
|
||||||
@ -5271,6 +5274,16 @@ begin
|
|||||||
DefButton:= ((uType and $00000300) shr 8) + 1;
|
DefButton:= ((uType and $00000300) shr 8) + 1;
|
||||||
DialogType:= (uType and $0000000F);
|
DialogType:= (uType and $0000000F);
|
||||||
DefIcon := (uType and $000000FF) shr 4;
|
DefIcon := (uType and $000000FF) shr 4;
|
||||||
|
|
||||||
|
|
||||||
|
{$IFNDEF QTDIALOGSUSEHTMLTEXT}
|
||||||
|
//issue #37805 - we must show plain text.
|
||||||
|
AQtString := QString_Create(PWideString(@Str));
|
||||||
|
QString_toHtmlEscaped(AQtString, @Str);
|
||||||
|
QString_destroy(AQtString);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
|
||||||
case IconToMessageType(DefIcon) of
|
case IconToMessageType(DefIcon) of
|
||||||
QMessageBoxInformation: Result := QMessageBox_information(AParent, @TitleStr, @Str, ButtonToQtButtons(DialogType), ButtonToQtDefButton(DialogType, DefButton));
|
QMessageBoxInformation: Result := QMessageBox_information(AParent, @TitleStr, @Str, ButtonToQtButtons(DialogType), ButtonToQtDefButton(DialogType, DefButton));
|
||||||
QMessageBoxQuestion: Result := QMessageBox_question(AParent, @TitleStr, @Str, ButtonToQtButtons(DialogType), ButtonToQtDefButton(DialogType, DefButton));
|
QMessageBoxQuestion: Result := QMessageBox_question(AParent, @TitleStr, @Str, ButtonToQtButtons(DialogType), ButtonToQtDefButton(DialogType, DefButton));
|
||||||
|
Loading…
Reference in New Issue
Block a user