VirtualBox

Changeset 71553 in vbox


Ignore:
Timestamp:
Mar 28, 2018 5:28:44 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
121532
Message:

FE/Qt: bugref:9049: Small cleanup for VBoxAboutDlg.

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

Legend:

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

    r71355 r71553  
    55
    66/*
    7  * Copyright (C) 2006-2017 Oracle Corporation
     7 * Copyright (C) 2006-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5959#endif
    6060    , m_strVersion(strVersion)
     61    , m_pMainLayout(0)
    6162    , m_pLabel(0)
    6263{
     
    7071    if (pEvent->type() == QEvent::Polish)
    7172        setFixedSize(m_size);
     73
    7274    /* Call to base-class: */
    7375    return QIDialog::event(pEvent);
    7476}
    7577
    76 void VBoxAboutDlg::paintEvent(QPaintEvent * /* pEvent */)
    77 {
     78void VBoxAboutDlg::paintEvent(QPaintEvent *)
     79{
     80    /* Draw About-VirtualBox background image: */
    7881    QPainter painter(this);
    79     /* Draw About-VirtualBox background image: */
    8082    painter.drawPixmap(0, 0, m_pixmap);
    8183}
     
    154156    /* Create main-layout: */
    155157    m_pMainLayout = new QVBoxLayout(this);
    156     AssertPtrReturnVoid(m_pMainLayout);
     158    if (m_pMainLayout)
    157159    {
    158160        /* Prepare label: */
     
    168170    /* Create label for version text: */
    169171    m_pLabel = new QLabel;
    170     AssertPtrReturnVoid(m_pLabel);
     172    if (m_pLabel)
    171173    {
    172174        /* Prepare label for version text: */
     
    193195    /* Create button-box: */
    194196    QDialogButtonBox *pButtonBox = new QDialogButtonBox;
    195     AssertPtrReturnVoid(pButtonBox);
     197    if (pButtonBox)
    196198    {
    197199        /* Create close-button: */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h

    r69500 r71553  
    55
    66/*
    7  * Copyright (C) 2006-2017 Oracle Corporation
     7 * Copyright (C) 2006-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3939public:
    4040
    41     /** Constructs dialog passing @a pParent to the QWidget base-class constructor.
    42       * @param strVersion is used to specify the version number of VirtualBox. */
     41    /** Constructs dialog passing @a pParent to the base-class.
     42      * @param  strVersion  Brings the version number of VirtualBox. */
    4343    VBoxAboutDlg(QWidget *pParent, const QString &strVersion);
    4444
     
    4646
    4747    /** Handles any Qt @a pEvent. */
    48     bool event(QEvent *pEvent);
     48    virtual bool event(QEvent *pEvent) /* override */;
    4949
    50     /** Handles Qt paint @a pEvent. */
    51     void paintEvent(QPaintEvent *pEvent);
     50    /** Handles paint @a pEvent. */
     51    virtual void paintEvent(QPaintEvent *pEvent) /* override */;
    5252
    5353    /** Handles translation event. */
    54     void retranslateUi();
     54    virtual void retranslateUi() /* override */;
    5555
    5656private:
    5757
    58     /** Prepares About-VirtualBox dialog. */
     58    /** Prepares all. */
    5959    void prepare();
    60 
    6160    /** Prepares main-layout. */
    6261    void prepareMainLayout();
    63 
    6462    /** Prepares label. */
    6563    void prepareLabel();
    66 
    6764    /** Prepares close-button. */
    6865    void prepareCloseButton();
     
    7269
    7370    /** Holds the About-VirtualBox text. */
    74     QString m_strAboutText;
    75 
     71    QString  m_strAboutText;
    7672    /** Holds the VirtualBox version number. */
    77     QString m_strVersion;
     73    QString  m_strVersion;
    7874
    7975    /** Holds the About-VirtualBox image. */
    80     QPixmap m_pixmap;
     76    QPixmap  m_pixmap;
     77    /** Holds the About-VirtualBox dialog size. */
     78    QSize    m_size;
    8179
    82     /** Holds the About-VirtualBox dialog size. */
    83     QSize   m_size;
    84 
    85     /** Holds the instance of label we create for About-VirtualBox text. */
    86     QLabel *m_pLabel;
    87 
    88     /** Holds the instance of main-layout we create. */
     80    /** Holds About-VirtualBox main-layout instance. */
    8981    QVBoxLayout *m_pMainLayout;
     82    /** Holds About-VirtualBox text-label instance. */
     83    QLabel      *m_pLabel;
    9084};
    9185
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