VirtualBox

Ignore:
Timestamp:
Oct 2, 2007 11:36:46 AM (17 years ago)
Author:
vboxsync
Message:

FE/Qt: Offer registration again if the registration data is missing or invalid (i.e. manually modified).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r5094 r5139  
    377377#endif
    378378
    379     void callRegistration();
     379    void checkRegistration();
    380380
    381381    CSession openSession (const QUuid &id);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r5132 r5139  
    16501650#endif
    16511651
    1652 void VBoxGlobal::callRegistration()
    1653 {
    1654     /* Check if the automatic registration already passed */
    1655     QString regData = virtualBox().GetExtraData (VBoxDefs::GUI_RegistrationData);
    1656     if (regData.startsWith ("triesLeft="))
    1657     {
    1658         QString triesLeft = regData.section ("=", 1, 1);
    1659         if (triesLeft == "0")
    1660             return;
    1661     }
    1662     else if (!regData.isEmpty())
     1652void VBoxGlobal::checkRegistration()
     1653{
     1654#ifdef VBOX_WITH_REGISTRATION
     1655    if (!VBoxRegistrationDlg::hasToBeShown())
    16631656        return;
    16641657
    1665     /* Store the winid of main app wgt to ensure only one reg dlg running */
     1658    /* Store the ID of the main window to ensure that only one registration
     1659     * dialog is shown at a time. This operation will implicitly cause the
     1660     * dialog to show if it's not already shown. */
    16661661    virtualBox().SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID,
    1667                                QString ("%1").arg ((long)qApp->mainWidget()->winId()));
     1662                               QString ("%1").arg ((long) qApp->mainWidget()->winId()));
     1663#endif
    16681664}
    16691665
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r5078 r5139  
    234234                if (vboxGlobal().startMachine (vboxGlobal().managedVMUuid()))
    235235                {
    236                     vboxGlobal().callRegistration();
     236                    vboxGlobal().checkRegistration();
    237237                    rc = a.exec();
    238238                }
     
    245245            {
    246246                a.setMainWidget (&vboxGlobal().selectorWnd());
    247                 vboxGlobal().callRegistration();
     247                vboxGlobal().checkRegistration();
    248248                vboxGlobal().selectorWnd().show();
    249249                vboxGlobal().startEnumeratingMedia();
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