diff options
Diffstat (limited to 'tdecore/ksimpledirwatch.cpp')
| -rw-r--r-- | tdecore/ksimpledirwatch.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp index cbb4ce682..7d9cfa70c 100644 --- a/tdecore/ksimpledirwatch.cpp +++ b/tdecore/ksimpledirwatch.cpp @@ -52,11 +52,17 @@ // debug #include <sys/ioctl.h> +#ifdef Q_OS_SOLARIS +#include <sys/filio.h> /* FIONREAD is defined here */ +#endif /* solaris */ + #ifdef HAVE_INOTIFY #include <unistd.h> #include <fcntl.h> #include <sys/syscall.h> +#ifdef Q_OS_LINUX #include <linux/types.h> +#endif /* Linux */ // Linux kernel headers are documented to not compile #define _S390_BITOPS_H #include <sys/inotify.h> @@ -207,7 +213,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() : rescan_timer(0, "KSimpleDirWatchPrivate::rescan_timer") { timer = new TQTimer(this, "KSimpleDirWatchPrivate::timer"); - connect (timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRescan())); + connect (timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotRescan())); freq = 3600000; // 1 hour as upper bound statEntries = 0; delayRemove = false; @@ -221,7 +227,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() // used for FAM and DNOTIFY rescan_all = false; - connect(&rescan_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRescan())); + connect(&rescan_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotRescan())); #ifdef HAVE_FAM // It's possible that FAM server can't be started @@ -230,8 +236,8 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() use_fam=true; sn = new TQSocketNotifier( FAMCONNECTION_GETFD(&fc), TQSocketNotifier::Read, this); - connect( sn, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(famEventReceived()) ); + connect( sn, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(famEventReceived()) ); } else { kdDebug(7001) << "Can't use FAM (fam daemon not running?)" << endl; @@ -267,7 +273,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() fcntl(m_inotify_fd, F_SETFD, FD_CLOEXEC); mSn = new TQSocketNotifier( m_inotify_fd, TQSocketNotifier::Read, this ); - connect( mSn, TQT_SIGNAL(activated( int )), this, TQT_SLOT( slotActivated() ) ); + connect( mSn, TQ_SIGNAL(activated( int )), this, TQ_SLOT( slotActivated() ) ); } #endif @@ -301,7 +307,7 @@ KSimpleDirWatchPrivate::KSimpleDirWatchPrivate() fcntl(mPipe[0], F_SETFL, O_NONBLOCK | fcntl(mPipe[0], F_GETFL)); fcntl(mPipe[1], F_SETFL, O_NONBLOCK | fcntl(mPipe[1], F_GETFL)); mSn = new TQSocketNotifier( mPipe[0], TQSocketNotifier::Read, this); - connect(mSn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated())); + connect(mSn, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotActivated())); // Install the signal handler only once if ( dnotify_signal == 0 ) { @@ -1212,7 +1218,7 @@ void KSimpleDirWatchPrivate::emitEvent(Entry* e, int event, const TQString &file else #ifdef Q_OS_UNIX path += "/" + fileName; -#elif defined(Q_WS_WIN) +#elif defined(TQ_WS_WIN) //current drive is passed instead of / path += TQDir::currentDirPath().left(2) + "/" + fileName; #endif @@ -1366,7 +1372,7 @@ void KSimpleDirWatchPrivate::slotRescan() if ( timerRunning ) timer->start(freq); - TQTimer::singleShot(0, this, TQT_SLOT(slotRemoveDelayed())); + TQTimer::singleShot(0, this, TQ_SLOT(slotRemoveDelayed())); } bool KSimpleDirWatchPrivate::isNoisyFile( const char * filename ) @@ -1415,7 +1421,7 @@ void KSimpleDirWatchPrivate::famEventReceived() checkFAMEvent(&fe); } - TQTimer::singleShot(0, this, TQT_SLOT(slotRemoveDelayed())); + TQTimer::singleShot(0, this, TQ_SLOT(slotRemoveDelayed())); } void KSimpleDirWatchPrivate::checkFAMEvent(FAMEvent* fe) |
