checkpoint. getting stuck
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
},
|
||||
"MSYS2": {
|
||||
"page": "https://www.msys2.org/",
|
||||
"category": "development.languages.C / C++",
|
||||
"category": "development.languages.c and c++",
|
||||
"homepage": "https://www.msys2.org",
|
||||
"icon url": "https://avatars1.githubusercontent.com/u/6759993?s=200&v=4",
|
||||
"search": {
|
||||
@@ -246,7 +246,7 @@
|
||||
},
|
||||
"Cppcheck": {
|
||||
"page": "https://portableapps.com/apps/development/cppcheck-portable",
|
||||
"category": "development.languages.C/C++",
|
||||
"category": "development.languages.c and c++",
|
||||
"homepage": "http://cppcheck.sourceforge.net/",
|
||||
"search": {
|
||||
"selector": "",
|
||||
|
||||
@@ -7,6 +7,7 @@ import zipfile
|
||||
from pathlib import Path
|
||||
from queue import Queue
|
||||
import json
|
||||
from operator import itemgetter
|
||||
|
||||
import psutil
|
||||
from PyQt5 import QtCore, QtGui, QtNetwork, QtWebEngineWidgets, QtWidgets
|
||||
@@ -155,16 +156,13 @@ class InstallerWizard(QtWidgets.QWizard):
|
||||
else:
|
||||
self._display_error(f"Encountered an error while loading supported tools from {request.url().toString()}", reply.errorString()).finished.connect(lambda x: self.back())
|
||||
|
||||
|
||||
def _populate_menu(self):
|
||||
"""Populates the selection menu with items loaded from supported_tools.json
|
||||
"""
|
||||
for name, info in self.__tools__.items():
|
||||
placement = [level.capitalize().strip() for level in info["category"].split(".") if level] + [name]
|
||||
|
||||
root = self.selection_menu.invisibleRootItem()
|
||||
#children = [root.child(i) for i in range(root.childCount())]
|
||||
children = list(MenuIterator(root, QtWidgets.QTreeWidgetItemIterator.All))
|
||||
children = [root.child(i) for i in range(root.childCount())]
|
||||
while placement:
|
||||
current_level = placement.pop()
|
||||
|
||||
@@ -197,6 +195,11 @@ class InstallerWizard(QtWidgets.QWizard):
|
||||
self.selection_menu.resizeColumnToContents(0)
|
||||
self.selection_menu.resizeColumnToContents(1)
|
||||
|
||||
def _create_placements(self):
|
||||
placements = [[level.capitalize().strip() for level in info["category"].split(".") if info["category"]] + [name] for name, info in self.__tools__.items()]
|
||||
for menu_placement in placements:
|
||||
self.__tools__[menu_placement[-1]]["placement"] = menu_placement
|
||||
|
||||
@QtCore.pyqtSlot("QTreeWidgetItem*", "int")
|
||||
def _open_homepage(self, item, column):
|
||||
"""Receives the itemClicked signal from the selection_menu QTreeWidget and if the user has clicked a homepage, opens it in a new browser tab.
|
||||
|
||||
Reference in New Issue
Block a user