Changeset 86 for psi/trunk/src/tools/openpgp/gpgproc
- Timestamp:
- Jan 6, 2007, 7:03:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
psi/trunk/src/tools/openpgp/gpgproc/gpgproc.cpp
r11 r86 106 106 if(!d->pipeAux.open()) { 107 107 #ifdef GPG_DEBUG 108 printf("Error creating pipeAux\n");108 qDebug("### Error creating pipeAux"); 109 109 #endif 110 110 closePipes(); … … 113 113 if(!d->pipeCommand.open()) { 114 114 #ifdef GPG_DEBUG 115 printf("Error creating pipeCommand\n");115 qDebug("### Error creating pipeCommand"); 116 116 #endif 117 117 closePipes(); … … 120 120 if(!d->pipeStatus.open()) { 121 121 #ifdef GPG_DEBUG 122 printf("Error creating pipeStatus\n");122 qDebug("### Error creating pipeStatus"); 123 123 #endif 124 124 closePipes(); … … 130 130 if(!d->pipeAux.writeEnd().winDupHandle()) { 131 131 #ifdef GPG_DEBUG 132 printf("Error dup'ing pipeAux\n");132 qDebug("### Error dup'ing pipeAux"); 133 133 #endif 134 134 closePipes(); … … 137 137 if(!d->pipeCommand.writeEnd().winDupHandle()) { 138 138 #ifdef GPG_DEBUG 139 printf("Error dup'ing pipeCommand\n");139 qDebug("### Error dup'ing pipeCommand"); 140 140 #endif 141 141 closePipes(); … … 144 144 if(!d->pipeStatus.readEnd().winDupHandle()) { 145 145 #ifdef GPG_DEBUG 146 printf("Error dup'ing pipeStatus\n");146 qDebug("### Error dup'ing pipeStatus"); 147 147 #endif 148 148 closePipes(); … … 168 168 QCString cs2 = buf.data(); 169 169 if(cs != cs2) 170 printf("Pipe test failed.\n");170 qDebug("### Pipe test failed."); 171 171 else 172 printf("Pipe test succeeded.\n");172 qDebug("### Pipe test succeeded."); 173 173 }*/ 174 174 … … 180 180 181 181 #ifdef GPG_DEBUG 182 printf("Pipe setup complete.\n");182 qDebug("### Pipe setup complete."); 183 183 #endif 184 184 … … 188 188 189 189 if(useExtra) { 190 fullargs += "--enable-special-filenames";191 192 190 fullargs += "--status-fd"; 193 191 fullargs += d->pipeStatus.writeEnd().toString(); … … 197 195 } 198 196 197 bool seen_special_filenames = false; 199 198 for(QStringList::ConstIterator it = args.begin(); it != args.end(); ++it) { 200 199 const QString &a = (*it); 201 if(a == "-&?") 202 fullargs += (QString("-&") + d->pipeAux.readEnd().toString()); 203 else 200 if(a == "-&?") { 201 seen_special_filenames = true; 202 fullargs += (QString("\"-&") + d->pipeAux.readEnd().toString() + "\""); 203 } else { 204 204 fullargs += a; 205 } 205 } 206 } 207 // insert --enable-special-filenames after --no-tty 208 if(seen_special_filenames) 209 fullargs.insert(fullargs.at(2), "--enable-special-filenames"); 206 210 207 211 // show full command 208 212 #ifdef GPG_DEBUG 209 printf("GPGProc: "); 210 for(QStringList::ConstIterator it2 = fullargs.begin(); it2 != fullargs.end(); ++it2) { 211 printf("%s ", (*it2).latin1()); 212 } 213 printf("\n"); 213 qDebug("### GPGProc: %s", fullargs.join(" ").latin1()); 214 214 #endif 215 215 … … 223 223 d->proc->setClosePipeList(plist); 224 224 #endif 225 /// @todo (dmik)226 // On Unix, it is done when SProcess is destructed. On OS/2 as well as on227 // Win32, SProcess is not used, but we use the same QPipe implelentation228 // on OS/2 as Unix does, so we need to use the similar technuque to close229 // them... Need to investigate this file (i.e. usage) in detail.230 225 231 226 connect(d->proc, SIGNAL(readyReadStdout()), SLOT(proc_readyReadStdout())); … … 327 322 #endif 328 323 processExited(); 324 325 #if defined(Q_OS_OS2) 326 closePipes(); 327 #endif 329 328 } 330 329
Note:
See TracChangeset
for help on using the changeset viewer.