[SCM] ktp-auth-handler packaging branch, master, updated. debian/15.12.1-2-282-g080758e

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:58:39 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-auth-handler.git;a=commitdiff;h=0d0a0e1

The following commit has been merged in the master branch:
commit 0d0a0e12c1032eead284bc26b147fae62a2bd1da
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Thu Dec 29 18:34:01 2011 +0100

    Use latin1 strings instead of char*
---
 sasl-auth-op.cpp                      | 16 ++++++++--------
 tls-cert-verifier-op.cpp              | 10 +++++-----
 x-messenger-oauth2-auth-operation.cpp |  2 +-
 x-messenger-oauth2-prompt.cpp         |  6 +++---
 x-telepathy-password-prompt.cpp       |  4 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/sasl-auth-op.cpp b/sasl-auth-op.cpp
index 521108c..09de944 100644
--- a/sasl-auth-op.cpp
+++ b/sasl-auth-op.cpp
@@ -55,19 +55,19 @@ void SaslAuthOp::gotProperties(Tp::PendingOperation *op)
 
     Tp::PendingVariantMap *pvm = qobject_cast<Tp::PendingVariantMap*>(op);
     QVariantMap props = qdbus_cast<QVariantMap>(pvm->result());
-    QStringList mechanisms = qdbus_cast<QStringList>(props.value("AvailableMechanisms"));
+    QStringList mechanisms = qdbus_cast<QStringList>(props.value(QLatin1String("AvailableMechanisms")));
     kDebug() << mechanisms;
 
     if (mechanisms.contains(QLatin1String("X-TELEPATHY-PASSWORD"))) {
         // everything ok, we can return from handleChannels now
         Q_EMIT ready(this);
-        XTelepathyPasswordAuthOperation *authop = new XTelepathyPasswordAuthOperation(m_account, m_saslIface, qdbus_cast<bool>(props.value("CanTryAgain")));
+        XTelepathyPasswordAuthOperation *authop = new XTelepathyPasswordAuthOperation(m_account, m_saslIface, qdbus_cast<bool>(props.value(QLatin1String("CanTryAgain"))));
         connect(authop,
                 SIGNAL(finished(Tp::PendingOperation*)),
                 SLOT(onAuthOperationFinished(Tp::PendingOperation*)));
-        uint status = qdbus_cast<uint>(props.value("SASLStatus"));
-        QString error = qdbus_cast<QString>(props.value("SASLError"));
-        QVariantMap errorDetails = qdbus_cast<QVariantMap>(props.value("SASLErrorDetails"));
+        uint status = qdbus_cast<uint>(props.value(QLatin1String("SASLStatus")));
+        QString error = qdbus_cast<QString>(props.value(QLatin1String("SASLError")));
+        QVariantMap errorDetails = qdbus_cast<QVariantMap>(props.value(QLatin1String("SASLErrorDetails")));
         authop->onSASLStatusChanged(status, error, errorDetails);
     } else if (mechanisms.contains(QLatin1String("X-MESSENGER-OAUTH2"))) {
         // everything ok, we can return from handleChannels now
@@ -76,9 +76,9 @@ void SaslAuthOp::gotProperties(Tp::PendingOperation *op)
         connect(authop,
                 SIGNAL(finished(Tp::PendingOperation*)),
                 SLOT(onAuthOperationFinished(Tp::PendingOperation*)));
-        uint status = qdbus_cast<uint>(props.value("SASLStatus"));
-        QString error = qdbus_cast<QString>(props.value("SASLError"));
-        QVariantMap errorDetails = qdbus_cast<QVariantMap>(props.value("SASLErrorDetails"));
+        uint status = qdbus_cast<uint>(props.value(QLatin1String("SASLStatus")));
+        QString error = qdbus_cast<QString>(props.value(QLatin1String("SASLError")));
+        QVariantMap errorDetails = qdbus_cast<QVariantMap>(props.value(QLatin1String("SASLErrorDetails")));
         authop->onSASLStatusChanged(status, error, errorDetails);
     } else {
         kWarning() << "X-TELEPATHY-PASSWORD and X-MESSENGER-OAUTH2 are the only supported SASL mechanism and are not available:" << mechanisms;
diff --git a/tls-cert-verifier-op.cpp b/tls-cert-verifier-op.cpp
index 5ffef3b..7e6008e 100644
--- a/tls-cert-verifier-op.cpp
+++ b/tls-cert-verifier-op.cpp
@@ -32,11 +32,11 @@ TlsCertVerifierOp::TlsCertVerifierOp(const Tp::AccountPtr &account,
       m_channel(channel)
 {
     QString certificatePath = qdbus_cast<QString>(channel->immutableProperties().value(
-                TP_QT_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION + ".ServerCertificate"));
+                TP_QT_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION + QLatin1String(".ServerCertificate")));
     m_hostname = qdbus_cast<QString>(channel->immutableProperties().value(
-                TP_QT_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION + ".Hostname"));
+                TP_QT_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION + QLatin1String(".Hostname")));
     m_referenceIdentities = qdbus_cast<QStringList>(channel->immutableProperties().value(
-                TP_QT_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION + ".ReferenceIdentities"));
+                TP_QT_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION + QLatin1String(".ReferenceIdentities")));
 
     m_authTLSCertificateIface = new Tp::Client::AuthenticationTLSCertificateInterface(
             channel->dbusConnection(), channel->busName(), certificatePath);
@@ -64,8 +64,8 @@ void TlsCertVerifierOp::gotProperties(Tp::PendingOperation *op)
 
     Tp::PendingVariantMap *pvm = qobject_cast<Tp::PendingVariantMap*>(op);
     QVariantMap props = qdbus_cast<QVariantMap>(pvm->result());
-    m_certType = qdbus_cast<QString>(props.value("CertificateType"));
-    m_certData = qdbus_cast<CertificateDataList>(props.value("certificateChainData"));
+    m_certType = qdbus_cast<QString>(props.value(QLatin1String("CertificateType")));
+    m_certData = qdbus_cast<CertificateDataList>(props.value(QLatin1String("certificateChainData")));
 
     // FIXME: verify cert
     setFinished();
diff --git a/x-messenger-oauth2-auth-operation.cpp b/x-messenger-oauth2-auth-operation.cpp
index a4950af..10a6e56 100644
--- a/x-messenger-oauth2-auth-operation.cpp
+++ b/x-messenger-oauth2-auth-operation.cpp
@@ -106,7 +106,7 @@ void XMessengerOAuth2AuthOperation::onDialogFinished(int result)
         return;
     case QDialog::Accepted:
         kDebug() << QLatin1String(m_dialog.data()->accessToken());
-        wallet.setEntry(m_account, XMessengerOAuth2TokenWalletEntry, m_dialog.data()->accessToken().toBase64());
+        wallet.setEntry(m_account, XMessengerOAuth2TokenWalletEntry, QLatin1String(m_dialog.data()->accessToken().toBase64()));
         m_saslIface->StartMechanismWithData(QLatin1String("X-MESSENGER-OAUTH2"), m_dialog.data()->accessToken());
         if (!m_dialog.isNull()) {
             m_dialog.data()->deleteLater();
diff --git a/x-messenger-oauth2-prompt.cpp b/x-messenger-oauth2-prompt.cpp
index fee8db2..ff82058 100644
--- a/x-messenger-oauth2-prompt.cpp
+++ b/x-messenger-oauth2-prompt.cpp
@@ -58,7 +58,7 @@ XMessengerOAuth2Prompt::XMessengerOAuth2Prompt(QWidget* parent) :
     widget->setContentsMargins(0, 0, 0, 0);
 
     setMainWidget(widget);
-    setWindowIcon(KIcon("telepathy-kde"));
+    setWindowIcon(KIcon(QLatin1String("telepathy-kde")));
     setButtons(Cancel);
 
     // connect progress bar
@@ -155,7 +155,7 @@ void XMessengerOAuth2Prompt::onUnsupportedContent(QNetworkReply* reply)
 void XMessengerOAuth2Prompt::extractToken(const QUrl &url)
 {
     QString accessToken;
-    Q_FOREACH (const QString &token, QString(url.encodedFragment()).split('&')) {
+    Q_FOREACH (const QString &token, QString::fromLatin1(url.encodedFragment()).split(QLatin1Char('&'))) {
         // Get the URL fragment part and iterate over the parameters of the request
         if (token.indexOf(tokenParameter) == 0) {
             // This is the token that we are looking for (we are not interested
@@ -170,7 +170,7 @@ void XMessengerOAuth2Prompt::extractToken(const QUrl &url)
         return;
     }
 
-    accessToken = accessToken.split('=').at(1);    // Split by "access_token=..." and take latter part
+    accessToken = accessToken.split(QLatin1Char('=')).at(1);    // Split by "access_token=..." and take latter part
 
     // Wocky will base64 encode, but token actually already is base64, so we
     // decode now and it will be re-encoded.
diff --git a/x-telepathy-password-prompt.cpp b/x-telepathy-password-prompt.cpp
index 3b62e74..f0ce5dc 100644
--- a/x-telepathy-password-prompt.cpp
+++ b/x-telepathy-password-prompt.cpp
@@ -30,10 +30,10 @@ XTelepathyPasswordPrompt::XTelepathyPasswordPrompt(const Tp::AccountPtr &account
 {
     ui->setupUi(mainWidget());
 
-    setWindowIcon(KIcon("telepathy-kde"));
+    setWindowIcon(KIcon(QLatin1String("telepathy-kde")));
 
     ui->accountName->setText(account->displayName());
-    ui->accountIcon->setPixmap(KIcon("dialog-password").pixmap(60, 60));
+    ui->accountIcon->setPixmap(KIcon(QLatin1String("dialog-password")).pixmap(60, 60));
     ui->title->setPixmap(KIcon(account->iconName()).pixmap(22, 22));
 
     KTp::WalletInterface wallet(this->effectiveWinId());

-- 
ktp-auth-handler packaging



More information about the pkg-kde-commits mailing list