File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ void CAddressCompleter::attachToLineEdit(QLineEdit *lineEdit)
127127 m_pLineEdit = lineEdit;
128128 if (m_pLineEdit) {
129129 m_pLineEdit->installEventFilter (this );
130- connect (m_pLineEdit, &QLineEdit::textChanged ,
130+ connect (m_pLineEdit, &QLineEdit::textEdited ,
131131 this , &CAddressCompleter::onTextChanged);
132132
133133 // 设置提示文本
@@ -271,7 +271,7 @@ void CAddressCompleter::performSearch()
271271 CAddressCompleterItem *completerItem = new CAddressCompleterItem (
272272 title.isEmpty () ? url : title,
273273 url,
274- getIconForUrl (url)
274+ i. icon
275275 );
276276
277277 m_pListWidget->setItemWidget (item, completerItem);
@@ -523,7 +523,7 @@ QIcon CAddressCompleter::getIconForUrl(const QString &url)
523523 static QIcon defaultIcon;
524524 static QIcon httpIcon;
525525 static QIcon httpsIcon;
526- static QIcon searchIcon = QIcon::fromTheme (QIcon::ThemeIcon::SystemSearch);
526+ static QIcon searchIcon; // = QIcon::fromTheme(QIcon::ThemeIcon::SystemSearch);
527527
528528 if (url.startsWith (" https://" )) {
529529 return httpsIcon;
Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ class CAddressCompleter : public QWidget
5555 void showEvent (QShowEvent *event) override ;
5656 void hideEvent (QHideEvent *event) override ;
5757
58- private slots :
58+ private Q_SLOTS :
5959 void onTextChanged (const QString &text);
6060 void onItemClicked (QListWidgetItem *item);
61- void performSearch ();
61+ virtual void performSearch ();
6262 void moveToNextItem ();
6363 void moveToPreviousItem ();
6464 void selectCurrentItem ();
You can’t perform that action at this time.
0 commit comments