Bug 570090

Summary: Qt application uses KDE file dialog, which doesn't work properly
Product: [Fedora] Fedora Reporter: Jeremy Sanders <jss>
Component: kdebase-workspaceAssignee: Than Ngo <than>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: fedora, fedora, jreznik, kevin, lorenzo, ltinkl, rdieter, smparrish, than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-13 02:02:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeremy Sanders 2010-03-03 09:12:21 UTC
Description of problem:
My Qt (PyQt) application, Veusz, now appears to use a KDE file dialog when exporting files with the updated Qt 4.6. I assume this is a patch to the Qt Fedora supplies.

This dialog is okay, but it appears to now work correctly when selecting filters. The application tries to use the same filter as last time, but the dialog is not responding to the selectFilter request.

My application does something like

dialog = QFileDialog(parent)

 filters=['Encapsulated Postscript (*.eps)', 'Portable Network Graphics (*.png)', 'Jpeg bitmap (*.jpg)', 'Windows bitmap (*.bmp)', 'Portable Document Format (*.pdf)', 'Scalable Vector Graphics (*.svg)']
 filt='Portable Document Format (*.pdf)'

setFilters and selectFilter don't appear in the API docs for Qt 4.6, but did for Qt 4.2. They do not appear to be deprecated.

The list of filters is set in the dialog, but the selectFilter call appears not to work.

Version-Release number of selected component (if applicable): qt-4.6.2-1.fc12.i686

How reproducible:
Every time

Steps to Reproduce:
1. Install veusz
2. Try to export PDF document in veusz
3. Try again, notice that it does not select the PDF filter in the export dialog.

Comment 1 Jeremy Sanders 2010-03-03 09:35:22 UTC
I've tried the new api, setNameFilter and setNameFilters, and these work okay. It would be good to have a completely compatible file dialog.

I've also discovered another fairly serious issue.

My application sets the directory for the dialog using dialog.setDirectory(somedir), where somedir is like '/data/jss/veusz/code/veusz'. The KDE file dialog in Fedora's Qt 4.6 displays the contents of the parent directory of this directory, not the directory itself. The Qt docs say this call "Sets the file dialog's current directory."

Comment 2 Jeremy Sanders 2010-03-03 11:37:07 UTC
Sorry - another problem. The new file dialog doesn't make the parent window go dark under kwin with compositing switched on. It makes it rather hard to see which window is the parent window.

Comment 3 Jeremy Sanders 2010-03-04 10:09:06 UTC
I've changed this to kde-workspace, as Kevin Kofler says this is provided by /usr/lib(64)/kde4/plugins/gui_platform/libkde.so

I've also filed an upstream bug: https://bugs.kde.org/show_bug.cgi?id=229375

Comment 4 Steven M. Parrish 2010-03-13 02:02:49 UTC
Thank you for taking the time to report this issue to us. 

We will continue to track the issue in the centralized upstream bug tracker, and will review any bug fixes that become available for consideration in future updates.

Thank you for the bug report.

Steven M. Parrish
KDE & Packagekit Triager 
Fedora Bugzappers volunteer triage team