Building gmic-qt on qt-5.11 ?

Anybody managed this ? It fails at the connect line of

#if QT_VERSION >= 0x050200
QHBoxLayout * hbox = dynamic_cast<QHBoxLayout *>(layout());
if (hbox) {
hbox->setMargin(0);
hbox->setSpacing(0);
}
hbox->addWidget(_lineEdit = new QLineEdit(this));
_action = _lineEdit->addAction(LOAD_ICON(“edit-find”), QLineEdit::TrailingPosition);
connect(_action, SIGNAL(triggered(bool)), _lineEdit, SLOT(clear()));
#else

with
src/Widgets/SearchFieldWidget.cpp: In constructor ‘SearchFieldWidget::SearchFieldWidget(QWidget*)’:
src/Widgets/SearchFieldWidget.cpp:52:69: error: no matching function for call to ‘SearchFieldWidget::connect(QAction*&, const char [17], QLineEdit*&, const char [9])’
connect(_action, SIGNAL(triggered(bool)), _lineEdit, SLOT(clear()));
^
But for the messages after that about the possible candidates - Graecum est; non legitur.

I decided to try the sledgehammer approach: the following includes have all been added to other things to fix compiles with qt-5.11, so I added all of them to gmic-qt/src/Widgets/SearchFieldWidget.cpp after line 25 :slight_smile:

QAbstractitemDelegate
QAction
QButtonGroup
QStyle
QStyleOptionGraphicsItem
QStyleOptionMenuItem

With all of them added, and after fixing a speelinge error in one of these additions, it compiled. From here I can play around to find which are actually needed, and then look at conditionally including them.

Hmm, I had not realised gmic-qt shipped as part of gmic_source.

Patch (named as ‘.txt’) attached to

Hopefully it should still build on older Qt (not tested).