Results 1 to 3 of 3

Thread: QFileSystemWatcher on linux

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QFileSystemWatcher on linux

    Hello,
    I have a problem with QFileSystemWatcher on Linux (Debian - kernel 2.6.32-5-amd64, Qt: 4.7.3 ).
    The problem is that after signal fileChanged(QString) is emited path, to the file that was changed, is automatically removed without my ingerention. This didn't happened on Win.

    Am I missing here something obvious or this is standard behavior or bug?
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  2. #2
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QFileSystemWatcher on linux

    Hello Talei, I don't seem to get where 'is automatically removed' refers to. Does it refer to the file?
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  3. #3
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QFileSystemWatcher on linux

    Situation is as fallow:
    1. QFileSystemWatcher addPath( "some file path" ) addPath( "some directory path" )
    2. file is edited signal is emited
    3. in slot, connected to the signal, QFileSystemWatcher clears file list (not directory list)

    qDebgu() output in slots

    Qt Code:
    1. Adding path to QFileSystemWatcher files: ("/home/userName/test.txt") directories: ("/home/userName/")
    2.  
    3. qDebug() for QFileSystemWatcher::files() and directories()
    4.  
    5. in slot directoryChangedSlot(QString dir) files(): ("/home/userName/test.txt") directories: ("/home/userName/")
    6. in slot fileChangedSlot(QString file) files(): () directories: ("/home/userName/")
    7. in slot directoryChangedSlot(QString dir) files(): () directories: ("/home/userName/")
    To copy to clipboard, switch view to plain text mode 

    QFileSystemWatcher clears files() list after emits signal fileChanged(QString), but don't remove directories!
    And ofcourse I don't use anywhere removePath()! test app uses only qDebug() and adPath().
    Question is why?

    Compiled with Qt 4.8.0 RC.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

Similar Threads

  1. Problem with QFileSystemWatcher?
    By arbi in forum Qt Programming
    Replies: 3
    Last Post: 29th March 2012, 07:57
  2. QFIleSystemWatcher
    By jayreddy in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2009, 08:21
  3. QFileSystemWatcher
    By Kumosan in forum Qt Programming
    Replies: 2
    Last Post: 18th March 2008, 20:52
  4. QFileSystemWatcher
    By minty in forum Qt Programming
    Replies: 13
    Last Post: 22nd May 2007, 15:39
  5. Need help with QFileSystemWatcher
    By L.Marvell in forum Qt Programming
    Replies: 1
    Last Post: 18th August 2006, 13:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.