Changeset 89599 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 10, 2021 1:11:03 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145043
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r89594 r89599 121 121 void UITabBar::paintEvent(QPaintEvent *pEvent) 122 122 { 123 124 123 Q_UNUSED(pEvent); 125 124 QStylePainter painter(this); 126 127 125 for (int i = 0; i < count(); i++) 128 126 { … … 629 627 if (machineId.isNull()) 630 628 return; 631 629 QVector<QUuid> machineList; 630 machineList << machineId; 631 removeLogViewerPages(machineList); 632 632 } 633 633 … … 925 925 } 926 926 927 QVector<UIVMLog Page*> UIVMLogViewerWidget::logPages()928 { 929 QVector<UIVMLog Page*> pages;927 QVector<UIVMLogTab*> UIVMLogViewerWidget::logTabs() 928 { 929 QVector<UIVMLogTab*> tabs; 930 930 if (m_pTabWidget) 931 return pages;931 return tabs; 932 932 for (int i = 0; i < m_pTabWidget->count(); ++i) 933 933 { 934 UIVMLog Page *pPage = logPage(i);934 UIVMLogTab *pPage = logTab(i); 935 935 if (pPage) 936 pages << pPage;937 } 938 return pages;936 tabs << pPage; 937 } 938 return tabs; 939 939 } 940 940 … … 984 984 return 0; 985 985 return qobject_cast<UIVMLogPage*>(m_pTabWidget->currentWidget()); 986 } 987 988 UIVMLogTab *UIVMLogViewerWidget::logTab(int iIndex) 989 { 990 if (!m_pTabWidget) 991 return 0; 992 return qobject_cast<UIVMLogTab*>(m_pTabWidget->widget(iIndex)); 986 993 } 987 994 … … 1044 1051 if (machineList.isEmpty() || !m_pTabWidget) 1045 1052 return; 1053 1054 QVector<QUuid> currentMachineList(m_machines); 1055 /* Make sure that we remove the machine(s) from our machine list: */ 1056 foreach (const QUuid &id, machineList) 1057 currentMachineList.removeAll(id); 1058 if (currentMachineList.isEmpty()) 1059 return; 1060 m_machines = currentMachineList; 1061 1046 1062 m_pTabWidget->blockSignals(true); 1047 1063 /* Cache log page pointers and tab titles: */ … … 1049 1065 for (int i = 0; i < m_pTabWidget->count(); ++i) 1050 1066 { 1051 UIVMLogTab *pTab = log Page(i);1067 UIVMLogTab *pTab = logTab(i); 1052 1068 if (pTab) 1053 1069 logTabs << QPair<UIVMLogTab*, QString>(pTab, m_pTabWidget->tabText(i)); … … 1071 1087 qDeleteAll(pagesToRemove.begin(), pagesToRemove.end()); 1072 1088 m_pTabWidget->blockSignals(false); 1089 labelTabHandler(); 1090 markLabelTabs(); 1073 1091 } 1074 1092 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r89594 r89599 49 49 class UIVirtualMachineItem; 50 50 class UIVMLogPage; 51 class UIVMLogTab; 51 52 class UIVMLogViewerBookmarksPanel; 52 53 class UIVMLogViewerFilterPanel; … … 183 184 const UIVMLogPage *currentLogPage() const; 184 185 UIVMLogPage *currentLogPage(); 185 /** Returns the log page at tab with iIndex if it contains a log page. Return 0 otherwise. */ 186 /** Returns the log tab at tab with iIndex if it contains a log page. Return 0 otherwise. */ 187 UIVMLogTab *logTab(int iIndex); 186 188 UIVMLogPage *logPage(int iIndex); 187 189 /** Returns a vector of all the log pages of the tab widget. */ 188 QVector<UIVMLog Page*> logPages();190 QVector<UIVMLogTab*> logTabs(); 189 191 190 192 void createLogViewerPages(const QVector<QUuid> &machineList);
Note:
See TracChangeset
for help on using the changeset viewer.