Changeset View
Changeset View
Standalone View
Standalone View
src/core/slaveinterface.cpp
Show First 20 Lines • Show All 313 Lines • ▼ Show 20 Line(s) | 312 | case MSG_NEED_SUBURL_DATA: { | |||
---|---|---|---|---|---|
314 | break; | 314 | break; | ||
315 | } | 315 | } | ||
316 | case MSG_HOST_INFO_REQ: { | 316 | case MSG_HOST_INFO_REQ: { | ||
317 | QString hostName; | 317 | QString hostName; | ||
318 | stream >> hostName; | 318 | stream >> hostName; | ||
319 | HostInfo::lookupHost(hostName, this, SLOT(slotHostInfo(QHostInfo))); | 319 | HostInfo::lookupHost(hostName, this, SLOT(slotHostInfo(QHostInfo))); | ||
320 | break; | 320 | break; | ||
321 | } | 321 | } | ||
322 | case MSG_PRIVILEGE_EXEC: | ||||
323 | emit privilegeOperationRequested(); | ||||
dfaure: Do the bytearray -> enum conversion here, so that everyone else than slavebase and… | |||||
324 | break; | ||||
322 | default: | 325 | default: | ||
323 | qCWarning(KIO_CORE) << "Slave sends unknown command (" << _cmd << "), dropping slave"; | 326 | qCWarning(KIO_CORE) << "Slave sends unknown command (" << _cmd << "), dropping slave"; | ||
324 | return false; | 327 | return false; | ||
325 | } | 328 | } | ||
326 | return true; | 329 | return true; | ||
327 | } | 330 | } | ||
328 | 331 | | |||
329 | void SlaveInterface::setOffset(KIO::filesize_t o) | 332 | void SlaveInterface::setOffset(KIO::filesize_t o) | ||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |
Do the bytearray -> enum conversion here, so that everyone else than slavebase and slaveinterface (i.e. both the job and the slave) only see the enum.
QDataStream can be used to stream an int (the enum value) in and out, no need to use "strings" in the bytearray. Alternatively, QByteArray::number() can do the job as long as it's really just the one enum value that's needed here (and we know it will never need to be more...).