Accepting request 1174024 from home:pallaswept:branches:devel:languages:pascal

My attempts to build the latest goverlay failed, and I tracked it down to this bug in lazarus. The qt6 pascal lib erroneously included reference to a method which has been removed from qt6 (isSimpleText()). A fix was merged upstream recently, but will not be released until 3.4. 

I thought perhaps you may be interested in cherry-picking this commit so that we can build qt6 pascal apps (like goverlay), until 3.4 comes along? It doesn't look like 3.4 will be with us in the short term.

Hope this is helpful!

OBS-URL: https://build.opensuse.org/request/show/1174024
OBS-URL: https://build.opensuse.org/package/show/devel:languages:pascal/lazarus?expand=0&rev=93
This commit is contained in:
Pragmatic Linux 2024-05-14 16:06:42 +00:00 committed by Git OBS Bridge
parent 0162e7ce1e
commit 21785979d2
2 changed files with 80 additions and 0 deletions

78
lazarus-libqt6_fix.patch Normal file
View File

@ -0,0 +1,78 @@
From b71e3074a333b1573c6d662930b4689d92f5962e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=BDeljan=20Rikalo?= <zeljko@lazarus-ide.org>
Date: Sun, 14 Apr 2024 13:19:52 +0200
Subject: [PATCH] Qt6: removed deprecated QString::IsSimpleText() from
cbindings. issue #40901
---
lcl/interfaces/qt6/cbindings/Qt6Pas.pro | 8 ++++----
lcl/interfaces/qt6/cbindings/src/qstring_c.cpp | 5 -----
lcl/interfaces/qt6/cbindings/src/qstring_c.h | 1 -
lcl/interfaces/qt6/qt62.pas | 1 -
4 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/lcl/interfaces/qt6/cbindings/Qt6Pas.pro b/lcl/interfaces/qt6/cbindings/Qt6Pas.pro
index bb4dd573cfd..c6e7419f18e 100644
--- a/lcl/interfaces/qt6/cbindings/Qt6Pas.pro
+++ b/lcl/interfaces/qt6/cbindings/Qt6Pas.pro
@@ -10,13 +10,13 @@
-# Binding Release Version 6.2.7 against Qt6 6.2 LTS release.
+# Binding Release Version 6.2.8 against Qt6 6.2 LTS release.
-win32:VERSION = 6.2.7.0
-else:VERSION = 6.2.7
+win32:VERSION = 6.2.8.0
+else:VERSION = 6.2.8
VER_MAJ = 6
VER_MIN = 2
-VER_PAT = 7
+VER_PAT = 8
win32:VERSION_PE_HEADER = 6.2
QT += gui printsupport
diff --git a/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp b/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp
index 9cb602ebc08..d3d5058480f 100644
--- a/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp
+++ b/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp
@@ -1073,11 +1073,6 @@ bool QString_isNull(QStringH handle)
return (bool) ((QString *)handle)->isNull();
}
-bool QString_isSimpleText(QStringH handle)
-{
- return (bool) ((QString *)handle)->isSimpleText();
-}
-
bool QString_isRightToLeft(QStringH handle)
{
return (bool) ((QString *)handle)->isRightToLeft();
diff --git a/lcl/interfaces/qt6/cbindings/src/qstring_c.h b/lcl/interfaces/qt6/cbindings/src/qstring_c.h
index 6f0b6715207..377ef5a133a 100644
--- a/lcl/interfaces/qt6/cbindings/src/qstring_c.h
+++ b/lcl/interfaces/qt6/cbindings/src/qstring_c.h
@@ -166,7 +166,6 @@ C_EXPORT void QString_push_back2(QStringH handle, PWideString s);
C_EXPORT void QString_push_front(QStringH handle, PWideChar c);
C_EXPORT void QString_push_front2(QStringH handle, PWideString s);
C_EXPORT bool QString_isNull(QStringH handle);
-C_EXPORT bool QString_isSimpleText(QStringH handle);
C_EXPORT bool QString_isRightToLeft(QStringH handle);
C_EXPORT void QString_chopped(QStringH handle, int len, PWideString retval);
C_EXPORT void QString_first(QStringH handle, int n, PWideString retval);
diff --git a/lcl/interfaces/qt6/qt62.pas b/lcl/interfaces/qt6/qt62.pas
index 9def6242a2a..bef59bfc9bc 100644
--- a/lcl/interfaces/qt6/qt62.pas
+++ b/lcl/interfaces/qt6/qt62.pas
@@ -3214,7 +3214,6 @@ procedure QString_push_back(handle: QStringH; s: PWideString); cdecl; external Q
procedure QString_push_front(handle: QStringH; c: PWideChar); cdecl; external Qt6PasLib name 'QString_push_front';
procedure QString_push_front(handle: QStringH; s: PWideString); cdecl; external Qt6PasLib name 'QString_push_front2';
function QString_isNull(handle: QStringH): Boolean; cdecl; external Qt6PasLib name 'QString_isNull';
-function QString_isSimpleText(handle: QStringH): Boolean; cdecl; external Qt6PasLib name 'QString_isSimpleText';
function QString_isRightToLeft(handle: QStringH): Boolean; cdecl; external Qt6PasLib name 'QString_isRightToLeft';
function QString_Create(size: Integer; AnonParam2: QtInitialization): QStringH; cdecl; external Qt6PasLib name 'QString_Create8';
procedure QString_chopped(handle: QStringH; len: integer; retval: PWideString); cdecl; external Qt6PasLib name 'QString_chopped';
--
GitLab

View File

@ -34,6 +34,8 @@ Source90: %{name}-rpmlintrc
Patch0: %{name}-Makefile_patch.diff Patch0: %{name}-Makefile_patch.diff
# PATCH-FIX-OPENSUSE lazarus.desktop.patch -- Fix desktop file # PATCH-FIX-OPENSUSE lazarus.desktop.patch -- Fix desktop file
Patch1: lazarus.desktop.patch Patch1: lazarus.desktop.patch
# PATCH-FIX-OPENSUSE lazarus-libqt6_fix.patch -- Fix libqt6pas per upstream issue #40901
Patch2: lazarus-libqt6_fix.patch
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: fpc >= 3.0.0 BuildRequires: fpc >= 3.0.0