mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Improved version of "Allow to delete data directory from application view"
- split functions into dynamic loading and const versions (loading at startup) - reload other versions from wizard in case they changed - some renaming/formatting
This commit is contained in:
@@ -27,9 +27,9 @@ namespace BlackGui
|
||||
this->setCustomMenu(new CApplicationInfoMenu(this));
|
||||
}
|
||||
|
||||
int CApplicationInfoView::otherSwiftVersionsFromDataDirectories()
|
||||
int CApplicationInfoView::otherSwiftVersionsFromDataDirectories(bool reInit)
|
||||
{
|
||||
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories();
|
||||
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories(reInit);
|
||||
this->updateContainer(others);
|
||||
m_acceptRowSelection = (others.size() > 0);
|
||||
return others.size();
|
||||
@@ -53,7 +53,7 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
if (deletedDirectories.isEmpty()) { return; }
|
||||
this->otherSwiftVersionsFromDataDirectories();
|
||||
this->otherSwiftVersionsFromDataDirectories(true);
|
||||
}
|
||||
|
||||
void CApplicationInfoMenu::customMenu(CMenuActions &menuActions)
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BlackGui
|
||||
explicit CApplicationInfoView(QWidget *parent = nullptr);
|
||||
|
||||
//! BlackMisc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories
|
||||
int otherSwiftVersionsFromDataDirectories();
|
||||
int otherSwiftVersionsFromDataDirectories(bool reInit = false);
|
||||
|
||||
//! Delete the selected directories
|
||||
void deleteSelectedDataDirectories();
|
||||
|
||||
Reference in New Issue
Block a user