summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
Side-by-side diff
Diffstat (limited to 'kaddressbook/views') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp65
1 files changed, 33 insertions, 32 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index ee2fcf8..8d2203e 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -83,3 +83,3 @@ void KAddressBookTableView::reconstructListView()
mListView->setColumnWidthMode(c++, QListView::Manual);
-//US
+//US
// qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
@@ -105,3 +105,4 @@ void KAddressBookTableView::reconstructListView()
- refresh();
+//US performceimprovement. Refresh is done from the outside
+//US refresh();
@@ -150,14 +151,14 @@ void KAddressBookTableView::refresh(QString uid)
QString currentUID, nextUID;
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ContactListViewItem *currentItem = dynamic_cast<ContactListViewItem*>( mListView->currentItem() );
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ContactListViewItem *currentItem = (ContactListViewItem*)( mListView->currentItem() );
-#endif //KAB_EMBEDDED
-
+#endif //KAB_EMBEDDED
+
if ( currentItem ) {
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ContactListViewItem *nextItem = dynamic_cast<ContactListViewItem*>( currentItem->itemBelow() );
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ContactListViewItem *nextItem = (ContactListViewItem*)( currentItem->itemBelow() );
-#endif //KAB_EMBEDDED
+#endif //KAB_EMBEDDED
if ( nextItem )
@@ -193,8 +194,8 @@ void KAddressBookTableView::refresh(QString uid)
while ( it.current() ) {
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ceItem = dynamic_cast<ContactListViewItem*>( it.current() );
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ceItem = (ContactListViewItem*)( it.current() );
-#endif //KAB_EMBEDDED
-
+#endif //KAB_EMBEDDED
+
if ( ceItem && ceItem->addressee().uid() == uid ) {
@@ -220,8 +221,8 @@ QStringList KAddressBookTableView::selectedUids()
{
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ceItem = dynamic_cast<ContactListViewItem*>(item);
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ceItem = (ContactListViewItem*)(item);
-#endif //KAB_EMBEDDED
-
+#endif //KAB_EMBEDDED
+
if (ceItem != 0L)
@@ -235,3 +236,3 @@ QStringList KAddressBookTableView::selectedUids()
}
-
+
return uidList;
@@ -252,9 +253,9 @@ void KAddressBookTableView::setSelected(QString uid, bool selected)
{
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ceItem = dynamic_cast<ContactListViewItem*>(item);
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ceItem = (ContactListViewItem*)(item);
-#endif //KAB_EMBEDDED
-
-
+#endif //KAB_EMBEDDED
+
+
if ((ceItem != 0L) && (ceItem->addressee().uid() == uid))
@@ -284,10 +285,10 @@ void KAddressBookTableView::addresseeSelected()
found = true;
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ContactListViewItem *ceItem
= dynamic_cast<ContactListViewItem*>(item);
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ContactListViewItem *ceItem
= (ContactListViewItem*)(item);
-#endif //KAB_EMBEDDED
-
+#endif //KAB_EMBEDDED
+
if ( ceItem ) emit selected(ceItem->addressee().uid());
@@ -304,9 +305,9 @@ void KAddressBookTableView::addresseeExecuted(QListViewItem *item)
{
-#ifndef KAB_EMBEDDED
+#ifndef KAB_EMBEDDED
ContactListViewItem *ceItem
= dynamic_cast<ContactListViewItem*>(item);
-#else //KAB_EMBEDDED
+#else //KAB_EMBEDDED
ContactListViewItem *ceItem
= (ContactListViewItem*)(item);
-#endif //KAB_EMBEDDED
+#endif //KAB_EMBEDDED
@@ -325,5 +326,5 @@ void KAddressBookTableView::addresseeDeleted()
{
-
+
emit deleteRequest();
-
+
}