summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/sysinfo.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-03 11:35:41 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-11-04 23:32:57 +0100
commitdd0d52ee0f6750233be61155160eb35e74b908f9 (patch)
tree73083ec78b3af7df8ec04c3b91bbd26d0b368ff2 /rbutil/rbutilqt/sysinfo.cpp
parent646f74937f00e508a5b25a003333569e907013d7 (diff)
downloadrockbox-dd0d52ee0f6750233be61155160eb35e74b908f9.tar.gz
rockbox-dd0d52ee0f6750233be61155160eb35e74b908f9.zip
Handle conversion to text in Sysinfo::getInfo().
When saving the system info from the progresslogger it shouldn't have knowledge about the format of the data provided by getInfo(). Instead of relying on the output being HTML formatted make getInfo() accept a parameter that indicates if the data is to be formatted as HTML or text. Change-Id: I733fe1a148e51b70ea1361d8feccffd7cbccd3d7
Diffstat (limited to 'rbutil/rbutilqt/sysinfo.cpp')
-rw-r--r--rbutil/rbutilqt/sysinfo.cpp5
1 files changed, 4 insertions, 1 deletions
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)
39 ui.textBrowser->setHtml(getInfo()); 39 ui.textBrowser->setHtml(getInfo());
40} 40}
41 41
42QString Sysinfo::getInfo() 42QString Sysinfo::getInfo(Sysinfo::InfoType type)
43{ 43{
44 QString info; 44 QString info;
45 info += tr("<b>OS</b><br/>") + System::osVersionString() + "<hr/>"; 45 info += tr("<b>OS</b><br/>") + System::osVersionString() + "<hr/>";
@@ -76,6 +76,9 @@ QString Sysinfo::getInfo()
76 } 76 }
77 info += "</table>"; 77 info += "</table>";
78 info += "<hr/>"; 78 info += "<hr/>";
79 if(type == InfoText) {
80 info.replace(QRegExp("(<[^>]+>)+"),"\n");
81 }
79 82
80 return info; 83 return info;
81} 84}