mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Allow to reload other swift versions UI
This commit is contained in:
@@ -117,7 +117,7 @@ namespace BlackGui
|
|||||||
if (sets > 0 || caches > 0)
|
if (sets > 0 || caches > 0)
|
||||||
{
|
{
|
||||||
const CStatusMessage m = CStatusMessage(this).validationInfo("Copied %1 sets and %2 caches for '%3'") << sets << caches << selectedSimulators.toQString(true);
|
const CStatusMessage m = CStatusMessage(this).validationInfo("Copied %1 sets and %2 caches for '%3'") << sets << caches << selectedSimulators.toQString(true);
|
||||||
this->showOverlayMessage(m);
|
this->showOverlayHTMLMessage(m, 7500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,17 @@ namespace BlackGui
|
|||||||
ui(new Ui::COtherSwiftVersionsComponent)
|
ui(new Ui::COtherSwiftVersionsComponent)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
ui->tvp_ApplicationInfo->menuRemoveItems(CApplicationInfoView::MenuClear);
|
||||||
|
ui->tvp_ApplicationInfo->menuAddItems(CApplicationInfoView::MenuRefresh);
|
||||||
|
|
||||||
ui->tvp_ApplicationInfo->otherSwiftVersionsFromDataDirectories();
|
ui->tvp_ApplicationInfo->otherSwiftVersionsFromDataDirectories();
|
||||||
ui->le_ThisVersion->setText(sGui->getApplicationInfo().asOtherSwiftVersionString());
|
ui->le_ThisVersion->setText(sGui->getApplicationInfo().asOtherSwiftVersionString());
|
||||||
ui->le_ThisVersion->home(false);
|
ui->le_ThisVersion->home(false);
|
||||||
|
|
||||||
connect(ui->tb_DataDir, &QToolButton::clicked, this, &COtherSwiftVersionsComponent::openDataDirectory);
|
connect(ui->tb_DataDir, &QToolButton::clicked, this, &COtherSwiftVersionsComponent::openDataDirectory);
|
||||||
connect(ui->tvp_ApplicationInfo, &CApplicationInfoView::objectSelected, this, &COtherSwiftVersionsComponent::onObjectSelected);
|
connect(ui->tvp_ApplicationInfo, &CApplicationInfoView::objectSelected, this, &COtherSwiftVersionsComponent::onObjectSelected);
|
||||||
|
connect(ui->tvp_ApplicationInfo, &CApplicationInfoView::requestUpdate, this, &COtherSwiftVersionsComponent::reloadVersions);
|
||||||
}
|
}
|
||||||
|
|
||||||
COtherSwiftVersionsComponent::~COtherSwiftVersionsComponent()
|
COtherSwiftVersionsComponent::~COtherSwiftVersionsComponent()
|
||||||
@@ -47,6 +53,11 @@ namespace BlackGui
|
|||||||
return ui->tvp_ApplicationInfo->selectedObject();
|
return ui->tvp_ApplicationInfo->selectedObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void COtherSwiftVersionsComponent::reloadVersions()
|
||||||
|
{
|
||||||
|
ui->tvp_ApplicationInfo->otherSwiftVersionsFromDataDirectories();
|
||||||
|
}
|
||||||
|
|
||||||
void COtherSwiftVersionsComponent::openDataDirectory()
|
void COtherSwiftVersionsComponent::openDataDirectory()
|
||||||
{
|
{
|
||||||
const QString dir = CDirectoryUtils::applicationDataDirectory();
|
const QString dir = CDirectoryUtils::applicationDataDirectory();
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ namespace BlackGui
|
|||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::COtherSwiftVersionsComponent> ui;
|
QScopedPointer<Ui::COtherSwiftVersionsComponent> ui;
|
||||||
|
|
||||||
|
//! Reload versions
|
||||||
|
void reloadVersions();
|
||||||
|
|
||||||
//! Data directory
|
//! Data directory
|
||||||
void openDataDirectory();
|
void openDataDirectory();
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories();
|
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories();
|
||||||
this->updateContainer(others);
|
this->updateContainer(others);
|
||||||
m_acceptRowSelection = others.size() > 0;
|
m_acceptRowSelection = (others.size() > 0);
|
||||||
return others.size();
|
return others.size();
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user