QT_BEGIN_NAMESPACE RemoteControl::RemoteControl(MainWindow *mainWindow) : QObject(mainWindow) , m_mainWindow(mainWindow) , m_debug(false) , m_caching(true) , m_syncContents(false) , m_expandTOC(-2) , helpEngine(HelpEngineWrapper::instance()) { TRACE_OBJ connect(m_mainWindow, SIGNAL(initDone()), this, SLOT(applyCache())); StdInListener *l = new StdInListener(this); connect(l, SIGNAL(receivedCommand(QString)), this, SLOT(handleCommandString(QString))); l->start(); }
RemoteControl::RemoteControl(MainWindow *mainWindow) : QObject(mainWindow) , m_mainWindow(mainWindow) , m_debug(false) , m_caching(true) , m_syncContents(false) , m_expandTOC(-2) , helpEngine(HelpEngineWrapper::instance()) { TRACE_OBJ connect(m_mainWindow, SIGNAL(initDone()), this, SLOT(applyCache())); #ifdef Q_OS_WIN StdInListenerWin *l = new StdInListenerWin(this); connect(l, SIGNAL(receivedCommand(QString)), this, SLOT(handleCommandString(QString))); l->start(); #else QSocketNotifier *notifier = new QSocketNotifier(fileno(stdin), QSocketNotifier::Read, this); connect(notifier, SIGNAL(activated(int)), this, SLOT(receivedData())); notifier->setEnabled(true); #endif }