D10124: Faster simplejob start

Milian Wolff noreply at phabricator.kde.org
Tue Jan 30 15:37:20 UTC 2018


mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  the crash may be due to missing context, the three-arg connect shouldn't ever be used imo

INLINE COMMENTS

> simplejob.cpp:141
>  
> -    q->connect(slave, SIGNAL(connected()),
> -               SLOT(slotConnected()));
> +    QObject::connect(slave, &Slave::infoMessage,
> +               [=](const QString& message){ this->_k_slotSlaveInfoMessage(message);} );

use four-arg connect, i.e. also add `q` as context

> simplejob.cpp:144
>  
> -    q->connect(slave, SIGNAL(finished()),
> -               SLOT(slotFinished()));
> +    QObject::connect(slave, &Slave::connected,
> +               [=](){ this->slotConnected();} );

dito

> simplejob.cpp:147
>  
> -    q->connect(slave, SIGNAL(privilegeOperationRequested()),
> -               SLOT(slotPrivilegeOperationRequested()));
> +    QObject::connect(slave, &Slave::privilegeOperationRequested,
> +               [=](){ this->slotPrivilegeOperationRequested();} );

dito

> simplejob.cpp:152
>  
> -        q->connect(slave, SIGNAL(processedSize(KIO::filesize_t)),
> -                   SLOT(slotProcessedSize(KIO::filesize_t)));
> +        QObject::connect(slave, &Slave::totalSize,
> +               [=](KIO::filesize_t size){ this->slotTotalSize(size);} );

dito

> simplejob.cpp:155
> +
> +        QObject::connect(slave, &Slave::processedSize,
> +               [=](KIO::filesize_t size){ this->slotProcessedSize(size);} );

dito

> simplejob.cpp:158
> +
> +        QObject::connect(slave, &Slave::speed,
> +               [=](ulong speed){ this->slotSpeed(speed);} );

dito

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D10124

To: jtamate, #frameworks, mwolff
Cc: mwolff, broulik, ngraham, anthonyfieroni, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180130/40db4363/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list