VirtualBox

Changeset 102269 in vbox for trunk


Ignore:
Timestamp:
Nov 22, 2023 6:50:08 PM (15 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10450: macOS: No need to QIToolBar layout/paint hacks since Qt6.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleManager.cpp

    r100896 r102269  
    489489void UICloudConsoleManagerWidget::retranslateUi()
    490490{
    491     /* Adjust toolbar: */
    492 #ifdef VBOX_WS_MAC
    493     // WORKAROUND:
    494     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    495     // the necessary size of the toolbar is increased. Also for some languages
    496     // the with doesn't match if the text increase. So manually adjust the size
    497     // after changing the text.
    498     if (m_pToolBar)
    499         m_pToolBar->updateLayout();
    500 #endif
    501 
    502491    /* Translate tree-widget: */
    503492    m_pTreeWidget->setHeaderLabels(   QStringList()
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp

    r100896 r102269  
    200200void UICloudProfileManagerWidget::retranslateUi()
    201201{
    202     /* Adjust toolbar: */
    203 #ifdef VBOX_WS_MAC
    204     // WORKAROUND:
    205     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    206     // the necessary size of the toolbar is increased. Also for some languages
    207     // the with doesn't match if the text increase. So manually adjust the size
    208     // after changing the text.
    209     if (m_pToolBar)
    210         m_pToolBar->updateLayout();
    211 #endif
    212 
    213202    /* Translate tree-widget: */
    214203    m_pTreeWidget->setHeaderLabels(   QStringList()
  • trunk/src/VBox/Frontends/VirtualBox/src/extensionpackmanager/UIExtensionPackManager.cpp

    r100896 r102269  
    199199void UIExtensionPackManagerWidget::retranslateUi()
    200200{
    201     /* Adjust toolbar: */
    202 #ifdef VBOX_WS_MAC
    203     // WORKAROUND:
    204     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    205     // the necessary size of the toolbar is increased. Also for some languages
    206     // the with doesn't match if the text increase. So manually adjust the size
    207     // after changing the text.
    208     if (m_pToolBar)
    209         m_pToolBar->updateLayout();
    210 #endif
    211 
    212201    /* Translate tree-widget: */
    213202    m_pTreeWidget->setHeaderLabels(   QStringList()
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIToolBar.cpp

    r100885 r102269  
    9393{
    9494    ::darwinSetShowsToolbarButton(this, fShow);
    95 }
    96 
    97 void QIToolBar::updateLayout()
    98 {
    99     // WORKAROUND:
    100     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    101     // the necessary size of the tool-bar is increased. Also for some languages
    102     // the with doesn't match if the text increase. So manually adjust the size
    103     // after changing the text.
    104     QSizePolicy sp = sizePolicy();
    105     setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
    106     adjustSize();
    107     setSizePolicy(sp);
    108     layout()->invalidate();
    109     layout()->activate();
    11095}
    11196
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIToolBar.h

    r98103 r102269  
    7878    /** Mac OS X: Defines whether native tool-bar button should be shown. */
    7979    void setShowToolBarButton(bool fShow);
    80     /** Mac OS X: Updates native tool-bar layout. */
    81     void updateLayout();
    8280
    8381    /** Mac OS X: Defines branding stuff to be shown.
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp

    r101563 r102269  
    18101810void UIHelpBrowserWidget::retranslateUi()
    18111811{
    1812     /* Translate toolbar: */
    1813 #ifdef VBOX_WS_MAC
    1814     // WORKAROUND:
    1815     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    1816     // the necessary size of the toolbar is increased. Also for some languages
    1817     // the with doesn't match if the text increase. So manually adjust the size
    1818     // after changing the text. */
    1819     if (m_pToolBar)
    1820         m_pToolBar->updateLayout();
    1821 #endif
    18221812    if (m_pTabWidget)
    18231813    {
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r101092 r102269  
    895895void UIVMLogViewerWidget::retranslateUi()
    896896{
    897     /* Translate toolbar: */
    898 #ifdef VBOX_WS_MAC
    899     // WORKAROUND:
    900     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    901     // the necessary size of the toolbar is increased. Also for some languages
    902     // the with doesn't match if the text increase. So manually adjust the size
    903     // after changing the text. */
    904     if (m_pToolBar)
    905         m_pToolBar->updateLayout();
    906 #endif
    907897    if (m_pCornerButton)
    908898        m_pCornerButton->setToolTip(tr("Select machines to show their log"));
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r102268 r102269  
    342342    /* Make sure chosen item fetched: */
    343343    sltHandleChooserPaneIndexChange();
    344 
    345 #ifdef VBOX_WS_MAC
    346     // WORKAROUND:
    347     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    348     // the necessary size of the toolbar is increased. Also for some languages
    349     // the with doesn't match if the text increase. So manually adjust the size
    350     // after changing the text.
    351     m_pToolBar->updateLayout();
    352 #endif
    353344}
    354345
     
    10541045        }
    10551046    }
    1056 
    1057 #ifdef VBOX_WS_MAC
    1058     // WORKAROUND:
    1059     // Actually Qt should do that itself but by some unknown reason it sometimes
    1060     // forget to update toolbar after changing its actions on Cocoa platform.
    1061     connect(actionPool()->action(UIActionIndexMN_M_Machine_S_New), &UIAction::changed,
    1062             m_pToolBar, static_cast<void(QIToolBar::*)(void)>(&QIToolBar::update)); // update ambiguity
    1063     connect(actionPool()->action(UIActionIndexMN_M_Machine_S_Settings), &UIAction::changed,
    1064             m_pToolBar, static_cast<void(QIToolBar::*)(void)>(&QIToolBar::update)); // update ambiguity
    1065     connect(actionPool()->action(UIActionIndexMN_M_Machine_S_Discard), &UIAction::changed,
    1066             m_pToolBar, static_cast<void(QIToolBar::*)(void)>(&QIToolBar::update)); // update ambiguity
    1067     connect(actionPool()->action(UIActionIndexMN_M_Machine_M_StartOrShow), &UIAction::changed,
    1068             m_pToolBar, static_cast<void(QIToolBar::*)(void)>(&QIToolBar::update)); // update ambiguity
    1069 
    1070     // WORKAROUND:
    1071     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    1072     // the necessary size of the toolbar is increased. Also for some languages
    1073     // the with doesn't match if the text increase. So manually adjust the size
    1074     // after changing the text.
    1075     m_pToolBar->updateLayout();
    1076 #endif /* VBOX_WS_MAC */
    10771047}
    10781048
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r100896 r102269  
    197197void UIMediumManagerWidget::retranslateUi()
    198198{
    199     /* Adjust toolbar: */
    200 #ifdef VBOX_WS_MAC
    201     // WORKAROUND:
    202     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    203     // the necessary size of the toolbar is increased. Also for some languages
    204     // the with doesn't match if the text increase. So manually adjust the size
    205     // after changing the text. */
    206     if (m_pToolBar)
    207         m_pToolBar->updateLayout();
    208 #endif
    209 
    210199    /* Translate tab-widget: */
    211200    if (m_pTabWidget)
  • trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp

    r100896 r102269  
    408408void UINetworkManagerWidget::retranslateUi()
    409409{
    410     /* Adjust toolbar: */
    411 #ifdef VBOX_WS_MAC
    412     // WORKAROUND:
    413     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    414     // the necessary size of the toolbar is increased. Also for some languages
    415     // the with doesn't match if the text increase. So manually adjust the size
    416     // after changing the text.
    417     if (m_pToolBar)
    418         m_pToolBar->updateLayout();
    419 #endif /* VBOX_WS_MAC */
    420 
    421410    /* Translate tab-widget: */
    422411    if (m_pTabWidget)
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp

    r99607 r102269  
    658658    /* Translate snapshot tree: */
    659659    m_pSnapshotTree->setWhatsThis(tr("Contains the snapshot tree of the current virtual machine"));
    660 
    661     /* Translate toolbar: */
    662 #ifdef VBOX_WS_MAC
    663     // WORKAROUND:
    664     // There is a bug in Qt Cocoa which result in showing a "more arrow" when
    665     // the necessary size of the toolbar is increased. Also for some languages
    666     // the with doesn't match if the text increase. So manually adjust the size
    667     // after changing the text. */
    668     if (m_pToolBar)
    669         m_pToolBar->updateLayout();
    670 #endif
    671660
    672661    /* Translate snapshot tree: */
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