| 101 | } |
| 102 | |
| 103 | void SearchEngineLineEdit::removeSearchEngine(const QString &name) |
| 104 | { |
| 105 | // Find the item in the menu, and its index so it may be removed |
| 106 | QList<QAction*> menuActions = m_searchEngineMenu->actions(); |
| 107 | for (QAction *currAction : menuActions) |
| 108 | { |
| 109 | if (currAction->text().compare(name) == 0) |
| 110 | { |
| 111 | m_searchEngineMenu->removeAction(currAction); |
| 112 | break; |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // Check if the current search engine is the one that was just removed, and if so change |
| 117 | // the current engine to the search engine manager's default |
| 118 | if (m_currentEngineName.compare(name) == 0) |
| 119 | setSearchEngine(SearchEngineManager::instance().getDefaultSearchEngine()); |
| 120 | } |
| 121 | |
| 122 | void SearchEngineLineEdit::resizeEvent(QResizeEvent *event) |
| 123 | { |
no outgoing calls
no test coverage detected