mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 04:35:39 +03:00
200 lines
5.3 KiB
Diff
200 lines
5.3 KiB
Diff
diff --git a/gns3/console_cmd.py b/gns3/console_cmd.py
|
|
index 5e630f43..b1d0673a 100644
|
|
--- a/gns3/console_cmd.py
|
|
+++ b/gns3/console_cmd.py
|
|
@@ -22,7 +22,7 @@ Handles commands typed in the GNS3 console.
|
|
import sys
|
|
import cmd
|
|
import struct
|
|
-import sip
|
|
+from .qt import sip
|
|
import json
|
|
|
|
from .node import Node
|
|
diff --git a/gns3/console_view.py b/gns3/console_view.py
|
|
index 10edb860..365f7bc1 100644
|
|
--- a/gns3/console_view.py
|
|
+++ b/gns3/console_view.py
|
|
@@ -16,7 +16,7 @@
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
import sys
|
|
-import sip
|
|
+from .qt import sip
|
|
import struct
|
|
import inspect
|
|
import datetime
|
|
diff --git a/gns3/crash_report.py b/gns3/crash_report.py
|
|
index bc37d061..a9379e16 100644
|
|
--- a/gns3/crash_report.py
|
|
+++ b/gns3/crash_report.py
|
|
@@ -132,7 +132,7 @@ class CrashReport:
|
|
def _add_qt_information(self, context):
|
|
try:
|
|
from .qt import QtCore
|
|
- import sip
|
|
+ from .qt import sip
|
|
except ImportError:
|
|
return context
|
|
context["psutil:version"] = psutil.__version__
|
|
diff --git a/gns3/dialogs/appliance_wizard.py b/gns3/dialogs/appliance_wizard.py
|
|
index 06f2bf2a..8ab386b4 100644
|
|
--- a/gns3/dialogs/appliance_wizard.py
|
|
+++ b/gns3/dialogs/appliance_wizard.py
|
|
@@ -16,7 +16,7 @@
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
import os
|
|
-import sip
|
|
+from ..qt import sip
|
|
import shutil
|
|
|
|
from ..qt import QtWidgets, QtCore, QtGui, qpartial, qslot
|
|
diff --git a/gns3/graphics_view.py b/gns3/graphics_view.py
|
|
index 517bfaaf..da058385 100644
|
|
--- a/gns3/graphics_view.py
|
|
+++ b/gns3/graphics_view.py
|
|
@@ -21,7 +21,7 @@ Graphical view on the scene where items are drawn.
|
|
|
|
import logging
|
|
import os
|
|
-import sip
|
|
+from .qt import sip
|
|
import sys
|
|
|
|
from .qt import QtCore, QtGui, QtNetwork, QtWidgets, qpartial, qslot
|
|
diff --git a/gns3/http_client.py b/gns3/http_client.py
|
|
index c0ceca69..6993bf58 100644
|
|
--- a/gns3/http_client.py
|
|
+++ b/gns3/http_client.py
|
|
@@ -15,7 +15,7 @@
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
-import sip
|
|
+from .qt import sip
|
|
import json
|
|
import copy
|
|
import http
|
|
diff --git a/gns3/items/node_item.py b/gns3/items/node_item.py
|
|
index cac82e70..b4ec7930 100644
|
|
--- a/gns3/items/node_item.py
|
|
+++ b/gns3/items/node_item.py
|
|
@@ -19,7 +19,7 @@
|
|
Graphical representation of a node on the QGraphicsScene.
|
|
"""
|
|
|
|
-import sip
|
|
+from ..qt import sip
|
|
|
|
from ..qt import QtCore, QtGui, QtWidgets, QtSvg, qslot
|
|
from ..qt.qimage_svg_renderer import QImageSvgRenderer
|
|
diff --git a/gns3/link.py b/gns3/link.py
|
|
index 1cd634c0..323823b1 100644
|
|
--- a/gns3/link.py
|
|
+++ b/gns3/link.py
|
|
@@ -21,7 +21,7 @@ Manages and stores everything needed for a connection between 2 devices.
|
|
|
|
import os
|
|
import re
|
|
-import sip
|
|
+from .qt import sip
|
|
import uuid
|
|
|
|
from .qt import QtCore, QtWidgets
|
|
diff --git a/gns3/nodes_view.py b/gns3/nodes_view.py
|
|
index 463a63fe..16f51ed4 100644
|
|
--- a/gns3/nodes_view.py
|
|
+++ b/gns3/nodes_view.py
|
|
@@ -22,7 +22,7 @@ on the QGraphics scene.
|
|
|
|
import tempfile
|
|
import json
|
|
-import sip
|
|
+from .qt import sip
|
|
|
|
from .qt import QtCore, QtGui, QtWidgets, qpartial
|
|
from .modules import MODULES
|
|
diff --git a/gns3/ports/port.py b/gns3/ports/port.py
|
|
index 66776a33..3425df0a 100644
|
|
--- a/gns3/ports/port.py
|
|
+++ b/gns3/ports/port.py
|
|
@@ -19,7 +19,7 @@
|
|
Base class for port objects.
|
|
"""
|
|
|
|
-import sip
|
|
+from ..qt import sip
|
|
|
|
from ..qt import qslot
|
|
|
|
diff --git a/gns3/progress.py b/gns3/progress.py
|
|
index 4f167bbd..33135513 100644
|
|
--- a/gns3/progress.py
|
|
+++ b/gns3/progress.py
|
|
@@ -15,7 +15,7 @@
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
-import sip
|
|
+from .qt import sip
|
|
import time
|
|
from contextlib import contextmanager
|
|
|
|
diff --git a/gns3/qt/__init__.py b/gns3/qt/__init__.py
|
|
index b8d9550e..ae88c4bf 100644
|
|
--- a/gns3/qt/__init__.py
|
|
+++ b/gns3/qt/__init__.py
|
|
@@ -24,7 +24,6 @@ Compatibility layer for Qt bindings, so it is easier to switch to PySide if need
|
|
|
|
|
|
import sys
|
|
-import sip
|
|
import os
|
|
import re
|
|
import inspect
|
|
@@ -33,12 +32,17 @@ import functools
|
|
import logging
|
|
log = logging.getLogger("qt/__init__.py")
|
|
|
|
+try:
|
|
+ import sip
|
|
+except ImportError:
|
|
+ from PyQt5 import sip
|
|
from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets, Qt
|
|
sys.modules[__name__ + '.QtCore'] = QtCore
|
|
sys.modules[__name__ + '.QtGui'] = QtGui
|
|
sys.modules[__name__ + '.QtNetwork'] = QtNetwork
|
|
sys.modules[__name__ + '.QtWidgets'] = QtWidgets
|
|
sys.modules[__name__ + '.Qt'] = Qt
|
|
+sys.modules[__name__ + '.sip'] = sip
|
|
|
|
try:
|
|
from PyQt5 import QtSvg
|
|
diff --git a/gns3/utils/progress_dialog.py b/gns3/utils/progress_dialog.py
|
|
index b6a84af9..9742e1b3 100644
|
|
--- a/gns3/utils/progress_dialog.py
|
|
+++ b/gns3/utils/progress_dialog.py
|
|
@@ -19,7 +19,7 @@
|
|
Progress dialog that blocking tasks (file operations, network connections etc.)
|
|
"""
|
|
|
|
-import sip
|
|
+from ..qt import sip
|
|
from gns3.version import __version__
|
|
from ..qt import QtWidgets, QtCore, qslot
|
|
|
|
diff --git a/gns3/utils/wait_for_lambda_worker.py b/gns3/utils/wait_for_lambda_worker.py
|
|
index 78a5207a..d24a3cb0 100644
|
|
--- a/gns3/utils/wait_for_lambda_worker.py
|
|
+++ b/gns3/utils/wait_for_lambda_worker.py
|
|
@@ -19,7 +19,7 @@
|
|
Thread showing a progress dialog and running the code from a lambda
|
|
"""
|
|
|
|
-import sip
|
|
+from ..qt import sip
|
|
|
|
from ..qt import QtCore
|
|
|
|
|