GUI: Fix a couple cases where a null lineedit completer could cause a crash
This commit is contained in:
parent
f42338c026
commit
f5418aa263
@ -216,7 +216,7 @@ void SSearch::onCompleterShown()
|
||||
LOGDEB0("SSearch::onCompleterShown: no completer\n");
|
||||
return;
|
||||
}
|
||||
QAbstractItemView *popup = queryText->completer()->popup();
|
||||
QAbstractItemView *popup = completer->popup();
|
||||
if (!popup) {
|
||||
LOGDEB0("SSearch::onCompleterShown: no popup\n");
|
||||
return;
|
||||
@ -321,6 +321,7 @@ void SSearch::onCompletionActivated(const QString& text)
|
||||
void SSearch::onHistoryClicked()
|
||||
{
|
||||
if (m_completermodel) {
|
||||
queryText->setCompleter(m_completer);
|
||||
m_completermodel->onPartialWord(SST_LANG, "", "");
|
||||
queryText->completer()->complete();
|
||||
}
|
||||
@ -423,7 +424,7 @@ tr("</table></body></html>")
|
||||
|
||||
void SSearch::startSimpleSearch()
|
||||
{
|
||||
if (queryText->completer()->popup()->isVisible()) {
|
||||
if (queryText->completer() && queryText->completer()->popup()->isVisible()) {
|
||||
return;
|
||||
}
|
||||
string u8 = qs2u8s(queryText->text());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user