ZynAddSubFX: flush temporary data exchange file

LMMS' ZynAddSubFX plugin creates a temporary file for exchanging XML
data with the remote process. After calling QFile::write(...) data
has not neccessarily been written due to QFile's internal write buffer.
Therefore explicitely call QFile::flush() so all data is guaranteed
to be written.

Closes #2877916.
(cherry picked from commit 17b388d482)
This commit is contained in:
Tobias Doerffel
2009-10-29 23:06:23 +01:00
parent db89dfa181
commit 7f75793995

View File

@@ -152,6 +152,7 @@ void ZynAddSubFxInstrument::loadSettings( const QDomElement & _this )
QByteArray a = doc.toString( 0 ).toUtf8();
a.prepend( "<?xml version=\"1.0\"?>\n" );
tf.write( a );
tf.flush();
const std::string fn = QSTR_TO_STDSTR(
QDir::toNativeSeparators( tf.fileName() ) );