new compile problem git master, gcc-8

Thomas Baumgart thb at net-bembel.de
Tue Jun 5 06:14:14 UTC 2018


Jack,

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.

> 
> 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

https://www.telegram.org/       Telegram, the better WhatsApp
-------------------------------------------------------------
As soon as we wish to be happier, we are no longer happy. -- Walter Landor
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 846 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20180605/b76fae36/attachment.sig>


More information about the KMyMoney-devel mailing list