Skip to content

Commit

Permalink
* Fix conan worker install ref call (affects Conan Install Dialog)
Browse files Browse the repository at this point in the history
* Fix RemoveRef menu item not enabled in LPE
  • Loading branch information
goszpeti committed Sep 12, 2023
1 parent f85cb94 commit cf731b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/conan_app_launcher/conan_wrapper/conanV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ def search_recipe_all_versions_in_remotes(self, conan_ref: ConanRef) -> List[Con
self.info_cache.update_remote_package_list(res_list)
return res_list

def get_remote_pkgs_from_ref(self, conan_ref: ConanRef, remote: Optional[str], query=None) -> List[ConanPkg]:
def get_remote_pkgs_from_ref(self, conan_ref: ConanRef, remote: Optional[str],
query=None) -> List[ConanPkg]:
found_pkgs: List[ConanPkg] = []
try:
from conan.api.model import ListPattern
Expand All @@ -366,8 +367,8 @@ def get_remote_pkgs_from_ref(self, conan_ref: ConanRef, remote: Optional[str], q
for remote_obj in self.get_remotes():
if remote_obj.name == remote:
break
search_results = self._conan.list.select(
pattern, remote=remote_obj, package_query=query)
search_results = self._conan.list.select(pattern, remote=remote_obj,
package_query=query)
if search_results:
latest_rev = self._conan.list.latest_recipe_revision(
conan_ref, remote_obj)
Expand Down
4 changes: 2 additions & 2 deletions src/conan_app_launcher/conan_wrapper/conan_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def _work_on_conan_install_queue(self):
pkg_id, _ = self._conan_api.get_path_or_auto_install(
conan_ref, conan_options, update)
else:
pkg_id, _ = self._conan_api.install_reference(
conan_ref, conan_profile, conan_settings, conan_options, update)
pkg_id, _ = self._conan_api.install_reference(conan_ref,
conan_settings, conan_options, conan_profile, update)
except Exception as e:
try:
self._conan_install_queue.task_done()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .sel_model import PkgSelectionType

from PySide6.QtCore import Qt, Signal
from PySide6.QtGui import QKeySequence, QResizeEvent, QAction
from PySide6.QtGui import QKeySequence, QResizeEvent, QAction, QShowEvent
from PySide6.QtWidgets import (QWidget, QTabBar, QTreeView, QHBoxLayout, QFrame,
QAbstractItemView, QAbstractScrollArea)

Expand Down Expand Up @@ -128,7 +128,7 @@ def on_pkg_selection_change(self, conan_ref: str, pkg: ConanPkg, type: PkgSelect
if ctrl._model:
self._ui.package_path_label.setText(ctrl._model.rootPath())

def showEvent(self, a0: "QShowEvent") -> None:
def showEvent(self, a0: QShowEvent) -> None:
self._pkg_sel_ctrl.refresh_pkg_selection_view(force_update=False) # only update the first time
return super().showEvent(a0)

Expand Down Expand Up @@ -191,7 +191,7 @@ def on_selection_context_menu_requested(self, position):
self.show_build_info_action.setVisible(True)
self.show_conanfile_action.setVisible(True)
self.install_ref_action.setVisible(True)
self.remove_ref_action.setVisible(False)
self.remove_ref_action.setVisible(True)

self.select_cntx_menu.exec(self._ui.package_select_view.mapToGlobal(position))

Expand Down

0 comments on commit cf731b3

Please sign in to comment.