1.1 --- a/file.cpp Thu Dec 06 18:43:23 2007 +0000
1.2 +++ b/file.cpp Fri Oct 02 14:31:03 2009 +0000
1.3 @@ -354,8 +354,6 @@
1.4 // Set up members of the STARTUPINFO structure.
1.5 ::ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
1.6 siStartInfo.cb = sizeof(STARTUPINFO);
1.7 - siStartInfo.dwFlags = STARTF_USESHOWWINDOW;
1.8 - siStartInfo.wShowWindow = SW_MINIMIZE;
1.9
1.10 // Create command line.
1.11 QString argv("unzip -o ");
1.12 @@ -364,32 +362,26 @@
1.13 argv.append(QDir::convertSeparators(zipDir.path()));
1.14
1.15 // Create the child process.
1.16 - if (!::CreateProcess(NULL,
1.17 - (LPWSTR) argv.unicode(), // command line
1.18 - NULL, // process security attributes
1.19 - NULL, // primary thread security attributes
1.20 - TRUE, // handles are inherited
1.21 - 0, // creation flags
1.22 - NULL, // use parent's environment
1.23 - NULL, // use parent's current directory
1.24 - &siStartInfo, // STARTUPINFO pointer
1.25 - &piProcInfo) ) // receives PROCESS_INFORMATION
1.26 + if( !::CreateProcess(NULL,
1.27 + (LPWSTR)argv.unicode(), // command line
1.28 + NULL, // process security attributes
1.29 + NULL, // primary thread security attributes
1.30 + TRUE, // handles are inherited
1.31 + 0, // creation flags
1.32 + NULL, // use parent's environment
1.33 + NULL, // use parent's current directory
1.34 + &siStartInfo, // STARTUPINFO pointer
1.35 + &piProcInfo) ) // receives PROCESS_INFORMATION
1.36 {
1.37 - QMessageBox::critical( 0, QObject::tr( "Critical Error" ),
1.38 - QObject::tr("Couldn't start unzip to decompress data."));
1.39 err = aborted;
1.40 }
1.41 else
1.42 {
1.43 // Wait for it to finish.
1.44 - ::WaitForSingleObject( piProcInfo.hProcess, INFINITE );
1.45 -
1.46 - // Clean up handles.
1.47 - CloseHandle(piProcInfo.hThread);
1.48 - CloseHandle(piProcInfo.hProcess);
1.49 + ::WaitForSingleObject( piProcInfo.hProcess, 10000 );
1.50 }
1.51 #endif
1.52 - return err;
1.53 + return err;
1.54 }
1.55
1.56 bool loadStringFromDisk (const QString &fname, QString &s)
1.57 @@ -503,3 +495,5 @@
1.58 if (imageFilters.at(i)==filter) return imageTypes.at(i);
1.59 return QString();
1.60 }
1.61 +
1.62 +