VirtualBox

Changeset 101027 in vbox for trunk


Ignore:
Timestamp:
Sep 6, 2023 11:21:36 AM (13 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6699, bugref:9072. Some cleaning.

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

Legend:

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

    r100896 r101027  
    179179    /* Apply language settings: */
    180180    retranslateUi();
    181     manageEscapeShortCut();
    182181    loadDialogGeometry();
    183182}
     
    225224        button(ButtonType_Close)->setShortcut(shortcut);
    226225}
    227 
    228 void UIVMLogViewerDialog::manageEscapeShortCut()
    229 {
    230     UIVMLogViewerWidget *pWidget = qobject_cast<UIVMLogViewerWidget*>(widget());
    231     if (!pWidget)
    232         return;
    233     pWidget->manageEscapeShortCut();
    234 }
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h

    r98845 r101027  
    124124private:
    125125
    126     void manageEscapeShortCut();
    127126    /** Holds the action-pool reference. */
    128127    UIActionPool *m_pActionPool;
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r101019 r101027  
    224224    /* Prepare VM Log-Viewer: */
    225225    prepare();
    226     restorePanelVisibility();
    227226    if (!uMachineId.isNull())
    228227        setMachines(QVector<QUuid>() << uMachineId);
     
    392391}
    393392
    394 void UIVMLogViewerWidget::savePanelVisibility()
    395 {
    396     // if (m_fCommitDataSignalReceived)
    397     //     return;
    398     // /* Save a list of currently visible panels: */
    399     // QStringList strNameList;
    400     // foreach(UIDialogPanel* pPanel, m_visiblePanelsList)
    401     //     strNameList.append(pPanel->panelName());
    402     // gEDataManager->setLogViewerVisiblePanels(strNameList);
    403 }
    404 
    405393void UIVMLogViewerWidget::sltRefresh()
    406394{
     
    756744    retranslateUi();
    757745
    758     /* Setup escape shortcut: */
    759     manageEscapeShortCut();
    760746    uiCommon().setHelpKeyword(this, "log-viewer");
    761747}
     
    908894}
    909895
    910 void UIVMLogViewerWidget::restorePanelVisibility()
    911 {
    912 }
    913 
    914896void UIVMLogViewerWidget::retranslateUi()
    915897{
     
    11641146}
    11651147
    1166 void UIVMLogViewerWidget::manageEscapeShortCut()
    1167 {
    1168     // /* if there is no visible panels give the escape shortcut to parent dialog: */
    1169     // if (m_visiblePanelsList.isEmpty())
    1170     // {
    1171     //     emit sigSetCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
    1172     //     return;
    1173     // }
    1174     // /* Take the escape shortcut from the dialog: */
    1175     // emit sigSetCloseButtonShortCut(QKeySequence());
    1176     // /* Just loop thru the visible panel list and set the esc key to the
    1177     //    panel which made visible latest */
    1178     // for (int i = 0; i < m_visiblePanelsList.size() - 1; ++i)
    1179     // {
    1180     //     m_visiblePanelsList[i]->setCloseButtonShortCut(QKeySequence());
    1181     // }
    1182     // m_visiblePanelsList.back()->setCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
    1183 }
    1184 
    11851148bool UIVMLogViewerWidget::labelTabHandler()
    11861149{
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r101019 r101027  
    163163        /** Loads options.  */
    164164        void loadOptions();
    165         void savePanelVisibility();
    166         /** Shows the panels that have been visible the last time logviewer is closed. */
    167         void restorePanelVisibility();
    168165    /** @} */
    169166
     
    201198    /** Resets document (of the current tab) and scrollbar highligthing */
    202199    void resetHighlighthing();
    203     /** Make sure escape key is assigned to only a single widget. This is done by checking
    204         several things in the following order:
    205         - when there are no more panels visible assign it to the parent dialog
    206         - grab it from the dialog as soon as a panel becomes visible again
    207         - assigned it to the most recently "unhidden" panel */
    208     void manageEscapeShortCut();
    209200    void setMachines(const QVector<QUuid> &machineIDs);
    210201    /** Returns the content of the ith log file of @comMachine or possibly an empty string */
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