Commit 5397fd4b authored by Laurent Montel's avatar Laurent Montel 😁

Readd selection change signal

parent d9abcbda
......@@ -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();
......
......@@ -49,7 +49,6 @@ protected:
private:
void slotAddItem();
void slotRemoveItem();
void slotSelectionChanged();
QToolButton *mNewButton;
QToolButton *mRemoveButton;
QListWidget *mListView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment