Flush buffer after adding a string, not before.
--HG-- branch : develop
This commit is contained in:
parent
f2c8481f53
commit
13a8b83a0e
|
@ -159,6 +159,9 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
|
|||
break;
|
||||
}
|
||||
|
||||
vStdOut().flush();
|
||||
vStdErr().flush();
|
||||
|
||||
if (isGuiThread)
|
||||
{
|
||||
//fixme: trying to make sure there are no save/load dialogs are opened, because error message during them will
|
||||
|
|
|
@ -170,6 +170,8 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
|
|||
default:
|
||||
break;
|
||||
}
|
||||
vStdOut().flush();
|
||||
vStdErr().flush();
|
||||
|
||||
(*qApp->LogFile()) << debugdate << endl;
|
||||
}
|
||||
|
|
|
@ -82,18 +82,16 @@ static const auto V_UNUSED V_EX_CONFIG = 78; /*Something was found in an un
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline QTextStream& vStdErr()
|
||||
{
|
||||
static QTextStream ts( stderr );
|
||||
static QTextStream ts(stderr, QIODevice::Unbuffered | QIODevice::WriteOnly);
|
||||
ts.setCodec("UTF-8");
|
||||
ts.flush();
|
||||
return ts;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline QTextStream& vStdOut()
|
||||
{
|
||||
static QTextStream ts( stdout );
|
||||
static QTextStream ts(stdout, QIODevice::Unbuffered | QIODevice::WriteOnly);
|
||||
ts.setCodec("UTF-8");
|
||||
ts.flush();
|
||||
return ts;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user