summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2020-10-23 14:34:40 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2020-10-23 14:34:40 +0000
commitcc605d7a4754c417cf8c9dc29acf5e6d07bfa7c9 (patch)
tree84f6838c22cb236b8f3dd629140a972a0644a4af
parent87f5e866c3c5c653f703bea07113a67097645862 (diff)
downloadVirtualBox-svn-cc605d7a4754c417cf8c9dc29acf5e6d07bfa7c9.tar.gz
FE/Qt: bugref:9653: !VirtualBox Manager: Cloud Profile Manager: A bit of cleanup for item creation stuff.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@86690 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r--src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp16
-rw-r--r--src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h8
2 files changed, 8 insertions, 16 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp b/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
index da8e3c05aed..1e60e88ca4f 100644
--- a/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
@@ -815,7 +815,7 @@ void UICloudProfileManagerWidget::loadCloudStuff()
/* Load provider data: */
UIDataCloudProvider providerData;
loadCloudProvider(comCloudProvider, restrictions, providerData);
- createItemForCloudProvider(providerData, false);
+ createItemForCloudProvider(providerData);
/* Make sure provider item is properly inserted: */
QTreeWidgetItem *pItem = searchItem(UIItemCloudProvider::definition(providerData.m_strShortName));
@@ -831,7 +831,7 @@ void UICloudProfileManagerWidget::loadCloudStuff()
/* Load profile data: */
UIDataCloudProfile profileData;
loadCloudProfile(comCloudProfile, restrictions, providerData, profileData);
- createItemForCloudProfile(pItem, profileData, false);
+ createItemForCloudProfile(pItem, profileData);
}
/* Expand provider item finally: */
@@ -933,8 +933,7 @@ QTreeWidgetItem *UICloudProfileManagerWidget::searchItem(const QString &strDefin
return 0;
}
-void UICloudProfileManagerWidget::createItemForCloudProvider(const UIDataCloudProvider &providerData,
- bool fChooseItem)
+void UICloudProfileManagerWidget::createItemForCloudProvider(const UIDataCloudProvider &providerData)
{
/* Create new provider item: */
UIItemCloudProvider *pItem = new UIItemCloudProvider;
@@ -945,15 +944,11 @@ void UICloudProfileManagerWidget::createItemForCloudProvider(const UIDataCloudPr
pItem->updateFields();
/* Add item to the tree: */
m_pTreeWidget->addTopLevelItem(pItem);
- /* And choose it as current if necessary: */
- if (fChooseItem)
- m_pTreeWidget->setCurrentItem(pItem);
}
}
void UICloudProfileManagerWidget::createItemForCloudProfile(QTreeWidgetItem *pParent,
- const UIDataCloudProfile &profileData,
- bool fChooseItem)
+ const UIDataCloudProfile &profileData)
{
/* Create new profile item: */
UIItemCloudProfile *pItem = new UIItemCloudProfile;
@@ -964,9 +959,6 @@ void UICloudProfileManagerWidget::createItemForCloudProfile(QTreeWidgetItem *pPa
pItem->updateFields();
/* Add item to the parent: */
pParent->addChild(pItem);
- /* And choose it as current if necessary: */
- if (fChooseItem)
- m_pTreeWidget->setCurrentItem(pItem);
}
}
diff --git a/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h b/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h
index f9808bba206..156d5317954 100644
--- a/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h
+++ b/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h
@@ -170,11 +170,11 @@ private:
QTreeWidgetItem *pParentItem = 0) const;
/** Creates a new tree-widget item
- * on the basis of passed @a providerData, @a fChooseItem if requested. */
- void createItemForCloudProvider(const UIDataCloudProvider &providerData, bool fChooseItem);
+ * on the basis of passed @a providerData. */
+ void createItemForCloudProvider(const UIDataCloudProvider &providerData);
/** Creates a new tree-widget item as a child of certain @a pParent,
- * on the basis of passed @a profileData, @a fChooseItem if requested. */
- void createItemForCloudProfile(QTreeWidgetItem *pParent, const UIDataCloudProfile &profileData, bool fChooseItem);
+ * on the basis of passed @a profileData. */
+ void createItemForCloudProfile(QTreeWidgetItem *pParent, const UIDataCloudProfile &profileData);
/* Gathers a list of Cloud Profile Manager restrictions starting from @a pParentItem. */
QStringList gatherCloudProfileManagerRestrictions(QTreeWidgetItem *pParentItem);