--- common/ip4.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ common/ip4.cpp 2025-06-10 18:09:43.000000000 +0800 @@ -20,6 +20,7 @@ #include "ip4.h" #include +#include Ip4Protocol::Ip4Protocol(StreamBase *stream, AbstractProtocol *parent) : AbstractProtocol(stream, parent) --- common/ip6.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ common/ip6.cpp 2025-06-10 18:09:35.000000000 +0800 @@ -18,8 +18,9 @@ */ #include "ip6.h" -#include +#include +#include Ip6Protocol::Ip6Protocol(StreamBase *stream, AbstractProtocol *parent) : AbstractProtocol(stream, parent) --- common/mac.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ common/mac.cpp 2025-06-10 18:10:20.000000000 +0800 @@ -23,6 +23,7 @@ #include "../common/streambase.h" #include +#include #define uintToMacStr(num) \ QString("%1").arg(num, 6*2, BASE_HEX, QChar('0')) \ --- common/updater.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ common/updater.cpp 2025-06-10 17:59:13.000000000 +0800 @@ -22,6 +22,7 @@ #include #include #include +#include #include extern const char* version; @@ -50,7 +51,7 @@ QNetworkRequest request(QUrl("http://update.ostinato.org/update/pad.xml")); //reqHdr.setHeader("Host", host); - request.setHeader(QNetworkRequest::UserAgentHeader, userAgent()); + request.setRawHeader("User-Agent", userAgent().toUtf8()); connect(http_, SIGNAL(finished(QNetworkReply*)), this, SLOT(parseXml(QNetworkReply*))); --- common/tosdscp.ui.orig 2019-09-07 15:01:53.000000000 +0800 +++ common/tosdscp.ui 2025-06-10 18:42:43.000000000 +0800 @@ -218,9 +218,6 @@ 255 - - 16 - --- client/streamlistdelegate.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/streamlistdelegate.cpp 2025-06-10 19:53:22.000000000 +0800 @@ -177,7 +177,8 @@ if ((event->type() == QEvent::MouseButtonRelease) || (event->type() == QEvent::MouseButtonDblClick)) { - QRect checkRect = doCheck(option, option.rect, Qt::Checked); + QRect checkRect = QApplication::style()-> + subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &option); QRect emptyRect; doLayout(option, &checkRect, &emptyRect, &emptyRect, false); if (!checkRect.contains(static_cast(event)->pos())) @@ -191,4 +192,3 @@ return QItemDelegate::editorEvent(event, model, option, index); } - --- client/devicegroupdialog.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/devicegroupdialog.cpp 2025-06-10 19:09:43.000000000 +0800 @@ -96,7 +96,7 @@ vlans->setItemDelegateForColumn(i, spd); } - vlans->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); + vlans->horizontalHeader()->setResizeMode(QHeaderView::Stretch); vlans->resizeRowsToContents(); // Set vlan tag count *after* adding all items, so connected slots --- client/icononlydelegate.h.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/icononlydelegate.h 2025-06-10 19:38:52.000000000 +0800 @@ -21,20 +21,20 @@ #define _ICON_ONLY_DELEGATE #include +#include class IconOnlyDelegate : public QStyledItemDelegate { using QStyledItemDelegate::QStyledItemDelegate; void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const + const QModelIndex &index) const override { QStyleOptionViewItem opt = option; opt.decorationPosition = QStyleOptionViewItem::Top; - opt.features &= ~QStyleOptionViewItem::HasDisplay; + static_cast(opt).text = QString(); QStyledItemDelegate::paint(painter, opt, index); } }; #endif - --- client/xqlocale.h.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/xqlocale.h 2025-06-10 19:37:50.000000000 +0800 @@ -25,7 +25,7 @@ class XLocale: public QLocale { public: - double toDouble(const QString &s, bool *ok = Q_NULLPTR) const { + double toDouble(const QString &s, bool *ok = nullptr) const { QString s2 = s; return QLocale::toDouble(s2.remove(groupSeparator()), ok); } --- client/applymsg.h.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/applymsg.h 2025-06-10 19:38:18.000000000 +0800 @@ -30,7 +30,7 @@ class ApplyMessage: public QDialog { public: - ApplyMessage(QWidget *parent = Q_NULLPTR); + ApplyMessage(QWidget *parent = nullptr); public slots: void show(); --- client/main.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/main.cpp 2025-06-10 19:16:07.000000000 +0800 @@ -42,8 +42,7 @@ QSettings *appSettings; QMainWindow *mainWindow; -void NoMsgHandler(QtMsgType type, const QMessageLogContext &context, - const QString &msg); +void NoMsgHandler(QtMsgType type, const char *msg); int main(int argc, char* argv[]) { @@ -59,7 +58,7 @@ #ifndef QT_DEBUG // Release mode if (appParams.optLogsDisabled()) - qInstallMessageHandler(NoMsgHandler); + qInstallMsgHandler(NoMsgHandler); #endif OstProtocolManager = new ProtocolManager(); @@ -96,8 +95,7 @@ return exitCode; } -void NoMsgHandler(QtMsgType type, const QMessageLogContext &/*context*/, - const QString &msg) +void NoMsgHandler(QtMsgType type, const char *msg) { if (type == QtFatalMsg) { fprintf(stderr, "%s\n", qPrintable(msg)); @@ -105,4 +103,3 @@ abort(); } } - --- client/logsmodel.h.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/logsmodel.h 2025-06-10 19:13:06.000000000 +0800 @@ -22,6 +22,7 @@ #include #include +#include class LogsModel: public QAbstractTableModel { --- client/logswindow.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/logswindow.cpp 2025-06-10 19:12:48.000000000 +0800 @@ -41,7 +41,7 @@ logs->verticalHeader()->minimumSectionSize()); logs->setShowGrid(false); logs->setAlternatingRowColors(true); - logs->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch); + logs->horizontalHeader()->setResizeMode(3, QHeaderView::Stretch); parentDock_ = qobject_cast(parent); windowTitle_ = parentDock_->windowTitle(); --- rpc/rpcconn.h.orig 2019-09-07 15:01:53.000000000 +0800 +++ rpc/rpcconn.h 2025-06-10 19:16:54.000000000 +0800 @@ -24,6 +24,10 @@ #include +#ifndef qintptr +typedef int qintptr; +#endif + // forward declarations class PbRpcController; class QTcpSocket; @@ -47,9 +51,7 @@ RpcConnection(qintptr socketDescriptor, ::google::protobuf::Service *service); virtual ~RpcConnection(); - static void connIdMsgHandler(QtMsgType type, - const QMessageLogContext &context, - const QString &msg); + static void connIdMsgHandler(QtMsgType type, const char *msg); private: void writeHeader(char* header, quint16 type, quint16 method, quint32 length); --- rpc/rpcconn.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ rpc/rpcconn.cpp 2025-06-10 19:17:26.000000000 +0800 @@ -407,7 +407,7 @@ } void RpcConnection::connIdMsgHandler(QtMsgType /*type*/, - const QMessageLogContext &/*context*/, const QString &msg) + const char *msg) { if (connId.hasLocalData()) { QString newMsg(*connId.localData()); --- rpc/rpcserver.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ rpc/rpcserver.cpp 2025-06-10 19:17:08.000000000 +0800 @@ -28,7 +28,7 @@ service = NULL; if (perConnLogs) - qInstallMessageHandler(RpcConnection::connIdMsgHandler); + qInstallMsgHandler(RpcConnection::connIdMsgHandler); } RpcServer::~RpcServer() --- rpc/rpcserver.h.orig 2019-09-07 15:01:53.000000000 +0800 +++ rpc/rpcserver.h 2025-06-10 19:17:41.000000000 +0800 @@ -24,6 +24,10 @@ #include +#ifndef qintptr +typedef int qintptr; +#endif + // forward declaration namespace google { namespace protobuf { --- client/ostinato.pro.orig 2019-09-07 15:01:53.000000000 +0800 +++ client/ostinato.pro 2025-06-10 20:01:08.000000000 +0800 @@ -30,7 +30,7 @@ "../common/libostproto.a" \ "../rpc/libpbrpc.a" } -LIBS += -lprotobuf +LIBS += -L"@PROTOROOT@/lib" -lprotobuf LIBS += -L"../extra/qhexedit2/$(OBJECTS_DIR)/" -lqhexedit2 RESOURCES += ostinato.qrc HEADERS += \ --- server/drone.pro.orig 2019-09-07 15:01:53.000000000 +0800 +++ server/drone.pro 2025-06-10 21:27:25.000000000 +0800 @@ -37,7 +37,7 @@ LIBS += -lnl-3 -lnl-route-3 } LIBS += -lm -LIBS += -lprotobuf +LIBS += -L"@PROTOROOT@/lib" -lprotobuf HEADERS += drone.h \ pcaptransmitter.h \ myservice.h --- rpc/pbrpc.pro.orig 2019-09-07 15:01:53.000000000 +0800 +++ rpc/pbrpc.pro 2025-06-10 21:26:20.000000000 +0800 @@ -2,7 +2,7 @@ CONFIG += qt staticlib QT += network DEFINES += HAVE_REMOTE -LIBS += -lprotobuf +LIBS += -L"@PROTOROOT@/lib" -lprotobuf HEADERS += rpcserver.h rpcconn.h pbrpccontroller.h pbrpcchannel.h pbqtio.h SOURCES += rpcserver.cpp rpcconn.cpp pbrpcchannel.cpp --- server/drone_main.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ server/drone_main.cpp 2025-06-10 20:44:46.000000000 +0800 @@ -40,8 +40,7 @@ QSettings *appSettings; Params appParams; -void NoMsgHandler(QtMsgType type, const QMessageLogContext &context, - const QString &msg); +void NoMsgHandler(QtMsgType type, const char *msg); void cleanup(int /*signum*/) { @@ -60,7 +59,7 @@ #ifdef QT_NO_DEBUG if (appParams.optLogsDisabled()) - qInstallMessageHandler(NoMsgHandler); + qInstallMsgHandler(NoMsgHandler); #endif qDebug("Version: %s", version); @@ -112,8 +111,7 @@ return exitCode; } -void NoMsgHandler(QtMsgType type, const QMessageLogContext &/*context*/, - const QString &msg) +void NoMsgHandler(QtMsgType type, const char *msg) { if (type == QtFatalMsg) { fprintf(stderr, "%s\n", qPrintable(msg)); --- server/bsdport.cpp.orig 2019-09-07 15:01:53.000000000 +0800 +++ server/bsdport.cpp 2025-06-10 20:52:03.000000000 +0800 @@ -39,6 +39,7 @@ #include #include #include +#include #ifdef Q_OS_MAC #define ifr_flagshigh ifr_flags # Broken by https://github.com/pstavirs/ostinato/commit/db231054daa2b1f310688d8a7cbf2ebbcff37464 # Just disable, it is optional. --- extra/extra.pro.orig 2019-09-07 15:01:53.000000000 +0800 +++ extra/extra.pro 2025-06-10 18:26:28.000000000 +0800 @@ -2,6 +2,6 @@ SUBDIRS = \ qhexedit2 -greaterThan(QT_MINOR_VERSION, 6) { +greaterThan(QT_MAJOR_VERSION, 4) { SUBDIRS += modeltest }