Bug 392795 - Support QOverload<>::of in fix-old-style-connect
Summary: Support QOverload<>::of in fix-old-style-connect
Status: CONFIRMED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-06 11:30 UTC by Alexander
Modified: 2023-06-09 15:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2018-04-06 11:30:34 UTC
Hi,

Please support QOverload<> syntax in fix-old-style-connect.

Right now half of my connect() calls fail to convert to the new syntax because clazy complains somethink like:

FixIt failed, requires manual intervention: Too many overloads (2) for method
      currentIndexChanged for record QComboBox [-Wclazy-old-style-connect]

This is very common for QComboBox, QSpinBox, etc...

Qt docs show how to do it:
http://doc.qt.io/qt-5/qtglobal.html#qOverload

Ideally, this should be configurable, to choose between "qOverload<>" (C++14), "QOverload<>::of" (C++11), or "static_cast<void (QComboBox::*)(int)>" (Qt 5.6 and older).

Thanks
Comment 1 Sergio Martins 2018-04-08 15:10:35 UTC
I don't have much time now, so don't hold your breath.

But it's a good suggestion
Comment 2 Andre Woebbeking 2023-06-09 15:26:55 UTC
Would be really nice to have.