From: vsr Date: Mon, 2 Feb 2015 15:54:55 +0000 (+0300) Subject: Avoid "QFileSystemWatcher: failed to add paths" warning when exiting SALOME X-Git-Tag: V7_6_0a1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a855c8761542842173e84c7cfea05b08e223b7e7;p=modules%2Fgui.git Avoid "QFileSystemWatcher: failed to add paths" warning when exiting SALOME --- diff --git a/src/HelpBrowser/HelpBrowser.cxx b/src/HelpBrowser/HelpBrowser.cxx index c6f88cffd..e81d875f0 100644 --- a/src/HelpBrowser/HelpBrowser.cxx +++ b/src/HelpBrowser/HelpBrowser.cxx @@ -220,7 +220,8 @@ int main( int argc, char **argv ) // Clear file system watcher if one has have path instance.clearWatcher(); - if ( aFile.open( QIODevice::WriteOnly | QIODevice::Text ) ) + QFileInfo wfi( aFile.fileName() ); + if ( QDir().mkpath( wfi.absolutePath() ) && aFile.open( QIODevice::WriteOnly | QIODevice::Text ) ) { // Write date and time when the file was created QTextStream aOutStream( &aFile );