VirtualBox

儲存庫 vbox 的更動 55103


忽略:
時間撮記:
2015-4-6 下午03:14:08 (10 年 以前)
作者:
vboxsync
訊息:

FE/Qt: 7127: Medium-enumeration improvements: UIMedium NLS changes.

位置:
trunk/src/VBox/Frontends/VirtualBox/src/medium
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp

    r55101 r55103  
    367367}
    368368
    369 UIMedium UIMedium::root() const
    370 {
    371     /* Redirect call to VBoxGlobal: */
    372     return vboxGlobal().medium(m_strRootId);
    373 }
    374 
    375 UIMedium UIMedium::parent() const
    376 {
    377     /* Redirect call to VBoxGlobal: */
    378     return vboxGlobal().medium(m_strParentId);
    379 }
    380 
    381369void UIMedium::updateParentID()
    382370{
     
    409397        if (fCheckRO && m_fReadOnly)
    410398            strTip += m_sstrRow.arg("<hr>") +
    411                       m_sstrRow.arg(VBoxGlobal::tr("Attaching this hard disk will be performed indirectly using "
    412                                                    "a newly created differencing hard disk.", "medium"));
     399                      m_sstrRow.arg(VBoxGlobal::tr("Attaching this hard drive will be performed indirectly using "
     400                                                   "a newly created differencing hard drive.", "medium"));
    413401    }
    414402
     
    438426    // @todo the below check is rough; if m_medium becomes uninitialized, any
    439427    // of getters called afterwards will also fail. The same relates to the
    440     // root hard disk object (that will be the hard disk itself in case of
     428    // root hard drive object (that will be the hard drive itself in case of
    441429    // non-differencing disks). However, this check was added to fix a
    442     // particular use case: when the hard disk is a differencing hard disk and
     430    // particular use case: when the hard drive is a differencing hard drive and
    443431    // it happens to be discarded (and uninitialized) after this method is
    444432    // called but before we read all its properties (yes, it's possible!), the
    445433    // root object will be null and calling methods on it will assert in the
    446434    // debug builds. This check seems to be enough as a quick solution (fresh
    447     // hard disk attachments will be re-read by a machine state change signal
     435    // hard drive attachments will be re-read by a machine state change signal
    448436    // after the discard operation is finished, so the user will eventually see
    449437    // correct data), but in order to solve the problem properly we need to use
     
    533521}
    534522
     523UIMedium UIMedium::root() const
     524{
     525    /* Redirect call to VBoxGlobal: */
     526    return vboxGlobal().medium(m_strRootId);
     527}
     528
     529UIMedium UIMedium::parent() const
     530{
     531    /* Redirect call to VBoxGlobal: */
     532    return vboxGlobal().medium(m_strParentId);
     533}
     534
    535535void UIMedium::checkNoDiffs(bool fNoDiffs)
    536536{
     
    548548
    549549            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"));
    554553
    555554            if (!parentMedium.m_result.isOk())
     
    565564        m_noDiffs.toolTip = root().tip() +
    566565                            m_sstrRow.arg("<hr>") +
    567                             m_sstrRow.arg(VBoxGlobal::tr("This base hard disk is indirectly attached using "
    568                                                          "the following differencing hard disk:", "medium")) +
     566                            m_sstrRow.arg(VBoxGlobal::tr("This base hard drive is indirectly attached using "
     567                                                         "the following differencing hard drive:", "medium")) +
    569568                            m_strToolTip + m_noDiffs.toolTip;
    570569    }
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h

    r55101 r55103  
    155155    QString parentID() const { return m_strParentId; }
    156156
    157     /** Returns medium root. */
    158     UIMedium root() const;
    159     /** Returns medium parent. */
    160     UIMedium parent() const;
    161 
    162157    /** Updates medium parent. */
    163158    void updateParentID();
     
    289284private:
    290285
     286    /** Returns medium root. */
     287    UIMedium root() const;
     288    /** Returns medium parent. */
     289    UIMedium parent() const;
     290
    291291    /** Checks if m_noDiffs is filled in and does it if not.
    292292      * @param fNoDiffs @if false, this method immediately returns. */
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette