-rw-r--r-- | libopie2/opiecore/linux/ofilenotify.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiecore/linux/ofilenotify.h | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/libopie2/opiecore/linux/ofilenotify.cpp b/libopie2/opiecore/linux/ofilenotify.cpp index a7820ee..68c5a96 100644 --- a/libopie2/opiecore/linux/ofilenotify.cpp +++ b/libopie2/opiecore/linux/ofilenotify.cpp @@ -238,2 +238,4 @@ bool OFileNotification::activate( const OFileNotificationEvent* e ) + //FIXME: Should we really deliver QueueOverflow and/or Ignore to user level code? + // dumb signal @@ -261,2 +263,4 @@ bool OFileNotification::activate( const OFileNotificationEvent* e ) case Unmount: emit unmounted( _path ); break; + case _QueueOverflow: qFatal( "OFileNotification::activate() - Inotify Event Queue Overload!" ); break; + case _Ignored: qWarning( "OFileNotification::activate() - Further Events for '%s' will be ignored", (const char*) _path ); break; default: assert( 0 ); @@ -264,2 +268,4 @@ bool OFileNotification::activate( const OFileNotificationEvent* e ) + delete e; + if ( !_multi ) stop(); @@ -319,3 +325,3 @@ bool OFileNotification::registerEventHandler() - OFileNotification::_sn = new QSocketNotifier( _fd, QSocketNotifier::Read, this, "inotify event" ); + OFileNotification::_sn = new QSocketNotifier( _fd, QSocketNotifier::Read ); connect( OFileNotification::_sn, SIGNAL( activated(int) ), this, SLOT( inotifyEventHandler() ) ); @@ -350,3 +356,3 @@ ODirNotification::~ODirNotification() -/* +/** Love-Trowbridge recursive directory scanning algorithm: @@ -367,3 +373,3 @@ ODirNotification::~ODirNotification() not yet created on bar, repeat step 1 on bar. -*/ +**/ diff --git a/libopie2/opiecore/linux/ofilenotify.h b/libopie2/opiecore/linux/ofilenotify.h index 17e6b5d..c713b30 100644 --- a/libopie2/opiecore/linux/ofilenotify.h +++ b/libopie2/opiecore/linux/ofilenotify.h @@ -259,3 +259,4 @@ class OFileNotification : public QObject * This class allows to watch for events happening to directories - * It uses the OFileNotification class + * It uses the OFileNotification class and (for recursive watches) + * implements the Love-Trowbridge recursive directory scanning algorithm. * |