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. QFileSystemWatcher's signal "directoryChanged" not emitted

QFileSystemWatcher's signal "directoryChanged" not emitted

Scheduled Pinned Locked Moved Unsolved General and Desktop
qfilesystemwatcwindows10
43 Posts 5 Posters 17.3k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #6

    Like suggested in both report, please provide a minimal compilable example.

    For it has two purposes: see what code triggers the problem and allows to build the example on other platforms.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    S 2 Replies Last reply
    1
    • SGaistS SGaist

      Like suggested in both report, please provide a minimal compilable example.

      For it has two purposes: see what code triggers the problem and allows to build the example on other platforms.

      S Offline
      S Offline
      stephane78
      wrote on last edited by
      #7

      @SGaist I have now uploaded a minimal project to test and display directorychange and filechange but it is not complete because it does'nt add the paths to watcher when adding new path....
      we use Qt -LGPL in our little company and (at home for personal projects)
      if our company buy a commercial license for three months, will be the two bugs be corrected ?

      1 Reply Last reply
      0
      • SGaistS SGaist

        Like suggested in both report, please provide a minimal compilable example.

        For it has two purposes: see what code triggers the problem and allows to build the example on other platforms.

        S Offline
        S Offline
        stephane78
        wrote on last edited by
        #8

        @SGaist if this project is not sufficient I will perhaps provide the whole code but this code belongs to my company......
        Buying a commercial license will perhaps help us to solve the two bugs?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #9

          Paying customer bug will have more weight however I don't know how fast it will make things. I'm not working for the Qt Company and can't comment on such matter.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by VRonin
            #10

            Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

            Did you try if other environments are affected too? Any linux distribution for example?

            "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

            S 7 Replies Last reply
            1
            • VRoninV VRonin

              Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

              Did you try if other environments are affected too? Any linux distribution for example?

              S Offline
              S Offline
              stephane78
              wrote on last edited by stephane78
              #11

              @VRonin I didn't try all the OS, but I can later, but under linux there isn't any difference between del and shift+del like under windows (because I tested that with del under win10 so when you put the folder in the trashcan, but did'nt test really with shift+del...I think with shift+del under win7 it is ok but not sure 100%
              I will do more test so....
              but I have already looked at the code of QFile SystemWatcher for one year because of the older bug and I don't really understand it....if I could understand it I would have made myself the correction.I will try again to look at the code of QFileSystemWatcher

              1 Reply Last reply
              0
              • VRoninV VRonin

                Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

                Did you try if other environments are affected too? Any linux distribution for example?

                S Offline
                S Offline
                stephane78
                wrote on last edited by
                #12

                @VRonin OK there is the same problem under linux debian 8 with kde.when you move to thrash a subdirectory watched the signal directorychanged is not emitted and when you delete it with shift+del the signal is emitted...I have just tested now
                under windows 7 I can only delete with shift+del it doesn't allow me to delete with del so there isn't any problem
                I didn't test under mac os

                1 Reply Last reply
                0
                • VRoninV VRonin

                  Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

                  Did you try if other environments are affected too? Any linux distribution for example?

                  S Offline
                  S Offline
                  stephane78
                  wrote on last edited by stephane78
                  #13

                  @VRonin I have looked quickly at the source code of QFileSystemWatcher....(Qt5.6.2)
                  first I don't find the definition of init() and initPollerEngine() of the class QFileSystemWatcherPrivate (qfilesystemwatcher_p.h) that are called in the constructor of QFileSystemWatcher and in the method addPaths.
                  second, I have seen that there is a thread that derivate from QThread for windows, QWindowsFileSystemWatcherEngineThread, and the method run is redefinited l332 in qfilesystemwatcher_win.cpp,so that I understand it but don't understand all the details in the method run...

                  1 Reply Last reply
                  0
                  • VRoninV VRonin

                    Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

                    Did you try if other environments are affected too? Any linux distribution for example?

                    S Offline
                    S Offline
                    stephane78
                    wrote on last edited by
                    #14

                    @VRonin I have seen where it emits the signal directoryChanged when the directory is deleted l.388 and l.385 I see if(fakeRemove||!fileInfo.exists()) but I don't understand the other things well.....

                    1 Reply Last reply
                    0
                    • VRoninV VRonin

                      Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

                      Did you try if other environments are affected too? Any linux distribution for example?

                      S Offline
                      S Offline
                      stephane78
                      wrote on last edited by
                      #15

                      @VRonin I have looked too at the win32 functions findfirstchangenotification (used l.160) and find nextchangenotification (used l.364)....I think I must use a debug version of Qt to debug that because perhaps there is no change notification on the handle when we use a simple del to delete a directory ie send it to trashcan(without shift) ?

                      1 Reply Last reply
                      0
                      • VRoninV VRonin

                        Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

                        Did you try if other environments are affected too? Any linux distribution for example?

                        S Offline
                        S Offline
                        stephane78
                        wrote on last edited by
                        #16

                        @VRonin or perhaps the error l.367 is another error than ERROR_ACCESS_DENIED that should be considered too and the that fakeRemove should be put to true too (or another boolean )

                        1 Reply Last reply
                        0
                        • VRoninV VRonin

                          Might be worth you looking directly at the source code, see if you can get it sorted yourself, and submit a patch.

                          Did you try if other environments are affected too? Any linux distribution for example?

                          S Offline
                          S Offline
                          stephane78
                          wrote on last edited by stephane78
                          #17

                          @VRonin what are the other errors of FindNextChangeNotification?didn't find them in the win32 msdn documentation.
                          And I don't really know how to do debug of Qt ? because it is in QtCore,so I suppose I must take the project and source of QtCore, but my test project use not only QtCore but QtGui and QtWidget too....

                          1 Reply Last reply
                          0
                          • VRoninV Offline
                            VRoninV Offline
                            VRonin
                            wrote on last edited by
                            #18

                            I'll take a quick look and see if I can spot something in the source, no promises though

                            "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

                            S 2 Replies Last reply
                            0
                            • VRoninV VRonin

                              I'll take a quick look and see if I can spot something in the source, no promises though

                              S Offline
                              S Offline
                              stephane78
                              wrote on last edited by
                              #19

                              @VRonin Thank you vronin, do you know how I can debug QtCore (or corelib or io) with my test project synchro as executable with QtCreator and mingw-w64(the compiler of qt.io).I suppose I must take the source (single,the .zip) but don't really know how to do that.my project synchro uses core,gui and widget but I suppose I must open corelib or io as project in QtCreator

                              1 Reply Last reply
                              0
                              • VRoninV VRonin

                                I'll take a quick look and see if I can spot something in the source, no promises though

                                S Offline
                                S Offline
                                stephane78
                                wrote on last edited by stephane78
                                #20

                                @VRonin do you know how to get the version 5.6.2 of qtbase from code.qt.io with git? (to build it in debug and try to debug corelib)

                                1 Reply Last reply
                                0
                                • VRoninV Offline
                                  VRoninV Offline
                                  VRonin
                                  wrote on last edited by
                                  #21

                                  Just clone the repository and check out the 5.6 branch

                                  "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

                                  S 6 Replies Last reply
                                  1
                                  • VRoninV VRonin

                                    Just clone the repository and check out the 5.6 branch

                                    S Offline
                                    S Offline
                                    stephane78
                                    wrote on last edited by
                                    #22

                                    @VRonin ok thanks vronin...

                                    1 Reply Last reply
                                    0
                                    • VRoninV VRonin

                                      Just clone the repository and check out the 5.6 branch

                                      S Offline
                                      S Offline
                                      stephane78
                                      wrote on last edited by
                                      #23

                                      @VRonin it is done.but to debug qfilesystemwatcher should I open corelib.pro in QtCreator (QtCore) and build it debug and put breakpoints and attach to my app synchro ?

                                      1 Reply Last reply
                                      0
                                      • VRoninV VRonin

                                        Just clone the repository and check out the 5.6 branch

                                        S Offline
                                        S Offline
                                        stephane78
                                        wrote on last edited by stephane78
                                        #24

                                        @VRonin I want to put a breakpoint l.364 of QFileSystemWatcher_win.cpp and watch error l365

                                        1 Reply Last reply
                                        0
                                        • VRoninV VRonin

                                          Just clone the repository and check out the 5.6 branch

                                          S Offline
                                          S Offline
                                          stephane78
                                          wrote on last edited by
                                          #25

                                          @VRonin there is "attach to unstarted application" and "debug an external application" in Qtcreator\debug. is it possible to use one this option to debug QtCore (corelib) with my app synchro.exe ?

                                          1 Reply Last reply
                                          0

                                          • Login

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