]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiAbout.cpp
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiAbout.cpp
index 953cf1f4f8f557e3fe5088ec2b1f682f23e4152d..09834d41f5f9c5b7aaae531bf8afc16536b76a0e 100644 (file)
@@ -23,8 +23,8 @@
 #include "support/Package.h"
 
 #include <QDate>
-#include <QtCore>
-#include <QtGui>
+#include <QFile>
+#include <QTextStream>
 
 using namespace lyx::support;
 using lyx::support::package;
@@ -44,7 +44,7 @@ static QDate release_date()
 static QString credits()
 {
        QString res;
-       QFile file(toqstr(package().system_support().absFilename()) + "/CREDITS");
+       QFile file(toqstr(package().system_support().absFileName()) + "/CREDITS");
        QTextStream out(&res);
 
        if (file.isReadable()) {
@@ -120,18 +120,31 @@ static QString version()
        QTextStream out(&res);
        out << toqstr(version_date);
        out << qt_("Library directory: ");
-       out << toqstr(makeDisplayPath(package().system_support().absFilename()));
+       out << toqstr(makeDisplayPath(package().system_support().absFileName()));
        out << "\n";
        out << qt_("User directory: ");
-       out << toqstr(makeDisplayPath(package().user_support().absFilename()));
+       out << toqstr(makeDisplayPath(package().user_support().absFileName()));
 #ifdef DEVEL_VERSION
        out << "\n";
-       out << "Qt Version (run-time): " << toqstr(qVersion()) << "\n";
-       out << "Qt Version (compile-time): " << QT_VERSION_STR << "\n";
+       out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion()))) << "\n";
+       out << toqstr(bformat(_("Qt Version (compile-time): %1$s"), from_ascii(QT_VERSION_STR))) << "\n";
 #endif
        return res;
 }
 
+static QString buildinfo()
+{
+       QString res;
+       QTextStream out(&res);
+       out << "LyX " << lyx_version
+               << " (" << lyx_release_date << ")" << endl;
+       out << toqstr(bformat(_("Built on %1$s[[date]], %2$s[[time]]"),
+               from_ascii(__DATE__), from_ascii(__TIME__))) << endl;
+
+       out << lyx_version_info << endl;
+       return res;
+}
+
 
 struct GuiAbout::Private
 {
@@ -152,6 +165,7 @@ GuiAbout::GuiAbout(GuiView & lv)
        d->ui.copyrightTB->append(disclaimer());
 
        d->ui.versionLA->setText(version());
+       d->ui.buildinfoTB->setText(buildinfo());
        d->ui.creditsTB->setHtml(credits());
 }