VirtualBox

Changeset 70824 in vbox


Ignore:
Timestamp:
Jan 31, 2018 11:45:40 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120629
Message:

FE/Qt: bugref:9104: Reworking VBoxVersion stuff: Renaming to UIVersion first of all.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.h

    r70823 r70824  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - VBoxVersion class declaration.
     3 * VBox Qt GUI - UIVersion class declaration/implementation.
    44 */
    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
     
    1616 */
    1717
    18 #ifndef ___VBoxVersion_h___
    19 #define ___VBoxVersion_h___
     18#ifndef ___UIVersion_h___
     19#define ___UIVersion_h___
    2020
    2121/**
    2222 *  Represents VirtualBox version wrapper
    2323 */
    24 class VBoxVersion
     24class UIVersion
    2525{
    2626public:
    2727
    28     VBoxVersion() : m_x(-1), m_y(-1), m_z(-1) {}
     28    UIVersion() : m_x(-1), m_y(-1), m_z(-1) {}
    2929
    30     VBoxVersion(const QString &strVersion)
     30    UIVersion(const QString &strVersion)
    3131        : m_x(-1), m_y(-1), m_z(-1)
    3232    {
     
    4040    }
    4141
    42     VBoxVersion& operator=(const VBoxVersion &other) { m_x = other.x(); m_y = other.y(); m_z = other.z(); return *this; }
     42    UIVersion& operator=(const UIVersion &other) { m_x = other.x(); m_y = other.y(); m_z = other.z(); return *this; }
    4343
    4444    bool isValid() const { return m_x != -1 && m_y != -1 && m_z != -1; }
    4545
    46     bool equal(const VBoxVersion &other) const { return (m_x == other.m_x) && (m_y == other.m_y) && (m_z == other.m_z); }
    47     bool operator==(const VBoxVersion &other) const { return equal(other); }
    48     bool operator!=(const VBoxVersion &other) const { return !equal(other); }
     46    bool equal(const UIVersion &other) const { return (m_x == other.m_x) && (m_y == other.m_y) && (m_z == other.m_z); }
     47    bool operator==(const UIVersion &other) const { return equal(other); }
     48    bool operator!=(const UIVersion &other) const { return !equal(other); }
    4949
    50     bool operator<(const VBoxVersion &other) const
     50    bool operator<(const UIVersion &other) const
    5151    {
    5252        return (m_x <  other.m_x) ||
     
    5454               (m_x == other.m_x && m_y == other.m_y && m_z <  other.m_z);
    5555    }
    56     bool operator>(const VBoxVersion &other) const
     56    bool operator>(const UIVersion &other) const
    5757    {
    5858        return (m_x >  other.m_x) ||
     
    7777};
    7878
    79 #endif // !___VBoxVersion_h___
     79#endif /* !___UIVersion_h___ */
    8080
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.cpp

    r69500 r70824  
    102102
    103103    /* Return 'true' if saved version value is NOT valid or NOT equal to current: */
    104     if (!version().isValid() || version() != VBoxVersion(vboxGlobal().vboxVersionStringNormalized()))
     104    if (!version().isValid() || version() != UIVersion(vboxGlobal().vboxVersionStringNormalized()))
    105105        return true;
    106106
     
    143143}
    144144
    145 VBoxVersion VBoxUpdateData::version() const
     145UIVersion VBoxUpdateData::version() const
    146146{
    147147    return m_version;
     
    185185        if (parser.size() > 3)
    186186        {
    187             m_version = VBoxVersion(parser[3]);
     187            m_version = UIVersion(parser[3]);
    188188        }
    189189    }
     
    219219
    220220        /* Encode 'version' value: */
    221         QString versionValue = VBoxVersion(vboxGlobal().vboxVersionStringNormalized()).toString();
     221        QString versionValue = UIVersion(vboxGlobal().vboxVersionStringNormalized()).toString();
    222222
    223223        /* Composite m_strData: */
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h

    r69500 r70824  
    1919#define ___UIUpdateDefs_h___
    2020
    21 /* Global includes: */
     21/* Qt includes: */
    2222#include <QDate>
    2323
    24 /* Local includes: */
    25 #include "VBoxVersion.h"
     24/* GUI includes: */
     25#include "UIVersion.h"
     26
    2627
    2728/* This structure is used to store retranslated reminder values. */
     
    3738};
    3839typedef QList<VBoxUpdateDay> VBoxUpdateDayList;
     40
    3941
    4042/* This class is used to encode/decode update data. */
     
    8486    BranchType branchIndex() const;
    8587    QString branchName() const;
    86     VBoxVersion version() const;
     88    UIVersion version() const;
    8789
    8890private:
     
    98100    QDate m_date;
    99101    BranchType m_branchIndex;
    100     VBoxVersion m_version;
     102    UIVersion m_version;
    101103};
    102104
    103 #endif // !___UIUpdateDefs_h___
     105#endif /* !___UIUpdateDefs_h___ */
    104106
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp

    r69550 r70824  
    368368        QString strVBoxVersion(vboxGlobal().vboxVersionStringNormalized());
    369369        QByteArray abVBoxVersion = strVBoxVersion.toUtf8();
    370         VBoxVersion vboxVersion(strVBoxVersion);
     370        UIVersion vboxVersion(strVBoxVersion);
    371371
    372372        /* Get extension pack version: */
  • trunk/src/VBox/Frontends/VirtualBox/src/precomp.h

    r69917 r70824  
    658658         the redefinitions, just prevent the inclusion of the header! */
    659659#include "VBoxUtils.h"
    660 #include "VBoxVersion.h"
     660#include "UIVersion.h"
    661661#ifdef VBOX_WS_X11
    662662# include "VBoxX11Helper.h"
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