By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1009
Collapse All | Expand All

(-)kdepim/libkmime/kmime_util.cpp.addquotes (-32 / +9 lines)
Lines 436-484 Link Here
436
436
437
void removeQuots(TQCString &str)
437
void removeQuots(TQCString &str)
438
{
438
{
439
  bool inQuote=false;
439
  str.replace(TQRegExp("\\\""), "\"");
440
440
  str.replace(TQRegExp("\\\\"), "\\");
441
  for (int i=0; i < (int)str.length(); i++) {
442
    if (str[i] == '"') {
443
      str.remove(i,1);
444
      i--;
445
      inQuote = !inQuote;
446
    } else {
447
      if (inQuote && (str[i] == '\\'))
448
        str.remove(i,1);
449
    }
450
  }
451
}
441
}
452
442
453
443
454
void removeQuots(TQString &str)
444
void removeQuots(TQString &str)
455
{
445
{
456
  bool inQuote=false;
446
  str.replace(TQRegExp("\\\""), "\"");
457
447
  str.replace(TQRegExp("\\\\"), "\\");
458
  for (int i=0; i < (int)str.length(); i++) {
459
    if (str[i] == '"') {
460
      str.remove(i,1);
461
      i--;
462
      inQuote = !inQuote;
463
    } else {
464
      if (inQuote && (str[i] == '\\'))
465
        str.remove(i,1);
466
    }
467
  }
468
}
448
}
469
449
470
450
471
void addQuotes(TQCString &str, bool forceQuotes)
451
void addQuotes(TQCString &str, bool forceQuotes)
472
{
452
{
473
  bool needsQuotes=false;
453
  bool needsQuotes=false;
474
  for (unsigned int i=0; i < str.length(); i++) {
454
  if ( TQString( str ) .contains( TQRegExp( TQString( "\"|\\\\|=|\\]|\\[|:|;|,|\\.|,|@|<|>|\\)|\\(" ) ) ) )
475
    if (strchr("()<>@,.;:[]=\\\"",str[i])!=0)
455
    needsQuotes = true;
476
      needsQuotes = true;
456
477
    if (str[i]=='\\' || str[i]=='\"') {
457
  str.replace(TQRegExp("\\"), "\\\\");
478
      str.insert(i, '\\');
458
  str.replace(TQRegExp("\""), "\\\"");
479
      i++;
480
    }
481
  }
482
459
483
  if (needsQuotes || forceQuotes) {
460
  if (needsQuotes || forceQuotes) {
484
    str.insert(0,'\"');
461
    str.insert(0,'\"');

Return to bug 1009