Changeset 88703 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 26, 2021 11:48:18 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144020
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogPage.cpp
r88702 r88703 106 106 } 107 107 108 void UIVMLogPage::setLogString(const QString &strLog) 109 { 110 m_strLog = strLog; 108 void UIVMLogPage::setLogContent(const QString &strLogContent, bool fError) 109 { 110 if (!fError) 111 { 112 m_strLog = strLogContent; 113 setTextEditText(strLogContent); 114 } 115 else 116 { 117 markForError(); 118 setTextEditTextAsHtml(strLogContent); 119 } 111 120 } 112 121 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogPage.h
r88702 r88703 63 63 QTextDocument *document(); 64 64 65 void setLogContent(const QString &strLogContent, bool fError); 65 66 /* Only to be called when log file is re-read. */ 66 void setLogString(const QString &strLog);67 // void setLogString(const QString &strLog); 67 68 const QString& logString() const; 68 69 69 70 void setLogFileName(const QString &strFileName); 70 71 const QString& logFileName() const; 71 72 /** Set plaintextEdit's text. Note that the text we73 * show currently might be different than74 * m_strLog. For example during filtering. */75 void setTextEditText(const QString &strText);76 void setTextEditTextAsHtml(const QString &strText);77 72 78 73 /** Marks the plain text edit When we dont have a log content. */ … … 134 129 void deleteBookmark(LogBookmark bookmark); 135 130 131 /** Set plaintextEdit's text. Note that the text we 132 * show currently might be different than 133 * m_strLog. For example during filtering. */ 134 void setTextEditText(const QString &strText); 135 void setTextEditTextAsHtml(const QString &strText); 136 136 137 QHBoxLayout *m_pMainLayout; 137 138 UIVMLogViewerTextEdit *m_pTextEdit; -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r88702 r88703 929 929 m_pTabWidget->insertTab(m_pTabWidget->count(), pLogPage, strTabTitle); 930 930 931 /* Set text edit since we want to display this text: */ 932 if (!noLogsToShow) 933 { 934 pLogPage->setTextEditText(strLogContent); 935 /* Set the log string of the UIVMLogPage: */ 936 pLogPage->setLogString(strLogContent); 937 } 938 /* In case there are some errors append the error text as html: */ 939 else 940 { 941 pLogPage->setTextEditTextAsHtml(strLogContent); 942 pLogPage->markForError(); 943 } 931 pLogPage->setLogContent(strLogContent, noLogsToShow); 944 932 pLogPage->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector()); 945 933 }
Note:
See TracChangeset
for help on using the changeset viewer.