Changeset View
Changeset View
Standalone View
Standalone View
src/util/externalcommand.cpp
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Line(s) | 187 | { | |||
---|---|---|---|---|---|
189 | const qint64 blockSize = 10 * 1024 * 1024; // number of bytes per block to copy | 189 | const qint64 blockSize = 10 * 1024 * 1024; // number of bytes per block to copy | ||
190 | 190 | | |||
191 | if (!QDBusConnection::systemBus().isConnected()) { | 191 | if (!QDBusConnection::systemBus().isConnected()) { | ||
192 | qWarning() << "Could not connect to DBus system bus"; | 192 | qWarning() << "Could not connect to DBus system bus"; | ||
193 | return false; | 193 | return false; | ||
194 | } | 194 | } | ||
195 | 195 | | |||
196 | // TODO KF6:Use new signal-slot syntax | 196 | // TODO KF6:Use new signal-slot syntax | ||
197 | connect(m_job, SIGNAL(percent(KJob*, unsigned long)), this, SLOT(emitProgress(KJob*, unsigned long))); | 197 | connect(m_job, SIGNAL(percent(KJob*, unsigned long)), this, SLOT(emitProgress(KJob*, quint32))); | ||
pino: The signal in KJob is:
lang=c++
void percent(KJob *job, unsigned long percent);
so this… | |||||
198 | connect(m_job, &KAuth::ExecuteJob::newData, this, &ExternalCommand::emitReport); | 198 | connect(m_job, &KAuth::ExecuteJob::newData, this, &ExternalCommand::emitReport); | ||
199 | 199 | | |||
200 | auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"), | 200 | auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"), | ||
201 | QStringLiteral("/Helper"), QDBusConnection::systemBus(), this); | 201 | QStringLiteral("/Helper"), QDBusConnection::systemBus(), this); | ||
202 | interface->setTimeout(10 * 24 * 3600 * 1000); // 10 days | 202 | interface->setTimeout(10 * 24 * 3600 * 1000); // 10 days | ||
203 | QByteArray request; | 203 | QByteArray request; | ||
204 | 204 | | |||
205 | const quint64 nonce = interface->getNonce(); | 205 | const quint64 nonce = interface->getNonce(); | ||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |
The signal in KJob is:
so this change is not correct, as the size of long is not the same as int.