X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiAbout.cpp;h=fcd0653afd8740951ba19cb51a974a0593e475da;hb=8b7584846c4e1a9c87a004fab479722fee7e3013;hp=218c061027641189e1f0fb1b6c1d11f5e9045472;hpb=aba488dea860737cbe369725c103d5429b658ab2;p=lyx.git diff --git a/src/frontends/qt4/GuiAbout.cpp b/src/frontends/qt4/GuiAbout.cpp index 218c061027..fcd0653afd 100644 --- a/src/frontends/qt4/GuiAbout.cpp +++ b/src/frontends/qt4/GuiAbout.cpp @@ -12,6 +12,8 @@ #include "GuiAbout.h" +#include "ui_AboutUi.h" + #include "qt_helpers.h" #include "version.h" @@ -42,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()) { @@ -58,9 +60,14 @@ static QString credits() line = ts.readLine(); if (line.startsWith("@b")) out << "" << line.mid(2) << ""; - else if (line.startsWith("@i")) + else if (line.startsWith("@i")) { + if (line.startsWith("@iE-mail")) { + // unmask email + line.replace(QString(" () "), QString("@")); + line.replace(QString(" ! "), QString(".")); + } out << "" << line.mid(2) << ""; - else + } else out << line; out << "
"; } while (!line.isNull()); @@ -113,29 +120,45 @@ 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"; +#endif return res; } +struct GuiAbout::Private +{ + Ui::AboutUi ui; +}; + + GuiAbout::GuiAbout(GuiView & lv) - : GuiDialog(lv, "aboutlyx", qt_("About LyX")) + : DialogView(lv, "aboutlyx", qt_("About LyX")), + d(new GuiAbout::Private) { - setupUi(this); + d->ui.setupUi(this); + + d->ui.copyrightTB->setPlainText(copyright()); + d->ui.copyrightTB->append(QString()); + d->ui.copyrightTB->append(license()); + d->ui.copyrightTB->append(QString()); + d->ui.copyrightTB->append(disclaimer()); - connect(closePB, SIGNAL(clicked()), this, SLOT(reject())); + d->ui.versionLA->setText(version()); + d->ui.creditsTB->setHtml(credits()); +} - copyrightTB->setPlainText(copyright()); - copyrightTB->append(QString()); - copyrightTB->append(license()); - copyrightTB->append(QString()); - copyrightTB->append(disclaimer()); - versionLA->setText(version()); - creditsTB->setHtml(credits()); +void GuiAbout::on_closePB_clicked() +{ + close(); }