mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/import-config-from-cloud
This commit is contained in:
@@ -41,7 +41,7 @@ bool ContainersModel::setData(const QModelIndex &index, const QVariant &value, i
|
||||
// return container;
|
||||
case IsInstalledRole:
|
||||
// return m_settings->containers(m_currentlyProcessedServerIndex).contains(container);
|
||||
case IsDefaultRole: {
|
||||
case IsDefaultRole: { //todo remove
|
||||
m_settings->setDefaultContainer(m_currentlyProcessedServerIndex, container);
|
||||
m_defaultContainerIndex = container;
|
||||
emit defaultContainerChanged();
|
||||
@@ -117,6 +117,14 @@ QString ContainersModel::getDefaultContainerName()
|
||||
return ContainerProps::containerHumanNames().value(m_defaultContainerIndex);
|
||||
}
|
||||
|
||||
void ContainersModel::setDefaultContainer(int index)
|
||||
{
|
||||
auto container = static_cast<DockerContainer>(index);
|
||||
m_settings->setDefaultContainer(m_currentlyProcessedServerIndex, container);
|
||||
m_defaultContainerIndex = container;
|
||||
emit defaultContainerChanged();
|
||||
}
|
||||
|
||||
int ContainersModel::getCurrentlyProcessedContainerIndex()
|
||||
{
|
||||
return m_currentlyProcessedContainerIndex;
|
||||
@@ -228,6 +236,11 @@ bool ContainersModel::isAnyContainerInstalled()
|
||||
return false;
|
||||
}
|
||||
|
||||
void ContainersModel::updateContainersConfig()
|
||||
{
|
||||
m_containers = m_settings->containers(m_currentlyProcessedServerIndex);
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> ContainersModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
|
||||
Reference in New Issue
Block a user