- Timestamp:
- Apr 22, 2021 3:59:04 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r88658 r88659 184 184 } 185 185 186 UIVMLogViewerWidget::~UIVMLogViewerWidget()187 {188 /* Cleanup VM Log-Viewer: */189 cleanup();190 }191 192 186 int UIVMLogViewerWidget::defaultLogPageWidth() const 193 187 { … … 253 247 if (m_pMachineSelectionMenu) 254 248 m_pMachineSelectionMenu->move(0, 40); 249 } 250 251 void UIVMLogViewerWidget::sltSaveOptions() 252 { 253 /* Save a list of currently visible panels: */ 254 QStringList strNameList; 255 foreach(UIDialogPanel* pPanel, m_visiblePanelsList) 256 strNameList.append(pPanel->panelName()); 257 gEDataManager->setLogViewerVisiblePanels(strNameList); 258 gEDataManager->setLogViweverOptions(m_font, m_bWrapLines, m_bShowLineNumbers); 255 259 } 256 260 … … 766 770 if (loadedFont != QFont()) 767 771 m_font = loadedFont; 772 connect(&uiCommon(), &UICommon::sigAskToCommitData, 773 this, &UIVMLogViewerWidget::sltSaveOptions); 768 774 } 769 775 … … 791 797 } 792 798 } 793 }794 795 void UIVMLogViewerWidget::saveOptions()796 {797 /* Save a list of currently visible panels: */798 QStringList strNameList;799 foreach(UIDialogPanel* pPanel, m_visiblePanelsList)800 strNameList.append(pPanel->panelName());801 gEDataManager->setLogViewerVisiblePanels(strNameList);802 gEDataManager->setLogViweverOptions(m_font, m_bWrapLines, m_bShowLineNumbers);803 }804 805 void UIVMLogViewerWidget::cleanup()806 {807 /* Save options: */808 saveOptions();809 799 } 810 800 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r88658 r88659 73 73 UIVMLogViewerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, 74 74 bool fShowToolbar = true, const CMachine &comMachine = CMachine(), QWidget *pParent = 0); 75 /** Destructs the VM Log-Viewer. */76 ~UIVMLogViewerWidget();77 75 /** Returns the width of the current log page. return 0 if there is no current log page: */ 78 76 int defaultLogPageWidth() const; … … 98 96 99 97 private slots: 98 99 /** Saves options. */ 100 void sltSaveOptions(); 100 101 101 102 /** Handles refresh action triggering. */ … … 162 163 /** Shows the panels that have been visible the last time logviewer is closed. */ 163 164 void restorePanelVisibility(); 164 165 /** Saves options. */166 void saveOptions();167 /** Cleanups VM Log-Viewer. */168 void cleanup();169 165 /** @} */ 170 166
Note:
See TracChangeset
for help on using the changeset viewer.