VirtualBox

Changeset 107586 in vbox for trunk


Ignore:
Timestamp:
Jan 9, 2025 10:31:28 AM (10 days ago)
Author:
vboxsync
Message:

FE/Qt: bugref:3409: Search-line editor: Fixing parfait warnings for coding pattern, related to self-excluding and thus unnecessary condition check.

File:
1 edited

Legend:

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

    r106061 r107586  
    103103void UISearchLineEdit::colorBackground(bool fWarning)
    104104{
    105     QPalette mPalette = QApplication::palette();
    106     /** Make sure we reset color. */
     105    /** Make sure we reset color: */
     106    QPalette pal = QApplication::palette();
    107107    if (!fWarning || !m_fMark)
    108     {
    109         mPalette.setColor(QPalette::Base, m_unmarkColor);
    110         setPalette(mPalette);
    111         return;
    112     }
    113 
    114     if (m_fMark && fWarning)
    115     {
    116         mPalette.setColor(QPalette::Base, m_markColor);
    117         setPalette(mPalette);
    118         return;
    119     }
     108        pal.setColor(QPalette::Base, m_unmarkColor);
     109    else
     110        pal.setColor(QPalette::Base, m_markColor);
     111    setPalette(pal);
    120112}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette