summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-07-10 13:59:46 +0200
committerMontel Laurent <[email protected]>2017-07-10 13:59:46 +0200
commit5397fd4bb64ebdf9ea30dccdd494b71022adbd53 (patch)
treeaa8f926abbd7f492d929c494f68f4308accf97db
parentd9abcbda1c3abe09e94d53054cdbd1e5a874fd40 (diff)
Readd selection change signal
-rw-r--r--src/libkdepim/addressline/recentaddress/recentaddresswidget.cpp7
-rw-r--r--src/libkdepim/addressline/recentaddress/recentaddresswidget.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/src/libkdepim/addressline/recentaddress/recentaddresswidget.cpp b/src/libkdepim/addressline/recentaddress/recentaddresswidget.cpp
index b04888d..31fa1be 100644
--- a/src/libkdepim/addressline/recentaddress/recentaddresswidget.cpp
+++ b/src/libkdepim/addressline/recentaddress/recentaddresswidget.cpp
@@ -46,7 +46,6 @@ RecentAddressWidget::RecentAddressWidget(QWidget *parent)
mLineEdit->setObjectName(QStringLiteral("line_edit"));
mLineEdit->setTrapReturnKey(true);
mLineEdit->installEventFilter(this);
- //connect(mLineEdit, &KLineEdit::textChanged, this, &RecentAddressWidget::slotTypedSomething);
connect(mLineEdit, &KLineEdit::returnPressed, this, &RecentAddressWidget::slotAddItem);
lineLayout->addWidget(mLineEdit);
@@ -70,6 +69,7 @@ RecentAddressWidget::RecentAddressWidget(QWidget *parent)
mListView->setObjectName(QStringLiteral("list_view"));
mListView->setSelectionMode(QAbstractItemView::ExtendedSelection);
mListView->setSortingEnabled(true);
+ connect(mListView, &QListWidget::itemSelectionChanged, this, &RecentAddressWidget::updateButtonState);
layout->addWidget(mListView);
mDirty = false;
}
@@ -113,11 +113,6 @@ void RecentAddressWidget::updateButtonState()
mLineEdit->setEnabled(enableElement);
}
-void RecentAddressWidget::slotSelectionChanged()
-{
- updateButtonState();
-}
-
void RecentAddressWidget::setAddresses(const QStringList &addrs)
{
mListView->clear();
diff --git a/src/libkdepim/addressline/recentaddress/recentaddresswidget.h b/src/libkdepim/addressline/recentaddress/recentaddresswidget.h
index 76eca3e..bd803fa 100644
--- a/src/libkdepim/addressline/recentaddress/recentaddresswidget.h
+++ b/src/libkdepim/addressline/recentaddress/recentaddresswidget.h
@@ -49,7 +49,6 @@ protected:
private:
void slotAddItem();
void slotRemoveItem();
- void slotSelectionChanged();
QToolButton *mNewButton;
QToolButton *mRemoveButton;
QListWidget *mListView;