Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved QSettings issue mingw32 vs. msvc

    General and Desktop
    3
    14
    1845
    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.
    • E
      Enrico last edited by

      Hi,
      Could someone please give me a hint on why I get access error when writing to a key in the registry, but only when my application is build with msvc (2013, havent tried others)
      If the application is build with mingw32 everything works as expected.
      The framework is the prebuild versions. 5.5.1 and 5.7.0

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        hi
        Thats pretty odd!
        both exe is named the same etc?

        Could VS make a manifest file that changes something and mingw will not?

        1 Reply Last reply Reply Quote 0
        • E
          Enrico last edited by

          Hi,
          Actually have only tried compiling in debug mode and runned in debugmode from QtCreator.

          But I guess it will give same result in release mode.

          I discovered the issue when building a DLL which should be able to access the same key. (That DLL is build with msvc)
          I then tryed building the other application with msvc, and found same issue.

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @Enrico last edited by

            @Enrico
            it possible to reproduce with small sample?
            Could be bug :)

            1 Reply Last reply Reply Quote 0
            • E
              Enrico last edited by

              Made a simple sample, you can get i here www.daniac.dk/QSettingsTest.zip

              Exact same issue here, might be a bug

              mrjj 1 Reply Last reply Reply Quote 1
              • mrjj
                mrjj Lifetime Qt Champion @Enrico last edited by

                @Enrico
                hi
                i tried mingw on win 10. no messages. ( as expected)

                then i tried
                windows 7, visual studio 2013 , 32 bit
                and no messages also?

                both Qt 5.5.1/ 5.7

                let me try 5.7 in VS.
                and see if it makes any difference.

                1 Reply Last reply Reply Quote 0
                • E
                  Enrico last edited by

                  Sorry but when you say no messages.

                  The only messages is from qDebug()

                  Have changed the sample to show the results in a plaintext box - Sorry

                  mrjj 1 Reply Last reply Reply Quote 0
                  • mrjj
                    mrjj Lifetime Qt Champion @Enrico last edited by

                    @Enrico
                    oh, i expected some window dialog to pop up saying access denied :)

                    so what is the sign of error im looking for ?

                    1 Reply Last reply Reply Quote 0
                    • E
                      Enrico last edited by Enrico

                      I have modified and updated the sample with a plaintextedit showwing the results - Sorry

                      mingw32 - Output:
                      Getting MyNewPort value:COM2
                      Setting MyNewPort=COM2 status:0 <- Success
                      Getting MyNewPort value:COM2

                      msvc - Output:
                      Getting MyNewPort value:default <- Failed reading also
                      Setting MyNewPort=COM2 status:1 <- Failed writing
                      Getting MyNewPort value:default <- Failed reading also

                      mrjj 1 Reply Last reply Reply Quote 0
                      • mrjj
                        mrjj Lifetime Qt Champion @Enrico last edited by mrjj

                        @Enrico
                        hi
                        sorry for the delay

                        win 7, vs 2013 , Qt 5.7

                        I get
                        Getting MyNewPort value:default
                        Setting MyNewPort=COM2 status:1
                        Getting MyNewPort value:default

                        so failed. ( thx @VRonin )

                        mingw
                        Getting MyNewPort value:COM2
                        Setting MyNewPort=COM2 status:0
                        Getting MyNewPort value:COM2

                        VRonin 1 Reply Last reply Reply Quote 0
                        • VRonin
                          VRonin @mrjj last edited by

                          @mrjj status: 1 = fail

                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                          ~Napoleon Bonaparte

                          On a crusade to banish setIndexWidget() from the holy land of Qt

                          mrjj 1 Reply Last reply Reply Quote 0
                          • mrjj
                            mrjj Lifetime Qt Champion @VRonin last edited by

                            @VRonin
                            thx. need more coffee :)
                            so sample did fail :)

                            Can anyone else try the sample with VS compiler
                            and say if they get same result before we call it a bug :)

                            1 Reply Last reply Reply Quote 0
                            • VRonin
                              VRonin last edited by

                              MSVC2013 win 7 Qt 5.5.1 and 5.7.0 both 32 and 64 bit versions all failing

                              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                              ~Napoleon Bonaparte

                              On a crusade to banish setIndexWidget() from the holy land of Qt

                              1 Reply Last reply Reply Quote 1
                              • E
                                Enrico last edited by

                                I have filed a bug
                                https://bugreports.qt.io/browse/QTBUG-55257

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