Changeset 70098 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Dec 13, 2017 8:53:52 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 119646
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r70074 r70098 29 29 # include <QPushButton> 30 30 # include <QScrollBar> 31 # include <Q TextEdit>31 # include <QPlainTextEdit> 32 32 # include <QVBoxLayout> 33 33 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
r70027 r70098 27 27 # endif 28 28 # include <QLabel> 29 # include <Q TextEdit>29 # include <QPlainTextEdit> 30 30 # include <QTextCursor> 31 31 … … 53 53 { 54 54 Q_UNUSED(iCurrentIndex); 55 Q TextEdit *pCurrentPage = m_pViewer->currentLogPage();55 QPlainTextEdit *pCurrentPage = m_pViewer->currentLogPage(); 56 56 AssertReturnVoid(pCurrentPage); 57 57 QString strInputText = m_pViewer->currentLog(); -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
r70027 r70098 28 28 # include <QHBoxLayout> 29 29 # include <QLabel> 30 # include <Q TextEdit>30 # include <QPlainTextEdit> 31 31 32 32 /* GUI includes: */ … … 80 80 { 81 81 /* Get current log-page: */ 82 Q TextEdit *pBrowser = m_pViewer->currentLogPage();82 QPlainTextEdit *pBrowser = m_pViewer->currentLogPage(); 83 83 /* If current log-page is valid and cursor has selection: */ 84 84 if (pBrowser && pBrowser->textCursor().hasSelection()) … … 371 371 { 372 372 /* Get current log-page: */ 373 Q TextEdit *pBrowser = m_pViewer->currentLogPage();373 QPlainTextEdit *pBrowser = m_pViewer->currentLogPage(); 374 374 if (!pBrowser) return; 375 375 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r70074 r70098 27 27 # include <QFontDatabase> 28 28 # endif 29 # include <Q TextEdit>29 # include <QPlainTextEdit> 30 30 31 31 /* GUI includes: */ … … 137 137 { 138 138 /* Create a log viewer page and append the read text to it: */ 139 Q TextEdit *pLogViewer = createLogPage(QFileInfo(strFileName).fileName());139 QPlainTextEdit *pLogViewer = createLogPage(QFileInfo(strFileName).fileName()); 140 140 pLogViewer->setPlainText(strText); 141 141 /* Move the cursor position to end: */ … … 143 143 cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor); 144 144 pLogViewer->setTextCursor(cursor); 145 /* Add the actual file name and the Q TextEdit containing the content to a list: */145 /* Add the actual file name and the QPlainTextEdit containing the content to a list: */ 146 146 m_book << qMakePair(strFileName, pLogViewer); 147 147 /* Add the log-text to the map: */ … … 155 155 if (!isAnyLogPresent) 156 156 { 157 Q TextEdit *pDummyLog = createLogPage("VBox.log");157 QPlainTextEdit *pDummyLog = createLogPage("VBox.log"); 158 158 pDummyLog->setWordWrapMode(QTextOption::WordWrap); 159 pDummyLog-> setHtml(tr("<p>No log files found. Press the "159 pDummyLog->appendHtml(tr("<p>No log files found. Press the " 160 160 "<b>Refresh</b> button to rescan the log folder " 161 161 "<nobr><b>%1</b></nobr>.</p>") … … 494 494 } 495 495 496 Q TextEdit* UIVMLogViewerWidget::currentLogPage() const496 QPlainTextEdit* UIVMLogViewerWidget::currentLogPage() const 497 497 { 498 498 /* If viewer-container is enabled: */ … … 501 501 /* Get and return current log-page: */ 502 502 QWidget *pContainer = m_pViewerContainer->currentWidget(); 503 Q TextEdit *pBrowser = pContainer->findChild<QTextEdit*>();503 QPlainTextEdit *pBrowser = pContainer->findChild<QPlainTextEdit*>(); 504 504 Assert(pBrowser); 505 505 return pBrowser ? pBrowser : 0; … … 509 509 } 510 510 511 Q TextEdit* UIVMLogViewerWidget::createLogPage(const QString &strName)511 QPlainTextEdit* UIVMLogViewerWidget::createLogPage(const QString &strName) 512 512 { 513 513 /* Create page-container: */ … … 519 519 AssertPtrReturn(pPageLayout, 0); 520 520 /* Create Log-Viewer: */ 521 Q TextEdit *pLogViewer = new QTextEdit(pPageContainer);521 QPlainTextEdit *pLogViewer = new QPlainTextEdit(pPageContainer); 522 522 AssertPtrReturn(pLogViewer, 0); 523 523 { … … 527 527 QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont); 528 528 #else 529 QFont font = pLogViewer->currentFont();529 QFont font; 530 530 font.setFamily("Courier New,courier"); 531 531 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r70080 r70098 34 34 /* Forward declarations: */ 35 35 class QITabWidget; 36 class Q TextEdit;36 class QPlainTextEdit; 37 37 class QVBoxLayout; 38 38 class UIToolBar; … … 41 41 42 42 /* Type definitions: */ 43 typedef QPair<QString, Q TextEdit*> LogPage;43 typedef QPair<QString, QPlainTextEdit*> LogPage; 44 44 typedef QList<LogPage> LogBook; 45 typedef QMap<Q TextEdit*, QString> VMLogMap;45 typedef QMap<QPlainTextEdit*, QString> VMLogMap; 46 46 47 47 /** QIMainWindow extension … … 114 114 115 115 /** Returns the current log-page. */ 116 Q TextEdit* currentLogPage() const;116 QPlainTextEdit* currentLogPage() const; 117 117 /** Returns the newly created log-page using @a strPage filename. */ 118 Q TextEdit* createLogPage(const QString &strPage);118 QPlainTextEdit* createLogPage(const QString &strPage); 119 119 /** Returns the content of current log-page. */ 120 120 const QString& currentLog();
Note:
See TracChangeset
for help on using the changeset viewer.