Results 1 to 2 of 2

Thread: QSettings own memory for earch app execution

  1. #1
    Join Date
    Sep 2009
    Location
    Warsaw/Poland
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSettings own memory for earch app execution

    Hello,

    I've got problem. I'm using QSettings in my app and everything is ok when my app is running only ones. But when I run my app more than one, second (and next) app is reading settings from first app.
    What should I do if I want run my app more than one and each running app need their own QSettings memory ?

    Maybe I need change application name (or/and setOrganizationName) to random for every execution ?
    Qt Code:
    1. QCoreApplication::setApplicationName("xyz-random");
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QSettings own memory for earch app execution

    Don't use a persistent shared data store for the settings if they are temporary and not to be shared. If you randomise the application name as you are suggesting then you will be leaving behind a trail of rubbish data in the system registry/configuration file areas. You won't be able to use them between runs anyway.

Similar Threads

  1. Replies: 1
    Last Post: 14th January 2011, 11:57
  2. Lib not found in execution.
    By Netich in forum Installation and Deployment
    Replies: 6
    Last Post: 30th October 2009, 14:28
  3. execution in QT
    By adamatic in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2009, 08:12
  4. Migrate Qt3 QSettings to Qt4 QSettings
    By hvengel in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2008, 03:21
  5. execution of slots
    By smalls in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2006, 19:38

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.