Closed Bug 626632 Opened 10 years ago Closed 10 years ago

nsFilePicker is broken in qt desktop

Categories

(Core Graveyard :: Widget: Qt, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tatiana, Assigned: tatiana)

Details

Attachments

(2 files, 1 obsolete file)

Attached image broken_file_dialog.png
Open qt desktop Firefox build

File -> Open File

EXPECTED:
file dialog

ACTUAL:
broken_file_dialog.png
Attached patch patch (obsolete) — Splinter Review
I don't see any reason to embed QFileDialog with QGraphicsProxyWidget creature
Assignee: nobody → tanya.meshkova
Status: NEW → ASSIGNED
Attachment #504698 - Flags: review?(romaxa)
Comment on attachment 504698 [details] [diff] [review]
patch


>+    MozQWidget *parentMozWidget = static_cast<MozQWidget*>(parent->GetNativeData(NS_NATIVE_WIDGET));
GetNativeData may return null...
check for null, add NS_WARNING and set parentWidget = 0 if parentMozWidget == null
>+    QWidget *parentWidget = parentMozWidget->getReceiver()->GetViewWidget();
>+
>-    }
>+    mDialog = new QFileDialog(parentWidget, QString::fromUtf16(str.get()));
>
Attachment #504698 - Flags: review?(romaxa) → review-
Attached patch patch v2Splinter Review
Attachment #504698 - Attachment is obsolete: true
Attachment #504709 - Flags: review?(romaxa)
Comment on attachment 504709 [details] [diff] [review]
patch v2

By checking different implementations, I noticed that all other ports are creating Dialogs in ::Show function and in ::InitNative function it is remembering parent, title...

Don't know exactly why it is done this way, but probably it make sense for Qt port do similar implementation...
Attachment #504709 - Flags: review?(romaxa) → review+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/3a9a6b749df6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.