Ticket #264: core.diff
File core.diff, 953 bytes (added by , 13 years ago) |
---|
-
core.cpp
21 21 #include <QFileInfo> 22 22 #include <QRegExp> 23 23 #include <QTextStream> 24 #include <QEventLoop> 24 25 25 26 #include <cmath> 26 27 … … 2226 2227 return; 2227 2228 } 2228 2229 2230 #ifdef Q_OS_OS2 2231 QEventLoop eventLoop; 2232 2233 connect(proc, SIGNAL(processExited()), &eventLoop, SLOT(quit())); 2234 2235 tellmp("quit"); 2236 2237 QTimer::singleShot(5000, &eventLoop, SLOT(quit())); 2238 eventLoop.exec(QEventLoop::ExcludeUserInputEvents); 2239 2240 if (proc->isRunning()) { 2241 qWarning("Core::stopMplayer: process didn't finish. Killing it..."); 2242 proc->kill(); 2243 } 2244 #else 2229 2245 tellmp("quit"); 2230 2246 2231 2247 qDebug("Core::stopMplayer: Waiting mplayer to finish..."); … … 2233 2249 qWarning("Core::stopMplayer: process didn't finish. Killing it..."); 2234 2250 proc->kill(); 2235 2251 } 2252 #endif 2236 2253 2237 2254 qDebug("Core::stopMplayer: Finished. (I hope)"); 2238 2255 }