Ludovic LANGE
5002f3ebec
fix some static cast errors in QMqtt
...
The following error occurs twice:
```
mqtt/qmqtt_ssl_socket.cpp:49:13: error: static_cast from 'QAbstractSocket::SocketError (QAbstractSocket::*)() const' to 'void (QSslSocket::*)(QAbstractSocket::SocketError)' is not allowed
```
It may not be the cleanest fix but the it is the only one I could come with...
2022-09-27 22:15:47 +02:00
Ludovic LANGE
1af5cbacc6
fix QMqtt ambiguous conversion
...
Prevent error:
```
moc_qmqtt_client.cpp:459:53: error: conversion from 'QMQTT::ConnectionState' to 'QChar' is ambiguous
```
2022-09-27 22:09:30 +02:00
Ludovic LANGE
74388791bf
remove QSerialPort obsolete enum values (qt6)
...
Three enums (`QSerialPort::ParityError`, `QSerialPort::FramingError`,
`QSerialPort::BreakConditionError`) are [deprecated since Qt5.6](https://doc.qt.io/qt-5/qserialport.html )
and removed from Qt6.
We remove them, it's unfortunate but I don't know how to replace
these - it seems that we need to handle those in an [OS-specific
way](https://codereview.qt-project.org/c/qt/qtserialport/+/125517/ ).
2022-09-27 21:36:38 +02:00
Ludovic LANGE
bcbe3d38bd
Use enums from Qt::ItemFlags
...
It seems that one my compiler we need to use an explicit enum instead of
the constant it represents.
It shouldn't cause any issue as the value is the same.
2022-09-27 21:29:03 +02:00
Ludovic LANGE
768ebf9966
replace QString::SkipEmptyParts with Qt::SkipEmptyParts (qt6)
...
`QString::SkipEmptyParts` is [deprecated since around Qt5.14](https://doc.qt.io/qt-5/qstring-obsolete.html ),
and has been removed in Qt6.
We replace it with `Qt::SkipEmptyParts` for Qt >= 5.14
2022-09-27 21:04:19 +02:00
Ludovic LANGE
97844ad1e5
make QCustomPlot compatible with Qt6.2+ (qt6)
...
Cf the discussion here: https://www.qcustomplot.com/index.php/support/forum/2380
2022-09-24 22:23:08 +02:00
Ludovic LANGE
5ac5a7d45f
replace QAtomicInt load()/store() with loadRelaxed()/storeRelaxed()
...
Since Qt5, some methods of QAtomicInteger [are deprecated](https://doc.qt.io/qt-5/qatomicinteger-obsolete.html ).
Qt6 remove those methods, thus we need to replace them.
2022-09-24 22:13:02 +02:00
Ludovic LANGE
c2fc1f179e
replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole (qt6)
...
Since long time ago (12yrs), Qt::BackgroundColorRole/Qt::TextColorRole are aliased by Qt::BackgroundRole/Qt::ForegroundRole
and raise a deprecation warning.
Qt6 remove those values, thus we need to use Qt::BackgroundRole/Qt::ForegroundRole.
2022-09-24 22:06:09 +02:00
Ludovic LANGE
5a18c611e1
replace QTime with QElapsedTimer when possible (qt6)
...
Since Qt5, some methods of QTime [are deprecated](https://doc.qt.io/qt-5/qtime-obsolete.html ).
Qt6 remove those methods, thus in two instances we need to use
a [QElapsedTimer](https://doc.qt.io/qt-6/qelapsedtimer.html ) instead of a QTime.
QElapsedTimer is available since Qt5.4, and is already used in the source
code.
2022-09-24 17:54:51 +02:00
Ludovic LANGE
9fb86e649f
remove qRegisterMetaTypeStreamOperators (qt6)
...
Since Qt6, some methods of [QMetaType are removed](https://doc.qt.io/qt-6/qtcore-changes-qt6.html#the-qmetatype-class ).
We remove `qRegisterMetaTypeStreamOperators()` calls for Qt >= 6
2022-09-24 17:51:25 +02:00
Ludovic LANGE
07db287407
replace qrand/qsrand with QRandomGenerator (qt6)
...
Since Qt5, qrand/qsrand methods [are deprecated](https://doc.qt.io/qt-5/qtglobal-obsolete.html#qrand ).
Qt6 remove those methods, thus we need to use instead a [QRandomGenerator](https://doc.qt.io/qt-6/qrandomgenerator.html ).
QElapsedTimer is available since Qt5.10, and is already used in the source code.
2022-09-24 17:34:40 +02:00