Debugger/DebugServer.py

changeset 541
00e1a5d060c5
parent 539
87f9bce38a44
child 553
5af61623ae3c
diff -r 2631831b4052 -r 00e1a5d060c5 Debugger/DebugServer.py
--- a/Debugger/DebugServer.py	Tue Aug 31 13:39:24 2010 +0200
+++ b/Debugger/DebugServer.py	Tue Aug 31 16:38:06 2010 +0200
@@ -10,7 +10,6 @@
 import os
 
 from PyQt4.QtCore import *
-from PyQt4.QtGui import QMessageBox
 from PyQt4.QtNetwork import QTcpServer, QHostAddress, QHostInfo
 
 from E5Gui.E5Application import e5App
@@ -567,16 +566,13 @@
         peerAddress = sock.peerAddress().toString()
         if peerAddress not in Preferences.getDebugger("AllowedHosts"):
             # the peer is not allowed to connect
-            res = E5MessageBox.warning(None,
+            res = E5MessageBox.yesNo(None,
                 self.trUtf8("Connection from illegal host"),
                 self.trUtf8("""<p>A connection was attempted by the"""
                     """ illegal host <b>{0}</b>. Accept this connection?</p>""")\
                     .format(peerAddress),
-                QMessageBox.StandardButtons(\
-                    QMessageBox.No | \
-                    QMessageBox.Yes),
-                QMessageBox.No)
-            if res == QMessageBox.No:
+                type_ = E5MessageBox.Warning)
+            if not res:
                 sock.abort()
                 return
             else:
@@ -1277,4 +1273,4 @@
         
         @return flag indicating a connection (boolean)
         """
-        return self.debuggerInterface and self.debuggerInterface.isConnected()
\ No newline at end of file
+        return self.debuggerInterface and self.debuggerInterface.isConnected()

eric ide

mercurial