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. QSettings issue mingw32 vs. msvc

QSettings issue mingw32 vs. msvc

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 3 Posters 2.2k Views
  • 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 Offline
    E Offline
    Enrico
    wrote on last edited by
    #1

    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
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • E Offline
        E Offline
        Enrico
        wrote on last edited by
        #3

        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.

        mrjjM 1 Reply Last reply
        0
        • E Enrico

          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.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Enrico
            wrote on last edited by
            #5

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

            Exact same issue here, might be a bug

            mrjjM 1 Reply Last reply
            1
            • E Enrico

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

              Exact same issue here, might be a bug

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @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
              0
              • E Offline
                E Offline
                Enrico
                wrote on last edited by
                #7

                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

                mrjjM 1 Reply Last reply
                0
                • E Enrico

                  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

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @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
                  0
                  • E Offline
                    E Offline
                    Enrico
                    wrote on last edited by Enrico
                    #9

                    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

                    mrjjM 1 Reply Last reply
                    0
                    • E 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

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by mrjj
                      #10

                      @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

                      VRoninV 1 Reply Last reply
                      0
                      • mrjjM 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

                        VRoninV Offline
                        VRoninV Offline
                        VRonin
                        wrote on last edited by
                        #11

                        @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

                        mrjjM 1 Reply Last reply
                        0
                        • VRoninV VRonin

                          @mrjj status: 1 = fail

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @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
                          0
                          • VRoninV Offline
                            VRoninV Offline
                            VRonin
                            wrote on last edited by
                            #13

                            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
                            1
                            • E Offline
                              E Offline
                              Enrico
                              wrote on last edited by
                              #14

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

                              1 Reply Last reply
                              1

                              • Login

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