Changeset 86
- Timestamp:
- Jan 6, 2007, 7:03:56 PM (18 years ago)
- Location:
- psi/trunk/src/tools/openpgp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
psi/trunk/src/tools/openpgp/gnupg.cpp
r2 r86 113 113 114 114 #ifdef GPG_DEBUG 115 printf("gpg bin=[%s]\n", bin.latin1());115 qDebug("### gpg bin=[%s]", bin.latin1()); 116 116 #endif 117 117 d = new Private(bin); … … 296 296 { 297 297 #ifdef GPG_DEBUG 298 printf("GnuPG initialization complete\n");299 printf(" Secret Keyring: [%s]\n", d->secretWatch.fileName().latin1());300 printf(" Public Keyring: [%s]\n", d->publicWatch.fileName().latin1());298 qDebug("### GnuPG initialization complete"); 299 qDebug("### Secret Keyring: [%s]", d->secretWatch.fileName().latin1()); 300 qDebug("### Public Keyring: [%s]", d->publicWatch.fileName().latin1()); 301 301 #endif 302 302 initFinished(b, err); … … 461 461 d->secretDirty = true; 462 462 #ifdef GPG_DEBUG 463 printf("Secret keys updated!\n");463 qDebug("### Secret keys updated!"); 464 464 #endif 465 465 } … … 467 467 d->publicDirty = true; 468 468 #ifdef GPG_DEBUG 469 printf("Public keys updated!\n");469 qDebug("### Public keys updated!"); 470 470 #endif 471 471 } -
psi/trunk/src/tools/openpgp/gpgop.cpp
r11 r86 365 365 { 366 366 #ifdef GPG_DEBUG 367 printf("{%s}\n", str.latin1());367 qDebug("### {%s}", str.latin1()); 368 368 #endif 369 369 QString s, rest; … … 435 435 436 436 #ifdef GPG_DEBUG 437 printf("GPG Finished: ");437 qDebug("### GPG Finished: "); 438 438 #endif 439 439 … … 443 443 clean = false; 444 444 #ifdef GPG_DEBUG 445 printf("bad exit.. crash?\n");445 qDebug("### bad exit.. crash?"); 446 446 #endif 447 447 } … … 449 449 exitStatus = d->proc->exitStatus(); 450 450 #ifdef GPG_DEBUG 451 printf("exitStatus=%d\n", exitStatus);451 qDebug("### exitStatus=%d", exitStatus); 452 452 #endif 453 453 } … … 472 472 473 473 #ifdef GPG_DEBUG 474 printf("stdout: [%s]\n", outstr.latin1());475 printf("stderr: [%s]\n", errstr.latin1());474 qDebug("### stdout: [%s]", outstr.latin1()); 475 qDebug("### stderr: [%s]", errstr.latin1()); 476 476 #endif 477 477 -
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.