Results 1 to 2 of 2

Thread: Potential bug in QwwFileChooser::chooseFile() (of wwWidgets)?

  1. #1
    Join Date
    Aug 2008
    Posts
    14
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Potential bug in QwwFileChooser::chooseFile() (of wwWidgets)?

    Hello,

    I've begun using wwWidgets in a project (great library, by the way ), and I came across what I think might be a bug. In the QwwFileChooser::chooseFile() function, the case for QFileDialog::ExistingFile seems like it might be missing a break. Here is the code:

    Qt Code:
    1. case QFileDialog::ExistingFile:
    2. if (d->acceptMode==QFileDialog::AcceptOpen)
    3. path = QFileDialog::getOpenFileName(this, tr("Choose file"), text(), filter());
    4. else
    5. break;
    To copy to clipboard, switch view to plain text mode 

    In this case, after getOpenFileName() is called, there is no break, so the following case will also be executed, leading to two file dialogs being displayed, one after the other. Is this the intended behavior, or is it a bug?

    Also, there doesn't seem to be a difference between QFileDialog::AnyFile and QFileDialog::ExistingFile (in that they both make the same call to getOpenFileName(). Is this intentional? I realize this is still a work in progress, so I understand if it still needs some "love."

    I'm using version 0.9.6 of wwWidgets.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Potential bug in QwwFileChooser::chooseFile() (of wwWidgets)?

    Yes, that's a bug. You should remove the "else" keyword and it should work fine.

    There is a difference between AnyFile and ExistingFile. The former will also work in "Save" mode.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. wwWidgets
    By wysota in forum Qt-based Software
    Replies: 178
    Last Post: 7th October 2011, 20:12
  2. QtScript + wwWidgets
    By bunjee in forum Qt Programming
    Replies: 0
    Last Post: 25th May 2009, 22:30
  3. Replies: 4
    Last Post: 11th February 2009, 18:21
  4. Designer doesn't load wwWidgets plugin
    By reimer in forum Installation and Deployment
    Replies: 21
    Last Post: 7th February 2009, 03:23
  5. wwWidgets
    By omega36 in forum Qt Programming
    Replies: 4
    Last Post: 17th December 2008, 23:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.