Fix a few small issues

- Remove an unused warnings
- Reverse if statement arguments to simplify logic
This commit is contained in:
Jay Kamat 2017-05-09 08:08:05 -07:00
parent a3d41c0467
commit e10d636ca0
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -17,9 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
# FIXME:qtwebengine remove this once the stubs are gone
# pylint: disable=unused-argument
"""Wrapper over a QWebEngineView."""
import functools
@ -281,10 +278,10 @@ class WebEngineCaret(browsertab.AbstractCaret):
log.webview.debug("Clicking a searched link via fake key press.")
# send a fake enter, clicking the orange selection box
if not tab:
self._tab.key_press(Qt.Key_Enter)
else:
if tab:
self._tab.key_press(Qt.Key_Enter, modifier=Qt.ControlModifier)
else:
self._tab.key_press(Qt.Key_Enter)
else:
# click an existing blue selection