VirtualBox

Ignore:
Timestamp:
Aug 13, 2021 9:58:57 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996. Initialize clone mode correctly.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp

    r90669 r90674  
    3939    , m_iCloneModePageIndex(-1)
    4040    , m_strCloneName(!machine.isNull() ? machine.GetName() : QString())
     41    , m_enmCloneMode(KCloneMode_MachineState)
    4142{
    4243#ifndef VBOX_WS_MAC
     
    5960{
    6061    if (m_iCloneModePageIndex == -1)
    61         return true;
     62        return false;
    6263    return isPageVisible(m_iCloneModePageIndex);
    6364}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp

    r90669 r90674  
    1818/* Global includes: */
    1919#include <QVBoxLayout>
    20 #include <QRadioButton>
     20
    2121
    2222/* Local includes: */
     
    2626#include "QIRichTextLabel.h"
    2727
    28 
    29 // UIWizardCloneVMPage3::UIWizardCloneVMPage3(bool fShowChildsOption)
    30 //     : m_fShowChildsOption(fShowChildsOption)
    31 // {
    32 // }
    33 
    34 // KCloneMode UIWizardCloneVMPage3::cloneMode() const
    35 // {
    36 //     if (m_pMachineAndChildsRadio->isChecked())
    37 //         return KCloneMode_MachineAndChildStates;
    38 //     else if (m_pAllRadio->isChecked())
    39 //         return KCloneMode_AllStates;
    40 //     return KCloneMode_MachineState;
    41 // }
    42 
    43 // void UIWizardCloneVMPage3::setCloneMode(KCloneMode cloneMode)
    44 // {
    45 //     switch (cloneMode)
    46 //     {
    47 //         case KCloneMode_MachineState: m_pMachineRadio->setChecked(true); break;
    48 //         case KCloneMode_MachineAndChildStates: m_pMachineAndChildsRadio->setChecked(true); break;
    49 //         case KCloneMode_AllStates: m_pAllRadio->setChecked(true); break;
    50 //         case KCloneMode_Max: break; /* Shut up, MSC! */
    51 //     }
    52 // }
    5328
    5429UIWizardCloneVMPageBasic3::UIWizardCloneVMPageBasic3(bool fShowChildsOption)
     
    11388                          .arg(strOpt1)
    11489                          .arg(strOpt3));
    115 
    116     // m_pMachineRadio->setText(UIWizardCloneVM::tr("Current &machine state"));
    117     // m_pMachineAndChildsRadio->setText(UIWizardCloneVM::tr("Current &snapshot tree branch"));
    118     // m_pAllRadio->setText(UIWizardCloneVM::tr("&Everything"));
    11990}
    12091
    12192void UIWizardCloneVMPageBasic3::initializePage()
    12293{
    123 
    12494    if (m_pCloneModeGroupBox && !m_userModifiedParameters.contains("CloneMode"))
    12595        cloneVMWizardPropertySet(CloneMode, m_pCloneModeGroupBox->cloneMode());
     
    130100bool UIWizardCloneVMPageBasic3::validatePage()
    131101{
    132     /* Initial result: */
    133102    bool fResult = true;
    134103
    135     // /* Lock finish button: */
    136     // startProcessing();
     104    UIWizardCloneVM *pWizard = qobject_cast<UIWizardCloneVM*>(wizard());
     105    AssertReturn(pWizard, false);
     106    /* Try to clone VM: */
     107    fResult = pWizard->cloneVM();
    137108
    138     /* Try to clone VM: */
    139     // if (fResult)
    140     //     fResult = qobject_cast<UIWizardCloneVM*>(wizard())->cloneVM();
    141 
    142     // /* Unlock finish button: */
    143     // endProcessing();
    144 
    145     /* Return result: */
    146109    return fResult;
    147110}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h

    r90661 r90674  
    3232
    3333/* Forward declaration: */
    34 class QRadioButton;
    3534class QIRichTextLabel;
    3635class UICloneVMCloneModeGroupBox;
Note: See TracChangeset for help on using the changeset viewer.

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