eric6/Preferences/ConfigurationPages/DebuggerGeneralPage.py

branch
multi_processing
changeset 7802
eefe954f01e8
parent 7422
9a008ab4811b
parent 7775
4a1db75550bd
child 7923
91e843545d9a
equal deleted inserted replaced
7646:39e3db2b4936 7802:eefe954f01e8
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