儲存庫 vbox 的更動 55103
- 時間撮記:
- 2015-4-6 下午03:14:08 (10 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r55101 r55103 367 367 } 368 368 369 UIMedium UIMedium::root() const370 {371 /* Redirect call to VBoxGlobal: */372 return vboxGlobal().medium(m_strRootId);373 }374 375 UIMedium UIMedium::parent() const376 {377 /* Redirect call to VBoxGlobal: */378 return vboxGlobal().medium(m_strParentId);379 }380 381 369 void UIMedium::updateParentID() 382 370 { … … 409 397 if (fCheckRO && m_fReadOnly) 410 398 strTip += m_sstrRow.arg("<hr>") + 411 m_sstrRow.arg(VBoxGlobal::tr("Attaching this hard d iskwill be performed indirectly using "412 "a newly created differencing hard d isk.", "medium"));399 m_sstrRow.arg(VBoxGlobal::tr("Attaching this hard drive will be performed indirectly using " 400 "a newly created differencing hard drive.", "medium")); 413 401 } 414 402 … … 438 426 // @todo the below check is rough; if m_medium becomes uninitialized, any 439 427 // of getters called afterwards will also fail. The same relates to the 440 // root hard d isk object (that will be the hard diskitself in case of428 // root hard drive object (that will be the hard drive itself in case of 441 429 // non-differencing disks). However, this check was added to fix a 442 // particular use case: when the hard d isk is a differencing hard diskand430 // particular use case: when the hard drive is a differencing hard drive and 443 431 // it happens to be discarded (and uninitialized) after this method is 444 432 // called but before we read all its properties (yes, it's possible!), the 445 433 // root object will be null and calling methods on it will assert in the 446 434 // debug builds. This check seems to be enough as a quick solution (fresh 447 // hard d iskattachments will be re-read by a machine state change signal435 // hard drive attachments will be re-read by a machine state change signal 448 436 // after the discard operation is finished, so the user will eventually see 449 437 // correct data), but in order to solve the problem properly we need to use … … 533 521 } 534 522 523 UIMedium UIMedium::root() const 524 { 525 /* Redirect call to VBoxGlobal: */ 526 return vboxGlobal().medium(m_strRootId); 527 } 528 529 UIMedium UIMedium::parent() const 530 { 531 /* Redirect call to VBoxGlobal: */ 532 return vboxGlobal().medium(m_strParentId); 533 } 534 535 535 void UIMedium::checkNoDiffs(bool fNoDiffs) 536 536 { … … 548 548 549 549 if (m_noDiffs.toolTip.isNull()) 550 m_noDiffs.toolTip = m_sstrRow.arg(VBoxGlobal::tr("Some of the files in this hard disk chain " 551 "are inaccessible. Please use the Virtual Media " 552 "Manager in <b>Show Differencing Hard Disks</b> " 553 "mode to inspect these files.", "medium")); 550 m_noDiffs.toolTip = m_sstrRow.arg(VBoxGlobal::tr("Some of the files in this hard drive chain " 551 "are inaccessible. Please use the Virtual Medium " 552 "Manager to inspect these files.", "medium")); 554 553 555 554 if (!parentMedium.m_result.isOk()) … … 565 564 m_noDiffs.toolTip = root().tip() + 566 565 m_sstrRow.arg("<hr>") + 567 m_sstrRow.arg(VBoxGlobal::tr("This base hard d iskis indirectly attached using "568 "the following differencing hard d isk:", "medium")) +566 m_sstrRow.arg(VBoxGlobal::tr("This base hard drive is indirectly attached using " 567 "the following differencing hard drive:", "medium")) + 569 568 m_strToolTip + m_noDiffs.toolTip; 570 569 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
r55101 r55103 155 155 QString parentID() const { return m_strParentId; } 156 156 157 /** Returns medium root. */158 UIMedium root() const;159 /** Returns medium parent. */160 UIMedium parent() const;161 162 157 /** Updates medium parent. */ 163 158 void updateParentID(); … … 289 284 private: 290 285 286 /** Returns medium root. */ 287 UIMedium root() const; 288 /** Returns medium parent. */ 289 UIMedium parent() const; 290 291 291 /** Checks if m_noDiffs is filled in and does it if not. 292 292 * @param fNoDiffs @if false, this method immediately returns. */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器