Changeset 70824 in vbox
- Timestamp:
- Jan 31, 2018 11:45:40 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120629
- 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 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - VBoxVersion class declaration.3 * VBox Qt GUI - UIVersion class declaration/implementation. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef ___ VBoxVersion_h___19 #define ___ VBoxVersion_h___18 #ifndef ___UIVersion_h___ 19 #define ___UIVersion_h___ 20 20 21 21 /** 22 22 * Represents VirtualBox version wrapper 23 23 */ 24 class VBoxVersion24 class UIVersion 25 25 { 26 26 public: 27 27 28 VBoxVersion() : m_x(-1), m_y(-1), m_z(-1) {}28 UIVersion() : m_x(-1), m_y(-1), m_z(-1) {} 29 29 30 VBoxVersion(const QString &strVersion)30 UIVersion(const QString &strVersion) 31 31 : m_x(-1), m_y(-1), m_z(-1) 32 32 { … … 40 40 } 41 41 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; } 43 43 44 44 bool isValid() const { return m_x != -1 && m_y != -1 && m_z != -1; } 45 45 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); } 49 49 50 bool operator<(const VBoxVersion &other) const50 bool operator<(const UIVersion &other) const 51 51 { 52 52 return (m_x < other.m_x) || … … 54 54 (m_x == other.m_x && m_y == other.m_y && m_z < other.m_z); 55 55 } 56 bool operator>(const VBoxVersion &other) const56 bool operator>(const UIVersion &other) const 57 57 { 58 58 return (m_x > other.m_x) || … … 77 77 }; 78 78 79 #endif / / !___VBoxVersion_h___79 #endif /* !___UIVersion_h___ */ 80 80 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.cpp
r69500 r70824 102 102 103 103 /* 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())) 105 105 return true; 106 106 … … 143 143 } 144 144 145 VBoxVersion VBoxUpdateData::version() const145 UIVersion VBoxUpdateData::version() const 146 146 { 147 147 return m_version; … … 185 185 if (parser.size() > 3) 186 186 { 187 m_version = VBoxVersion(parser[3]);187 m_version = UIVersion(parser[3]); 188 188 } 189 189 } … … 219 219 220 220 /* Encode 'version' value: */ 221 QString versionValue = VBoxVersion(vboxGlobal().vboxVersionStringNormalized()).toString();221 QString versionValue = UIVersion(vboxGlobal().vboxVersionStringNormalized()).toString(); 222 222 223 223 /* Composite m_strData: */ -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h
r69500 r70824 19 19 #define ___UIUpdateDefs_h___ 20 20 21 /* Globalincludes: */21 /* Qt includes: */ 22 22 #include <QDate> 23 23 24 /* Local includes: */ 25 #include "VBoxVersion.h" 24 /* GUI includes: */ 25 #include "UIVersion.h" 26 26 27 27 28 /* This structure is used to store retranslated reminder values. */ … … 37 38 }; 38 39 typedef QList<VBoxUpdateDay> VBoxUpdateDayList; 40 39 41 40 42 /* This class is used to encode/decode update data. */ … … 84 86 BranchType branchIndex() const; 85 87 QString branchName() const; 86 VBoxVersion version() const;88 UIVersion version() const; 87 89 88 90 private: … … 98 100 QDate m_date; 99 101 BranchType m_branchIndex; 100 VBoxVersion m_version;102 UIVersion m_version; 101 103 }; 102 104 103 #endif / / !___UIUpdateDefs_h___105 #endif /* !___UIUpdateDefs_h___ */ 104 106 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
r69550 r70824 368 368 QString strVBoxVersion(vboxGlobal().vboxVersionStringNormalized()); 369 369 QByteArray abVBoxVersion = strVBoxVersion.toUtf8(); 370 VBoxVersion vboxVersion(strVBoxVersion);370 UIVersion vboxVersion(strVBoxVersion); 371 371 372 372 /* Get extension pack version: */ -
trunk/src/VBox/Frontends/VirtualBox/src/precomp.h
r69917 r70824 658 658 the redefinitions, just prevent the inclusion of the header! */ 659 659 #include "VBoxUtils.h" 660 #include " VBoxVersion.h"660 #include "UIVersion.h" 661 661 #ifdef VBOX_WS_X11 662 662 # include "VBoxX11Helper.h"
Note:
See TracChangeset
for help on using the changeset viewer.