VirtualBox

Changeset 70676 in vbox


Ignore:
Timestamp:
Jan 22, 2018 12:59:41 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120412
Message:

FE/Qt: bugref:9072 Trying to convince MacOS to show logviewer in a stacked layout

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp

    r70664 r70676  
    358358    prepareRadioButtonGroup();
    359359
    360     m_pFilterComboBox = new QComboBox(this);
     360    m_pFilterComboBox = new QComboBox;
    361361    if (m_pFilterComboBox)
    362362    {
     
    370370    }
    371371
    372     m_pAddFilterTermButton = new QIToolButton(this);
     372    m_pAddFilterTermButton = new QIToolButton;
    373373    if (m_pAddFilterTermButton)
    374374    {
     
    377377    }
    378378
    379     m_pFilterTermsLineEdit = new UIVMFilterLineEdit(this);
     379    m_pFilterTermsLineEdit = new UIVMFilterLineEdit;
    380380    if (m_pFilterTermsLineEdit)
    381381    {
     
    384384    }
    385385
    386     m_pResultLabel = new QLabel(this);
     386    m_pResultLabel = new QLabel;
    387387    if (m_pResultLabel)
    388388    {
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp

    r70664 r70676  
    7979        m_pMainLayout->setSpacing(2);
    8080    }
    81     m_pCloseButton = new UIMiniCancelButton(this);
     81    m_pCloseButton = new UIMiniCancelButton;
    8282    if (m_pCloseButton)
    8383    {
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp

    r70664 r70676  
    184184
    185185    /* Create search-editor: */
    186     m_pSearchEditor = new UISearchField(this);
     186    m_pSearchEditor = new UISearchField(0 /* parent */);
    187187    if (m_pSearchEditor)
    188188    {
     
    194194
    195195    /* Create search-label: */
    196     m_pSearchLabel = new QLabel(this);
     196    m_pSearchLabel = new QLabel;
    197197    if (m_pSearchLabel)
    198198    {
     
    210210
    211211    /* Create Next/Prev button-box: */
    212     m_pNextPrevButtons = new UIRoundRectSegmentedButton(this, 2);
     212    m_pNextPrevButtons = new UIRoundRectSegmentedButton(0 /* parent */, 2);
    213213    if (m_pNextPrevButtons)
    214214    {
     
    239239    }
    240240
    241     m_pMatchWholeWordCheckBox = new QCheckBox(this);
     241    m_pMatchWholeWordCheckBox = new QCheckBox;
    242242    if (m_pMatchWholeWordCheckBox)
    243243    {
     
    253253    }
    254254
    255     m_pHighlightAllCheckBox = new QCheckBox(this);
     255    m_pHighlightAllCheckBox = new QCheckBox;
    256256    if (m_pHighlightAllCheckBox)
    257257    {
     
    267267
    268268    /* Create warning-icon: */
    269     m_pWarningIcon = new QLabel(this);
     269    m_pWarningIcon = new QLabel;
    270270    if (m_pWarningIcon)
    271271    {
     
    280280
    281281    /* Create warning-label: */
    282     m_pInfoLabel = new QLabel(this);
     282    m_pInfoLabel = new QLabel;
    283283    if (m_pInfoLabel)
    284284    {
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r70664 r70676  
    7171    , m_pActionSave(0)
    7272    , m_pActionBookmark(0)
     73    , m_pActionSettings(0)
    7374    , m_pMenu(0)
    7475    , m_bShowLineNumbers(true)
     
    169170void UIVMLogViewerWidget::sltRefresh()
    170171{
     172    if (!m_pTabWidget)
     173        return;
    171174    /* Disconnect this connection to avoid initial signals during page creation/deletion: */
    172175    disconnect(m_pTabWidget, &QITabWidget::currentChanged, m_pFilterPanel, &UIVMLogViewerFilterPanel::applyFilter);
     
    196199
    197200    /* Setup this connection after refresh to avoid initial signals during page creation: */
    198     connect(m_pTabWidget, &QITabWidget::currentChanged, m_pFilterPanel, &UIVMLogViewerFilterPanel::applyFilter);
     201    if (m_pFilterPanel)
     202        connect(m_pTabWidget, &QITabWidget::currentChanged, m_pFilterPanel, &UIVMLogViewerFilterPanel::applyFilter);
    199203    connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIVMLogViewerWidget::sltTabIndexChange);
    200204
    201205    /* Enable/Disable toolbar actions (except Refresh) & tab widget according log presence: */
    202     m_pActionFind->setEnabled(!noLogsToShow);
    203     m_pActionFilter->setEnabled(!noLogsToShow);
    204     m_pActionSave->setEnabled(!noLogsToShow);
    205     m_pActionBookmark->setEnabled(!noLogsToShow);
     206    if (m_pActionFind)
     207        m_pActionFind->setEnabled(!noLogsToShow);
     208    if (m_pActionFilter)
     209        m_pActionFilter->setEnabled(!noLogsToShow);
     210    if (m_pActionSave)
     211        m_pActionSave->setEnabled(!noLogsToShow);
     212    if (m_pActionBookmark)
     213        m_pActionBookmark->setEnabled(!noLogsToShow);
    206214    //m_pTabWidget->setEnabled(!noLogsToShow);
    207     m_pActionSettings->setEnabled(!noLogsToShow);
     215    if (m_pActionSettings)
     216        m_pActionSettings->setEnabled(!noLogsToShow);
    208217    m_pTabWidget->show();
    209218    if (m_pSearchPanel && m_pSearchPanel->isVisible())
     
    352361    m_pMainLayout = new QVBoxLayout(this);
    353362
    354     /* Prepare widgets: */
     363    prepareToolBar();
     364    prepareActions();
     365   
     366    prepareMenu();
    355367    prepareWidgets();
    356 
    357 
    358     prepareActions();
    359 
    360     prepareToolBar();
    361     prepareMenu();
    362 
     368   
    363369    /* Reading log files: */
    364370    sltRefresh();
     
    384390
    385391    /* Create VM Log-Viewer container: */
    386     m_pTabWidget = new QITabWidget(this);
     392    m_pTabWidget = new QITabWidget;
    387393    if (m_pTabWidget)
    388394    {
    389395        /* Add VM Log-Viewer container to main-layout: */
    390         m_pMainLayout->insertWidget(1, m_pTabWidget);
     396        m_pMainLayout->addWidget(m_pTabWidget);
    391397    }
    392398
    393399    /* Create VM Log-Viewer search-panel: */
    394     m_pSearchPanel = new UIVMLogViewerSearchPanel(this, this);
     400    m_pSearchPanel = new UIVMLogViewerSearchPanel(0, this);
    395401    if (m_pSearchPanel)
    396402    {
     
    399405        m_pSearchPanel->hide();
    400406        /* Add VM Log-Viewer search-panel to main-layout: */
    401         m_pMainLayout->insertWidget(2, m_pSearchPanel);
     407        m_pMainLayout->addWidget(m_pSearchPanel);
    402408        connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated,
    403409                this, &UIVMLogViewerWidget::sltSearchResultHighLigting);
     
    405411
    406412    /* Create VM Log-Viewer filter-panel: */
    407     m_pFilterPanel = new UIVMLogViewerFilterPanel(this, this);
     413    m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this);
    408414    if (m_pFilterPanel)
    409415    {
     
    412418        m_pFilterPanel->hide();
    413419        /* Add VM Log-Viewer filter-panel to main-layout: */
    414         m_pMainLayout->insertWidget(3, m_pFilterPanel);
     420        m_pMainLayout->addWidget(m_pFilterPanel);
    415421        connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied,
    416422                this, &UIVMLogViewerWidget::sltFilterApplied);
    417423    }
    418424
    419     m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(this, this);
     425    m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this);
    420426    if (m_pBookmarksPanel)
    421427    {
    422428        installEventFilter(m_pBookmarksPanel);
    423429        m_pBookmarksPanel->hide();
    424         m_pMainLayout->insertWidget(4, m_pBookmarksPanel);
     430        m_pMainLayout->addWidget(m_pBookmarksPanel);
    425431        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmark,
    426432                this, &UIVMLogViewerWidget::sltDeleteBookmark);
     
    431437    }
    432438
    433     m_pSettingsPanel = new UIVMLogViewerSettingsPanel(this, this);
     439    m_pSettingsPanel = new UIVMLogViewerSettingsPanel(0, this);
    434440    if (m_pSettingsPanel)
    435441    {
     
    441447        m_pSettingsPanel->setFontSizeInPoints(m_iFontSizeInPoints);
    442448
    443         m_pMainLayout->insertWidget(5, m_pSettingsPanel);
     449        m_pMainLayout->addWidget(m_pSettingsPanel);
    444450        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers);
    445451        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines);
     
    580586#else
    581587        /* Add into layout: */
    582         m_pMainLayout->insertWidget(0, m_pToolBar);
     588        m_pMainLayout->addWidget(m_pToolBar);
    583589#endif
    584590    }
     
    838844
    839845    /* Create page-container: */
    840     UIVMLogPage* pLogPage = new UIVMLogPage(this);
     846    UIVMLogPage* pLogPage = new UIVMLogPage();
    841847    if (pLogPage)
    842848    {
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