Changeset View
Changeset View
Standalone View
Standalone View
src/core/slaveinterface.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | 45 | | |||
46 | SlaveInterface::~SlaveInterface() | 46 | SlaveInterface::~SlaveInterface() | ||
47 | { | 47 | { | ||
48 | // Note: no Debug() here (scheduler is deleted very late) | 48 | // Note: no Debug() here (scheduler is deleted very late) | ||
49 | 49 | | |||
50 | delete d_ptr; | 50 | delete d_ptr; | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | #if KIOCORE_BUILD_DEPRECATED_SINCE(5, 0) | ||||
53 | void SlaveInterface::setConnection(Connection *connection) | 54 | void SlaveInterface::setConnection(Connection *connection) | ||
54 | { | 55 | { | ||
55 | Q_D(SlaveInterface); | 56 | Q_D(SlaveInterface); | ||
56 | d->connection = connection; | 57 | d->connection = connection; | ||
57 | } | 58 | } | ||
59 | #endif | ||||
58 | 60 | | |||
61 | #if KIOCORE_BUILD_DEPRECATED_SINCE(5, 0) | ||||
59 | Connection *SlaveInterface::connection() const | 62 | Connection *SlaveInterface::connection() const | ||
60 | { | 63 | { | ||
61 | const Q_D(SlaveInterface); | 64 | const Q_D(SlaveInterface); | ||
62 | return d->connection; | 65 | return d->connection; | ||
63 | } | 66 | } | ||
67 | #endif | ||||
64 | 68 | | |||
65 | static KIO::filesize_t readFilesize_t(QDataStream &stream) | 69 | static KIO::filesize_t readFilesize_t(QDataStream &stream) | ||
66 | { | 70 | { | ||
67 | KIO::filesize_t result; | 71 | KIO::filesize_t result; | ||
68 | stream >> result; | 72 | stream >> result; | ||
69 | return result; | 73 | return result; | ||
70 | } | 74 | } | ||
71 | 75 | | |||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 185 | case MSG_CANRESUME: // From the get job | |||
182 | d->filesize = d->offset; | 186 | d->filesize = d->offset; | ||
183 | emit canResume(0); // the arg doesn't matter | 187 | emit canResume(0); // the arg doesn't matter | ||
184 | break; | 188 | break; | ||
185 | case MSG_ERROR: | 189 | case MSG_ERROR: | ||
186 | stream >> i >> str1; | 190 | stream >> i >> str1; | ||
187 | //qDebug() << "error " << i << " " << str1; | 191 | //qDebug() << "error " << i << " " << str1; | ||
188 | emit error(i, str1); | 192 | emit error(i, str1); | ||
189 | break; | 193 | break; | ||
194 | #if KIOCORE_BUILD_DEPRECATED_SINCE(5, 45) | ||||
190 | case MSG_SLAVE_STATUS: | 195 | case MSG_SLAVE_STATUS: | ||
196 | #endif | ||||
191 | case MSG_SLAVE_STATUS_V2: { | 197 | case MSG_SLAVE_STATUS_V2: { | ||
192 | qint64 pid; | 198 | qint64 pid; | ||
193 | QByteArray protocol; | 199 | QByteArray protocol; | ||
194 | stream >> pid >> protocol >> str1 >> b; | 200 | stream >> pid >> protocol >> str1 >> b; | ||
195 | emit slaveStatus(pid, protocol, str1, (b != 0)); | 201 | emit slaveStatus(pid, protocol, str1, (b != 0)); | ||
196 | break; | 202 | break; | ||
197 | } | 203 | } | ||
198 | case MSG_CONNECTED: | 204 | case MSG_CONNECTED: | ||
Show All 34 Lines | 236 | case INF_TRUNCATED: { | |||
233 | break; | 239 | break; | ||
234 | } | 240 | } | ||
235 | case INF_SPEED: | 241 | case INF_SPEED: | ||
236 | stream >> ul; | 242 | stream >> ul; | ||
237 | d->slave_calcs_speed = true; | 243 | d->slave_calcs_speed = true; | ||
238 | d->speed_timer.stop(); | 244 | d->speed_timer.stop(); | ||
239 | emit speed(ul); | 245 | emit speed(ul); | ||
240 | break; | 246 | break; | ||
247 | #if KIOCORE_BUILD_DEPRECATED_SINCE(3, 0) | ||||
241 | case INF_GETTING_FILE: | 248 | case INF_GETTING_FILE: | ||
242 | break; | 249 | break; | ||
250 | #endif | ||||
243 | case INF_ERROR_PAGE: | 251 | case INF_ERROR_PAGE: | ||
244 | emit errorPage(); | 252 | emit errorPage(); | ||
245 | break; | 253 | break; | ||
246 | case INF_REDIRECTION: { | 254 | case INF_REDIRECTION: { | ||
247 | QUrl url; | 255 | QUrl url; | ||
248 | stream >> url; | 256 | stream >> url; | ||
249 | emit redirection(url); | 257 | emit redirection(url); | ||
250 | break; | 258 | break; | ||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |