Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
22ace5fc
Commit
22ace5fc
authored
Feb 22, 2010
by
Thorbjørn Lindeijer
Browse files
Disable links to QML errors when compiling against Qt 4.6
This feature depends on the availability of QPlainTextEdit::anchorAt.
parent
c46f9773
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/outputwindow.cpp
View file @
22ace5fc
...
...
@@ -460,6 +460,8 @@ void OutputWindow::appendOutputInline(const QString &out)
format
.
setForeground
(
palette
().
text
().
color
());
setCurrentCharFormat
(
format
);
// (This feature depends on the availability of QPlainTextEdit::anchorAt)
#if QT_VERSION >= 0x040700
// Convert to HTML, preserving newlines and whitespace
s
=
Qt
::
convertFromPlainText
(
s
);
...
...
@@ -472,6 +474,9 @@ void OutputWindow::appendOutputInline(const QString &out)
index
+=
link
.
length
();
}
appendHtml
(
s
);
#else
appendPlainText
(
s
);
#endif
}
enableUndoRedo
();
...
...
@@ -531,6 +536,7 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
return
;
}
#if QT_VERSION >= 0x040700
const
QString
href
=
anchorAt
(
e
->
pos
());
if
(
!
href
.
isEmpty
())
{
QRegExp
qmlErrorLink
(
QLatin1String
(
"^file://(/[^:]+):(
\\
d+):(
\\
d+)"
));
...
...
@@ -542,12 +548,14 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
TextEditor
::
BaseTextEditor
::
openEditorAt
(
fileName
,
line
,
column
-
1
);
}
}
#endif
}
void
OutputWindow
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
QPlainTextEdit
::
mouseMoveEvent
(
e
);
#if QT_VERSION >= 0x040700
// Cursor was dragged to make a selection, deactivate links
if
(
m_mousePressed
&&
textCursor
().
hasSelection
())
m_linksActive
=
false
;
...
...
@@ -556,4 +564,5 @@ void OutputWindow::mouseMoveEvent(QMouseEvent *e)
viewport
()
->
setCursor
(
Qt
::
IBeamCursor
);
else
viewport
()
->
setCursor
(
Qt
::
PointingHandCursor
);
#endif
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment