Browse Source

Correctly escape transfer list filter value typed by user

adaptive-webui-19844
Christophe Dumez 12 years ago
parent
commit
06c8e658aa
  1. 4
      src/transferlistwidget.cpp
  2. 2
      src/transferlistwidget.h

4
src/transferlistwidget.cpp

@ -859,8 +859,8 @@ void TransferListWidget::applyLabelFilter(QString label) { @@ -859,8 +859,8 @@ void TransferListWidget::applyLabelFilter(QString label) {
labelFilterModel->setFilterRegExp(QRegExp("^" + QRegExp::escape(label) + "$", Qt::CaseSensitive));
}
void TransferListWidget::applyNameFilter(QString name) {
nameFilterModel->setFilterRegExp(QRegExp(name, Qt::CaseInsensitive));
void TransferListWidget::applyNameFilter(const QString& name) {
nameFilterModel->setFilterRegExp(QRegExp(QRegExp::escape(name), Qt::CaseInsensitive));
}
void TransferListWidget::applyStatusFilter(int f) {

2
src/transferlistwidget.h

@ -78,7 +78,7 @@ public slots: @@ -78,7 +78,7 @@ public slots:
void previewSelectedTorrents();
void hidePriorityColumn(bool hide);
void displayDLHoSMenu(const QPoint&);
void applyNameFilter(QString name);
void applyNameFilter(const QString& name);
void applyStatusFilter(int f);
void applyLabelFilter(QString label);
void previewFile(QString filePath);

Loading…
Cancel
Save