Is their any limitation in using INI file for crossplatform application in Qsetting class?



  • Like limitation in file size or portability.



  • No, theres is no limit, as the code for reading/writing .ini files is the same on all platforms. Size is only restricted by the maximum file size supported by the filesystem in use, but if you run into that limit, you should seriously consider another design for storing the data :-)



  • [quote author="Volker" date="1322829270"]No, theres is no limit, as the code for reading/writing .ini files is the same on all platforms. Size is only restricted by the maximum file size supported by the filesystem in use, but if you run into that limit, you should seriously consider another design for storing the data :-)[/quote]
    "filesystem in use" means how can we know what is the limit of that file?



  • If you run into the limits of a file system, which is usually 2GB or more, you should seriously consider using another storage engine for your data instead of QSettings.

    To know the limits, use Google and search for ext2, ext3, ext4, fat, ntfs, hfs+ or whatever file system you're using.



  • [quote author="Volker" date="1322830102"]If you run into the limits of a file system, which is usually 2GB or more, you should seriously consider using another storage engine for your data instead of QSettings.

    To know the limits, use Google and search for ext2, ext3, ext4, fat, ntfs, hfs+ or whatever file system you're using.[/quote]
    oh but i think that much it will never reached.



  • Volker was just kidding. The current file systems accept really large files. He meant that a .ini file is a regular file like any other, and you can use it so that Qt will store your data in a regular fashion across platforms and you won't suffer any consequence.
    More precisely, he answered your initial question with a "no".



  • By the way, if you will hit some limit (maybe an embedded device) you can store in a ini file names or paths to reach and load other specific ini files. But as stated in this thread, you will never hit the ini file size unles you use it in an improper way (e.g., storing large strings as user data).


Log in to reply
 

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