mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-26 08:18:08 +00:00
Fix Qt bug on FileDialog for Windows that prevented remote file to be used.
This commit is contained in:
parent
b900728003
commit
d1fa93995f
2 changed files with 10 additions and 3 deletions
|
|
@ -54,8 +54,15 @@ QSharedPointer<ContentModel> ContentListModel::add(std::shared_ptr<linphone::Con
|
|||
return contentModel;
|
||||
}
|
||||
|
||||
void ContentListModel::addFile(const QString& path){
|
||||
void ContentListModel::addFile(QString path){
|
||||
QFile file(path);
|
||||
#ifdef _WIN32
|
||||
// A bug from FileDialog suppose that the file is local and overwrite the uri by removing "\\".
|
||||
if (!file.exists()) {
|
||||
path.prepend("\\\\");
|
||||
file.setFileName(path);
|
||||
}
|
||||
#endif
|
||||
if (!file.exists())
|
||||
return;
|
||||
|
||||
|
|
@ -168,4 +175,4 @@ void ContentListModel::updateAllTransferData(){
|
|||
void ContentListModel::downloaded(){
|
||||
for(auto content : mList)
|
||||
content.objectCast<ContentModel>()->createThumbnail();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public:
|
|||
int count();
|
||||
|
||||
QSharedPointer<ContentModel> add(std::shared_ptr<linphone::Content> content);
|
||||
void addFile(const QString& path);
|
||||
void addFile(QString path);
|
||||
Q_INVOKABLE void remove(ContentModel * model);
|
||||
|
||||
void clear();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue