[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:01:04 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=4a6df58
The following commit has been merged in the master branch:
commit 4a6df58b9493edc8398d9fa014fb3b7cbb87e739
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Thu Dec 29 12:34:41 2011 +0100
QLatin1String in src
---
src/account-item.cpp | 14 +++++++-------
src/add-account-assistant.cpp | 14 +++++++-------
src/avatar-button.cpp | 7 +++----
src/edit-account-dialog.cpp | 6 +++---
src/fetch-avatar-job.cpp | 2 +-
src/kcm-telepathy-accounts.cpp | 16 ++++++++--------
src/salut-details-dialog.cpp | 2 +-
src/salut-message-widget.cpp | 12 ++++++------
8 files changed, 36 insertions(+), 37 deletions(-)
diff --git a/src/account-item.cpp b/src/account-item.cpp
index f72cabf..028c20c 100644
--- a/src/account-item.cpp
+++ b/src/account-item.cpp
@@ -102,7 +102,7 @@ const QString AccountItem::connectionStateString() const
case Tp::ConnectionStatusDisconnected:
return i18nc("This is a connection state", "Disconnected");
default:
- return "Unknown";
+ return i18nc("This is an unknown connection state", "Unknown");
}
}
@@ -110,14 +110,14 @@ const KIcon AccountItem::connectionStateIcon() const
{
switch (m_account->connectionStatus()) {
case Tp::ConnectionStatusConnected:
- return KIcon("user-online");
+ return KIcon(QLatin1String("user-online"));
case Tp::ConnectionStatusConnecting:
//imho this is not really worth animating, but feel free to play around..
- return KIcon(KPixmapSequence("process-working", 22).frameAt(0));
+ return KIcon(KPixmapSequence(QLatin1String("process-working"), 22).frameAt(0));
case Tp::ConnectionStatusDisconnected:
- return KIcon("user-offline");
+ return KIcon(QLatin1String("user-offline"));
default:
- return KIcon("user-offline");
+ return KIcon(QLatin1String("user-offline"));
}
}
@@ -145,7 +145,7 @@ void AccountItem::generateIcon()
//if the icon has not been set, we use the protocol icon
if(iconPath.isEmpty()) {
- iconPath = QString("im-%1").arg(account()->protocolName());
+ iconPath = QString(QLatin1String("im-%1")).arg(account()->protocolName());
}
delete m_icon;
@@ -159,7 +159,7 @@ void AccountItem::generateIcon()
//we paint a warning symbol in the right-bottom corner
QPixmap pixmap = m_icon->pixmap(32, 32);
QPainter painter(&pixmap);
- KIcon("dialog-error").paint(&painter, 15, 15, 16, 16);
+ KIcon(QLatin1String("dialog-error")).paint(&painter, 15, 15, 16, 16);
delete m_icon;
m_icon = new KIcon(pixmap);
diff --git a/src/add-account-assistant.cpp b/src/add-account-assistant.cpp
index 0cebd29..6d55695 100644
--- a/src/add-account-assistant.cpp
+++ b/src/add-account-assistant.cpp
@@ -202,7 +202,7 @@ void AddAccountAssistant::accept()
// Check account we're trying to create doesn't already exist
Q_FOREACH (const Tp::AccountPtr &account, d->accountManager->allAccounts()) {
- if (values.value("account") == account->displayName()
+ if (values.value(QLatin1String("account")) == account->displayName()
&& d->currentProfileItem->protocolName() == account->protocolName()) {
Q_EMIT feedbackMessage(i18n("Failed to create account"),
i18n("Account already exists. Old one will be used instead"),
@@ -216,17 +216,17 @@ void AddAccountAssistant::accept()
QVariantMap properties;
if (d->accountManager->supportedAccountProperties().contains(QLatin1String("org.freedesktop.Telepathy.Account.Service"))) {
- properties.insert("org.freedesktop.Telepathy.Account.Service", d->currentProfileItem->serviceName());
+ properties.insert(QLatin1String("org.freedesktop.Telepathy.Account.Service"), d->currentProfileItem->serviceName());
}
if (d->accountManager->supportedAccountProperties().contains(QLatin1String("org.freedesktop.Telepathy.Account.Enabled"))) {
- properties.insert("org.freedesktop.Telepathy.Account.Enabled", true);
+ properties.insert(QLatin1String("org.freedesktop.Telepathy.Account.Enabled"), true);
}
// FIXME: Ask the user to submit a Display Name
QString displayName;
- if (values.contains("account")) {
- displayName = values["account"].toString();
+ if (values.contains(QLatin1String("account"))) {
+ displayName = values[QLatin1String("account")].toString();
}
else {
displayName = d->currentProfileItem->protocolName();
@@ -286,11 +286,11 @@ void AddAccountAssistant::onAccountCreated(Tp::PendingOperation *op)
QVariantMap values = d->accountEditWidget->parametersSet();
if (values.contains(QLatin1String("password"))) {
KTp::WalletInterface wallet(this->effectiveWinId());
- wallet.setPassword(account, values["password"].toString());
+ wallet.setPassword(account, values[QLatin1String("password")].toString());
}
if(d->accountEditWidget->connectOnAdd()){
- account->setRequestedPresence(Tp::Presence::available(QString("Online")));
+ account->setRequestedPresence(Tp::Presence::available(QLatin1String("Online")));
}
account->setServiceName(d->currentProfileItem->serviceName());
KAssistantDialog::accept();
diff --git a/src/avatar-button.cpp b/src/avatar-button.cpp
index ef7ddd5..e5829ff 100644
--- a/src/avatar-button.cpp
+++ b/src/avatar-button.cpp
@@ -38,9 +38,8 @@ AvatarButton::AvatarButton(QWidget *parent)
setIconSize(QSize(64,64));
- menu->addAction(KIcon("document-open-folder"), i18n("Load from file..."), this, SLOT(onLoadAvatarFromFile()));
- menu->addAction(KIcon("edit-clear"),i18n("Clear Avatar"), this, SLOT(onClearAvatar()));
-
+ menu->addAction(KIcon(QLatin1String("document-open-folder")), i18n("Load from file..."), this, SLOT(onLoadAvatarFromFile()));
+ menu->addAction(KIcon(QLatin1String("edit-clear")), i18n("Clear Avatar"), this, SLOT(onClearAvatar()));
setMenu(menu);
}
@@ -60,7 +59,7 @@ void AvatarButton::setAvatar(const Tp::Avatar &avatar) {
avatarIcon.addPixmap(avatarPixmap.scaled(iconSize().boundedTo(avatarPixmap.size()), Qt::KeepAspectRatio));
setIcon(avatarIcon);
} else {
- setIcon(KIcon("im-user"));
+ setIcon(KIcon(QLatin1String("im-user")));
}
}
diff --git a/src/edit-account-dialog.cpp b/src/edit-account-dialog.cpp
index be8660e..37cb28f 100644
--- a/src/edit-account-dialog.cpp
+++ b/src/edit-account-dialog.cpp
@@ -141,7 +141,7 @@ void EditAccountDialog::onParametersUpdated(Tp::PendingOperation *op)
KTp::WalletInterface wallet(this->effectiveWinId());
if (values.contains(QLatin1String("password"))) {
- wallet.setPassword(d->item->account(), values["password"].toString());
+ wallet.setPassword(d->item->account(), values[QLatin1String("password")].toString());
} else {
wallet.removePassword(d->item->account());
}
@@ -149,8 +149,8 @@ void EditAccountDialog::onParametersUpdated(Tp::PendingOperation *op)
// FIXME: Ask the user to submit a Display Name
QString displayName;
- if (values.contains("account")) {
- displayName = values["account"].toString();
+ if (values.contains(QLatin1String("account"))) {
+ displayName = values[QLatin1String("account")].toString();
}
else {
displayName = d->item->account()->profile()->protocolName();
diff --git a/src/fetch-avatar-job.cpp b/src/fetch-avatar-job.cpp
index 06a35ea..e734ede 100644
--- a/src/fetch-avatar-job.cpp
+++ b/src/fetch-avatar-job.cpp
@@ -79,7 +79,7 @@ void FetchAvatarJob::start()
void FetchAvatarJob::Private::_k_onMimeTypeDetected(KIO::Job *job, const QString &mimetype)
{
- if (!mimetype.contains("image/")) {
+ if (!mimetype.contains(QLatin1String("image/"))) {
q->setErrorText(i18n("The file you have selected does not seem to be an image.
"
"Please select an image file."));
q->setError(1);
diff --git a/src/kcm-telepathy-accounts.cpp b/src/kcm-telepathy-accounts.cpp
index 792fb7a..9acd6d4 100644
--- a/src/kcm-telepathy-accounts.cpp
+++ b/src/kcm-telepathy-accounts.cpp
@@ -94,7 +94,7 @@ KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList&
m_ui->setupUi(this);
m_ui->salutListView->setHidden(true);
m_ui->salutEnableFrame->setHidden(true);
- m_ui->salutEnableCheckbox->setIcon(KIcon("im-local-xmpp"));
+ m_ui->salutEnableCheckbox->setIcon(KIcon(QLatin1String("im-local-xmpp")));
m_ui->salutEnableCheckbox->setIconSize(QSize(32, 32));
m_accountsListModel = new AccountsListModel(this);
@@ -117,13 +117,13 @@ KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList&
m_accountsFilterModel->sort(0);
m_ui->accountsListView->setModel(m_accountsFilterModel);
- m_ui->addAccountButton->setIcon(KIcon("list-add"));
- m_ui->editAccountButton->setIcon(KIcon("configure"));
- m_ui->removeAccountButton->setIcon(KIcon("edit-delete"));
- m_ui->editAccountIdentityButton->setIcon(KIcon("user-identity"));
+ m_ui->addAccountButton->setIcon(KIcon(QLatin1String("list-add")));
+ m_ui->editAccountButton->setIcon(KIcon(QLatin1String("configure")));
+ m_ui->removeAccountButton->setIcon(KIcon(QLatin1String("edit-delete")));
+ m_ui->editAccountIdentityButton->setIcon(KIcon(QLatin1String("user-identity")));
m_salutBusyWheel = new KPixmapSequenceOverlayPainter(this);
- m_salutBusyWheel->setSequence(KPixmapSequence("process-working", 22));
+ m_salutBusyWheel->setSequence(KPixmapSequence(QLatin1String("process-working"), 22));
m_salutBusyWheel->setWidget(m_ui->salutWidget);
m_salutBusyWheel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
@@ -336,7 +336,7 @@ void KCMTelepathyAccounts::onRemoveAccountClicked()
QModelIndex index = m_currentListView->currentIndex();
if ( KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove the account \"%1\"?", m_currentModel->data(index, Qt::DisplayRole).toString()),
- i18n("Remove Account"), KGuiItem(i18n("Remove Account"), "edit-delete"), KStandardGuiItem::cancel(),
+ i18n("Remove Account"), KGuiItem(i18n("Remove Account"), QLatin1String("edit-delete")), KStandardGuiItem::cancel(),
QString(), KMessageBox::Notify | KMessageBox::Dangerous) == KMessageBox::Continue)
{
AccountItem *item = index.data(AccountsListModel::AccountItemRole).value<AccountItem*>();
@@ -435,7 +435,7 @@ ErrorOverlay::ErrorOverlay(QWidget *baseWidget, const QString &details, QWidget
layout->setSpacing(10);
QLabel *pixmap = new QLabel();
- pixmap->setPixmap(KIcon("dialog-error").pixmap(64));
+ pixmap->setPixmap(KIcon(QLatin1String("dialog-error")).pixmap(64));
QLabel *message = new QLabel(i18n("Something went terribly wrong and the IM system could not be initialized.
"
"It is likely your system is missing Telepathy Mission Control package.
"
diff --git a/src/salut-details-dialog.cpp b/src/salut-details-dialog.cpp
index dd30049..bc24835 100644
--- a/src/salut-details-dialog.cpp
+++ b/src/salut-details-dialog.cpp
@@ -64,7 +64,7 @@ SalutDetailsDialog::SalutDetailsDialog(const Tp::ProfileManagerPtr profileManage
// Add the parameters to the model.
ParameterEditModel *parameterModel = new ParameterEditModel(this);
- d->profile = profileManager->profilesForCM("salut").first();
+ d->profile = profileManager->profilesForCM(QLatin1String("salut")).first();
Q_ASSERT(!d->profile.isNull());
Q_ASSERT(d->profile->isValid());
diff --git a/src/salut-message-widget.cpp b/src/salut-message-widget.cpp
index 1596b57..c0a5a32 100644
--- a/src/salut-message-widget.cpp
+++ b/src/salut-message-widget.cpp
@@ -45,11 +45,11 @@ SalutMessageWidget::SalutMessageWidget(QWidget *parent)
connect(circCountdown, SIGNAL(timeout()), this, SIGNAL(timeout()));
- KAction *configAction = new KAction(KIcon("configure"), i18n("Configure manually..."), this);
+ KAction *configAction = new KAction(KIcon(QLatin1String("configure")), i18n("Configure manually..."), this);
connect(configAction, SIGNAL(triggered(bool)), this, SIGNAL(configPressed()));
addAction(configAction);
- KAction *cancelAction = new KAction(KIcon("dialog-cancel"), i18n("Cancel"), this);
+ KAction *cancelAction = new KAction(KIcon(QLatin1String("dialog-cancel")), i18n("Cancel"), this);
connect(cancelAction, SIGNAL(triggered(bool)), this, SIGNAL(cancelPressed()));
addAction(cancelAction);
@@ -79,24 +79,24 @@ void SalutMessageWidget::setParams(const QString& firstname, const QString& last
if (((lastname.isEmpty() && !firstname.isEmpty()) || (!lastname.isEmpty() && firstname.isEmpty()))
&& !nick.isEmpty()) {
- displayName = QString("%1 (%2)").arg(lastname.isEmpty() ? firstname : lastname, nick);
+ displayName = QString(QLatin1String("%1 (%2)")).arg(lastname.isEmpty() ? firstname : lastname, nick);
//either one of the names is filled and nick is empty
} else if (((lastname.isEmpty() && !firstname.isEmpty()) || (!lastname.isEmpty() && firstname.isEmpty()))
&& nick.isEmpty()) {
- displayName = QString("%1").arg(lastname.isEmpty() ? firstname : lastname);
+ displayName = QString(QLatin1String("%1")).arg(lastname.isEmpty() ? firstname : lastname);
//both first & last names are empty but nick is not
} else if (lastname.isEmpty() && firstname.isEmpty() && !nick.isEmpty()) {
- displayName = QString("%1").arg(nick);
+ displayName = QString(QLatin1String("%1")).arg(nick);
} else if (lastname.isEmpty() && firstname.isEmpty() && nick.isEmpty()) {
//FIXME: let the user know that he reached a very strange situation
} else {
- displayName = QString("%1 %2 (%3)").arg(firstname, lastname, nick);
+ displayName = QString(QLatin1String("%1 %2 (%3)")).arg(firstname, lastname, nick);
}
setText(i18n("You will appear as \"%1\" on your local network.",
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list