Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
06fbda77
Commit
06fbda77
authored
4 years ago
by
Sébastien Blin
Committed by
Adrien Béraud
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
chatview: correctly handle clicked links in the webview
Change-Id: I16edca89fe0e66fb3845cc0420c251c70c12bdec Gitlab:
#11
parent
214d9add
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mainview/components/MessageWebView.qml
+7
-0
7 additions, 0 deletions
src/mainview/components/MessageWebView.qml
src/messagesadapter.cpp
+8
-0
8 additions, 0 deletions
src/messagesadapter.cpp
src/messagesadapter.h
+1
-0
1 addition, 0 deletions
src/messagesadapter.h
with
16 additions
and
0 deletions
src/mainview/components/MessageWebView.qml
+
7
−
0
View file @
06fbda77
...
...
@@ -232,6 +232,13 @@ Rectangle {
}
}
onNavigationRequested
:
{
if
(
request
.
navigationType
===
WebEngineView
.
LinkClickedNavigation
)
{
MessagesAdapter
.
openUrl
(
request
.
url
)
request
.
action
=
WebEngineView
.
IgnoreRequest
}
}
onLoadingChanged
:
{
if
(
loadRequest
.
status
==
WebEngineView
.
LoadSucceededStatus
)
{
messageWebView
.
runJavaScript
(
ClientWrapper
.
utilsAdaptor
.
getStyleSheet
(
...
...
This diff is collapsed.
Click to expand it.
src/messagesadapter.cpp
+
8
−
0
View file @
06fbda77
...
...
@@ -332,6 +332,14 @@ MessagesAdapter::openFile(const QString &arg)
}
}
void
MessagesAdapter
::
openUrl
(
const
QString
&
url
)
{
if
(
!
QDesktopServices
::
openUrl
(
url
))
{
qDebug
()
<<
"Couldn't open url: "
<<
url
;
}
}
void
MessagesAdapter
::
acceptFile
(
const
QString
&
arg
)
{
...
...
This diff is collapsed.
Click to expand it.
src/messagesadapter.h
+
1
−
0
View file @
06fbda77
...
...
@@ -49,6 +49,7 @@ public:
Q_INVOKABLE
void
sendFile
(
const
QString
&
message
);
Q_INVOKABLE
void
retryInteraction
(
const
QString
&
arg
);
Q_INVOKABLE
void
deleteInteraction
(
const
QString
&
arg
);
Q_INVOKABLE
void
openUrl
(
const
QString
&
url
);
Q_INVOKABLE
void
openFile
(
const
QString
&
arg
);
Q_INVOKABLE
void
acceptFile
(
const
QString
&
arg
);
Q_INVOKABLE
void
refuseFile
(
const
QString
&
arg
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment