Bug 392795

Summary: Support QOverload<>::of in fix-old-style-connect
Product: [Developer tools] clazy Reporter: Alexander <ashaduri>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: CONFIRMED ---    
Severity: normal CC: smartins, woebbeking
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

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.