VirtualBox

Changeset 7226 in vbox


Ignore:
Timestamp:
Feb 29, 2008 5:29:15 PM (17 years ago)
Author:
vboxsync
Message:

FE/Qt4: Fixed memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r7220 r7226  
    38093809    }
    38103810
    3811     // initialize guest OS type vector
     3811    /* initialize guest OS type vector */
    38123812    CGuestOSTypeCollection coll = mVBox.GetGuestOSTypes();
    38133813    int osTypeCount = coll.GetCount();
     
    38223822    }
    38233823
    3824     // fill in OS type icon dictionary
     3824    /* fill in OS type icon dictionary */
    38253825    static const char *osTypeIcons[][2] =
    38263826    {
     
    38493849        {"l4", "os_l4.png"},
    38503850    };
    3851     vm_os_type_icons.setAutoDelete (true); // takes ownership of elements
     3851    vm_os_type_icons.setAutoDelete (true); /* takes ownership of elements */
    38523852    for (uint n = 0; n < SIZEOF_ARRAY (osTypeIcons); n ++)
    38533853    {
     
    38563856    }
    38573857
    3858     // fill in VM state icon dictionary
     3858    /* fill in VM state icon dictionary */
    38593859    static struct
    38603860    {
     
    38843884    }
    38853885
    3886     // online/offline snapshot icons
     3886    /* online/offline snapshot icons */
    38873887    mOfflineSnapshotIcon = qPixmapFromMimeSource ("offline_snapshot_16px.png");
    38883888    mOnlineSnapshotIcon = qPixmapFromMimeSource ("online_snapshot_16px.png");
    38893889
    3890     // initialize state colors vector
    3891     // no ownership of elements, we're passing pointers to existing objects
     3890    /* initialize state colors vector */
     3891    vm_state_color.setAutoDelete (true); /* takes ownership of elements */
    38923892    vm_state_color.insert (KMachineState_Null,           new QColor(Qt::red));
    38933893    vm_state_color.insert (KMachineState_PoweredOff,     new QColor(Qt::gray));
     
    39053905    qApp->installEventFilter (this);
    39063906
    3907     // create default non-null global settings
     3907    /* create default non-null global settings */
    39083908    gset = VBoxGlobalSettings (false);
    39093909
    3910     // try to load global settings
     3910    /* try to load global settings */
    39113911    gset.load (mVBox);
    39123912    if (!mVBox.isOk() || !gset)
     
    39233923    languageChange();
    39243924
    3925     // process command line
     3925    /* process command line */
    39263926
    39273927    vm_render_mode_str = 0;
     
    39813981    vm_render_mode = vboxGetRenderMode( vm_render_mode_str );
    39823982
    3983     // setup the callback
     3983    /* setup the callback */
    39843984    callback = CVirtualBoxCallback (new VBoxCallback (*this));
    39853985    mVBox.RegisterCallback (callback);
     
    39883988        return;
    39893989
    3990     /*
    3991      *  Redefine default large and small icon sizes. In particular, it is
    3992      *  necessary to consider both 32px and 22px icon sizes as Large when
    3993      *  we explicitly define them as Large (seems to be a bug in
    3994      *  QToolButton::sizeHint()).
    3995      */
     3990    /* Redefine default large and small icon sizes. In particular, it is
     3991     * necessary to consider both 32px and 22px icon sizes as Large when we
     3992     * explicitly define them as Large (seems to be a bug in
     3993     * QToolButton::sizeHint()). */
    39963994#warning port me
    39973995//    QIcon::setIconSize (QIcon::Small, QSize (16, 16));
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