Replaced old connect() with QT5 style. Part 3
ClosedPublic

Authored by mchabrecek on Nov 5 2018, 4:52 PM.

Details

Summary

Replacing connect() lines with the new signal/slot syntax in Qt5. Details: https://wiki.qt.io/New_Signal_Slot_Syntax.

There many of them. This is the third part.

Diff Detail

Repository
R167 Krusader
Branch
newConnection4
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4863
Build 4881: arc lint + arc unit
mchabrecek requested review of this revision.Nov 5 2018, 4:52 PM
mchabrecek created this revision.
yurchor added inline comments.
krusader/KViewer/lister.cpp
1933–1934

Maybe it would be better to declare

KIO::TransferJob *saveJob = KIO::put(url, -1, KIO::Overwrite);

and avoid dynamic casts?

abika accepted this revision as: abika.Nov 11 2018, 1:53 PM
abika added a subscriber: abika.

Please get rid of the dynamic casts. Everything else is fine. Thanks!

krusader/KViewer/lister.cpp
1933–1934

yes, i agree.

krusader/Konfigurator/krresulttable.cpp
200

here, too: better change the type of _label to KUrlLabel

krusader/Panel/krlayoutfactory.cpp
305

And here, too: please change the type of frame to ListPanelFrame and panel to ListPanel.

krusader/Synchronizer/synchronizerdirlist.cpp
146–148

And here, too: please change the type of job to ListJob.

This revision is now accepted and ready to land.Nov 11 2018, 1:53 PM
mchabrecek marked 3 inline comments as done.
  • Remove some dynamic casts

Can I push it now to the master?

Thank you,
Miro

krusader/Konfigurator/krresulttable.cpp
200

_label as QLabel is used for creating more compoments, many of them are Qlabels, so it won't work without bigger refactoring.

So I won't change it

krusader/Panel/krlayoutfactory.cpp
305

Panel to ListPanel is not so strait forward. It forces dynamic cast at KrLayoutFactory constructor:
../Panel/krlayoutfactory.h:39:103: error: invalid conversion from ‘QWidget*’ to ‘ListPanel*’ [-fpermissive]

KrLayoutFactory(QWidget *panel, QHash<QString, QWidget*> &widgets) : panel(panel), widgets(widgets) {}

So I won't change it

Can I push it now to the master?

Thank you,
Miro

I guess so. At least, no objections from me. Thanks for your patience.

This revision was automatically updated to reflect the committed changes.