new compile problem git master, gcc-8
Jack
ostroffjh at users.sourceforge.net
Wed Jun 6 16:42:55 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.
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:116:
error: no matching function for call to
‘KFindTransactionDlg::connect(QHeaderView*, const char [30],
KFindTransactionDlg* const&, const char [19])’
q->connect(ui->m_register->horizontalHeader(),
SIGNAL(customContextMenuRequested()), q, SLOT(slotSortOptions()));
^
I've looked at the docs, but I'm having trouble following, and some of
the examples have other than four parameters to connect(). As far as I
can tell, qt11 may have added some new ways to connect() but I don't
see any reasons anything which worked with 10 should not work with 11.
Amy other thoughts?
>
> >
> > 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
Jack
More information about the KMyMoney-devel
mailing list