77 self.searchEdit.setFocus(Qt.OtherFocusReason) |
77 self.searchEdit.setFocus(Qt.OtherFocusReason) |
78 |
78 |
79 self.__canceled = False |
79 self.__canceled = False |
80 self.__detailsData = {} |
80 self.__detailsData = {} |
81 self.__query = [] |
81 self.__query = [] |
|
82 |
|
83 self.__packageDetailsDialog = None |
82 |
84 |
83 def closeEvent(self, e): |
85 def closeEvent(self, e): |
84 """ |
86 """ |
85 Protected slot implementing a close event handler. |
87 Protected slot implementing a close event handler. |
86 |
88 |
87 @param e close event (QCloseEvent) |
89 @param e close event (QCloseEvent) |
88 """ |
90 """ |
89 QApplication.restoreOverrideCursor() |
91 QApplication.restoreOverrideCursor() |
|
92 |
|
93 if self.__packageDetailsDialog is not None: |
|
94 self.__packageDetailsDialog.close() |
|
95 |
90 e.accept() |
96 e.accept() |
91 |
97 |
92 @pyqtSlot(str) |
98 @pyqtSlot(str) |
93 def on_searchEdit_textChanged(self, txt): |
99 def on_searchEdit_textChanged(self, txt): |
94 """ |
100 """ |
398 Private method to display the returned package details. |
404 Private method to display the returned package details. |
399 |
405 |
400 @param data result data (tuple) with downloads information in the first |
406 @param data result data (tuple) with downloads information in the first |
401 element |
407 element |
402 """ |
408 """ |
|
409 from .PipPackageDetailsDialog import PipPackageDetailsDialog |
|
410 |
403 self.__finish() |
411 self.__finish() |
404 self.__showDetailsButton.setEnabled(True) |
412 self.__showDetailsButton.setEnabled(True) |
405 from .PipPackageDetailsDialog import PipPackageDetailsDialog |
413 |
406 dlg = PipPackageDetailsDialog(self.__detailsData, data[0], self) |
414 if self.__packageDetailsDialog is not None: |
407 dlg.exec_() |
415 self.__packageDetailsDialog.close() |
|
416 |
|
417 self.__packageDetailsDialog = \ |
|
418 PipPackageDetailsDialog(self.__detailsData, data[0], self) |
|
419 self.__packageDetailsDialog.show() |
408 |
420 |
409 def __detailsError(self, errorCode, errorString): |
421 def __detailsError(self, errorCode, errorString): |
410 """ |
422 """ |
411 Private method handling a details error. |
423 Private method handling a details error. |
412 |
424 |