Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
65bfcb98
Commit
65bfcb98
authored
May 05, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/app/App): add a `convertUrlToLocalPath` function
parent
be46f8cf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
10 deletions
+11
-10
App.cpp
linphone-desktop/src/app/App.cpp
+4
-0
App.hpp
linphone-desktop/src/app/App.hpp
+2
-0
ChatModel.cpp
linphone-desktop/src/components/chat/ChatModel.cpp
+1
-6
main.cpp
linphone-desktop/src/main.cpp
+1
-1
FileMessage.qml
linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml
+1
-1
ContactEdit.js
linphone-desktop/ui/views/App/Main/ContactEdit.js
+2
-2
No files found.
linphone-desktop/src/app/App.cpp
View file @
65bfcb98
...
...
@@ -261,6 +261,10 @@ void App::smartShowWindow (QQuickWindow *window) {
window
->
requestActivate
();
}
QString
App
::
convertUrlToLocalPath
(
const
QUrl
&
url
)
{
return
QDir
::
toNativeSeparators
(
url
.
toLocalFile
());
}
// -----------------------------------------------------------------------------
bool
App
::
hasFocus
()
const
{
...
...
linphone-desktop/src/app/App.hpp
View file @
65bfcb98
...
...
@@ -71,6 +71,8 @@ public:
Q_INVOKABLE
static
void
smartShowWindow
(
QQuickWindow
*
window
);
Q_INVOKABLE
static
QString
convertUrlToLocalPath
(
const
QUrl
&
url
);
public
slots
:
void
quit
();
...
...
linphone-desktop/src/components/chat/ChatModel.cpp
View file @
65bfcb98
...
...
@@ -428,12 +428,7 @@ void ChatModel::downloadFile (int id, const QString &downloadPath) {
return
;
}
message
->
setFileTransferFilepath
(
::
Utils
::
qStringToLinphoneString
(
downloadPath
.
startsWith
(
"file://"
)
?
downloadPath
.
mid
(
sizeof
(
"file://"
)
-
1
)
:
downloadPath
)
);
message
->
setFileTransferFilepath
(
::
Utils
::
qStringToLinphoneString
(
downloadPath
));
message
->
setListener
(
mMessageHandlers
);
if
(
message
->
downloadFile
()
<
0
)
...
...
linphone-desktop/src/main.cpp
View file @
65bfcb98
...
...
@@ -98,6 +98,6 @@ int main (int argc, char *argv[]) {
// ---------------------------------------------------------------------------
app
.
initContentApp
();
qInfo
()
<<
"Running app..."
;
qInfo
()
<<
QStringLiteral
(
"Running app..."
)
;
return
app
.
exec
();
}
linphone-desktop/ui/modules/Linphone/Chat/FileMessage.qml
View file @
65bfcb98
...
...
@@ -186,7 +186,7 @@ Row {
selectExisting
:
false
title
:
qsTr
(
'
downloadFileTitle
'
)
onAccepted
:
proxyModel
.
downloadFile
(
index
,
fileUrl
)
onAccepted
:
proxyModel
.
downloadFile
(
index
,
App
.
convertUrlToLocalPath
(
fileUrl
)
)
}
anchors.fill
:
parent
...
...
linphone-desktop/ui/views/App/Main/ContactEdit.js
View file @
65bfcb98
...
...
@@ -117,8 +117,8 @@ function cancel () {
// -----------------------------------------------------------------------------
function
setAvatar
(
path
)
{
contactEdit
.
_vcard
.
avatar
=
path
.
match
(
/^
(?:
file:
\/\/)?(
.*
)
$/
)[
1
]
function
setAvatar
(
url
)
{
contactEdit
.
_vcard
.
avatar
=
Linphone
.
App
.
convertUrlToLocalPath
(
url
)
}
function
setUsername
(
username
)
{
...
...
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