summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rbutil/rbutilqt/progressloggergui.cpp3
-rw-r--r--rbutil/rbutilqt/sysinfo.cpp5
-rw-r--r--rbutil/rbutilqt/sysinfo.h6
3 files changed, 10 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp
index 41df0600f0..71485b02ea 100644
--- a/rbutil/rbutilqt/progressloggergui.cpp
+++ b/rbutil/rbutilqt/progressloggergui.cpp
@@ -175,8 +175,7 @@ void ProgressLoggerGui::saveErrorLog()
"*********************************************\n";
file.write(info.toUtf8(), info.size());
- info = Sysinfo::getInfo();
- info.replace(QRegExp("(<[^>]+>)+"),"\n");
+ info = Sysinfo::getInfo(Sysinfo::InfoText);
file.write(info.toUtf8(), info.size());
// trace
diff --git a/rbutil/rbutilqt/sysinfo.cpp b/rbutil/rbutilqt/sysinfo.cpp
index 3de387721c..0bb5465240 100644
--- a/rbutil/rbutilqt/sysinfo.cpp
+++ b/rbutil/rbutilqt/sysinfo.cpp
@@ -39,7 +39,7 @@ void Sysinfo::updateSysinfo(void)
ui.textBrowser->setHtml(getInfo());
}
-QString Sysinfo::getInfo()
+QString Sysinfo::getInfo(Sysinfo::InfoType type)
{
QString info;
info += tr("<b>OS</b><br/>") + System::osVersionString() + "<hr/>";
@@ -76,6 +76,9 @@ QString Sysinfo::getInfo()
}
info += "</table>";
info += "<hr/>";
+ if(type == InfoText) {
+ info.replace(QRegExp("(<[^>]+>)+"),"\n");
+ }
return info;
}
diff --git a/rbutil/rbutilqt/sysinfo.h b/rbutil/rbutilqt/sysinfo.h
index 45928a8b43..e2b3675102 100644
--- a/rbutil/rbutilqt/sysinfo.h
+++ b/rbutil/rbutilqt/sysinfo.h
@@ -30,9 +30,13 @@ class Sysinfo : public QDialog
Q_OBJECT
public:
+ enum InfoType {
+ InfoHtml,
+ InfoText,
+ };
Sysinfo(QWidget *parent = 0);
- static QString getInfo();
+ static QString getInfo(InfoType type = InfoHtml);
private:
void changeEvent(QEvent *event);
Ui::SysinfoFrm ui;