void FileChooser::openFileChooser(Document* doc)
{
    Page *page = doc->page();
    Frame *frame = doc->frame();
    if (!page || !frame)
        return;

    FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(frame->loader()->client());
    if (!fl)
        return;

    QString f = fl->chooseFile(m_filename);
    if (!f.isEmpty())
        chooseFile(f);
}