diff -r 4ffc47ae27e4 -r 9abdd5e6c3dc file.cpp --- a/file.cpp Fri Nov 09 12:07:21 2007 +0000 +++ b/file.cpp Fri Feb 01 15:28:35 2008 +0000 @@ -354,6 +354,8 @@ // Set up members of the STARTUPINFO structure. ::ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) ); siStartInfo.cb = sizeof(STARTUPINFO); + siStartInfo.dwFlags = STARTF_USESHOWWINDOW; + siStartInfo.wShowWindow = SW_MINIMIZE; // Create command line. QString argv("unzip -o "); @@ -362,26 +364,32 @@ argv.append(QDir::convertSeparators(zipDir.path())); // Create the child process. - if( !::CreateProcess(NULL, - (LPWSTR)argv.unicode(), // command line - NULL, // process security attributes - NULL, // primary thread security attributes - TRUE, // handles are inherited - 0, // creation flags - NULL, // use parent's environment - NULL, // use parent's current directory - &siStartInfo, // STARTUPINFO pointer - &piProcInfo) ) // receives PROCESS_INFORMATION + if (!::CreateProcess(NULL, + (LPWSTR) argv.unicode(), // command line + NULL, // process security attributes + NULL, // primary thread security attributes + TRUE, // handles are inherited + 0, // creation flags + NULL, // use parent's environment + NULL, // use parent's current directory + &siStartInfo, // STARTUPINFO pointer + &piProcInfo) ) // receives PROCESS_INFORMATION { + QMessageBox::critical( 0, QObject::tr( "Critical Error" ), + QObject::tr("Couldn't start unzip to decompress data.")); err = aborted; } else { // Wait for it to finish. - ::WaitForSingleObject( piProcInfo.hProcess, 10000 ); + ::WaitForSingleObject( piProcInfo.hProcess, INFINITE ); + + // Clean up handles. + CloseHandle(piProcInfo.hThread); + CloseHandle(piProcInfo.hProcess); } #endif - return err; + return err; } bool loadStringFromDisk (const QString &fname, QString &s) @@ -495,5 +503,3 @@ if (imageFilters.at(i)==filter) return imageTypes.at(i); return QString(); } - -