mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 06:40:58 -04:00
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:
parent
9ff59e4722
commit
8673924374
2 changed files with 12 additions and 21 deletions
|
@ -125,10 +125,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||||
ui.actionSave_as->setDisabled(true);
|
ui.actionSave_as->setDisabled(true);
|
||||||
|
|
||||||
connect( ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
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)),
|
connect(ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)),
|
||||||
this, SLOT(filterColumnChanged()));
|
this, SLOT(filterColumnChanged()));
|
||||||
|
@ -1450,6 +1447,17 @@ void MessagesDialog::filterRegExpChanged()
|
||||||
{
|
{
|
||||||
QRegExp regExp(ui.filterPatternLineEdit->text(), Qt::CaseInsensitive , QRegExp::FixedString);
|
QRegExp regExp(ui.filterPatternLineEdit->text(), Qt::CaseInsensitive , QRegExp::FixedString);
|
||||||
proxyModel->setFilterRegExp(regExp);
|
proxyModel->setFilterRegExp(regExp);
|
||||||
|
|
||||||
|
QString text = ui.filterPatternLineEdit->text();
|
||||||
|
|
||||||
|
if (text.isEmpty())
|
||||||
|
{
|
||||||
|
ui.clearButton->hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui.clearButton->show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesDialog::filterColumnChanged()
|
void MessagesDialog::filterColumnChanged()
|
||||||
|
@ -1561,19 +1569,3 @@ void MessagesDialog::clearFilter()
|
||||||
ui.filterPatternLineEdit->clear();
|
ui.filterPatternLineEdit->clear();
|
||||||
ui.filterPatternLineEdit->setFocus();
|
ui.filterPatternLineEdit->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* toggle clearButton */
|
|
||||||
void MessagesDialog::toggleclearButton()
|
|
||||||
{
|
|
||||||
QString text = ui.filterPatternLineEdit->text();
|
|
||||||
|
|
||||||
if (text.isEmpty())
|
|
||||||
{
|
|
||||||
ui.clearButton->hide();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui.clearButton->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -95,7 +95,6 @@ private slots:
|
||||||
void filterColumnChanged();
|
void filterColumnChanged();
|
||||||
|
|
||||||
void clearFilter();
|
void clearFilter();
|
||||||
void toggleclearButton();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class QStandardItemModel *MessagesModel;
|
class QStandardItemModel *MessagesModel;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue