diff options
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 60f517825d..1c00ef9a07 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -282,12 +282,37 @@ void RbUtilQt::about() | |||
282 | QTextStream c(&licence); | 282 | QTextStream c(&licence); |
283 | about.browserLicense->insertHtml(c.readAll()); | 283 | about.browserLicense->insertHtml(c.readAll()); |
284 | about.browserLicense->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); | 284 | about.browserLicense->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); |
285 | 285 | licence.close(); | |
286 | QFile speexlicense(":/docs/COPYING.SPEEX"); | 286 | |
287 | speexlicense.open(QIODevice::ReadOnly); | 287 | QString html = "<p>" + tr("Libraries used") + "</p>"; |
288 | QTextStream s(&speexlicense); | 288 | html += "<ul>"; |
289 | about.browserSpeexLicense->insertHtml("<pre>" + s.readAll() + "</pre>"); | 289 | html += "<li>Speex: <a href='#speex'>Speex License</a></li>"; |
290 | about.browserSpeexLicense->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); | 290 | html += "<li>bspatch: <a href='#bspatch'>bspatch License</a></li>"; |
291 | html += "<li>bzip2: <a href='#bzip2'>bzip2 License</a></li>"; | ||
292 | html += "<li>mspack: <a href='#lgpl2'>LGPL v2.1 License</a></li>"; | ||
293 | html += "<li>quazip: <a href='#lgpl2'>LGPL v2.1 License</a></li>"; | ||
294 | html += "<li>tomcrypt: <a href='#tomcrypt'>Tomcrypt License</a></li>"; | ||
295 | html += "<li>CuteLogger: <a href='#lgpl2'>LGPL v2.1 License</a></li>"; | ||
296 | html += "</ul>"; | ||
297 | about.browserLicenses->insertHtml(html); | ||
298 | |||
299 | QMap<QString, QString> licenses; | ||
300 | licenses[":/docs/COPYING.SPEEX"] = "<a id='speex'>Speex License</a>"; | ||
301 | licenses[":/docs/lgpl-2.1.txt"] = "<a id='lgpl2'>LGPL v2.1</a>"; | ||
302 | licenses[":/docs/LICENSE.TOMCRYPT"] = "<a id='tomcrypt'>Tomcrypt License</a>"; | ||
303 | licenses[":/docs/LICENSE.BZIP2"] = "<a id='bzip2'>bzip2 License</a>"; | ||
304 | licenses[":/docs/LICENSE.BSPATCH"] = "<a id='bspatch'>bspatch License</a>"; | ||
305 | |||
306 | for (int i = 0; i < licenses.size(); i++) { | ||
307 | QString key = licenses.keys().at(i); | ||
308 | QFile license(key); | ||
309 | license.open(QIODevice::ReadOnly); | ||
310 | QTextStream s(&license); | ||
311 | about.browserLicenses->insertHtml("<hr/><h2>" + licenses[key] + "</h2><br/>\n"); | ||
312 | about.browserLicenses->insertHtml("<pre>" + s.readAll() + "</pre>"); | ||
313 | license.close(); | ||
314 | } | ||
315 | about.browserLicenses->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); | ||
291 | 316 | ||
292 | QFile credits(":/docs/CREDITS"); | 317 | QFile credits(":/docs/CREDITS"); |
293 | credits.open(QIODevice::ReadOnly); | 318 | credits.open(QIODevice::ReadOnly); |
@@ -304,6 +329,7 @@ void RbUtilQt::about() | |||
304 | line.remove(QRegExp("^People.*")); | 329 | line.remove(QRegExp("^People.*")); |
305 | about.browserCredits->append(line); | 330 | about.browserCredits->append(line); |
306 | } | 331 | } |
332 | credits.close(); | ||
307 | about.browserCredits->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); | 333 | about.browserCredits->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); |
308 | QString title = QString("<b>The Rockbox Utility</b><br/>Version %1").arg(FULLVERSION); | 334 | QString title = QString("<b>The Rockbox Utility</b><br/>Version %1").arg(FULLVERSION); |
309 | about.labelTitle->setText(title); | 335 | about.labelTitle->setText(title); |