From c8734602b8be839764aece389ee19f3b128d22d5 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 13 Dec 2012 11:57:36 +0100 Subject: [PATCH] Use non-deprecated types and methods: WFlags -> WindowFlags (it's a typedef, and it's BC, nm says QFlags) toAscii -> toLatin1 fromAscii -> fromLatin1 as suggested by Treeve Jelbert on kde-frameworks-devel --- animations/bindings/easingcurve.cpp | 2 +- packagestructure.cpp | 2 +- private/remoteservice.cpp | 8 ++++---- private/remoteservicejob.cpp | 4 ++-- private/serviceprovider.cpp | 4 ++-- remote/credentials.cpp | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/animations/bindings/easingcurve.cpp b/animations/bindings/easingcurve.cpp index 724c99fac..91e913c81 100644 --- a/animations/bindings/easingcurve.cpp +++ b/animations/bindings/easingcurve.cpp @@ -74,7 +74,7 @@ static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng) QMetaObject meta = QEasingCurve::staticMetaObject; QMetaEnum easingCurveEnum = meta.enumerator(meta.indexOfEnumerator("Type")); - type = easingCurveEnum.keyToValue(arg.toString().toAscii().data()); + type = easingCurveEnum.keyToValue(arg.toString().toLatin1().data()); } if (type > -1 && type < QEasingCurve::Custom) { self->setType(static_cast(type)); diff --git a/packagestructure.cpp b/packagestructure.cpp index 7552edea1..b66069c45 100644 --- a/packagestructure.cpp +++ b/packagestructure.cpp @@ -484,7 +484,7 @@ void PackageStructure::read(const KConfigBase *config) QStringList groups = config->groupList(); foreach (const QString &group, groups) { KConfigGroup entry(config, group); - QByteArray key = group.toAscii(); + QByteArray key = group.toLatin1(); QString path = entry.readEntry("Path", QString()); QString name = entry.readEntry("Name", QString()); diff --git a/private/remoteservice.cpp b/private/remoteservice.cpp index b96c3ac17..cf695897e 100644 --- a/private/remoteservice.cpp +++ b/private/remoteservice.cpp @@ -111,7 +111,7 @@ void RemoteService::setLocation(const KUrl &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); @@ -199,7 +199,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 @@ -269,9 +269,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))); diff --git a/private/remoteservicejob.cpp b/private/remoteservicejob.cpp index 5c800d0eb..25da059b1 100644 --- a/private/remoteservicejob.cpp +++ b/private/remoteservicejob.cpp @@ -91,9 +91,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; diff --git a/private/serviceprovider.cpp b/private/serviceprovider.cpp index bac7d251c..61eda5839 100644 --- a/private/serviceprovider.cpp +++ b/private/serviceprovider.cpp @@ -201,7 +201,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; @@ -246,7 +246,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); diff --git a/remote/credentials.cpp b/remote/credentials.cpp index b1efc55f2..690a3b01b 100644 --- a/remote/credentials.cpp +++ b/remote/credentials.cpp @@ -112,7 +112,7 @@ Credentials Credentials::createCredentials(const QString &name) QCA::KeyGenerator generator; QCA::PrivateKey key = generator.createRSA(2048); QString pemKey(key.toPublicKey().toPEM()); - QString id = QCA::Hash("sha1").hashToString(pemKey.toAscii()); + QString id = QCA::Hash("sha1").hashToString(pemKey.toLatin1()); return Credentials(id, name, key.toPEM(), true); #else return Credentials(); @@ -146,7 +146,7 @@ bool Credentials::isValid() const if (d->publicKey.isNull()) { return false; } else { - QString id = QCA::Hash("sha1").hashToString(d->publicKey.toPEM().toAscii()); + QString id = QCA::Hash("sha1").hashToString(d->publicKey.toPEM().toLatin1()); return (id == d->id); } #else