<div dir="ltr"><span id="m_-6906264229590155016goog_511391755"></span><span id="m_-6906264229590155016goog_511391756"></span>Here is how it looks like:<br><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://drive.google.com/file/d/0B6EoXZNf-QgTNVE5QmEtOU5JSEk/view?usp=drive_web" target="_blank" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_11_image_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">Screenshot from 2016-09-10 15-52-24.png</span></a></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-19 19:50 GMT+02:00 Paweł Wegner <span dir="ltr"><<a href="mailto:pawel.wegner95@gmail.com" target="_blank">pawel.wegner95@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
modules/gui/qt/components/<wbr>open_panels.cpp | 29 +++++++++++++++++++++++++----<br>
1 file changed, 25 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/modules/gui/qt/components/<wbr>open_panels.cpp b/modules/gui/qt/components/<wbr>open_panels.cpp<br>
index 2232dbe..db118e9 100644<br>
--- a/modules/gui/qt/components/<wbr>open_panels.cpp<br>
+++ b/modules/gui/qt/components/<wbr>open_panels.cpp<br>
@@ -1433,6 +1433,29 @@ public:<br>
{<br>
}<br>
};<br>
+<br>
+class CloudListDirectoryCallback : public cloudstorage::<wbr>IListDirectoryCallback {<br>
+public:<br>
+ CloudListDirectoryCallback(<wbr>DirectoryModel* model) : model(model)<br>
+ {<br>
+ }<br>
+<br>
+ void receivedItem(IItem::Pointer item) override<br>
+ {<br>
+ model->addItem(item);<br>
+ }<br>
+<br>
+ void done(const std::vector<IItem::Pointer>&) override<br>
+ {<br>
+ }<br>
+<br>
+ void error(const std::string&) override<br>
+ {<br>
+ }<br>
+<br>
+private:<br>
+ DirectoryModel* model;<br>
+};<br>
} // namespace<br>
<br>
CloudOpenPanel::<wbr>CloudOpenPanel( QWidget *parent, intf_thread_t *t ) :<br>
@@ -1535,11 +1558,9 @@ void CloudOpenPanel::itemClicked(<wbr>const QModelIndex& index)<br>
void CloudOpenPanel::listDirectory(<wbr>)<br>
{<br>
directoryModel.clear();<br>
+ std::unique_ptr<<wbr>CloudListDirectoryCallback> callback(new CloudListDirectoryCallback(&<wbr>directoryModel));<br>
listDirectoryRequest = currentProvider-><wbr>listDirectoryAsync(<wbr>currentDirectory,<br>
- [this](const std::vector<cloudstorage::<wbr>IItem::Pointer>& d) {<br>
- for (auto i : d)<br>
- directoryModel.addItem(i);<br>
- });<br>
+ std::move(callback));<br>
}<br>
<br>
void CloudOpenPanel::updateMRL()<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
</font></span></blockquote></div><br></div>