eric7/WebBrowser/UrlBar/UrlBar.py

branch
eric7
changeset 8319
ea11a3948f40
parent 8318
962bce857696
child 8350
74a3b2a6a944
equal deleted inserted replaced
8318:962bce857696 8319:ea11a3948f40
347 if ( 347 if (
348 evt.key() in [Qt.Key.Key_Enter, Qt.Key.Key_Return] and 348 evt.key() in [Qt.Key.Key_Enter, Qt.Key.Key_Return] and
349 not currentText.lower().startswith(("http://", "https://")) 349 not currentText.lower().startswith(("http://", "https://"))
350 ): 350 ):
351 append = "" 351 append = ""
352 if evt.modifiers() == Qt.KeyboardModifiers( 352 if evt.modifiers() == Qt.KeyboardModifier.ControlModifier:
353 Qt.KeyboardModifier.ControlModifier
354 ):
355 append = ".com" 353 append = ".com"
356 elif ( 354 elif (
357 evt.modifiers() == Qt.KeyboardModifiers( 355 evt.modifiers() == (
358 Qt.KeyboardModifier.ControlModifier | 356 Qt.KeyboardModifier.ControlModifier |
359 Qt.KeyboardModifier.ShiftModifier 357 Qt.KeyboardModifier.ShiftModifier
360 ) 358 )
361 ): 359 ):
362 append = ".org" 360 append = ".org"
363 elif evt.modifiers() == Qt.KeyboardModifiers( 361 elif evt.modifiers() == Qt.KeyboardModifier.ShiftModifier:
364 Qt.KeyboardModifier.ShiftModifier
365 ):
366 append = ".net" 362 append = ".net"
367 363
368 if append != "": 364 if append != "":
369 url = QUrl("http://www." + currentText) 365 url = QUrl("http://www." + currentText)
370 host = url.host() 366 host = url.host()

eric ide

mercurial