VirtualBox

Changeset 77435 in vbox


Ignore:
Timestamp:
Feb 22, 2019 3:25:52 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128998
Message:

FE/Qt: bugref:9389: A bit of care for r128995.

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

Legend:

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

    r77432 r77435  
    1616 */
    1717
    18 /* Qt includes: */
    19 #include <QAccessibleObject>
    20 #include <QPainter>
    21 #include <QTextLayout>
    22 #include <QApplication>
    23 #include <QFontMetrics>
    24 #include <QGraphicsSceneHoverEvent>
    25 
    2618/* GUI includes: */
    2719#include "UITextTable.h"
    28 #include "UIRichTextString.h"
    29 #include "VBoxGlobal.h"
    3020
    31 /* Other VBox includes: */
    32 #include <iprt/assert.h>
     21
     22UITextTableLine::UITextTableLine(const QString &str1, const QString &str2, QObject *pParent /* = 0 */)
     23    : QObject(pParent)
     24    , m_str1(str1)
     25    , m_str2(str2)
     26{}
     27
     28UITextTableLine::UITextTableLine(const UITextTableLine &other)
     29    : QObject(other.parent())
     30    , m_str1(other.string1())
     31    , m_str2(other.string2())
     32{}
     33
     34UITextTableLine &UITextTableLine::operator=(const UITextTableLine &other)
     35{
     36    setParent(other.parent());
     37    set1(other.string1());
     38    set2(other.string2());
     39    return *this;
     40}
     41
     42bool UITextTableLine::operator==(const UITextTableLine &other) const
     43{
     44    return    string1() == other.string1()
     45           && string2() == other.string2();
     46}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UITextTable.h

    r77433 r77435  
    2222#endif
    2323
     24/* Qt includes: */
     25#include <QObject>
     26#include <QString>
     27
    2428/* GUI includes: */
    25 #include "QIGraphicsWidget.h"
    26 
    27 /* Forward declarations: */
    28 class QTextLayout;
    29 
     29#include "UILibraryDefs.h"
    3030
    3131/** QObject extension used as an
     
    4040      * @param  str1  Brings the 1st table string.
    4141      * @param  str2  Brings the 2nd table string. */
    42     UITextTableLine(const QString &str1, const QString &str2, QObject *pParent = 0)
    43         : QObject(pParent)
    44         , m_str1(str1)
    45         , m_str2(str2)
    46     {}
     42    UITextTableLine(const QString &str1, const QString &str2, QObject *pParent = 0);
    4743
    4844    /** Constructs text-table line on the basis of passed @a other. */
    49     UITextTableLine(const UITextTableLine &other)
    50         : QObject(other.parent())
    51         , m_str1(other.string1())
    52         , m_str2(other.string2())
    53     {}
     45    UITextTableLine(const UITextTableLine &other);
    5446
    5547    /** Assigns @a other to this. */
    56     UITextTableLine &operator=(const UITextTableLine &other)
    57     {
    58         setParent(other.parent());
    59         set1(other.string1());
    60         set2(other.string2());
    61         return *this;
    62     }
     48    UITextTableLine &operator=(const UITextTableLine &other);
    6349
    6450    /** Compares @a other to this. */
    65     bool operator==(const UITextTableLine &other) const
    66     {
    67         return string1() == other.string1()
    68             && string2() == other.string2();
    69     }
     51    bool operator==(const UITextTableLine &other) const;
    7052
    7153    /** Defines 1st table @a strString. */
     
    9173Q_DECLARE_METATYPE(UITextTable);
    9274
    93 
    9475#endif /* !FEQT_INCLUDED_SRC_globals_UITextTable_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