D6039: No need to use a QBuffer in DownloadJob

Aleix Pol Gonzalez noreply at phabricator.kde.org
Tue May 30 22:33:09 UTC 2017


apol added inline comments.

INLINE COMMENTS

> downloadjob.cpp:74
>  {
> -    if (error != QAbstractSocket::RemoteHostClosedError) { //remote host closes when finishes
> -        qWarning(KDECONNECT_CORE) << "error..." << mSocket->errorString();
> -        setError(error + 1);
> -        setErrorText(mSocket->errorString());
> -    } else {
> -        auto ba = mSocket->readAll();
> -        mBuffer->write(ba);
> -        mBuffer->seek(0);
> -    }
> +    qWarning() << "error..." << (error == QAbstractSocket::RemoteHostClosedError) << mSocket->errorString();
> +    setError(error + 1);

qCWarning(KDECONNECT_CORE)

> downloadjob.cpp:87
> +{
> +    emitResult();
>  }

Why do we need to emit upon `connected`?

> filetransferjob.cpp:82
>  {
> +    // Don't put each ready read
> +    if (mTimer.isValid())

don't put?

REPOSITORY
  R224 KDE Connect

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

To: aacid, apol, albertvaka
Cc: #kde_connect
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20170530/d9e93af7/attachment-0001.html>


More information about the KDEConnect mailing list