Changeset View
Changeset View
Standalone View
Standalone View
webenginepart/src/ui/searchbar.cpp
Show All 38 Lines | 38 | { | |||
---|---|---|---|---|---|
39 | 39 | | |||
40 | // Get the widget that currently has the focus so we can properly | 40 | // Get the widget that currently has the focus so we can properly | ||
41 | // restore it when the filter bar is closed. | 41 | // restore it when the filter bar is closed. | ||
42 | QWidget* widgetWindow = (parent ? parent->window() : nullptr); | 42 | QWidget* widgetWindow = (parent ? parent->window() : nullptr); | ||
43 | m_focusWidget = (widgetWindow ? widgetWindow->focusWidget() : nullptr); | 43 | m_focusWidget = (widgetWindow ? widgetWindow->focusWidget() : nullptr); | ||
44 | 44 | | |||
45 | // Initialize the user interface... | 45 | // Initialize the user interface... | ||
46 | m_ui.setupUi(this); | 46 | m_ui.setupUi(this); | ||
47 | m_ui.optionsButton->addAction(m_ui.actionMatchCase); | 47 | m_optionsMenu = new QMenu(); | ||
48 | m_ui.optionsButton->addAction(m_ui.actionHighlightMatch); | 48 | m_optionsMenu->addAction(m_ui.actionMatchCase); | ||
49 | m_ui.optionsButton->addAction(m_ui.actionSearchAutomatically); | 49 | m_optionsMenu->addAction(m_ui.actionHighlightMatch); | ||
50 | m_optionsMenu->addAction(m_ui.actionSearchAutomatically); | ||||
51 | m_ui.optionsButton->setMenu(m_optionsMenu); | ||||
52 | m_ui.searchComboBox->lineEdit()->setPlaceholderText(i18n("Find...")); | ||||
53 | m_ui.searchComboBox->lineEdit()->setClearButtonEnabled(true); | ||||
50 | 54 | | |||
51 | setFocusProxy(m_ui.searchComboBox); | 55 | setFocusProxy(m_ui.searchComboBox); | ||
52 | 56 | | |||
53 | connect(m_ui.nextButton, SIGNAL(clicked()), | 57 | connect(m_ui.nextButton, SIGNAL(clicked()), | ||
54 | this, SLOT(findNext())); | 58 | this, SLOT(findNext())); | ||
55 | connect(m_ui.previousButton, SIGNAL(clicked()), | 59 | connect(m_ui.previousButton, SIGNAL(clicked()), | ||
56 | this, SLOT(findPrevious())); | 60 | this, SLOT(findPrevious())); | ||
57 | connect(m_ui.searchComboBox, SIGNAL(returnPressed()), | 61 | connect(m_ui.searchComboBox, SIGNAL(returnPressed()), | ||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |