Bug 1747375 - QDesktopServices::openUrl use deprecated call
Summary: QDesktopServices::openUrl use deprecated call
Keywords:
Status: CLOSED DUPLICATE of bug 1689616
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gvfs
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ondrej Holy
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-30 09:09 UTC by Frank Büttner
Modified: 2019-09-10 13:28 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-10 13:28:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Simple test case (10.00 KB, application/x-tar)
2019-09-02 08:49 UTC, Frank Büttner
no flags Details

Description Frank Büttner 2019-08-30 09:09:55 UTC
Description of problem:
Call that function, will result in an deprecation warning.

Version-Release number of selected component (if applicable):
qt5-qtbase-gui-5.9.2-3

How reproducible:
Every time

Steps to Reproduce:
call "QDesktopServices::openUrl(QUrl::fromLocalFile("/tmp/foo.pdf"));"
from C++ code to open an pdf file.

Actual results:
The pdf will loaded, but an warning will logged.

Expected results:
That the pdf will opening without an warning.


Additional info:
The warning:
This tool has been deprecated, use 'gio open' instead.
See 'gio help open' for more info

Comment 2 Jan Grulich 2019-08-30 09:18:00 UTC
Where do you get this warning from? This doesn't seem to come from Qt and from what I see QDesktopServices::openUrl(const QUrl &url) is not deprecated. It would't even make sense that Qt library would suggest to replace their API with gio.

Comment 3 Jan Grulich 2019-08-30 09:20:34 UTC
After some searching I found:
1) https://github.com/github/hub/issues/1473
2) https://github.com/texstudio-org/texstudio/issues/28

This indicates it's an issue in gvfs → reassigning.

Comment 4 Frank Büttner 2019-09-02 08:49:43 UTC
Created attachment 1610703 [details]
Simple test case

Here is an very simple test case for it.

Comment 5 Ondrej Holy 2019-09-10 13:28:20 UTC
This warning comes from "gvfs-open" which is superseded by "gio open". This wrapper is not part of newer releases at all. I don't know how QDesktopServices::openUrl() is implemented, but most probably it calls "xdg-open" which needs to be updated to use "gio open" if available...

*** This bug has been marked as a duplicate of bug 1689616 ***


Note You need to log in before you can comment on or make changes to this bug.