QFileDialog does not honor QCoreApplication settings



  • Hello,

    I created a QtGui application via QtCreator template.
    I added this in the main.cpp:
    @QCoreApplication::setOrganizationName("testName");
    QCoreApplication::setOrganizationDomain("testOrganizationDomain");
    QCoreApplication::setApplicationName("testApplicationName");@

    and this in MainWindows constructor:
    @
    QString hello = "Hello, world!";
    settings.setValue("Welcome", hello);
    hello = "";
    hello = settings.value("Welcome").toString();
    qDebug() << hello; // this prints "Hello, world!"
    @
    this writes the settings to
    @~/Library/Preferences/com.testorganizationdomain.testApplicationName.plist@
    when running the app (I'm on mac)

    when adding a FileDialog via
    @
    QString tempFilePath = QFileDialog::getOpenFileName(this);
    @
    running the app and closing the file dialog, I have a new settings file at:
    @~/Library/Preferences/com.yourcompany.FileProblem@
    where FileProblem is the Targets name. The content is the last accessed directory with the key
    @NSNavLastRootDirectory@
    I think this is the wrong behavior. Shouldn't the key be appended to the existing preferences?

    I'm on OS X, 10.7.1, running the last SDK 1.1.3. I know, that this OS is not supported, but I don't think that this is different on other platforms. Sorry but don't have a SnowLeopard machine around.

    Regards,
    Christian



  • You should open an issue on the "bug tracker:"http://bugreports.qt.nokia.com/, this way you ensure that the developers are aware of the problem. If you can provide a complete example, it's more likely that the issue is fixed quickly :-)

    Please report back the issue id here, so that others can look for the progress.



  • Created a bugreport as suggested. Link here:
    https://bugreports.qt.nokia.com/browse/QTBUG-21399

    Regards,
    chrisQT



  • Thank's - I voted for it, may it raise the priority a bit :-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.