Changeset 47952 in vbox for trunk/src/VBox
- Timestamp:
- Aug 21, 2013 8:40:17 AM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r47150 r47952 42 42 UIMedium& UIMedium::operator= (const UIMedium &aOther) 43 43 { 44 m_fAttachedToHiddenMachinesOnly = aOther.isAttachedToHiddenMachinesOnly(); 44 m_fHide = aOther.m_fHide; 45 m_fAttachedToHiddenMachinesOnly = aOther.m_fAttachedToHiddenMachinesOnly; 45 46 46 47 mMedium = aOther.medium(); … … 123 124 void UIMedium::refresh() 124 125 { 125 /* We assume this flag is 'false' by default: */ 126 /* We assume these flags are 'false' by default: */ 127 m_fHide = false; 126 128 m_fAttachedToHiddenMachinesOnly = false; 127 129 … … 142 144 mLocation = mMedium.isNull() || mIsHostDrive ? QString ("--") : 143 145 QDir::toNativeSeparators (mMedium.GetLocation()); 146 147 QString tmp; 148 if (!mMedium.isNull()) 149 tmp = mMedium.GetProperty("Special/GUI/Hints"); 150 if (!tmp.isEmpty()) 151 { 152 QStringList tmpList(tmp.split(',')); 153 if (tmpList.contains("Hide", Qt::CaseInsensitive)) 154 m_fHide = true; 155 } 144 156 145 157 if (mType == UIMediumType_HardDisk) -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
r46756 r47952 6 6 7 7 /* 8 * Copyright (C) 2009-201 2Oracle Corporation8 * Copyright (C) 2009-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 130 130 void refresh(); 131 131 132 bool is AttachedToHiddenMachinesOnly() const { returnm_fAttachedToHiddenMachinesOnly; }132 bool isHidden() const { return m_fHide | m_fAttachedToHiddenMachinesOnly; } 133 133 134 134 const CMedium &medium() const { return mMedium; } … … 244 244 void checkNoDiffs (bool aNoDiffs); 245 245 246 bool m_fAttachedToHiddenMachinesOnly;247 248 246 CMedium mMedium; 249 247 … … 272 270 bool mIsUsedInSnapshots : 1; 273 271 bool mIsHostDrive : 1; 272 bool m_fHide : 1; 273 bool m_fAttachedToHiddenMachinesOnly : 1; 274 274 275 275 QList <QString> mCurStateMachineIds; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r47831 r47952 778 778 return; 779 779 780 /* Ignore mediums (and their children) attached to hidden machines only: */ 780 /* Ignore mediums (and their children) which are marked as hidden or 781 * which are attached to hidden machines only: */ 781 782 if (isMediumAttachedToHiddenMachinesOnly(aMedium)) 782 783 return; … … 893 894 return; 894 895 895 /* Ignore mediums (and their children) attached to hidden machines only: */ 896 /* Ignore mediums (and their children) which are marked as hidden or 897 * which are attached to hidden machines only: */ 896 898 if (isMediumAttachedToHiddenMachinesOnly(aMedium)) 897 899 return; … … 1998 2000 do 1999 2001 { 2000 /* Ignore medium if its attached to hidden machines only: */2001 if (pMedium->is AttachedToHiddenMachinesOnly())2002 /* Ignore medium if its hidden or attached to hidden machines only: */ 2003 if (pMedium->isHidden()) 2002 2004 return true; 2003 2005 /* Move iterator to parent: */
Note:
See TracChangeset
for help on using the changeset viewer.