~ubuntu-branches/ubuntu/oneiric/arora/oneiric

« back to all changes in this revision

Viewing changes to src/aboutdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Roderick B. Greening
  • Date: 2009-09-10 15:24:04 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090910152404-668k22ux3mfap6g0
Tags: 0.9.0-0ubuntu1
* New upstream release
* Update patches:
  - kubuntu_02_default_bookmarks.diff
* Remove patches:
  - kubuntu_04_startpage_spacing.diff (fixed upstream)
  - kubuntu_05_manpages.diff (fixed upstream)
  - kubuntu_07_adblock.diff (unstable/unsuitable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <qtextedit.h>
28
28
#include <qtextstream.h>
29
29
 
 
30
#if defined(WEBKIT_TRUNK)
 
31
#include <qwebkitversion.h>
 
32
#endif
 
33
 
30
34
AboutDialog::AboutDialog(QWidget *parent)
31
35
    : QDialog(parent)
32
36
{
35
39
    logo->setPixmap(qApp->windowIcon().pixmap(128, 128));
36
40
    name->setText(qApp->applicationName());
37
41
    version->setText(qApp->applicationVersion());
 
42
#if defined(WEBKIT_TRUNK)
 
43
    webkitVersion->setText(tr("WebKit version: %1").arg(qWebKitVersion()));
 
44
#else
 
45
    webkitVersion->hide();
 
46
#endif
38
47
    connect(authorsButton, SIGNAL(clicked()),
39
48
            this, SLOT(authorsButtonClicked()));
40
49
    connect(licenseButton, SIGNAL(clicked()),
54
63
    if (!file.open(QIODevice::ReadOnly))
55
64
        return;
56
65
 
57
 
    QString text = QTextStream(&file).readAll();
 
66
    QTextStream stream(&file);
 
67
    stream.setCodec("UTF-8");
 
68
    QString text = stream.readAll();
58
69
    // this is done to force the content of the text editor to be LTR, and monospaced.
59
70
    textEdit.setHtml(QString(QLatin1String("<pre>%1</pre>")).arg(text));
60
71