Commit f544ffd7 authored by Frerich Raabe's avatar Frerich Raabe

- Made the "Clear" button in the advanced search dialog do something.

svn path=/trunk/kdemultimedia/juk/; revision=242487
parent 4a9532d5
......@@ -64,7 +64,9 @@ AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
QWidget *buttons = new QWidget(criteriaGroupBox);
QBoxLayout *l = new QHBoxLayout(buttons, 0, 5);
l->addWidget(new KPushButton(i18n("Clear"), buttons));
KPushButton *clearButton = new KPushButton(i18n("Clear"), buttons);
connect(clearButton, SIGNAL(clicked()), SLOT(clear()));
l->addWidget(clearButton);
l->addStretch(1);
......@@ -113,4 +115,11 @@ void AdvancedSearchDialog::accept()
KDialogBase::accept();
}
void AdvancedSearchDialog::clear()
{
QValueListConstIterator<SearchLine *> it = m_searchLines.begin();
for(; it != m_searchLines.end(); ++it)
(*it)->clear();
}
#include "advancedsearchdialog.moc"
......@@ -50,6 +50,7 @@ public slots:
protected slots:
virtual void accept();
virtual void clear();
private:
QWidget *m_criteria;
......
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