Skip to content

Commit

Permalink
Use non-deprecated qChecksum in qtlocalpeer of qtsingleapplication
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra committed Dec 5, 2024
1 parent 036bb77 commit e1a20fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/3rdparty/qtsingleapplication/qtlocalpeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ static const char ack[] = "ack";

QString QtLocalPeer::appSessionId(const QString &appId)
{
QByteArray idc = appId.toUtf8();
quint16 idNum = qChecksum(idc.constData(), idc.size());
QByteArrayView idc = appId.toUtf8();

Check warning on line 54 in src/3rdparty/qtsingleapplication/qtlocalpeer.cpp

View workflow job for this annotation

GitHub Actions / build

src/3rdparty/qtsingleapplication/qtlocalpeer.cpp:54:20 [cppcoreguidelines-init-variables]

variable 'idc' is not initialized
quint16 idNum = qChecksum(idc, idc.size());

Check warning on line 55 in src/3rdparty/qtsingleapplication/qtlocalpeer.cpp

View workflow job for this annotation

GitHub Actions / build

src/3rdparty/qtsingleapplication/qtlocalpeer.cpp:55:13 [cppcoreguidelines-init-variables]

variable 'idNum' is not initialized
//### could do: two 16bit checksums over separate halves of id, for a 32bit result - improved uniqeness probability. Every-other-char split would be best.

QString res = QLatin1String("qtsingleapplication-")
Expand Down

0 comments on commit e1a20fa

Please sign in to comment.