mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 09:29:35 +02:00
Qt5: cleanup unused variables, fix string conversion warnings, use Utf8ToUtf16.
git-svn-id: trunk@62897 -
This commit is contained in:
parent
ccc310d045
commit
fee54a4bf2
@ -174,23 +174,23 @@ begin
|
||||
if (BtnID >= Low(IdButtonToQtStandardButton)) and
|
||||
(BtnID <= High(IdButtonToQtStandardButton)) and
|
||||
(IdButtonToQtStandardButton[BtnID] <> QMessageBoxNoButton) then
|
||||
QtMessageBox.AddButton(Caption, IdButtonToQtStandardButton[BtnID], ModalResult, Default, Cancel)
|
||||
QtMessageBox.AddButton(UTF8ToUTF16(Caption), IdButtonToQtStandardButton[BtnID], ModalResult, Default, Cancel)
|
||||
else
|
||||
QtMessageBox.AddButton(Caption, ModalResult, Default, Cancel);
|
||||
QtMessageBox.AddButton(UTF8ToUTF16(Caption), ModalResult, Default, Cancel);
|
||||
end;
|
||||
end;
|
||||
|
||||
if DialogCaption <> '' then
|
||||
QtMessageBox.Title := DialogCaption
|
||||
QtMessageBox.Title := UTF8ToUTF16(DialogCaption)
|
||||
else
|
||||
case DialogType of
|
||||
idDialogWarning: QtMessageBox.Title := rsMtWarning;
|
||||
idDialogError: QtMessageBox.Title := rsMtError;
|
||||
idDialogInfo : QtMessageBox.Title := rsMtInformation;
|
||||
idDialogConfirm : QtMessageBox.Title := rsMtConfirmation;
|
||||
idDialogWarning: QtMessageBox.Title := UTF8ToUTF16(rsMtWarning);
|
||||
idDialogError: QtMessageBox.Title := UTF8ToUTF16(rsMtError);
|
||||
idDialogInfo : QtMessageBox.Title := UTF8ToUTF16(rsMtInformation);
|
||||
idDialogConfirm : QtMessageBox.Title := UTF8ToUTF16(rsMtConfirmation);
|
||||
end;
|
||||
|
||||
QtMessageBox.MessageStr := DialogMessage;
|
||||
QtMessageBox.MessageStr := UTF8ToUTF16(DialogMessage);
|
||||
|
||||
case DialogType of
|
||||
idDialogWarning: QtMessageBox.MsgBoxType := QMessageBoxWarning;
|
||||
@ -384,24 +384,24 @@ begin
|
||||
if (BtnID >= Low(IdButtonToQtStandardButton)) and
|
||||
(BtnID <= High(IdButtonToQtStandardButton)) and
|
||||
(IdButtonToQtStandardButton[BtnID] <> QMessageBoxNoButton) then
|
||||
QtMessageBox.AddButton(GetButtonCaption(BtnID), IdButtonToQtStandardButton[BtnID], BtnID,
|
||||
QtMessageBox.AddButton(UTF8ToUTF16(GetButtonCaption(BtnID)), IdButtonToQtStandardButton[BtnID], BtnID,
|
||||
BtnIdx = DefaultIndex, (EscapeResult = mrCancel) and (BtnId = EscapeResult))
|
||||
else
|
||||
QtMessageBox.AddButton(GetButtonCaption(BtnID), BtnID, BtnIdx = DefaultIndex,
|
||||
QtMessageBox.AddButton(UTF8ToUTF16(GetButtonCaption(BtnID)), BtnID, BtnIdx = DefaultIndex,
|
||||
(EscapeResult = mrCancel) and (BtnId = EscapeResult));
|
||||
end;
|
||||
|
||||
if DialogCaption <> '' then
|
||||
QtMessageBox.Title := DialogCaption
|
||||
QtMessageBox.Title := UTF8ToUTF16(DialogCaption)
|
||||
else
|
||||
case DialogType of
|
||||
idDialogWarning: QtMessageBox.Title := rsMtWarning;
|
||||
idDialogError: QtMessageBox.Title := rsMtError;
|
||||
idDialogInfo : QtMessageBox.Title := rsMtInformation;
|
||||
idDialogConfirm : QtMessageBox.Title := rsMtConfirmation;
|
||||
idDialogWarning: QtMessageBox.Title := UTF8ToUTF16(rsMtWarning);
|
||||
idDialogError: QtMessageBox.Title := UTF8ToUTF16(rsMtError);
|
||||
idDialogInfo : QtMessageBox.Title := UTF8ToUTF16(rsMtInformation);
|
||||
idDialogConfirm : QtMessageBox.Title := UTF8ToUTF16(rsMtConfirmation);
|
||||
end;
|
||||
|
||||
QtMessageBox.MessageStr := DialogMessage;
|
||||
QtMessageBox.MessageStr := UTF8ToUTF16(DialogMessage);
|
||||
|
||||
case DialogType of
|
||||
idDialogWarning: QtMessageBox.MsgBoxType := QMessageBoxWarning;
|
||||
|
@ -631,7 +631,7 @@ var
|
||||
begin
|
||||
AWidget := QWidgetH(Sender);
|
||||
QObject_objectName(Sender, @AName);
|
||||
if UTF8Copy(AName, 1, 16) = 'qtlclsystrayicon' then
|
||||
if Copy(AName, 1, 16) = 'qtlclsystrayicon' then
|
||||
begin
|
||||
for i := 0 to SysTrayIconsList.Count - 1 do
|
||||
begin
|
||||
@ -677,7 +677,7 @@ var
|
||||
RGeom := TQtSystemTrayIcon(SysTrayIconsList.Items[i]).GetGeometry;
|
||||
if (QApplication_widgetAt(RGeom.Left, RGeom.Top) = AWidget) then
|
||||
begin
|
||||
AName := 'qtlclsystrayicon_' + dbgHex(PtrUInt(AWidget));
|
||||
AName := UTF8ToUTF16('qtlclsystrayicon_' + dbgHex(PtrUInt(AWidget)));
|
||||
QObject_setObjectName(Sender, @AName);
|
||||
TQtSystemTrayIcon(SysTrayIconsList.Items[i]).AttachSysTrayWidget(AWidget);
|
||||
{$IFDEF DEBUGSYSTRAYICON}
|
||||
|
@ -1313,8 +1313,6 @@ var
|
||||
Pt: TPoint;
|
||||
ClipRect: TRect;
|
||||
B: Boolean;
|
||||
S: String;
|
||||
i: Integer;
|
||||
|
||||
procedure CalculateOffsetWithAngle(const AFontAngle: Integer;
|
||||
var TextLeft,TextTop: Integer);
|
||||
|
@ -296,7 +296,6 @@ var
|
||||
ScreenNum: Integer;
|
||||
XClient: TXClientMessageEvent;
|
||||
WMAtom: TAtom;
|
||||
APlatform: WideString;
|
||||
begin
|
||||
if IsWayland then
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user