View Issue Details

IDProjectCategoryView StatusLast Update
0004576FreeCADBugpublic2021-03-28 11:44
ReporterStefanBruens Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0004576: Prefer new-style/functor QObject::connect over string based
DescriptionNew-style or functor based connects allow compile-time checking of signal/slot arguments.

Usage of small lambdas often also allows to get rid of small helper slots/functions.

E.g. (src/Gui/Filedialog.cpp):

    connect(this, SIGNAL(filterSelected(const QString&)),
            this, SLOT(onSelectedFilter(const QString&)));

    connect(this, &Filedialog::filterSelected,
            this, &Filedialog::onSelectedFilter);
Additional Information

FreeCAD InformationOS: openSUSE Tumbleweed (KDE//usr/share/xsessions/plasma5)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.Unknown
Build type: Release
Python version: 3.8.7
Qt version: 5.15.2
Coin version: 3.1.3
OCC version: 7.5.1
Locale: English/United States (en_US)



2021-02-28 07:07

administrator   ~0015456

With v0.19 we still support Qt4 (and Py2) which doesn't support the offered method. Now with the started development of v0.20 we will drop Qt4/Py2 support and can start to use the new stuff.


2021-03-28 11:44

administrator   ~0015564

@wmayer should we do this before or after Toponaming patch (@realthunder is planning to submit a patch by the end of the month, is what he mentioned to me)

Issue History

Date Modified Username Field Change
2021-02-27 15:12 StefanBruens New Issue
2021-02-27 15:21 StefanBruens Tag Attached: Qt
2021-02-28 07:07 wmayer Note Added: 0015456
2021-03-28 11:42 Kunda1 Description Updated View Revisions
2021-03-28 11:44 Kunda1 Note Added: 0015564