VirtualBox

Changeset 88409 in vbox


Ignore:
Timestamp:
Apr 8, 2021 9:46:27 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143659
Message:

FE/Qt: bugref:6877: VirtualBox Manager: Snapshots pane: A bit of cleanup for prepare procedure; Snapshot details widget layout bug fix.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/snapshots
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp

    r87022 r88409  
    55
    66/*
    7  * Copyright (C) 2006-2020 Oracle Corporation
     7 * Copyright (C) 2006-2021 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    468468    , m_pIconSnapshotOnline(0)
    469469    , m_pTimerUpdateAge(0)
     470    , m_pLayoutMain(0)
    470471    , m_pToolBar(0)
    471472    , m_pSnapshotTree(0)
     
    11881189    /* Create timer: */
    11891190    m_pTimerUpdateAge = new QTimer;
    1190     AssertPtrReturnVoid(m_pTimerUpdateAge);
     1191    if (m_pTimerUpdateAge)
    11911192    {
    11921193        /* Configure timer: */
     
    12561257{
    12571258    /* Create layout: */
    1258     new QVBoxLayout(this);
    1259     AssertPtrReturnVoid(layout());
     1259    m_pLayoutMain = new QVBoxLayout(this);
     1260    if (m_pLayoutMain)
    12601261    {
    12611262        /* Configure layout: */
    1262         layout()->setContentsMargins(0, 0, 0, 0);
     1263        m_pLayoutMain->setContentsMargins(0, 0, 0, 0);
    12631264#ifdef VBOX_WS_MAC
    1264         layout()->setSpacing(10);
     1265        m_pLayoutMain->setSpacing(10);
    12651266#else
    1266         layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2);
     1267        m_pLayoutMain->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2);
    12671268#endif
    12681269
     
    12981299
    12991300        /* Add into layout: */
    1300         layout()->addWidget(m_pToolBar);
     1301        m_pLayoutMain->addWidget(m_pToolBar);
    13011302    }
    13021303}
     
    13061307    /* Create snapshot tree: */
    13071308    m_pSnapshotTree = new UISnapshotTree(this);
    1308     AssertPtrReturnVoid(m_pSnapshotTree);
     1309    if (m_pSnapshotTree)
    13091310    {
    13101311        /* Configure tree: */
     
    13191320
    13201321        /* Add into layout: */
    1321         layout()->addWidget(m_pSnapshotTree);
     1322        m_pLayoutMain->addWidget(m_pSnapshotTree, 1);
    13221323    }
    13231324}
     
    13261327{
    13271328    /* Create details-widget: */
    1328     m_pDetailsWidget = new UISnapshotDetailsWidget;
    1329     AssertPtrReturnVoid(m_pDetailsWidget);
     1329    m_pDetailsWidget = new UISnapshotDetailsWidget(this);
     1330    if (m_pDetailsWidget)
    13301331    {
    13311332        /* Configure details-widget: */
     
    13351336
    13361337        /* Add into layout: */
    1337         layout()->addWidget(m_pDetailsWidget);
     1338        m_pLayoutMain->addWidget(m_pDetailsWidget, 1);
    13381339    }
    13391340}
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.h

    r86233 r88409  
    55
    66/*
    7  * Copyright (C) 2006-2020 Oracle Corporation
     7 * Copyright (C) 2006-2021 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3434class QTimer;
    3535class QTreeWidgetItem;
     36class QVBoxLayout;
     37class QIToolBar;
    3638class QITreeWidgetItem;
    3739class UIActionPool;
     
    3941class UISnapshotItem;
    4042class UISnapshotTree;
    41 class QIToolBar;
    4243
    4344
     
    239240    /** @name Widget variables.
    240241      * @{ */
     242        /** Holds the main layout instance. */
     243        QVBoxLayout *m_pLayoutMain;
     244
    241245        /** Holds the toolbar instance. */
    242246        QIToolBar *m_pToolBar;
Note: See TracChangeset for help on using the changeset viewer.

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