Merge remote-tracking branch 'origin/KDE/4.10' into frameworks
"4e03e90 - (origin/KDE/4.10) Use non-deprecated types and methods" (rerunning the perl scripts rather than solving every conflict by hand)
This commit is contained in:
commit
eb992ce047
@ -123,7 +123,7 @@ void RemoteService::setLocation(const QUrl &location)
|
||||
Jolie::Message getOpDesc(resourcePathFromUrl(location), "startConnection");
|
||||
Jolie::Value data;
|
||||
data.children(JolieMessage::Field::IDENTITY) << Jolie::Value(identityByteArray);
|
||||
data.children(JolieMessage::Field::UUID) << Jolie::Value(m_uuid.toAscii());
|
||||
data.children(JolieMessage::Field::UUID) << Jolie::Value(m_uuid.toLatin1());
|
||||
getOpDesc.setData(data);
|
||||
|
||||
Jolie::PendingCall pendingReply = m_client->asyncCall(getOpDesc);
|
||||
@ -225,7 +225,7 @@ void RemoteService::slotGotPin(Plasma::ClientPinRequest *request)
|
||||
Jolie::Value value;
|
||||
value.children(JolieMessage::Field::PARAMETERS) << Jolie::Value(QByteArray());
|
||||
if (!request->pin().isEmpty()) {
|
||||
value.children(JolieMessage::Field::PIN) << Jolie::Value(request->pin().toAscii());
|
||||
value.children(JolieMessage::Field::PIN) << Jolie::Value(request->pin().toLatin1());
|
||||
}
|
||||
getOpDesc.setData(value);
|
||||
//TODO: async
|
||||
@ -302,9 +302,9 @@ Jolie::Message RemoteService::signMessage(const Jolie::Message &message) const
|
||||
}
|
||||
|
||||
Jolie::Value data = response.data();
|
||||
data.children(JolieMessage::Field::IDENTITYID) << Jolie::Value(identity.id().toAscii());
|
||||
data.children(JolieMessage::Field::IDENTITYID) << Jolie::Value(identity.id().toLatin1());
|
||||
data.children(JolieMessage::Field::TOKEN) << Jolie::Value(m_token);
|
||||
data.children(JolieMessage::Field::UUID) << Jolie::Value(m_uuid.toAscii());
|
||||
data.children(JolieMessage::Field::UUID) << Jolie::Value(m_uuid.toLatin1());
|
||||
response.setData(data);
|
||||
data.children(JolieMessage::Field::SIGNATURE) <<
|
||||
Jolie::Value(identity.signMessage(JolieMessage::payload(response)));
|
||||
|
@ -93,9 +93,9 @@ void RemoteServiceJob::start()
|
||||
Jolie::Message message(m_location.path(KUrl::RemoveTrailingSlash).remove(0, 1).toUtf8(),
|
||||
"startOperationCall");
|
||||
Jolie::Value data;
|
||||
data.children(JolieMessage::Field::OPERATION) << (Jolie::Value(operationName().toAscii()));
|
||||
data.children(JolieMessage::Field::OPERATION) << (Jolie::Value(operationName().toLatin1()));
|
||||
data.children(JolieMessage::Field::PARAMETERS) << Jolie::Value(params);
|
||||
data.children(JolieMessage::Field::DESTINATION) << Jolie::Value(destination().toAscii());
|
||||
data.children(JolieMessage::Field::DESTINATION) << Jolie::Value(destination().toLatin1());
|
||||
message.setData(data);
|
||||
|
||||
Jolie::Client *client = m_service->m_client;
|
||||
|
@ -241,7 +241,7 @@ void ServiceProvider::relay(Jolie::Server *server, int descriptor,
|
||||
|
||||
Jolie::Message response(message.resourcePath(), message.operationName(), message.id());
|
||||
QByteArray uuid = JolieMessage::field(JolieMessage::Field::UUID, message);
|
||||
response = appendToken(response, identity.id().toAscii(), uuid);
|
||||
response = appendToken(response, identity.id().toLatin1(), uuid);
|
||||
AuthorizationManager::self()->d->server->sendReply(descriptor, response);
|
||||
|
||||
return;
|
||||
@ -294,7 +294,7 @@ void ServiceProvider::operationCompleted(Plasma::ServiceJob *job)
|
||||
data.children(JolieMessage::Field::RESULT) << Jolie::Value(byteArrayResult);
|
||||
response.setData(data);
|
||||
if (job->error()) {
|
||||
response.setFault(Jolie::Fault(job->errorString().toAscii()));
|
||||
response.setFault(Jolie::Fault(job->errorString().toLatin1()));
|
||||
}
|
||||
|
||||
QByteArray id = JolieMessage::field(JolieMessage::Field::IDENTITYID, message);
|
||||
@ -367,7 +367,7 @@ Jolie::Message ServiceProvider::appendToken(Jolie::Message message,
|
||||
const QByteArray &caller,
|
||||
const QByteArray &uuid)
|
||||
{
|
||||
m_tokens[caller + uuid] = QUuid::createUuid().toString().toAscii();
|
||||
m_tokens[caller + uuid] = QUuid::createUuid().toString().toLatin1();
|
||||
//kDebug() << "setting token: " << m_tokens[caller + uuid].toBase64()
|
||||
//<< " for caller: " << caller.toBase64()
|
||||
//<< " with uuid caller: " << uuid.toBase64();
|
||||
|
@ -113,7 +113,7 @@ Credentials Credentials::createCredentials(const QString &name)
|
||||
QCA::KeyGenerator generator;
|
||||
QCA::PrivateKey key = generator.createRSA(2048);
|
||||
QString pemKey(key.toPublicKey().toPEM());
|
||||
QString id = QCryptographicHash::hash(pemKey.toAscii(), QCryptographicHash::Sha1);
|
||||
QString id = QCryptographicHash::hash(pemKey.toLatin1(), QCryptographicHash::Sha1);
|
||||
return Credentials(id, name, key.toPEM(), true);
|
||||
#else
|
||||
return Credentials();
|
||||
@ -147,7 +147,7 @@ bool Credentials::isValid() const
|
||||
if (d->publicKey.isNull()) {
|
||||
return false;
|
||||
} else {
|
||||
QString id = QCryptographicHash::hash(d->publicKey.toPEM().toAscii(), QCryptographicHash::Sha1);
|
||||
QString id = QCryptographicHash::hash(d->publicKey.toPEM().toLatin1(), QCryptographicHash::Sha1);
|
||||
return (id == d->id);
|
||||
}
|
||||
#else
|
||||
|
@ -72,7 +72,7 @@ SigningPrivate::SigningPrivate(Signing *auth, const QString &path)
|
||||
KUser user;
|
||||
m_keystorePath.append(user.homeDir()).append("/.gnupg/");
|
||||
} else {
|
||||
error = m_gpgContext->setEngineHomeDirectory(m_keystorePath.toAscii().data());
|
||||
error = m_gpgContext->setEngineHomeDirectory(m_keystorePath.toLatin1().data());
|
||||
if (error) {
|
||||
#ifndef NDEBUG
|
||||
kDebug() << "Failed setting custom gpg keystore directory: using default.";
|
||||
@ -130,7 +130,7 @@ void SigningPrivate::registerUltimateTrustKeys()
|
||||
|
||||
foreach (QString keyFile, keyFiles) {
|
||||
FILE *fp;
|
||||
fp = fopen(keyFile.toAscii().data(), "r");
|
||||
fp = fopen(keyFile.toLatin1().data(), "r");
|
||||
GpgME::Data data(fp);
|
||||
GpgME::ImportResult iRes = m_gpgContext->importKeys(data);
|
||||
if (iRes.error()) {
|
||||
@ -364,7 +364,7 @@ void SigningPrivate::keyAdded(const QString &path)
|
||||
m_keystoreDir->stopScan();
|
||||
|
||||
FILE *fp;
|
||||
fp = fopen(path.toAscii().data(), "r");
|
||||
fp = fopen(path.toLatin1().data(), "r");
|
||||
GpgME::Data data(fp);
|
||||
GpgME::ImportResult iRes = m_gpgContext->importKeys(data);
|
||||
|
||||
@ -455,7 +455,7 @@ QStringList SigningPrivate::signersOf(const QString id) const
|
||||
{
|
||||
QStringList result;
|
||||
GpgME::Error error;
|
||||
GpgME::Key key = m_gpgContext->key(id.toAscii().data(), error);
|
||||
GpgME::Key key = m_gpgContext->key(id.toLatin1().data(), error);
|
||||
|
||||
if (!error) {
|
||||
for (unsigned int i = 0; i < key.numUserIDs(); ++i) {
|
||||
@ -510,13 +510,13 @@ TrustLevel Signing::trustLevelOf(const QString &keyID) const
|
||||
for (int i = (int)Plasma::UnverifiableTrust; i <= (int)Plasma::UltimatelyTrusted; ++i) {
|
||||
QSet<QByteArray> tmp = d->keys[(Plasma::TrustLevel)i];
|
||||
foreach (QByteArray key, tmp) {
|
||||
if (key.contains(keyID.toAscii().data())) {
|
||||
if (key.contains(keyID.toLatin1().data())) {
|
||||
return (Plasma::TrustLevel)i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return d->addKeyToCache(keyID.toAscii());
|
||||
return d->addKeyToCache(keyID.toLatin1());
|
||||
}
|
||||
|
||||
QString Signing::signerOf(const Package &package) const
|
||||
@ -649,7 +649,7 @@ QString Signing::descriptiveString(const QString &keyID) const
|
||||
}
|
||||
|
||||
GpgME::Error error;
|
||||
GpgME::Key key = d->m_gpgContext->key(keyID.toAscii().data(), error);
|
||||
GpgME::Key key = d->m_gpgContext->key(keyID.toLatin1().data(), error);
|
||||
if (error) {
|
||||
return QString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user