- Timestamp:
- Dec 11, 2023 4:42:29 PM (10 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
-
logviewer/UIVMLogViewerDialog.cpp (modified) (5 diffs)
-
logviewer/UIVMLogViewerDialog.h (modified) (4 diffs)
-
logviewer/UIVMLogViewerWidget.cpp (modified) (3 diffs)
-
logviewer/UIVMLogViewerWidget.h (modified) (2 diffs)
-
manager/UIVirtualBoxManager.cpp (modified) (3 diffs)
-
runtime/UIMachineLogic.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r101027 r102574 50 50 51 51 UIVMLogViewerDialogFactory::UIVMLogViewerDialogFactory(UIActionPool *pActionPool /* = 0 */, 52 const Q Uuid &uMachineId /* = QUuid()*/,52 const QList<QUuid> &machineIDs /* = QList<QUuid>() */, 53 53 const QString &strMachineName /* = QString() */) 54 54 : m_pActionPool(pActionPool) 55 , m_ uMachineId(uMachineId)55 , m_machineIDs(machineIDs) 56 56 , m_strMachineName(strMachineName) 57 57 { … … 60 60 void UIVMLogViewerDialogFactory::create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) 61 61 { 62 pDialog = new UIVMLogViewerDialog(pCenterWidget, m_pActionPool, m_ uMachineId, m_strMachineName);62 pDialog = new UIVMLogViewerDialog(pCenterWidget, m_pActionPool, m_machineIDs, m_strMachineName); 63 63 } 64 64 … … 69 69 70 70 UIVMLogViewerDialog::UIVMLogViewerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, 71 const Q Uuid &uMachineId /* = QUuid()*/,71 const QList<QUuid> &machineIDs /* = QList<QUuid>() */, 72 72 const QString &strMachineName /* = QString() */) 73 73 : QIWithRetranslateUI<QIManagerDialog>(pCenterWidget) 74 74 , m_pActionPool(pActionPool) 75 , m_ uMachineId(uMachineId)75 , m_machineIDs(machineIDs) 76 76 , m_iGeometrySaveTimerId(-1) 77 77 , m_strMachineName(strMachineName) … … 89 89 if (pLogViewerWidget) 90 90 pLogViewerWidget->setSelectedVMListItems(items); 91 }92 93 void UIVMLogViewerDialog::addSelectedVMListItems(const QList<UIVirtualMachineItem*> &items)94 {95 Q_UNUSED(items);96 UIVMLogViewerWidget *pLogViewerWidget = qobject_cast<UIVMLogViewerWidget*>(widget());97 if (pLogViewerWidget)98 pLogViewerWidget->addSelectedVMListItems(items);99 91 } 100 92 … … 158 150 { 159 151 /* Create widget: */ 160 UIVMLogViewerWidget *pWidget = new UIVMLogViewerWidget(EmbedTo_Dialog, m_pActionPool, true /* show toolbar */, m_ uMachineId, this);152 UIVMLogViewerWidget *pWidget = new UIVMLogViewerWidget(EmbedTo_Dialog, m_pActionPool, true /* show toolbar */, m_machineIDs, this); 161 153 if (pWidget) 162 154 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h
r101027 r102574 52 52 /** Constructs Log Viewer factory acquiring additional arguments. 53 53 * @param pActionPool Brings the action-pool reference. 54 * @param uMachineId Brings the machine id for which VM Log-Viewer is requested. */ 55 UIVMLogViewerDialogFactory(UIActionPool *pActionPool = 0, const QUuid &uMachineId = QUuid(), 54 * @param machineIDs Brings the list of machine IDs. */ 55 UIVMLogViewerDialogFactory(UIActionPool *pActionPool = 0, 56 const QList<QUuid> &machineIDs = QList<QUuid>(), 56 57 const QString &strMachineName = QString()); 57 58 … … 64 65 /** Holds the action-pool reference. */ 65 66 UIActionPool *m_pActionPool; 66 /** Holds the machine id. */67 Q Uuid m_uMachineId;68 QString m_strMachineName;67 /** Holds the list of machine IDs. */ 68 QList<QUuid> m_machineIDs; 69 QString m_strMachineName; 69 70 }; 70 71 … … 80 81 * @param pCenterWidget Brings the widget reference to center according to. 81 82 * @param pActionPool Brings the action-pool reference. 82 * @param machine id Brings the machine id. */83 * @param machineIDs Brings the list of machine IDs. */ 83 84 UIVMLogViewerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, 84 const QUuid &uMachineId = QUuid(), const QString &strMachineName = QString()); 85 const QList<QUuid> &machineIDs = QList<QUuid>(), 86 const QString &strMachineName = QString()); 85 87 ~UIVMLogViewerDialog(); 86 88 void setSelectedVMListItems(const QList<UIVirtualMachineItem*> &items); 87 void addSelectedVMListItems(const QList<UIVirtualMachineItem*> &items);88 89 89 90 protected: … … 126 127 /** Holds the action-pool reference. */ 127 128 UIActionPool *m_pActionPool; 128 /** Holds the machine id. */129 Q Uuid m_uMachineId;130 int m_iGeometrySaveTimerId;131 QString m_strMachineName;129 /** Holds the list of machine IDs. */ 130 QList<QUuid> m_machineIDs; 131 int m_iGeometrySaveTimerId; 132 QString m_strMachineName; 132 133 }; 133 134 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r102573 r102574 203 203 UIActionPool *pActionPool, 204 204 bool fShowToolbar /* = true */, 205 const Q Uuid &uMachineId /* = QUuid() */,205 const QList<QUuid> &machineIDs /* = QList<QUuid>() */, 206 206 QWidget *pParent /* = 0 */) 207 207 : QIWithRetranslateUI<QWidget>(pParent) … … 224 224 /* Prepare VM Log-Viewer: */ 225 225 prepare(); 226 if (! uMachineId.isNull())227 setMachines( QVector<QUuid>() << uMachineId);226 if (!machineIDs.isEmpty()) 227 setMachines(machineIDs); 228 228 connect(&uiCommon(), &UICommon::sigAskToCommitData, 229 229 this, &UIVMLogViewerWidget::sltCommitDataSignalReceived); … … 263 263 } 264 264 265 266 265 void UIVMLogViewerWidget::setSelectedVMListItems(const QList<UIVirtualMachineItem*> &items) 267 266 { 268 267 QVector<QUuid> selectedMachines; 269 270 foreach (const UIVirtualMachineItem *item, items)271 {272 if (!item)273 continue;274 selectedMachines << item->id();275 }276 setMachines(selectedMachines);277 }278 279 void UIVMLogViewerWidget::addSelectedVMListItems(const QList<UIVirtualMachineItem*> &items)280 {281 QVector<QUuid> selectedMachines(m_machines);282 268 283 269 foreach (const UIVirtualMachineItem *item, items) -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r102573 r102574 78 78 * @param pActionPool Brings the action-pool reference. 79 79 * @param fShowToolbar Brings whether we should create/show toolbar. 80 * @param uMachineId Brings the machine id for which VM Log-Viewer is requested. */80 * @param machineIDs Brings the list of machine IDs. */ 81 81 UIVMLogViewerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool, 82 bool fShowToolbar = true, const Q Uuid &uMachineId = QUuid(), QWidget *pParent = 0);82 bool fShowToolbar = true, const QList<QUuid> &machineIDs = QList<QUuid>(), QWidget *pParent = 0); 83 83 ~UIVMLogViewerWidget(); 84 84 /** Returns the width of the current log page. return 0 if there is no current log page: */ … … 94 94 95 95 void setSelectedVMListItems(const QList<UIVirtualMachineItem*> &items); 96 void addSelectedVMListItems(const QList<UIVirtualMachineItem*> &items);97 96 QFont currentFont() const; 98 97 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r102322 r102574 2224 2224 } 2225 2225 2226 QList< UIVirtualMachineItem*> itemsToShowLogs;2226 QList<QUuid> machineIDs; 2227 2227 2228 2228 /* For each selected item: */ … … 2237 2237 if (!isActionEnabled(UIActionIndexMN_M_Group_S_ShowLogDialog, QList<UIVirtualMachineItem*>() << pItem)) 2238 2238 continue; 2239 itemsToShowLogs << pItem;2240 } 2241 2242 if ( itemsToShowLogs.isEmpty())2239 machineIDs << pItem->id(); 2240 } 2241 2242 if (machineIDs.isEmpty()) 2243 2243 return; 2244 2244 if (!m_pLogViewerDialog) 2245 2245 { 2246 UIVMLogViewerDialogFactory dialogFactory(actionPool(), QUuid());2246 UIVMLogViewerDialogFactory dialogFactory(actionPool(), machineIDs); 2247 2247 dialogFactory.prepare(m_pLogViewerDialog, this); 2248 2248 if (m_pLogViewerDialog) … … 2251 2251 } 2252 2252 AssertPtrReturnVoid(m_pLogViewerDialog); 2253 UIVMLogViewerDialog *pDialog = qobject_cast<UIVMLogViewerDialog*>(m_pLogViewerDialog);2254 if (pDialog)2255 pDialog->addSelectedVMListItems(itemsToShowLogs);2256 2253 m_pLogViewerDialog->show(); 2257 2254 m_pLogViewerDialog->setWindowState(m_pLogViewerDialog->windowState() & ~Qt::WindowMinimized); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r102571 r102574 1710 1710 if (!m_pLogViewerDialog) 1711 1711 { 1712 UIVMLogViewerDialogFactory(actionPool(), uiCommon().managedVMUuid(), uimachine()->machineName()) 1712 const QList<QUuid> machineIDs = QList<QUuid>() << uiCommon().managedVMUuid(); 1713 UIVMLogViewerDialogFactory(actionPool(), machineIDs, uimachine()->machineName()) 1713 1714 .prepare(m_pLogViewerDialog, activeMachineWindow()); 1714 1715 connect(m_pLogViewerDialog, &QIManagerDialog::sigClose,
Note:
See TracChangeset
for help on using the changeset viewer.

