Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-client-windows
Commits
625521e1
Commit
625521e1
authored
Dec 14, 2018
by
Isa
Committed by
Andreas Traczyk
Dec 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: set default download folder if not user-selected
Change-Id: If48532c1293de43ffb78113f53dc5a0e0befb3ac
parent
62b08ac1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mainwindow.cpp
mainwindow.cpp
+4
-2
messagewebview.cpp
messagewebview.cpp
+1
-3
No files found.
mainwindow.cpp
View file @
625521e1
...
...
@@ -287,8 +287,10 @@ MainWindow::readSettingsFromRegistry()
QSettings
settings
;
restoreGeometry
(
settings
.
value
(
SettingsKey
::
geometry
).
toByteArray
());
restoreState
(
settings
.
value
(
SettingsKey
::
windowState
).
toByteArray
());
LRCInstance
::
editableDataTransferModel
()
->
downloadDirectory
=
settings
.
value
(
SettingsKey
::
downloadPath
,
"Downloads"
).
toString
().
toStdString
()
+
"/"
;
LRCInstance
::
editableDataTransferModel
()
->
downloadDirectory
=
settings
.
value
(
SettingsKey
::
downloadPath
,
QStandardPaths
::
writableLocation
(
QStandardPaths
::
DownloadLocation
)).
toString
().
toStdString
()
+
"/"
;
if
(
not
settings
.
contains
(
SettingsKey
::
enableNotifications
))
{
settings
.
setValue
(
SettingsKey
::
enableNotifications
,
true
);
}
...
...
messagewebview.cpp
View file @
625521e1
...
...
@@ -284,10 +284,8 @@ PrivateBridging::acceptFile(const QString& arg)
auto
convUid
=
LRCInstance
::
getSelectedConvUid
();
LRCInstance
::
getCurrentConversationModel
()
->
getTransferInfo
(
interactionUid
,
info
);
auto
downloadsFolder
=
QSettings
().
value
(
SettingsKey
::
downloadPath
,
"Downloads"
).
toString
().
toStdString
()
+
"/"
;
// get full path
std
::
string
filename
=
downloadsFolder
.
c_str
();
std
::
string
filename
=
LRCInstance
::
dataTransferModel
().
downloadDirectory
.
c_str
();
if
(
!
filename
.
empty
()
&&
filename
.
back
()
!=
'/'
)
filename
+=
"/"
;
auto
wantedFilename
=
filename
+
info
.
displayName
;
...
...
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