Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

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

    General and Desktop
    4
    7
    2842
    Loading More Posts
    • 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.
    • P
      pratik041 last edited by

      Like limitation in file size or portability.

      Pratik Agrawal

      1 Reply Last reply Reply Quote 0
      • G
        goetz last edited by

        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 :-)

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

        1 Reply Last reply Reply Quote 0
        • P
          pratik041 last edited by

          [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?

          Pratik Agrawal

          1 Reply Last reply Reply Quote 0
          • G
            goetz last edited by

            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.

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

            1 Reply Last reply Reply Quote 0
            • P
              pratik041 last edited by

              [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.

              Pratik Agrawal

              1 Reply Last reply Reply Quote 0
              • V
                veeeee_d last edited by

                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".

                1 Reply Last reply Reply Quote 0
                • F
                  fluca1978 last edited by

                  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).

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post