Add support for Qt5

This commit is contained in:
Duncan Ogilvie
2026-02-10 01:37:26 +01:00
parent 6bd61a6b78
commit 7194322831
16 changed files with 363 additions and 82 deletions

View File

@@ -47,7 +47,11 @@ int main(int argc, char* argv[]) {
app.quit();
});
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
QObject::connect(socket, &QLocalSocket::errorOccurred, [&](QLocalSocket::LocalSocketError err) {
#else
QObject::connect(socket, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error), [&](QLocalSocket::LocalSocketError err) {
#endif
fprintf(stderr, "[rcx-mcp-stdio] Socket error %d: %s\n",
(int)err, socket->errorString().toUtf8().constData());
app.quit();