From 17b388d4823735d0e597381b55b935c050ae80a8 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 29 Oct 2009 23:06:23 +0100 Subject: [PATCH] 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. --- plugins/zynaddsubfx/ZynAddSubFx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 774f58047..b8a2e5906 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -157,6 +157,7 @@ void ZynAddSubFxInstrument::loadSettings( const QDomElement & _this ) QByteArray a = doc.toString( 0 ).toUtf8(); a.prepend( "\n" ); tf.write( a ); + tf.flush(); const std::string fn = QSTR_TO_STDSTR( QDir::toNativeSeparators( tf.fileName() ) );