Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog does not honor QCoreApplication settings
Forum Updated to NodeBB v4.3 + New Features

QFileDialog does not honor QCoreApplication settings

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chrisQT
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      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.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chrisQT
        wrote on last edited by
        #3

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

        Regards,
        chrisQT

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

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

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved