diff --git a/core/backends/lan/uploadjob.cpp b/core/backends/lan/uploadjob.cpp index 09fe36fd3..665f2004a 100644 --- a/core/backends/lan/uploadjob.cpp +++ b/core/backends/lan/uploadjob.cpp @@ -29,16 +29,12 @@ UploadJob::UploadJob(const QSharedPointer& source, const QString& deviceId) : KJob() + , mInput(source) + , mServer(new Server(this)) + , mSocket(nullptr) + , mPort(0) + , mDeviceId(deviceId) // We will use this info if link is on ssl, to send encrypted payload { -// TODO: initialize in constructor - mInput = source; - mServer = new Server(this); - mSocket = nullptr; - mPort = 0; - - // We will use this info if link is on ssl, to send encrypted payload - this->mDeviceId = deviceId; - connect(mInput.data(), SIGNAL(readyRead()), this, SLOT(startUploading())); connect(mInput.data(), SIGNAL(aboutToClose()), this, SLOT(aboutToClose())); } diff --git a/core/backends/lan/uploadjob.h b/core/backends/lan/uploadjob.h index 775fe4402..146a1b2f2 100644 --- a/core/backends/lan/uploadjob.h +++ b/core/backends/lan/uploadjob.h @@ -41,11 +41,11 @@ public: QVariantMap transferInfo(); private: - QSharedPointer mInput; - Server* mServer; + const QSharedPointer mInput; + Server * const mServer; QSslSocket* mSocket; quint16 mPort; - QString mDeviceId; + const QString mDeviceId; private Q_SLOTS: void startUploading();