Add Qt6 support

This commit is contained in:
Simon Stürz 2025-08-12 12:20:40 +02:00
parent 5cb5f0255b
commit 13519fe87a
18 changed files with 72 additions and 6 deletions

1
debian Symbolic link
View File

@ -0,0 +1 @@
debian-qt5

View File

@ -1,7 +1,7 @@
Source: nymea-networkmanager
Section: utils
Priority: optional
Maintainer: Simon Stürz <simon.stuerz@nymea.io>
Maintainer: nymea GmbH <developer@nymea.io>
Standards-Version: 4.6.0
Build-Depends: debhelper (>= 9.0.0),
dpkg-dev (>= 1.16.1~),
@ -20,4 +20,4 @@ Depends: ${misc:Depends},
libnymea-gpio
Description: Daemon for wireless configuration using bluetooth LE.
This daemon allows to configure a wireless network using a bluetooth
low energy gatt server. The tool is written in Qt 5.
low energy gatt server.

View File

@ -7,5 +7,5 @@ License: GPL-3
Public License can be found in `/usr/share/common-licenses/GPL-3'.
Files: *
Copyright: (C) 2018 - 2024 nymea GmbH <contact@nymea.io>
Copyright: (C) 2018 - 2025 nymea GmbH <contact@nymea.io>
License: GPL-3

1
debian-qt6/changelog Symbolic link
View File

@ -0,0 +1 @@
../debian-qt5/changelog

1
debian-qt6/compat Normal file
View File

@ -0,0 +1 @@
13

23
debian-qt6/control Normal file
View File

@ -0,0 +1,23 @@
Source: nymea-networkmanager
Section: utils
Priority: optional
Maintainer: nymea GmbH <developer@nymea.io>
Standards-Version: 4.7.2
Build-Depends: debhelper,
dpkg-dev,
qt6-base-dev,
qt6-base-dev-tools,
qt6-connectivity-dev,
libnymea-networkmanager-dev,
libnymea-gpio-dev
Package: nymea-networkmanager
Architecture: any
Depends: ${misc:Depends},
network-manager,
libnymea-networkmanager,
libnymea-gpio
Description: Daemon for wireless configuration using bluetooth LE.
This daemon allows to configure a wireless network using a bluetooth
low energy gatt server.

1
debian-qt6/copyright Symbolic link
View File

@ -0,0 +1 @@
../debian-qt5/copyright

View File

@ -0,0 +1 @@
../debian-qt5/nymea-networkmanager.install

12
debian-qt6/rules Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/make -f
export DH_VERBOSE=1
override_dh_missing:
dh_missing --list-missing
override_dh_installsystemd:
dh_installsystemd --restart-after-upgrade
%:
dh $@ --buildsystem=qmake6 --parallel

1
debian-qt6/source Symbolic link
View File

@ -0,0 +1 @@
../debian-qt5/source

View File

@ -1,5 +1,17 @@
QMAKE_CXXFLAGS *= -Werror -std=c++1z -g
QMAKE_LFLAGS *= -std=c++1z
greaterThan(QT_MAJOR_VERSION, 5) {
message("Building using Qt6 support")
CONFIG *= c++17
QMAKE_LFLAGS *= -std=c++17
QMAKE_CXXFLAGS *= -std=c++17
} else {
message("Building using Qt5 support")
CONFIG *= c++11
QMAKE_LFLAGS *= -std=c++11
QMAKE_CXXFLAGS *= -std=c++11
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00
}
QMAKE_CXXFLAGS *= -Werror -g
top_srcdir=$$PWD
top_builddir=$$shadowed($$PWD)

View File

@ -109,7 +109,7 @@ int main(int argc, char *argv[])
parser.addHelpOption();
parser.addVersionOption();
parser.setApplicationDescription(QString("\nThis daemon allows to configure a wifi network using a bluetooth low energy connection.\n\n"
"Copyright %1 2018-2024 Simon Stürz <simon.stuerz@nymea.io>\n\n"
"Copyright %1 2018-2025 Simon Stürz <simon.stuerz@nymea.io>\n\n"
"Modes: \n"
" - offline This mode starts the bluetooth server once the device is offline\n"
" and not connected to any LAN network.\n"

View File

@ -2,6 +2,19 @@ include(../nymea-networkmanager.pri)
TARGET = nymea-networkmanager
greaterThan(QT_MAJOR_VERSION, 5) {
message("Building using Qt6 support")
CONFIG *= c++17
QMAKE_LFLAGS *= -std=c++17
QMAKE_CXXFLAGS *= -std=c++17
} else {
message("Building using Qt5 support")
CONFIG *= c++11
QMAKE_LFLAGS *= -std=c++11
QMAKE_CXXFLAGS *= -std=c++11
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00
}
QT += core network bluetooth dbus
QT -= gui