- Timestamp:
- Dec 3, 2006, 11:23:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qprocess_pm.cpp
r134 r159 544 544 QProcess *proc = (QProcess *) PVOIDFROMMP( mp1 ); 545 545 USHORT key = SHORT1FROMMP( mp2 ); 546 // check parameter validity (we can safely do it outside the lock 547 // because the GUI thread is the only that can modify pipeKeys) 548 if ( proc == pipeKeys.find( key ) ) { 546 549 #if defined(QT_QPROCESS_DEBUG) 547 550 qDebug( "QProcessMonitor::WM_U_PIPE_RDATA: proc=%p (%s/%s) d=%p " … … 549 552 proc, proc->name(), proc->className(), proc->d, key ); 550 553 #endif 551 // check parameter validity (we can safely do it outside the lock552 // because the GUI thread is the only that can modify pipeKeys)553 if ( proc == pipeKeys.find( key ) ) {554 554 QProcessPrivate *d = proc->d; 555 555 if ( d->stdout.key == key ) { … … 560 560 } 561 561 } 562 #if defined(QT_QPROCESS_DEBUG) 563 else { 564 qDebug( "QProcessMonitor::WM_U_PIPE_RDATA: proc=%p (invalid)", 565 proc ); 566 } 567 #endif 562 568 break; 563 569 } … … 565 571 QProcess *proc = (QProcess *) PVOIDFROMMP( mp1 ); 566 572 USHORT key = SHORT1FROMMP( mp2 ); 573 // check parameter validity (we can safely do it outside the lock 574 // because the GUI thread is the only that can modify pipeKeys) 575 if ( proc == pipeKeys.find( key ) ) { 567 576 #if defined(QT_QPROCESS_DEBUG) 568 577 qDebug( "QProcessMonitor::WM_U_PIPE_CLOSE: proc=%p (%s/%s) d=%p " … … 570 579 proc, proc->name(), proc->className(), proc->d, key ); 571 580 #endif 572 // check parameter validity (we can safely do it outside the lock573 // because the GUI thread is the only that can modify pipeKeys)574 if ( proc == pipeKeys.find( key ) ) {575 581 QProcessPrivate *d = proc->d; 576 582 QProcessPrivate::Pipe *pipe = d->findPipe( key ); … … 586 592 } 587 593 } 594 #if defined(QT_QPROCESS_DEBUG) 595 else { 596 qDebug( "QProcessMonitor::WM_U_PIPE_CLOSE: proc=%p (invalid)", 597 proc ); 598 } 599 #endif 588 600 break; 589 601 } … … 686 698 687 699 #if defined(QT_QPROCESS_DEBUG) 688 qDebug( " ~QProcess::init(): d=%p", d );700 qDebug( "QProcess::init(): d=%p", d ); 689 701 #endif 690 702 } … … 954 966 buf.resize( sz ); 955 967 strcpy( buf.data(), appNameFull ); 956 sprintf( buf.data() + shellLen + 1, hasSpaces ? "/c \"%s\"" : "/c %s", 957 appName.data() ); 958 if ( appArgsLen ) 959 strcat( buf.data() + shellLen + 1, appArgs.data() ); 968 char *argsPtr = buf.data() + shellLen + 1; 969 sprintf( argsPtr, hasSpaces ? "/c \"%s\"" : "/c %s", appName.data() ); 970 if ( appArgsLen ) { 971 strcat( argsPtr, " " ); 972 strcat( argsPtr, appArgs.data() ); 973 } 960 974 buf[ sz - 1 ] = '\0'; 961 975 }
Note:
See TracChangeset
for help on using the changeset viewer.