#include <config.h>
+#include "support/lassert.h"
#include "support/Timeout.h"
#include "support/debug.h"
#include <QObject>
#include <QTimerEvent>
+using namespace std;
+
namespace lyx {
/**
///
Impl(Timeout & owner) : owner_(owner), timeout_id(-1) {}
///
- bool running() const { return timeout_id != -1; }
+ bool running() const { return timeout_id != -1; }
/// start the timer
void start();
/// stop the timer
unsigned int timeout_ms() const { return owner_.timeout_ms; }
protected:
- ///
+ ///
void timerEvent(QTimerEvent *) { owner_.emit(); }
private:
void Timeout::Impl::start()
{
if (running())
- lyxerr << "Timeout::start: already running!" << std::endl;
+ lyxerr << "Timeout::start: already running!" << endl;
timeout_id = startTimer(timeout_ms());
}
Timeout & Timeout::setTimeout(unsigned int msec)
{
// Can't have a timeout of zero!
- BOOST_ASSERT(msec);
+ LASSERT(msec, /**/);
timeout_ms = msec;
return *this;