qtests: Connect slots explicitly instead of using auto-connections
ClosedPublic

Authored by volkov on Oct 31 2018, 1:20 PM.

Diff Detail

Repository
R478 KDiagram: Libraries for diagrams
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7170
Build 7188: arc lint + arc unit
volkov requested review of this revision.Oct 31 2018, 1:20 PM
volkov created this revision.
tbaumgart added inline comments.
qtests/DrawIntoPainter/mainwindow.cpp
61

Why don't you use the new functor based connections as in

connect( lineTypeCB, &QComboBox::currentIndexChanged, this, &MainWindow::setLineType);
volkov added inline comments.Nov 1 2018, 11:42 AM
qtests/DrawIntoPainter/mainwindow.cpp
61

The corresponding overload of QComboBox::currentIndexChanged must be selected, and QOverload is the best way to do it:
connect( lineTypeCB, QOverload<const QString &>::of(&QComboBox::currentIndexChanged), this, &MainWindow::setLineType );

But QOverload was added in Qt 5.7 and KDiagram still requires only Qt 5.6.

tbaumgart accepted this revision as: tbaumgart.Nov 1 2018, 12:15 PM
tbaumgart added inline comments.
qtests/DrawIntoPainter/mainwindow.cpp
61

Makes sense. Thanks for clarifying.

This revision is now accepted and ready to land.Nov 1 2018, 12:15 PM
volkov added a comment.Nov 1 2018, 2:03 PM

Maybe bump up required Qt version?
Qt 5.9 is the current LTS release and the next LTS release Qt 5.12 is coming soon.

volkov closed this revision.Jan 16 2019, 11:16 AM