mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 16:09:01 +08:00
Remove unneeded code
CURA-4644
This commit is contained in:
parent
596e0be7b6
commit
406b64b331
@ -4,7 +4,6 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import shutil
|
import shutil
|
||||||
import zipfile
|
import zipfile
|
||||||
import tempfile
|
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_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._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.
|
installedPackagesChanged = pyqtSignal() # Emitted whenever the installed packages collection have been changed.
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
@ -84,14 +81,6 @@ class CuraPackageManager(QObject):
|
|||||||
self._to_install_package_dict.clear()
|
self._to_install_package_dict.clear()
|
||||||
self._saveManagementData()
|
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.
|
# 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]:
|
def getInstalledPackageInfo(self, package_id: str) -> Optional[dict]:
|
||||||
if package_id in self._to_remove_package_set:
|
if package_id in self._to_remove_package_set:
|
||||||
|
@ -345,10 +345,6 @@ UM.MainWindow
|
|||||||
pluginInstallDialog.open();
|
pluginInstallDialog.open();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (CuraApplication.getCuraPackageManager().isPackageFile(drop.urls[0]))
|
|
||||||
{
|
|
||||||
CuraApplication.getCuraPackageManager().install(drop.urls[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openDialog.handleOpenFileUrls(drop.urls);
|
openDialog.handleOpenFileUrls(drop.urls);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user