From: Andres Salomon <dilinger@queued.net>
To: ofono@lists.linux.dev
Cc: jbb.prv@gmx.de
Subject: [PATCH phonesim 1/3] Fix compatibility with Qt6
Date: Sat, 28 Feb 2026 04:15:57 -0500 [thread overview]
Message-ID: <20260228041557.16eaa9d1@5400> (raw)
In-Reply-To: <20260228041213.45bc0030@5400>
From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= <jbb.prv@gmx.de>
---
src/control.cpp | 6 +++---
src/phonesim.cpp | 2 +-
src/qwsppdu.cpp | 12 ++++++------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/control.cpp b/src/control.cpp
index 817a0b2..b06dbc1 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -337,7 +337,7 @@ void ControlWidget::sendSMSMessage()
return;
}
- if (ui->leSMSServiceCenter->text().isEmpty() || ui->leSMSServiceCenter->text().contains(QRegExp("\\D"))) {
+ if (ui->leSMSServiceCenter->text().isEmpty() || ui->leSMSServiceCenter->text().contains(QRegularExpression(R"(\D)"))) {
p->warning(tr("Invalid Service Center"),
tr("Service Center must not be empty and contain "
"only digits"));
@@ -386,14 +386,14 @@ void ControlWidget::selectFile()
void ControlWidget::sendSMSDatagram()
{
QString dstPortStr = ui->leDstPort->text();
- if ( dstPortStr.contains(QRegExp("\\D")) ) {
+ if ( dstPortStr.contains(QRegularExpression(R"(\D)")) ) {
p->warning(tr("Invalid Port"), tr("Port number can contain only digits" ));
return;
}
int dst = dstPortStr.toInt();
QString srcPortStr = ui->leSrcPort->text();
- if ( srcPortStr.contains(QRegExp("\\D")) ) {
+ if ( srcPortStr.contains(QRegularExpression(R"(\D)")) ) {
p->warning(tr("Invalid Port"), tr("Port number can contain only digits" ));
return;
}
diff --git a/src/phonesim.cpp b/src/phonesim.cpp
index 89d5e9d..1b826ed 100644
--- a/src/phonesim.cpp
+++ b/src/phonesim.cpp
@@ -346,7 +346,7 @@ bool SimChat::command( const QString& cmd )
else {
int index = value.indexOf( "${*}" );
if ( index != -1 ) {
- if ( wild.length() > 0 && wild[wild.length() - 1] == 0x1A ) {
+ if ( wild.length() > 0 && wild[wild.length() - 1] == QChar(0x1A) ) {
// Strip the terminating ^Z from SMS PDU's.
wild = wild.left( wild.length() - 1 );
}
diff --git a/src/qwsppdu.cpp b/src/qwsppdu.cpp
index d636b5c..9798374 100644
--- a/src/qwsppdu.cpp
+++ b/src/qwsppdu.cpp
@@ -707,7 +707,7 @@ QString QWspPduDecoder::decodeTextString()
if (o == '\"')
o = decodeOctet();
while (o != 0 && !dev->atEnd()) {
- str += o;
+ str += QChar(o);
o = decodeOctet();
}
@@ -722,7 +722,7 @@ QString QWspPduDecoder::decodeTextBlock(int length)
{
QString result;
for(int i = 0; i < length; ++i)
- result += decodeOctet();
+ result += QChar(decodeOctet());
return result;
}
@@ -815,7 +815,7 @@ QString QWspPduDecoder::decodeContentType()
// Extension-Media
o = decodeOctet();
while (o != 0) {
- type += o;
+ type += QChar(o);
o = decodeOctet();
}
}
@@ -838,7 +838,7 @@ QString QWspPduDecoder::decodeContentType()
// Constrained-encoding = Extension-Media
o = decodeOctet();
while (o != 0) {
- type += o;
+ type += QChar(o);
o = decodeOctet();
}
}
@@ -988,13 +988,13 @@ QString QWspPduDecoder::decodeParameter()
p = decodeTokenText() + "=";
octet = peekOctet();
if (octet <= 31 || octet & 0x80) {
- p += decodeInteger();
+ p += QChar(decodeInteger());
} else {
// Extension-Media
p += '\"';
octet = decodeOctet();
while (octet != 0 && !dev->atEnd()) {
- p += octet;
+ p += QChar(octet);
octet = decodeOctet();
}
p += '\"';
--
2.51.0
next prev parent reply other threads:[~2026-02-28 9:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 9:12 [PATCH phonesim 0/3] Port to Qt6 (v2) Andres Salomon
2026-02-28 9:15 ` Andres Salomon [this message]
2026-02-28 9:16 ` [PATCH phonesim 2/3] Only call QTextStream::setCodec in Qt5 Andres Salomon
2026-02-28 9:17 ` [PATCH phonesim 3/3] Make configure script detect and enable Qt6 if available Andres Salomon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260228041557.16eaa9d1@5400 \
--to=dilinger@queued.net \
--cc=jbb.prv@gmx.de \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox