Changeset 67965 in vbox
- Timestamp:
- Jul 14, 2017 1:01:13 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r67923 r67965 1217 1217 .arg(gpConverter->toString(oldMediumType)).arg(gpConverter->toString(newMediumType)), 1218 1218 formatErrorInfo(medium)); 1219 } 1220 1221 void UIMessageCenter::cannotMoveMediumStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const 1222 { 1223 error(pParent, MessageType_Error, 1224 tr("Failed to move the storage unit of the disk image <b>%1</b> to <b>%2</b>.") 1225 .arg(strLocationOld, strLocationNew), 1226 formatErrorInfo(comMedium)); 1227 } 1228 1229 void UIMessageCenter::cannotMoveMediumStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const 1230 { 1231 error(pParent, MessageType_Error, 1232 tr("Failed to move the storage unit of the disk image <b>%1</b> to <b>%2</b>.") 1233 .arg(strLocationOld, strLocationNew), 1234 formatErrorInfo(comProgress)); 1219 1235 } 1220 1236 … … 1325 1341 .arg(strLocation), 1326 1342 formatErrorInfo(progress)); 1327 }1328 1329 void UIMessageCenter::cannotMoveHardDiskStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const1330 {1331 error(pParent, MessageType_Error,1332 tr("Failed to move the storage unit of the hard disk <b>%1</b> to <b>%2</b>.")1333 .arg(strLocationOld, strLocationNew),1334 formatErrorInfo(comMedium));1335 }1336 1337 void UIMessageCenter::cannotMoveHardDiskStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent /* = 0 */) const1338 {1339 error(pParent, MessageType_Error,1340 tr("Failed to move the storage unit of the hard disk <b>%1</b> to <b>%2</b>.")1341 .arg(strLocationOld, strLocationNew),1342 formatErrorInfo(comProgress));1343 1343 } 1344 1344 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r67923 r67965 245 245 /* API: Virtual Medium Manager warnings: */ 246 246 void cannotChangeMediumType(const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType, QWidget *pParent = 0) const; 247 void cannotMoveMediumStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const; 248 void cannotMoveMediumStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const; 247 249 bool confirmMediumRelease(const UIMedium &medium, QWidget *pParent = 0) const; 248 250 bool confirmMediumRemoval(const UIMedium &medium, QWidget *pParent = 0) const; … … 250 252 void cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent = 0) const; 251 253 void cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent = 0) const; 252 void cannotMoveHardDiskStorage(const CMedium &comMedium, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const;253 void cannotMoveHardDiskStorage(const CProgress &comProgress, const QString &strLocationOld, const QString &strLocationNew, QWidget *pParent = 0) const;254 254 void cannotResizeHardDiskStorage(const CMedium &comMedium, const QString &strLocation, const QString &strSizeOld, const QString &strSizeNew, QWidget *pParent = 0) const; 255 255 void cannotResizeHardDiskStorage(const CProgress &comProgress, const QString &strLocation, const QString &strSizeOld, const QString &strSizeNew, QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDetailsWidget.cpp
r67947 r67965 136 136 } 137 137 138 void UIMediumDetailsWidget::sltSize EditorChanged(qulonglong uSize)138 void UIMediumDetailsWidget::sltSizeValueChanged(qulonglong uSize) 139 139 { 140 140 m_newData.m_options.m_uLogicalSize = uSize; … … 349 349 m_pEditorSize->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 350 350 connect(m_pEditorSize, &UIMediumSizeEditor::sigSizeChanged, 351 this, &UIMediumDetailsWidget::sltSize EditorChanged);351 this, &UIMediumDetailsWidget::sltSizeValueChanged); 352 352 353 353 /* Add into layout: */ … … 361 361 /* Configure label: */ 362 362 m_pErrorPaneSize->setAlignment(Qt::AlignCenter); 363 m_pErrorPaneSize->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 363 364 m_pErrorPaneSize->setPixmap(UIIconPool::iconSet(":/status_error_16px.png") 364 365 366 /* Add into layout: */ 367 pLayoutSize->addWidget(m_pErrorPaneSize, 0, 1 );365 .pixmap(QSize(iIconMetric, iIconMetric))); 366 367 /* Add into layout: */ 368 pLayoutSize->addWidget(m_pErrorPaneSize, 0, 1, Qt::AlignCenter); 368 369 } 369 370 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDetailsWidget.h
r67947 r67965 201 201 void sltLocationPathChanged(const QString &strPath); 202 202 /** Handles size editor change. */ 203 void sltSize EditorChanged(qulonglong uSize);203 void sltSizeValueChanged(qulonglong uSize); 204 204 205 205 /** Handles button-box button click. */ … … 277 277 278 278 /** Holds the location label. */ 279 QLabel *m_pLabelLocation;279 QLabel *m_pLabelLocation; 280 280 /** Holds the location selector. */ 281 281 UIFilePathSelector *m_pSelectorLocation; 282 282 /** Holds the location error pane. */ 283 QLabel *m_pErrorPaneLocation;283 QLabel *m_pErrorPaneLocation; 284 284 285 285 /** Holds the size label. */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r67947 r67965 943 943 /* Show error message if necessary: */ 944 944 if (!comMedium.isOk()) 945 msgCenter().cannotMove HardDiskStorage(comMedium,946 947 948 945 msgCenter().cannotMoveMediumStorage(comMedium, 946 oldData.m_options.m_strLocation, 947 newData.m_options.m_strLocation, 948 this); 949 949 else 950 950 { … … 955 955 /* Show error message if necessary: */ 956 956 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 957 msgCenter().cannotMove HardDiskStorage(comProgress,958 959 960 957 msgCenter().cannotMoveMediumStorage(comProgress, 958 oldData.m_options.m_strLocation, 959 newData.m_options.m_strLocation, 960 this); 961 961 } 962 962 }
Note:
See TracChangeset
for help on using the changeset viewer.