Browse Source

Remove unneeded code

CURA-4644
Lipu Fei 7 years ago
parent
commit
406b64b331
2 changed files with 0 additions and 15 deletions
  1. 0 11
      cura/CuraPackageManager.py
  2. 0 4
      resources/qml/Cura.qml

+ 0 - 11
cura/CuraPackageManager.py

@@ -4,7 +4,6 @@
 from typing import Optional
 import json
 import os
-import re
 import shutil
 import zipfile
 import tempfile
@@ -37,8 +36,6 @@ class CuraPackageManager(QObject):
         self._to_remove_package_set = set()  # a set of packages that need to be removed at the next start
         self._to_install_package_dict = {}  # a dict of packages that need to be installed at the next start
 
-        self._semantic_version_regex = re.compile(r"^[0-9]+(.[0-9]+)+$")
-
     installedPackagesChanged = pyqtSignal()  # Emitted whenever the installed packages collection have been changed.
 
     def initialize(self):
@@ -84,14 +81,6 @@ class CuraPackageManager(QObject):
         self._to_install_package_dict.clear()
         self._saveManagementData()
 
-    @pyqtSlot(str, result = bool)
-    def isPackageFile(self, file_name: str):
-        # TODO: remove this
-        extension = os.path.splitext(file_name)[1].strip(".")
-        if extension.lower() in ("curapackage",):
-            return True
-        return False
-
     # Checks the given package is installed. If so, return a dictionary that contains the package's information.
     def getInstalledPackageInfo(self, package_id: str) -> Optional[dict]:
         if package_id in self._to_remove_package_set:

+ 0 - 4
resources/qml/Cura.qml

@@ -345,10 +345,6 @@ UM.MainWindow
                                 pluginInstallDialog.open();
                                 return;
                             }
-                            else if (CuraApplication.getCuraPackageManager().isPackageFile(drop.urls[0]))
-                            {
-                                CuraApplication.getCuraPackageManager().install(drop.urls[0]);
-                            }
                         }
 
                         openDialog.handleOpenFileUrls(drop.urls);