Port some core Q_PRIVATE_SLOTS to new connect syntax
ClosedPublic

Authored by davidedmundson on Nov 30 2018, 2:54 PM.

Details

Summary

KJob's are quite QObject heavy, we lose a non-trivial amount of time in
signal matching strings. This ports some Q_PRIVATE_SLOTS in FileCopyJob
and the Job base.

Test Plan

Relevant unit tests
Copied some files

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5549
Build 5567: arc lint + arc unit
davidedmundson created this revision.Nov 30 2018, 2:54 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 30 2018, 2:54 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 30 2018, 2:54 PM
broulik added inline comments.
src/core/filecopyjob.cpp
207–208

Why this change?

241

Add q context

242

All slotProcessedSize does is call q->setProcessedAmount so you can probably call this directly

244–254

Same as processedSize

src/core/job.cpp
88–91

Capture only this

davidedmundson added inline comments.Nov 30 2018, 3:32 PM
src/core/filecopyjob.cpp
207–208

m_copyJob is a superclass of DirectCopyJob which doesn't have the signal.

so it's this or

q->connect(qobject_cast<DirectCopyJob*>(m_copyJob), ....)

davidedmundson marked an inline comment as done.

update

apol accepted this revision.Nov 30 2018, 4:27 PM
apol added a subscriber: apol.

LGTM

This revision is now accepted and ready to land.Nov 30 2018, 4:27 PM
This revision was automatically updated to reflect the committed changes.