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
21b0e5ee
Commit
21b0e5ee
authored
4 years ago
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
filetransfer: adjust the url decoding for qml component file urls
Gitlab:
#92
Change-Id: I10ae359b26c70cacdb1e1168658678f3f5b2a96e
parent
2cb49217
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/CallViewContextMenu.qml
+1
-4
1 addition, 4 deletions
src/mainview/components/CallViewContextMenu.qml
src/messagesadapter.cpp
+5
-5
5 additions, 5 deletions
src/messagesadapter.cpp
src/utilsadapter.cpp
+3
-0
3 additions, 0 deletions
src/utilsadapter.cpp
with
9 additions
and
9 deletions
src/mainview/components/CallViewContextMenu.qml
+
1
−
4
View file @
21b0e5ee
...
...
@@ -149,10 +149,7 @@ Item {
mode
:
JamiFileDialog
.
Mode
.
OpenFile
onAccepted
:
{
// No need to trim file:///.
AvAdapter
.
shareFile
(
jamiFileDialog
.
file
)
}
onAccepted
:
AvAdapter
.
shareFile
(
jamiFileDialog
.
file
)
}
Component.onCompleted
:
{
...
...
This diff is collapsed.
Click to expand it.
src/messagesadapter.cpp
+
5
−
5
View file @
21b0e5ee
...
...
@@ -264,9 +264,9 @@ MessagesAdapter::sendImage(const QString& message)
QString
msg
(
message
);
#ifdef Q_OS_WIN
msg
=
msg
.
replace
(
"file://
/
"
,
""
);
msg
=
msg
.
replace
(
"file://"
,
""
);
#else
msg
=
msg
.
replace
(
"file://
/
"
,
"/"
);
msg
=
msg
.
replace
(
"file://"
,
"/"
);
#endif
QFileInfo
fi
(
msg
);
QString
fileName
=
fi
.
fileName
();
...
...
@@ -337,7 +337,7 @@ MessagesAdapter::deleteInteraction(const QString& arg)
void
MessagesAdapter
::
openFile
(
const
QString
&
arg
)
{
QUrl
fileUrl
(
"file://
/
"
+
arg
);
QUrl
fileUrl
(
"file://"
+
arg
);
if
(
!
QDesktopServices
::
openUrl
(
fileUrl
))
{
qDebug
()
<<
"Couldn't open file: "
<<
fileUrl
;
}
...
...
@@ -399,9 +399,9 @@ MessagesAdapter::pasteKeyDetected()
*/
for
(
int
i
=
0
;
i
<
urlList
.
size
();
++
i
)
{
/*
* Trim file://
/
from url.
* Trim file:// from url.
*/
QString
filePath
=
urlList
.
at
(
i
).
toString
().
remove
(
0
,
8
);
QString
filePath
=
urlList
.
at
(
i
).
toString
().
remove
(
"file://"
);
QByteArray
imageFormat
=
QImageReader
::
imageFormat
(
filePath
);
/*
...
...
This diff is collapsed.
Click to expand it.
src/utilsadapter.cpp
+
3
−
0
View file @
21b0e5ee
...
...
@@ -353,6 +353,9 @@ UtilsAdapter::toFileAbsolutepath(QString inputFileName)
QString
UtilsAdapter
::
getAbsPath
(
QString
path
)
{
// Note: this function is used on urls returned from qml-FileDialogs which
// contain 'file:///' for reasons we don't understand.
// TODO: this logic can be refactored into the JamiFileDialog component.
#ifdef Q_OS_WIN
return
path
.
replace
(
"file:///"
,
""
).
replace
(
"
\n
"
,
""
).
replace
(
"
\r
"
,
""
);
#else
...
...
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