qtkeychain_qt6, revbump, fixes login for Tokodon gear24 (#11341)

This commit is contained in:
Schrijvers Luc
2024-11-17 07:51:37 +01:00
committed by GitHub
parent 274a4769e4
commit 0e1a9c775c
2 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
From 2de524ebbb2fb41a0650e9fd574ab7f6f10f30be Mon Sep 17 00:00:00 2001
From: Joshua Goins <josh@redstrate.com>
Date: Fri, 15 Nov 2024 17:17:14 -0500
Subject: [PATCH] Fix read password job on Haiku
There seems to be a breaking change in how QString::fromUtf8 works in Qt6, and this affects QtKeychain handling on Haiku. If we use QByteArray with an explicit size, it messes with the null termination handling and the application is given a QString with a null terminator, which fails.
But this actually isn't needed at all, letting QByteArray figure out where the password data ends is good enough and lets Qt6 applications work again on Haiku.
---
qtkeychain/keychain_haiku.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qtkeychain/keychain_haiku.cpp b/qtkeychain/keychain_haiku.cpp
index 16abe1c..153ebe7 100644
--- a/keychain_haiku.cpp
+++ b/keychain_haiku.cpp
@@ -86,7 +86,7 @@ void ReadPasswordJobPrivate::scheduledStart()
q->key().toUtf8().constData(),
false, password);
- data = QByteArray(reinterpret_cast<const char*>(password.Data()), password.DataLength());
+ data = QByteArray(reinterpret_cast<const char*>(password.Data()));
switch ( result ) {
case B_OK:

View File

@@ -5,11 +5,12 @@ How the data is stored depends on the platform."
HOMEPAGE="https://github.com/frankosterfeld/qtkeychain"
COPYRIGHT="2011-2016 Frank Osterfeld, Mathias Hasselmann"
LICENSE="BSD (2-clause)" #XXX: modified
REVISION="2"
REVISION="3"
SOURCE_URI="https://github.com/frankosterfeld/qtkeychain/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="a22c708f351431d8736a0ac5c562414f2b7bb919a6292cbca1ff7ac0849cb0a7"
SOURCE_FILENAME="qtkeychain-$portVersion.tar.gz"
SOURCE_DIR="qtkeychain-$portVersion"
PATCHES="258.patch"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"