/[svn]/qsampler/trunk/src/qsamplerMessages.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerMessages.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3357 by capela, Tue Oct 17 21:44:20 2017 UTC revision 3358 by capela, Wed Oct 18 08:57:21 2017 UTC
# Line 34  Line 34 
34  #include <QDateTime>  #include <QDateTime>
35  #include <QIcon>  #include <QIcon>
36    
37  #if !defined(_WIN32)  #if !defined(__WIN32__) && !defined(_WIN32) && !defined(WIN32)
38  #include <unistd.h>  #include <unistd.h>
39  #include <fcntl.h>  #include <fcntl.h>
40  #endif  #endif
# Line 116  Messages::~Messages (void) Line 116  Messages::~Messages (void)
116  // Set stdout/stderr blocking mode.  // Set stdout/stderr blocking mode.
117  bool Messages::stdoutBlock ( int fd, bool bBlock ) const  bool Messages::stdoutBlock ( int fd, bool bBlock ) const
118  {  {
119  #if !defined(_WIN32)  #if !defined(__WIN32__) && !defined(_WIN32) && !defined(WIN32)
120          const int iFlags = ::fcntl(fd, F_GETFL, 0);          const int iFlags = ::fcntl(fd, F_GETFL, 0);
121          const bool bNonBlock = bool(iFlags & O_NONBLOCK);          const bool bNonBlock = bool(iFlags & O_NONBLOCK);
122          if (bBlock && bNonBlock)          if (bBlock && bNonBlock)
# Line 132  bool Messages::stdoutBlock ( int fd, boo Line 132  bool Messages::stdoutBlock ( int fd, boo
132  // Own stdout/stderr socket notifier slot.  // Own stdout/stderr socket notifier slot.
133  void Messages::stdoutNotify ( int fd )  void Messages::stdoutNotify ( int fd )
134  {  {
135  #if !defined(_WIN32)  #if !defined(__WIN32__) && !defined(_WIN32) && !defined(WIN32)
136          // Set non-blocking reads, if not already...          // Set non-blocking reads, if not already...
137          const bool bBlock = stdoutBlock(fd, false);          const bool bBlock = stdoutBlock(fd, false);
138          // Read as much as is available...          // Read as much as is available...
# Line 190  void Messages::setCaptureEnabled ( bool Line 190  void Messages::setCaptureEnabled ( bool
190          // Flush current buffer.          // Flush current buffer.
191          flushStdoutBuffer();          flushStdoutBuffer();
192    
193  #if !defined(_WIN32)  #if !defined(__WIN32__) && !defined(_WIN32) && !defined(WIN32)
194          // Destroy if already enabled.          // Destroy if already enabled.
195          if (!bCapture && m_pStdoutNotifier) {          if (!bCapture && m_pStdoutNotifier) {
196                  delete m_pStdoutNotifier;                  delete m_pStdoutNotifier;

Legend:
Removed from v.3357  
changed lines
  Added in v.3358

  ViewVC Help
Powered by ViewVC