mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
fix infinite loop & fix safeGetFileTree for houseArrestAfcClient
This commit is contained in:
+1
-1
Submodule lib/zupdater updated: 61aea855c8...3b28a91564
@@ -206,8 +206,9 @@ void AfcExplorerWidget::loadPath(const QString &path)
|
||||
updateAddressBar(path);
|
||||
updateNavigationButtons();
|
||||
|
||||
AFCFileTree tree =
|
||||
ServiceManager::safeGetFileTree(m_device, path.toStdString(), m_afc);
|
||||
AFCFileTree tree = ServiceManager::safeGetFileTree(
|
||||
m_device, path.toStdString(), true, m_afc);
|
||||
|
||||
if (!tree.success) {
|
||||
showErrorState();
|
||||
return;
|
||||
|
||||
@@ -193,6 +193,9 @@ protected:
|
||||
{
|
||||
if (event->type() == QEvent::ApplicationFontChange) {
|
||||
updateIconSize();
|
||||
/* TODO: may be use PaletteChange event?
|
||||
but ApplicationPaletteChange seems to be a better fit here than
|
||||
PaletteChange*/
|
||||
} else if (event->type() == QEvent::ApplicationPaletteChange) {
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,10 @@ void AppTabWidget::updateStyles()
|
||||
"; border-radius: 10px; border: 1px solid " +
|
||||
bgColor.lighter().name() + "; }";
|
||||
}
|
||||
setStyleSheet(style);
|
||||
// prevent infinite loop
|
||||
if (style != styleSheet()) {
|
||||
setStyleSheet(style);
|
||||
}
|
||||
}
|
||||
|
||||
InstalledAppsWidget::InstalledAppsWidget(iDescriptorDevice *device,
|
||||
@@ -733,18 +736,6 @@ void InstalledAppsWidget::loadAppContainer(const QString &bundleId)
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList files;
|
||||
if (list) {
|
||||
for (int i = 0; list[i]; i++) {
|
||||
QString fileName = QString::fromUtf8(list[i]);
|
||||
if (fileName != "." && fileName != "..") {
|
||||
qDebug() << "Found file:" << fileName;
|
||||
files.append(fileName);
|
||||
}
|
||||
}
|
||||
afc_dictionary_free(list);
|
||||
}
|
||||
result["files"] = files;
|
||||
result["afcClient"] =
|
||||
QVariant::fromValue(reinterpret_cast<void *>(afcClient));
|
||||
result["houseArrestClient"] = QVariant::fromValue(
|
||||
|
||||
@@ -87,7 +87,6 @@ private:
|
||||
QLabel *m_iconLabel;
|
||||
QLabel *m_nameLabel;
|
||||
QLabel *m_versionLabel;
|
||||
QList<AppTabWidget *> m_appTabs;
|
||||
QNetworkAccessManager *m_networkManager = new QNetworkAccessManager(this);
|
||||
};
|
||||
|
||||
|
||||
@@ -214,7 +214,8 @@ public:
|
||||
iDescriptorDevice *device, const char *path,
|
||||
std::optional<afc_client_t> altAfc = std::nullopt);
|
||||
static AFCFileTree
|
||||
safeGetFileTree(iDescriptorDevice *device, const std::string &path = "/", bool checkDir = true,
|
||||
safeGetFileTree(iDescriptorDevice *device, const std::string &path = "/",
|
||||
bool checkDir = true,
|
||||
std::optional<afc_client_t> altAfc = std::nullopt);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user