summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-10-28 00:13:27 (UTC)
committer ulf69 <ulf69>2004-10-28 00:13:27 (UTC)
commit0b7fefe9f97ced1e4b2d93d26e12385aadb7b7e9 (patch) (side-by-side diff)
treee46a98f6d1ac10b2a8378ef9d1dd77fb0d82fed1
parent0766b449ccdcc125c18c401d87cc51c277464728 (diff)
downloadkdepimpi-0b7fefe9f97ced1e4b2d93d26e12385aadb7b7e9.zip
kdepimpi-0b7fefe9f97ced1e4b2d93d26e12385aadb7b7e9.tar.gz
kdepimpi-0b7fefe9f97ced1e4b2d93d26e12385aadb7b7e9.tar.bz2
bugfix: pass singleclick parameter to the tableview
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index e40eb9e..6f20e05 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -79,50 +79,56 @@ void KAddressBookTableView::reconstructListView()
this, SLOT(addresseeExecuted(QListViewItem*)));
disconnect(mListView, SIGNAL(startAddresseeDrag()), this,
SIGNAL(startDrag()));
disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)),
this, SLOT(addresseeExecuted(QListViewItem*)));
disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
SIGNAL(dropped(QDropEvent*)));
delete mListView;
}
mListView = new ContactListView( this, addressBook(), viewWidget() );
+
+ //US set singleClick manually, because it is no global configparameter in embedded space
+ mListView->setSingleClick(KABPrefs::instance()->mHonorSingleClick);
// Add the columns
KABC::Field::List fieldList = fields();
KABC::Field::List::ConstIterator it;
int c = 0;
for( it = fieldList.begin(); it != fieldList.end(); ++it ) {
mListView->addColumn( (*it)->label() );
mListView->setColumnWidthMode(c++, QListView::Manual);
//US
// qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
}
connect(mListView, SIGNAL(selectionChanged()),
this, SLOT(addresseeSelected()));
connect(mListView, SIGNAL(startAddresseeDrag()), this,
SIGNAL(startDrag()));
connect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
SIGNAL(dropped(QDropEvent*)));
- if (KABPrefs::instance()->mHonorSingleClick)
+ if (KABPrefs::instance()->mHonorSingleClick) {
+ // qDebug("KAddressBookTableView::reconstructListView single");
connect(mListView, SIGNAL(executed(QListViewItem*)),
this, SLOT(addresseeExecuted(QListViewItem*)));
- else
+ } else {
+ // qDebug("KAddressBookTableView::reconstructListView double");
connect(mListView, SIGNAL(doubleClicked(QListViewItem*)),
this, SLOT(addresseeExecuted(QListViewItem*)));
+ }
connect(mListView, SIGNAL(returnPressed(QListViewItem*)),
this, SLOT(addresseeExecuted(QListViewItem*)));
connect(mListView, SIGNAL(signalDelete()),
this, SLOT(addresseeDeleted()));
//US performceimprovement. Refresh is done from the outside
//US refresh();
mListView->setSorting( 0, true );
mainLayout->addWidget( mListView );
mainLayout->activate();
mListView->show();