Commit fb7022c4 authored by jhammen's avatar jhammen
Browse files

add full path to script output panel links

parent f6f834f1
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "style.h" #include "style.h"
#include "ui_outputwidget.h" #include "ui_outputwidget.h"
#include <QDir>
#include <QMessageBox> #include <QMessageBox>
#include <signal.h> #include <signal.h>
...@@ -91,7 +92,12 @@ void OutputWidget::parseLine(int pos) { ...@@ -91,7 +92,12 @@ void OutputWidget::parseLine(int pos) {
href.setScheme("bipsrc"); href.setScheme("bipsrc");
href.setHost(errorExp.cap(1)); href.setHost(errorExp.cap(1));
href.setPort(errorExp.cap(3).toInt()); href.setPort(errorExp.cap(3).toInt());
href.setPath(errorExp.cap(2)); QString path = errorExp.cap(2);
if (!path.startsWith("/")) {
QFileInfo fileInfo(QDir::currentPath() + "/" + path);
path = fileInfo.canonicalFilePath();
}
href.setPath(path);
anchorFormat.setAnchorHref(href.toString()); anchorFormat.setAnchorHref(href.toString());
// add link to document // add link to document
QTextCursor cursor(ui->stdoutBrowser->document()); QTextCursor cursor(ui->stdoutBrowser->document());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment