]> git.lyx.org Git - lyx.git/commitdiff
GuiAbout: Detect and provide links to trac
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 24 May 2015 12:51:47 +0000 (14:51 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 24 May 2015 12:51:47 +0000 (14:51 +0200)
Text in the form "bug #1234" is transformed to a link that points
to the respective trac entry.

src/frontends/qt4/GuiAbout.cpp

index 3c4e84fe8d5df3b2fa1cc6b68613ff1a9b41ebc3..d2a69e9d7a7e078760935100ac09ee9f1c4487d4 100644 (file)
@@ -121,6 +121,11 @@ static QString release_notes()
                                        continue;
                                } if (incomment)
                                        continue;
+
+                               // detect links to the tracker
+                               line.replace(QRegExp("(bug )(\\#)(\\d+)*"),
+                                            "<a href=\"http://www.lyx.org/trac/ticket/\\3\">\\1\\3</a>");
+
                                // headings
                                if (line.startsWith("!!!")) {
                                        if (inlist) {
@@ -267,6 +272,7 @@ GuiAbout::GuiAbout(GuiView & lv)
        d->ui.versionLA->setText(version());
        d->ui.buildinfoTB->setText(buildinfo());
        d->ui.releasenotesTB->setHtml(release_notes());
+       d->ui.releasenotesTB->setOpenExternalLinks(true);
        d->ui.creditsTB->setHtml(credits());
 
        d->ui.tab->setUsesScrollButtons(false);