Changeset 88671 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 23, 2021 11:09:03 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143985
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogPage.cpp
r82968 r88671 32 32 33 33 34 UIVMLogPage::UIVMLogPage(QWidget *pParent /* = 0 */ , int tabIndex /*= -1 */)34 UIVMLogPage::UIVMLogPage(QWidget *pParent /* = 0 */) 35 35 : QIWithRetranslateUI<QWidget>(pParent) 36 36 , m_pMainLayout(0) 37 37 , m_pTextEdit(0) 38 , m_tabIndex(tabIndex)39 38 , m_iSelectedBookmarkIndex(-1) 40 39 , m_bFiltered(false) … … 96 95 return 0; 97 96 return m_pTextEdit->document(); 98 }99 100 void UIVMLogPage::setTabIndex(int index)101 {102 m_tabIndex = index;103 }104 105 int UIVMLogPage::tabIndex() const106 {107 return m_tabIndex;108 97 } 109 98 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogPage.h
r82968 r88671 54 54 public: 55 55 56 UIVMLogPage(QWidget *pParent = 0 , int tabIndex = -1);56 UIVMLogPage(QWidget *pParent = 0); 57 57 ~UIVMLogPage(); 58 58 … … 62 62 QPlainTextEdit *textEdit(); 63 63 QTextDocument *document(); 64 65 void setTabIndex(int index);66 int tabIndex() const;67 64 68 65 /* Only to be called when log file is re-read. */ … … 137 134 /** Stores full path and name of the log file. */ 138 135 QString m_strLogFileName; 139 /** This is the index of the tab containing this widget in UIVMLogViewerWidget. */140 int m_tabIndex;141 136 /** Stores the bookmarks of the logpage. All other bookmark related containers are updated wrt. this one. */ 142 137 QVector<LogBookmark> m_bookmarkVector; -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r88660 r88671 133 133 m_pLayout->addWidget(pCheckBox); 134 134 } 135 136 137 UIVMLogViewerWidget::Machine::Machine(const QUuid &id, const QString &strName)138 : m_id(id)139 , m_strName(strName)140 {141 }142 143 UIVMLogViewerWidget::Machine::Machine()144 {}145 135 146 136 UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding, … … 213 203 if (!item) 214 204 continue; 215 m_machines << Machine(item->id(), item->name());216 } 217 updateMachineSelectionMenu();205 //m_machines << Machine(item->id(), item->name()); 206 } 207 //updateMachineSelectionMenu(); 218 208 } 219 209 … … 875 865 int tabIndex = m_pTabWidget->insertTab(m_pTabWidget->count(), pLogPage, QFileInfo(strFileName).fileName()); 876 866 877 pLogPage->setTabIndex(tabIndex);878 867 m_logPageList.resize(m_pTabWidget->count()); 879 868 m_logPageList[tabIndex] = pLogPage; … … 948 937 if (uOffset >= uAllowedLogSize) 949 938 { 950 strText.append("\n=========Log file has been truncate as it is too large.======");939 strText.append("\n=========Log file has been truncated as it is too large.======"); 951 940 break; 952 941 } … … 1043 1032 m_pMachineSelectionMenu->clear(); 1044 1033 1045 foreach (const Machine &machine, m_machines)1046 {1047 1048 m_pMachineSelectionMenu->addListItem(machine.m_strName, machine.m_id);1049 }1034 // foreach (const Machine &machine, m_machines) 1035 // { 1036 1037 // m_pMachineSelectionMenu->addListItem(machine.m_strName, machine.m_id); 1038 // } 1050 1039 } 1051 1040 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r88660 r88671 141 141 void sltCornerButtonClicked(); 142 142 private: 143 struct Machine 144 { 145 Machine(const QUuid &id, const QString &strName); 146 Machine(); 147 QUuid m_id; 148 QString m_strName; 149 }; 143 150 144 /** @name Prepare/Cleanup 151 145 * @{ */ … … 207 201 /** Holds the machine instance. */ 208 202 CMachine m_comMachine; 209 Q Vector<Machine> m_machines;203 QMap<QUuid, CMachine> m_machines; 210 204 211 205 /** Holds whether the dialog is polished. */
Note:
See TracChangeset
for help on using the changeset viewer.