eric6/Preferences/ConfigurationPages/DebuggerGeneralPage.py

changeset 7775
4a1db75550bd
parent 7360
9190402e4505
child 7802
eefe954f01e8
child 7924
8a96736d465e
equal deleted inserted replaced
7774:9eed155411f0 7775:4a1db75550bd
5 5
6 """ 6 """
7 Module implementing the Debugger General configuration page. 7 Module implementing the Debugger General configuration page.
8 """ 8 """
9 9
10 10 import re
11 import socket 11 import socket
12 12
13 from PyQt5.QtCore import Qt, QAbstractItemModel, QModelIndex, QRegExp, pyqtSlot 13 from PyQt5.QtCore import pyqtSlot, Qt, QAbstractItemModel, QModelIndex
14 from PyQt5.QtGui import QBrush, QColor 14 from PyQt5.QtGui import QBrush, QColor
15 from PyQt5.QtWidgets import QLineEdit, QInputDialog 15 from PyQt5.QtWidgets import QLineEdit, QInputDialog
16 from PyQt5.QtNetwork import QNetworkInterface, QAbstractSocket, QHostAddress 16 from PyQt5.QtNetwork import QNetworkInterface, QAbstractSocket, QHostAddress
17 17
18 from E5Gui.E5Application import e5App 18 from E5Gui.E5Application import e5App
89 else: 89 else:
90 self.selectedInterfaceButton.setChecked(True) 90 self.selectedInterfaceButton.setChecked(True)
91 index = -1 91 index = -1
92 for i in range(len(interfaces)): 92 for i in range(len(interfaces)):
93 if ( 93 if (
94 QRegExp(".*{0}.*".format(interface)) 94 re.fullmatch(".*{0}.*".format(interface), interfaces[i])
95 .exactMatch(interfaces[i])
96 ): 95 ):
97 index = i 96 index = i
98 break 97 break
99 self.interfacesCombo.setCurrentIndex(index) 98 self.interfacesCombo.setCurrentIndex(index)
100 99

eric ide

mercurial