Changeset View
Changeset View
Standalone View
Standalone View
src/core/storedtransferjob.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 54 | static inline StoredTransferJob *newJob(const QUrl &url, int command, | |||
---|---|---|---|---|---|
56 | const QByteArray &staticData, JobFlags flags) | 56 | const QByteArray &staticData, JobFlags flags) | ||
57 | { | 57 | { | ||
58 | StoredTransferJob *job = new StoredTransferJob( | 58 | StoredTransferJob *job = new StoredTransferJob( | ||
59 | *new StoredTransferJobPrivate(url, command, packedArgs, staticData)); | 59 | *new StoredTransferJobPrivate(url, command, packedArgs, staticData)); | ||
60 | job->setUiDelegate(KIO::createDefaultJobUiDelegate()); | 60 | job->setUiDelegate(KIO::createDefaultJobUiDelegate()); | ||
61 | if (!(flags & HideProgressInfo)) { | 61 | if (!(flags & HideProgressInfo)) { | ||
62 | KIO::getJobTracker()->registerJob(job); | 62 | KIO::getJobTracker()->registerJob(job); | ||
63 | } | 63 | } | ||
64 | if (!(flags & NoPrivilegeExecution)) { | ||||
65 | job->d_func()->m_privilegeExecutionEnabled = true; | ||||
66 | job->d_func()->m_operationType = Transfer; | ||||
67 | } | ||||
64 | return job; | 68 | return job; | ||
65 | } | 69 | } | ||
66 | 70 | | |||
67 | static inline StoredTransferJob *newJob(const QUrl &url, int command, | 71 | static inline StoredTransferJob *newJob(const QUrl &url, int command, | ||
68 | const QByteArray &packedArgs, | 72 | const QByteArray &packedArgs, | ||
69 | QIODevice *ioDevice, JobFlags flags) | 73 | QIODevice *ioDevice, JobFlags flags) | ||
70 | { | 74 | { | ||
71 | StoredTransferJob *job = new StoredTransferJob( | 75 | StoredTransferJob *job = new StoredTransferJob( | ||
72 | *new StoredTransferJobPrivate(url, command, packedArgs, ioDevice)); | 76 | *new StoredTransferJobPrivate(url, command, packedArgs, ioDevice)); | ||
73 | job->setUiDelegate(KIO::createDefaultJobUiDelegate()); | 77 | job->setUiDelegate(KIO::createDefaultJobUiDelegate()); | ||
74 | if (!(flags & HideProgressInfo)) { | 78 | if (!(flags & HideProgressInfo)) { | ||
75 | KIO::getJobTracker()->registerJob(job); | 79 | KIO::getJobTracker()->registerJob(job); | ||
76 | } | 80 | } | ||
81 | if (!(flags & NoPrivilegeExecution)) { | ||||
82 | job->d_func()->m_privilegeExecutionEnabled = true; | ||||
83 | job->d_func()->m_operationType = Transfer; | ||||
84 | } | ||||
77 | return job; | 85 | return job; | ||
78 | } | 86 | } | ||
79 | }; | 87 | }; | ||
80 | 88 | | |||
81 | StoredTransferJob::StoredTransferJob(StoredTransferJobPrivate &dd) | 89 | StoredTransferJob::StoredTransferJob(StoredTransferJobPrivate &dd) | ||
82 | : TransferJob(dd) | 90 | : TransferJob(dd) | ||
83 | { | 91 | { | ||
84 | connect(this, SIGNAL(data(KIO::Job*,QByteArray)), | 92 | connect(this, SIGNAL(data(KIO::Job*,QByteArray)), | ||
▲ Show 20 Lines • Show All 383 Lines • Show Last 20 Lines |