Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paweł Wegner
libcloudstorage
Commits
690a9109
Commit
690a9109
authored
Jul 11, 2016
by
Paweł Wegner
Browse files
Cloudbrowser: bugfix.
parent
93dd9392
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/cloudbrowser/Window.cpp
View file @
690a9109
...
...
@@ -246,15 +246,17 @@ void Window::downloadFile(int item_id, QUrl path) {
ItemModel
::
ItemModel
(
IItem
::
Pointer
item
,
ICloudProvider
::
Pointer
p
,
Window
*
w
)
:
item_
(
item
),
provider_
(
p
),
window_
(
w
)
{
QString
id
=
(
p
->
name
()
+
"/"
+
item_
->
id
()).
c_str
();
connect
(
this
,
&
ItemModel
::
receivedImage
,
[
this
,
id
](
ImagePointer
image
)
{
window_
->
imageProvider
()
->
addImage
(
id
,
std
::
move
(
image
));
thumbnail_
=
"image://provider//"
+
id
;
emit
thumbnailChanged
();
});
connect
(
this
,
&
ItemModel
::
receivedImage
,
this
,
[
this
,
id
](
ImagePointer
image
)
{
window_
->
imageProvider
()
->
addImage
(
id
,
std
::
move
(
image
));
thumbnail_
=
"image://provider//"
+
id
;
emit
thumbnailChanged
();
},
Qt
::
QueuedConnection
);
}
void
ItemModel
::
fetchThumbnail
()
{
if
(
!
thumbnail_
.
isEmpty
()
)
return
;
if
(
thumbnail_
request_
)
return
;
QString
id
=
(
provider_
->
name
()
+
"/"
+
item_
->
id
()).
c_str
();
if
(
window_
->
imageProvider
()
->
hasImage
(
id
))
thumbnail_
=
"image://provider//"
+
id
;
...
...
Write
Preview
Supports
Markdown
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