forked from openkylin/ukui-search
Fix the problem that the fuzzy search button is not displayed when the index switch is turned on by ask dialog.
This commit is contained in:
parent
48ddb0fe58
commit
4e75e57775
|
@ -95,10 +95,15 @@ QWidget *Search::pluginUi()
|
|||
//监听gsettings值改变,更新控制面板UI
|
||||
connect(m_gsettings, &QGSettings::changed, this, [ = ](const QString &key) {
|
||||
if (key == SEARCH_METHOD_KEY) {
|
||||
bool is_index_search_on = m_gsettings->get(SEARCH_METHOD_KEY).toBool();
|
||||
bool isIndexSearchOn = m_gsettings->get(SEARCH_METHOD_KEY).toBool();
|
||||
m_searchMethodBtn->blockSignals(true);
|
||||
m_searchMethodBtn->setChecked(is_index_search_on);
|
||||
m_searchMethodBtn->setChecked(isIndexSearchOn);
|
||||
m_searchMethodBtn->blockSignals(false);
|
||||
if (isIndexSearchOn) {
|
||||
m_indexSetFrame->show();
|
||||
} else {
|
||||
m_indexSetFrame->hide();
|
||||
}
|
||||
} else if (key == WEB_ENGINE_KEY) {
|
||||
QString engine = m_gsettings->get(WEB_ENGINE_KEY).toString();
|
||||
m_webEngineFrame->mCombox->blockSignals(true);
|
||||
|
@ -117,11 +122,6 @@ QWidget *Search::pluginUi()
|
|||
if (m_gsettings && m_gsettings->keys().contains(SEARCH_METHOD_KEY)) {
|
||||
m_gsettings->set(SEARCH_METHOD_KEY, checked);
|
||||
}
|
||||
if (checked) {
|
||||
m_indexSetFrame->show();
|
||||
} else {
|
||||
m_indexSetFrame->hide();
|
||||
}
|
||||
});
|
||||
connect(m_indexMethodBtnGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled),[ = ](int id, bool checked) {
|
||||
if (id == -3) {//fuzzyBtn's id
|
||||
|
|
Loading…
Reference in New Issue