removed unnecessary method

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2950 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-19 19:44:06 +00:00
parent 9ff59e4722
commit 8673924374
2 changed files with 12 additions and 21 deletions

View File

@ -125,10 +125,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
ui.actionSave_as->setDisabled(true);
connect( ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
connect( ui.filterPatternLineEdit, SIGNAL( textChanged(const QString &)), this, SLOT(toggleclearButton()));
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)),
this, SLOT(filterRegExpChanged()));
connect( ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
connect(ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(filterColumnChanged()));
@ -1450,6 +1447,17 @@ void MessagesDialog::filterRegExpChanged()
{
QRegExp regExp(ui.filterPatternLineEdit->text(), Qt::CaseInsensitive , QRegExp::FixedString);
proxyModel->setFilterRegExp(regExp);
QString text = ui.filterPatternLineEdit->text();
if (text.isEmpty())
{
ui.clearButton->hide();
}
else
{
ui.clearButton->show();
}
}
void MessagesDialog::filterColumnChanged()
@ -1561,19 +1569,3 @@ void MessagesDialog::clearFilter()
ui.filterPatternLineEdit->clear();
ui.filterPatternLineEdit->setFocus();
}
/* toggle clearButton */
void MessagesDialog::toggleclearButton()
{
QString text = ui.filterPatternLineEdit->text();
if (text.isEmpty())
{
ui.clearButton->hide();
}
else
{
ui.clearButton->show();
}
}

View File

@ -95,7 +95,6 @@ private slots:
void filterColumnChanged();
void clearFilter();
void toggleclearButton();
private:
class QStandardItemModel *MessagesModel;