Commit Graph

17 Commits

Author SHA1 Message Date
Hartmnt
0784673d4b FIX(client): Use IPv4 HostAddress representation where applicable
In 6c565689 the HostAddress was refactored. A check for isV6 when
creating a QHostAddress was removed. However, the QHostAddress
determines the (IPv4 vs IPv6) distinction at construction time.
This resulted in some regressions both visually and functional.

This commit reintroduces the distinction.

Fixes #6349
2024-02-28 20:36:46 +00:00
Davide Beatrici
3731007915 FIX(shared): Crash in HostAddress::toIPv4()
Bug introduced in 6c565689ae.
2024-01-30 01:04:29 +01:00
Robert Adam
6c565689ae REFAC: Get rid of union in HostAddress
The way this union was accessed is not covered by the C++ standard and
was therefore undefined behavior. Therefore, the code was rewritten to
stick to standard C++.
2024-01-07 17:10:11 +01:00
Robert Adam
249d2c6298 MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Jan Neugebauer
1a0e048865 FEAT(client, ui): separate ipv4 and ipv6 in ServerItem tooltip
The "Addresses" field in the ServerItem tooltip shows both ipv4 and ipv6
addresses. The order of addresses in this field is not determined.
In the wild it is randomized. As discussed in #5696 it is better to implement
a concrete ordering to prevent user confusion. To further improve the
readability of the addresses we split the addresses field in two fields
called "IPv4 address" and "IPv6 address". The ipv4 address is now always
shown above the ipv6 address.

Implements #5696

Co-Authored-By: Thomas Pawelek <thomas.pawelek@stud.uni-hannover.de>
2022-06-05 20:03:35 +02:00
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Robert
56db3410c5 MAINT: Update copyright notice to 2021 (Part II)
Apparently the first commit (59ae429972)
did not include all files.

Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
2021-04-09 15:41:49 +02:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert
af7dac72f4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
Robert Adam
af6f24ef43 src: Fix for b263b91340
In b263b91340 I exchanged QString::sprintf
with QString::asprintf as the former was declared deprecated from Qt 5.5
onwards. I forgot to check the docs though. If I had, I would have
noticed that in contrast to sprintf, asprintf is a static function which
returns the assembled String (sprintf wrote it to the object it was
being called on). Thus I also have to assign the return value of
asprintf to a variable in order to have it have an effect.
2020-04-04 20:19:47 +02:00
Robert Adam
b263b91340 Qt: Replaced deprecated sprintf() by asprintf() for Qt 5.5 and higher
See https://stackoverflow.com/questions/12746885/why-use-asprintf-instead-of-sprintf
for a reason why sprintf() has been deprecated in favor of asprintf()
2020-02-27 15:27:45 +01:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Davide Beatrici
15831dbca8 Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.

Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
2019-09-12 22:08:39 +02:00
Davide Beatrici
5a07244a44 Don't include PCH headers directly
According to Qt's documentation the PCH header doesn't need to be included.

From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:

"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."

"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
2019-09-12 00:13:35 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Mikkel Krautz
5ede036c7d Net: refactor HostAddress class to its own set of files. 2017-04-10 09:22:56 +02:00