From 4d4056ad518aec8a9802744908cce33f7ebaf9f5 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sat, 15 Aug 2020 19:46:18 +0200 Subject: [PATCH] fix compilation on gcc --- src/util/QObjectRef.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util/QObjectRef.hpp b/src/util/QObjectRef.hpp index ec4259399..939f9b7bf 100644 --- a/src/util/QObjectRef.hpp +++ b/src/util/QObjectRef.hpp @@ -66,10 +66,11 @@ private: // new if (other) { - this->conn_ = QObject::connect( - other, &QObject::destroyed, qApp, - [this](QObject *) { this->set(nullptr); }, - Qt::DirectConnection); + // the cast here should absolutely not be necessary, but gcc still requires it + this->conn_ = + QObject::connect((QObject *)other, &QObject::destroyed, qApp, + [this](QObject *) { this->set(nullptr); }, + Qt::DirectConnection); } this->t_ = other;