Bug 570090 - Qt application uses KDE file dialog, which doesn't work properly
Summary: Qt application uses KDE file dialog, which doesn't work properly
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kdebase-workspace
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-03 09:12 UTC by Jeremy Sanders
Modified: 2010-03-13 02:02 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-03-13 02:02:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 229375 0 None None None Never

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)
dialog.setFilters(filters)
dialog.selectFilter(filt)

where
 filters=['Encapsulated Postscript (*.eps)', 'Portable Network Graphics (*.png)', 'Jpeg bitmap (*.jpg)', 'Windows bitmap (*.bmp)', 'Portable Document Format (*.pdf)', 'Scalable Vector Graphics (*.svg)']
and
 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
https://fedoraproject.org/wiki/BugZappers


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