X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt2%2Fio_callback.h;h=a8d03576cb9e0e4fa4230086faec23ee99c96c0c;hb=1fcedd4b635807e7046342f324d054c04c37f054;hp=919625388d534cdddb60feb87325243b679dd1e0;hpb=fe6aaf3797a1b60d9bbea3f22b36c4afab4cec46;p=lyx.git diff --git a/src/frontends/qt2/io_callback.h b/src/frontends/qt2/io_callback.h index 919625388d..a8d03576cb 100644 --- a/src/frontends/qt2/io_callback.h +++ b/src/frontends/qt2/io_callback.h @@ -1,20 +1,24 @@ +// -*- C++ -*- /** * \file io_callback.h - * Copyright 2002 the LyX Team - * Read the file COPYING + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * * \author unknown - * \author John Levon + * \author John Levon + * + * Full author contact details are available in file CREDITS */ #ifndef IO_CALLBACK_H #define IO_CALLBACK_H - -#include -#include "lyxserver.h" - + +#include #include +#include + +class LyXComm; /** * io_callback - a simple wrapper for asynchronous pipe notification @@ -25,23 +29,17 @@ * FIXME: this code apparently will not work on Windows. */ class io_callback : public QObject { - Q_OBJECT + Q_OBJECT public: /// connect a read ready notification for fd to the LyXComm - io_callback(int fd, LyXComm * comm) - : comm_(comm) { - QSocketNotifier * sn = new QSocketNotifier(fd, - QSocketNotifier::Read, this); - connect(sn, SIGNAL(activated(int)), this, SLOT(data_received())); - } - + io_callback(int fd, LyXComm * comm); public slots: - void data_received() { - comm_->read_ready(); - } - + void data_received(); private: + /// our notifier + boost::scoped_ptr sn_; + LyXComm * comm_; }; -#endif // IO_CALLBACK_H +#endif // IO_CALLBACK_H