new compile problem git master, gcc-8
Jack
ostroffjh at users.sourceforge.net
Wed Jun 6 20:08:30 UTC 2018
On 2018.06.05 02:14, Thomas Baumgart wrote:
> On Sonntag, 3. Juni 2018 02:23:26 CEST Jack Ostroff wrote:
>
> > Under Artix Linux, trying to compile KMM from git head, I get
> >
> > In file included from
> > /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
> > /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:
> In member function ‘void KFindTransactionDlgPrivate::init(bool)’:
> >
> /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130:
> > error: no matching function for call to
> > ‘KFindTransactionDlg::connect(QHeaderView*, void
> (QWidget::*)(const > > QPoint&), KFindTransactionDlg* const&, void
> (KFindTransactionDlg::*)())’
> > q->connect(ui->m_register->horizontalHeader(),
> &QWidget::customContextMenuRequested, q,
> &KFindTransactionDlg::slotSortOptions);
>
> The only thing I can think of is that the arguments of the signal and
> slot don't match. But that shouldn't be a problem. You can try to
> replace this statement with
>
> q->connect(ui->m_register->horizontalHeader(),
> SIGNAL(customContextMenuRequested()), q, SLOT(slotSortOptions()));
>
> and see if that makes a difference.
I already replied that doesn't work either, other than changing the
details of the error message, but as I dig further, I wonder if some of
the warnings might be useful to figure out the errors. I'm attaching
an output file with all the errors and warnings, in case it's easier to
read without any wrapping added by the email system(s) and I'm also
pasting here. In case the attachment doesn't get through, it's pasted
at the end of the message. The more I hunt through the qt docs, the
less it seems there was any significant change from 5.10 to 5.11, so
I'm just more confused, unless this does happen to be due to gcc 8.
>
> >
> > There are other warnings in the same file, and two instances of
> > /usr/include/qt/QtCore/qobject.h:308:13: error: no type named
> ‘type’ in
> > ‘struct std::enable_if<false, QMetaObject::Connection>’
> > but I figure I'll track things down one at a time.
> >
> > The same code compiles fine on my Gentoo box with gcc-7.3.0. The
> Artix
> > box has failed with more than one version of gcc-8.x, currently
> > 8.1.1. Since this is not my primary PC, it is not critical, but
> I'm
> > wondering if this might be related to the gcc version. Is anyone
> else
> > using this new a gcc?
> >
> > I admit I don't follow the code well enough here - I don't see
> where q
> > is defined, so I don't know where to even look for a connect
> function.
>
> q gets defined here:
>
> Q_Q(KFindTransactionDlg);
>
> See http://wiki.qt.io/D-Pointer for many details on the topic. So
> connect in fact is QObject::connect.
>
> > Jack
>
> --
>
> Regards
>
> Thomas Baumgart
[ 33%] Automatic MOC for target dialogs
[ 33%] Built target dialogs_autogen
[ 33%] Building CXX object
kmymoney/dialogs/CMakeFiles/dialogs.dir/kfindtransactiondlg.cpp.o
In file included from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h: In
member function ‘void KFindTransactionDlgPrivate::init(bool)’:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130:
error: no matching function for call to
‘KFindTransactionDlg::connect(QHeaderView*, void (QWidget::*)(const
QPoint&), KFindTransactionDlg* const&, void (KFindTransactionDlg::*)())’
q->connect(ui->m_register->horizontalHeader(),
&QWidget::customContextMenuRequested, q,
&KFindTransactionDlg::slotSortOptions);
^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
from /usr/include/qt/QtWidgets/qdialog.h:44,
from /usr/include/qt/QtWidgets/QDialog:1,
from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.h:25,
from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:19:
/usr/include/qt/QtCore/qobject.h:208:36: note: candidate: ‘static
QMetaObject::Connection QObject::connect(const QObject*, const char*,
const QObject*, const char*, Qt::ConnectionType)’
static QMetaObject::Connection connect(const QObject *sender,
const char *signal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:208:36: note: no known conversion
for argument 1 from ‘QHeaderView*’ to ‘const QObject*’
/usr/include/qt/QtCore/qobject.h:211:36: note: candidate: ‘static
QMetaObject::Connection QObject::connect(const QObject*, const
QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType)’
static QMetaObject::Connection connect(const QObject *sender,
const QMetaMethod &signal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:211:36: note: no known conversion
for argument 1 from ‘QHeaderView*’ to ‘const QObject*’
/usr/include/qt/QtCore/qobject.h:463:32: note: candidate:
‘QMetaObject::Connection QObject::connect(const QObject*, const char*,
const char*, Qt::ConnectionType) const’
inline QMetaObject::Connection QObject::connect(const QObject
*asender, const char *asignal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:463:32: note: no known conversion
for argument 1 from ‘QHeaderView*’ to ‘const QObject*’
/usr/include/qt/QtCore/qobject.h:228:43: note: candidate: ‘static
QMetaObject::Connection QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename
QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType)
[with Func1 = void (QWidget::*)(const QPoint&); Func2 = void
(KFindTransactionDlg::*)(); typename
QtPrivate::FunctionPointer<Func>::Object = QWidget; typename
QtPrivate::FunctionPointer<Func2>::Object = KFindTransactionDlg]’
static inline QMetaObject::Connection connect(const typename
QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:228:43: note: no known conversion
for argument 1 from ‘QHeaderView*’ to ‘const Object*’ {aka ‘const
QWidget*’}
/usr/include/qt/QtCore/qobject.h:260:13: note: candidate:
‘template<class Func1, class Func2> static typename
std::enable_if<((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >=
0), QMetaObject::Connection>::type QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’
connect(const typename
QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2
slot)
^~~~~~~
/usr/include/qt/QtCore/qobject.h:260:13: note: template argument
deduction/substitution failed:
In file included from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130:
note: candidate expects 3 arguments, 4 provided
q->connect(ui->m_register->horizontalHeader(),
&QWidget::customContextMenuRequested, q,
&KFindTransactionDlg::slotSortOptions);
^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
from /usr/include/qt/QtWidgets/qdialog.h:44,
from /usr/include/qt/QtWidgets/QDialog:1,
from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.h:25,
from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:19:
/usr/include/qt/QtCore/qobject.h:269:13: note: candidate:
‘template<class Func1, class Func2> static typename
std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >=
0) && (!
QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)),
QMetaObject::Connection>::type QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*,
Func2, Qt::ConnectionType)’
connect(const typename
QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const
QObject *context, Func2 slot,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:269:13: note: template argument
deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of ‘template<class
Func1, class Func2> static typename
std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >=
0) && (!
QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)),
QMetaObject::Connection>::type QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*,
Func2, Qt::ConnectionType) [with Func1 = void (QWidget::*)(const
QPoint&); Func2 = void (KFindTransactionDlg::*)()]’:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130:
required from here
/usr/include/qt/QtCore/qobject.h:269:13: error: no type named ‘type’ in
‘struct std::enable_if<false, QMetaObject::Connection>’
/usr/include/qt/QtCore/qobject.h:300:13: note: candidate:
‘template<class Func1, class Func2> static typename
std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount ==
-1), QMetaObject::Connection>::type QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’
connect(const typename
QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2
slot)
^~~~~~~
/usr/include/qt/QtCore/qobject.h:300:13: note: template argument
deduction/substitution failed:
In file included from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130:
note: candidate expects 3 arguments, 4 provided
q->connect(ui->m_register->horizontalHeader(),
&QWidget::customContextMenuRequested, q,
&KFindTransactionDlg::slotSortOptions);
^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
from /usr/include/qt/QtWidgets/qdialog.h:44,
from /usr/include/qt/QtWidgets/QDialog:1,
from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.h:25,
from
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:19:
/usr/include/qt/QtCore/qobject.h:308:13: note: candidate:
‘template<class Func1, class Func2> static typename
std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount ==
-1), QMetaObject::Connection>::type QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*,
Func2, Qt::ConnectionType)’
connect(const typename
QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const
QObject *context, Func2 slot,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:308:13: note: template argument
deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of ‘template<class
Func1, class Func2> static typename
std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount ==
-1), QMetaObject::Connection>::type QObject::connect(const typename
QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*,
Func2, Qt::ConnectionType) [with Func1 = void (QWidget::*)(const
QPoint&); Func2 = void (KFindTransactionDlg::*)()]’:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130:
required from here
/usr/include/qt/QtCore/qobject.h:308:13: error: no type named ‘type’ in
‘struct std::enable_if<false, QMetaObject::Connection>’
make[2]: *** [kmymoney/dialogs/CMakeFiles/dialogs.dir/build.make:421:
kmymoney/dialogs/CMakeFiles/dialogs.dir/kfindtransactiondlg.cpp.o]
Error 1
make[1]: *** [CMakeFiles/Makefile2:3912:
kmymoney/dialogs/CMakeFiles/dialogs.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
-------------- next part --------------
[ 33%] Automatic MOC for target dialogs
[ 33%] Built target dialogs_autogen
[ 33%] Building CXX object kmymoney/dialogs/CMakeFiles/dialogs.dir/kfindtransactiondlg.cpp.o
In file included from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h: In member function ‘void KFindTransactionDlgPrivate::init(bool)’:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130: error: no matching function for call to ‘KFindTransactionDlg::connect(QHeaderView*, void (QWidget::*)(const QPoint&), KFindTransactionDlg* const&, void (KFindTransactionDlg::*)())’
q->connect(ui->m_register->horizontalHeader(), &QWidget::customContextMenuRequested, q, &KFindTransactionDlg::slotSortOptions);
^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
from /usr/include/qt/QtWidgets/qdialog.h:44,
from /usr/include/qt/QtWidgets/QDialog:1,
from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.h:25,
from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:19:
/usr/include/qt/QtCore/qobject.h:208:36: note: candidate: ‘static QMetaObject::Connection QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)’
static QMetaObject::Connection connect(const QObject *sender, const char *signal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:208:36: note: no known conversion for argument 1 from ‘QHeaderView*’ to ‘const QObject*’
/usr/include/qt/QtCore/qobject.h:211:36: note: candidate: ‘static QMetaObject::Connection QObject::connect(const QObject*, const QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType)’
static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:211:36: note: no known conversion for argument 1 from ‘QHeaderView*’ to ‘const QObject*’
/usr/include/qt/QtCore/qobject.h:463:32: note: candidate: ‘QMetaObject::Connection QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const’
inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:463:32: note: no known conversion for argument 1 from ‘QHeaderView*’ to ‘const QObject*’
/usr/include/qt/QtCore/qobject.h:228:43: note: candidate: ‘static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType) [with Func1 = void (QWidget::*)(const QPoint&); Func2 = void (KFindTransactionDlg::*)(); typename QtPrivate::FunctionPointer<Func>::Object = QWidget; typename QtPrivate::FunctionPointer<Func2>::Object = KFindTransactionDlg]’
static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:228:43: note: no known conversion for argument 1 from ‘QHeaderView*’ to ‘const Object*’ {aka ‘const QWidget*’}
/usr/include/qt/QtCore/qobject.h:260:13: note: candidate: ‘template<class Func1, class Func2> static typename std::enable_if<((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot)
^~~~~~~
/usr/include/qt/QtCore/qobject.h:260:13: note: template argument deduction/substitution failed:
In file included from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130: note: candidate expects 3 arguments, 4 provided
q->connect(ui->m_register->horizontalHeader(), &QWidget::customContextMenuRequested, q, &KFindTransactionDlg::slotSortOptions);
^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
from /usr/include/qt/QtWidgets/qdialog.h:44,
from /usr/include/qt/QtWidgets/QDialog:1,
from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.h:25,
from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:19:
/usr/include/qt/QtCore/qobject.h:269:13: note: candidate: ‘template<class Func1, class Func2> static typename std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0) && (! QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType)’
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:269:13: note: template argument deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of ‘template<class Func1, class Func2> static typename std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0) && (! QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (QWidget::*)(const QPoint&); Func2 = void (KFindTransactionDlg::*)()]’:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130: required from here
/usr/include/qt/QtCore/qobject.h:269:13: error: no type named ‘type’ in ‘struct std::enable_if<false, QMetaObject::Connection>’
/usr/include/qt/QtCore/qobject.h:300:13: note: candidate: ‘template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2)’
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot)
^~~~~~~
/usr/include/qt/QtCore/qobject.h:300:13: note: template argument deduction/substitution failed:
In file included from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:20:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130: note: candidate expects 3 arguments, 4 provided
q->connect(ui->m_register->horizontalHeader(), &QWidget::customContextMenuRequested, q, &KFindTransactionDlg::slotSortOptions);
^
In file included from /usr/include/qt/QtWidgets/qwidget.h:45,
from /usr/include/qt/QtWidgets/qdialog.h:44,
from /usr/include/qt/QtWidgets/QDialog:1,
from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.h:25,
from /home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg.cpp:19:
/usr/include/qt/QtCore/qobject.h:308:13: note: candidate: ‘template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType)’
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
^~~~~~~
/usr/include/qt/QtCore/qobject.h:308:13: note: template argument deduction/substitution failed:
/usr/include/qt/QtCore/qobject.h: In substitution of ‘template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (QWidget::*)(const QPoint&); Func2 = void (KFindTransactionDlg::*)()]’:
/home/jack/KMM/kmymoney/kmymoney/dialogs/kfindtransactiondlg_p.h:108:130: required from here
/usr/include/qt/QtCore/qobject.h:308:13: error: no type named ‘type’ in ‘struct std::enable_if<false, QMetaObject::Connection>’
make[2]: *** [kmymoney/dialogs/CMakeFiles/dialogs.dir/build.make:421: kmymoney/dialogs/CMakeFiles/dialogs.dir/kfindtransactiondlg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3912: kmymoney/dialogs/CMakeFiles/dialogs.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
More information about the KMyMoney-devel
mailing list