VirtualBox

Changeset 104980 in vbox


Ignore:
Timestamp:
Jun 20, 2024 1:21:58 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163590
Message:

FE/Qt: bugref:10666, bugref:10669: QILineEdit: Merge resizeEvent and showEvent into event function; Throw out some excessive code.

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

Legend:

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

    r104979 r104980  
    130130            break;
    131131        }
     132        case QEvent::Move:
     133        case QEvent::Resize:
     134        {
     135            /* Update label position on each move/resize: */
     136            if (m_fMarkable)
     137                moveIconLabel();
     138            break;
     139        }
    132140        default:
    133141            break;
     
    136144    /* Call to base-class: */
    137145    return QLineEdit::event(pEvent);
    138 }
    139 
    140 void QILineEdit::resizeEvent(QResizeEvent *pResizeEvent)
    141 {
    142     /* Call to base-class: */
    143     QLineEdit::resizeEvent(pResizeEvent);
    144     if (m_fMarkable)
    145     {
    146         m_pLabelIcon->resize(m_pLabelIcon->minimumSizeHint());
    147         m_iIconMargin = (height() - m_pLabelIcon->height()) / 2;
    148         moveIconLabel();
    149     }
    150 }
    151 
    152 void QILineEdit::showEvent(QShowEvent *pShowEvent)
    153 {
    154     /* Call to base-class: */
    155     QLineEdit::showEvent(pShowEvent);
    156     if (m_fMarkable)
    157         moveIconLabel();
    158146}
    159147
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h

    r104979 r104980  
    7272    virtual bool event(QEvent *pEvent) RT_OVERRIDE;
    7373
    74     /** Handles resize @a pEvent. */
    75     virtual void resizeEvent(QResizeEvent *pResizeEvent) RT_OVERRIDE;
    76 
    77     /** Handles show @a pEvent. */
    78     virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
    79 
    8074private slots:
    8175
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