11 import os |
11 import os |
12 import datetime |
12 import datetime |
13 |
13 |
14 from PyQt5.QtCore import pyqtSlot, Qt, QUrl |
14 from PyQt5.QtCore import pyqtSlot, Qt, QUrl |
15 from PyQt5.QtWidgets import ( |
15 from PyQt5.QtWidgets import ( |
16 QDialog, QDialogButtonBox, QTreeWidgetItem, QListWidgetItem, QApplication |
16 QDialog, QDialogButtonBox, QTreeWidgetItem, QListWidgetItem |
17 ) |
17 ) |
18 from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply |
18 from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply |
19 |
19 |
20 from E5Gui.E5Application import e5App |
20 from E5Gui.E5Application import e5App |
21 from E5Gui import E5MessageBox, E5FileDialog |
21 from E5Gui import E5MessageBox, E5FileDialog |
22 from E5Gui.E5Completers import E5DirCompleter |
22 from E5Gui.E5Completers import E5DirCompleter |
|
23 from E5Gui.E5OverrideCursor import E5OverrideCursor |
23 |
24 |
24 from .Ui_SetupWizardDialog import Ui_SetupWizardDialog |
25 from .Ui_SetupWizardDialog import Ui_SetupWizardDialog |
25 |
26 |
26 import UI.PixmapCache |
27 import UI.PixmapCache |
27 import Utilities |
28 import Utilities |
553 @pyqtSlot() |
554 @pyqtSlot() |
554 def on_autodiscoverPackagesButton_clicked(self): |
555 def on_autodiscoverPackagesButton_clicked(self): |
555 """ |
556 """ |
556 Private slot to discover packages automatically. |
557 Private slot to discover packages automatically. |
557 """ |
558 """ |
558 self.autodiscoverPackagesButton.setEnabled(False) |
559 with E5OverrideCursor(): |
559 QApplication.setOverrideCursor(Qt.WaitCursor) |
560 self.autodiscoverPackagesButton.setEnabled(False) |
560 startDir = self.packageRootEdit.text() or self.__getStartDir() |
561 startDir = self.packageRootEdit.text() or self.__getStartDir() |
561 if startDir: |
562 if startDir: |
562 self.packagesList.clear() |
563 self.packagesList.clear() |
563 for dirpath, _dirnames, filenames in os.walk(startDir): |
564 for dirpath, _dirnames, filenames in os.walk(startDir): |
564 if "__init__.py" in filenames: |
565 if "__init__.py" in filenames: |
565 self.__addPackage(dirpath) |
566 self.__addPackage(dirpath) |
566 self.autodiscoverPackagesButton.setEnabled(True) |
567 self.autodiscoverPackagesButton.setEnabled(True) |
567 QApplication.restoreOverrideCursor() |
|
568 |
568 |
569 @pyqtSlot() |
569 @pyqtSlot() |
570 def on_packageRootDirButton_clicked(self): |
570 def on_packageRootDirButton_clicked(self): |
571 """ |
571 """ |
572 Private slot to select the packages root directory via a |
572 Private slot to select the packages root directory via a |