|
From: Ethan A M. <sf...@us...> - 2014-02-24 20:24:08
|
On Monday, 24 February, 2014 21:12:17 Bastian Märkisch wrote: > >> gnuplot> plot sin(x) > >> QIODevice::write: device not open > >> QIODevice::write: device not open > > The reason for these is the section below in qt_graphics(). The first > time it is called the qt->socket is not yet open and thus the call to > qt_flushOutBuffer will fail: > > qt->out << GEDesactivate; > qt_flushOutBuffer(); > qt_connectToServer(); > > Adding this snippet to qt_flushOutBuffer() solves that problem: > > if (!qt || !qt->socket.isValid()) > return; > > But maybe the order of commands in qt_graphics() should be changed instead. I think the order is correct. It wants to flush and close any previous connection before starting a new one. The message comes when there was no previous connection. Curiously, I see these warnings on some machines but not others. I've no idea why. But your check in qt_flushOutBuffer() looks correct. Ethan > Bastian > |