mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-23 16:01:43 +01:00
Use qocoa for icecast filter.
This commit is contained in:
parent
569c8295db
commit
53998ee976
@ -19,8 +19,8 @@
|
||||
#include "icecastfilterwidget.h"
|
||||
#include "ui_icecastfilterwidget.h"
|
||||
#include "ui/iconloader.h"
|
||||
#include "widgets/maclineedit.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QSettings>
|
||||
#include <QSignalMapper>
|
||||
@ -50,15 +50,6 @@ IcecastFilterWidget::IcecastFilterWidget(QWidget *parent)
|
||||
ui_->options->setMenu(menu_);
|
||||
|
||||
connect(sort_mode_mapper_, SIGNAL(mapped(int)), SLOT(SortModeChanged(int)));
|
||||
|
||||
#ifdef Q_OS_DARWIN
|
||||
delete ui_->filter;
|
||||
MacLineEdit* lineedit = new MacLineEdit(this);
|
||||
ui_->horizontalLayout->insertWidget(1, lineedit);
|
||||
filter_ = lineedit;
|
||||
#else
|
||||
filter_ = ui_->filter;
|
||||
#endif
|
||||
}
|
||||
|
||||
void IcecastFilterWidget::AddAction(
|
||||
@ -79,7 +70,7 @@ void IcecastFilterWidget::FocusOnFilter(QKeyEvent *event) {
|
||||
|
||||
void IcecastFilterWidget::SetIcecastModel(IcecastModel* model) {
|
||||
model_ = model;
|
||||
connect(filter_->widget(), SIGNAL(textChanged(QString)),
|
||||
connect(ui_->filter, SIGNAL(textChanged(QString)),
|
||||
model_, SLOT(SetFilterText(QString)));
|
||||
|
||||
// Load settings
|
||||
|
@ -57,8 +57,6 @@ private:
|
||||
QMenu* menu_;
|
||||
|
||||
QSignalMapper* sort_mode_mapper_;
|
||||
|
||||
LineEditInterface* filter_;
|
||||
};
|
||||
|
||||
#endif // ICECASTFILTERWIDGET_H
|
||||
|
@ -21,10 +21,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="LineEdit" name="filter">
|
||||
<property name="hint" stdset="0">
|
||||
<string>Search Icecast stations</string>
|
||||
</property>
|
||||
<widget class="QSearchField" name="filter">
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -71,9 +68,9 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>widgets/lineedit.h</header>
|
||||
<class>QSearchField</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>3rdparty/qocoa/qsearchfield.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
|
Loading…
Reference in New Issue
Block a user