Message info
 
To:kde-commits@kde.org From:Daniele E. Domenichelli Subject:[ktp-accounts-kcm] src: Use KIcon instead of QIcon and copy constructors instead of assignment operator Date:Fri, 30 Mar 2012 17:58:08 +0200 (CEST)
 

Git commit 85f11d83af9fc009b829abc1c0e368b963d284c9 by Daniele E. Domenichelli.
Committed on 30/03/2012 at 16:59.
Pushed by ddomenichelli into branch 'master'.

Use KIcon instead of QIcon and copy constructors instead of assignment operator

M +8 -8 src/accounts-list-delegate.cpp

http://commits.kde.org/telepathy-accounts-kcm/85f11d83af9fc009b829abc1c0e368b963d284c9

diff --git a/src/accounts-list-delegate.cpp b/src/accounts-list-delegate.cpp
index 7f431d6..60e3c40 100644
--- a/src/accounts-list-delegate.cpp
+++ b/src/accounts-list-delegate.cpp
@@ -123,14 +123,14 @@ void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, con
Q_ASSERT(connectionErrorLabel);


- bool isSelected = itemView()->selectionModel()->isSelected(index) && itemView()->hasFocus();
- bool isEnabled = index.data(Qt::CheckStateRole).toBool();
- QIcon accountIcon = index.data(Qt::DecorationRole).value<QIcon>();
- QIcon statusIcon = index.data(AccountsListModel::ConnectionStateIconRole).value<QIcon>();
- QString statusText = index.data(AccountsListModel::ConnectionStateDisplayRole).toString();
- QString displayName = index.data(Qt::DisplayRole).toString();
- QString connectionError = index.data(AccountsListModel::ConnectionErrorMessageDisplayRole).toString();
- Tp::AccountPtr account = index.data(AccountsListModel::AccountItemRole).value<AccountItem*>()->account();
+ bool isSelected(itemView()->selectionModel()->isSelected(index) && itemView()->hasFocus());
+ bool isEnabled(index.data(Qt::CheckStateRole).toBool());
+ KIcon accountIcon(index.data(Qt::DecorationRole).value<QIcon>());
+ KIcon statusIcon(index.data(AccountsListModel::ConnectionStateIconRole).value<QIcon>());
+ QString statusText(index.data(AccountsListModel::ConnectionStateDisplayRole).toString());
+ QString displayName(index.data(Qt::DisplayRole).toString());
+ QString connectionError(index.data(AccountsListModel::ConnectionErrorMessageDisplayRole).toString());
+ Tp::AccountPtr account(index.data(AccountsListModel::AccountItemRole).value<AccountItem*>()->account());


QRect outerRect(0, 0, option.rect.width(), option.rect.height());