~ubuntu-branches/ubuntu/quantal/kdevplatform/quantal-proposed

« back to all changes in this revision

Viewing changes to language/duchain/stringhelpers.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra, Fathi Boudra, Sune Vuorela
  • Date: 2010-07-22 20:36:46 UTC
  • mfrom: (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100722203646-ujxro0qx5bivjj58
Tags: 1.0.1-1
* New upstream release.

[ Fathi Boudra ]
* Add localization packages: Finnish (fi), Dutch (nl), Slovenian (sl) and
  Thai (th).
* Update debian/control:
  - bump Standards-Version to 3.9.0 (no changes needed).
  - comment turkish localization package, not shipped in this release.
* Update debian/rules: remove workaround for FindKDE4Internal.cmake default
  rpath value, fixed in kdelibs5-dev 4.4.1.

[ Sune Vuorela ]
* Remove hardcoded dependency in libsublime1 on kdelibs5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
290
290
      lastPos = i+2;
291
291
      if( lastPos == len ) break;
292
292
    } else {
 
293
      if ( i == -1 ) {
 
294
        // unterminated comment, might happen during code completion
 
295
        // see also: https://bugs.kde.org/show_bug.cgi?id=231351
 
296
        fillString( str, pos, len, replacement );
 
297
      }
293
298
      break;
294
299
    }
295
300
  }
313
318
QString clearStrings( QString str, QChar replacement ) {
314
319
  bool inString = false;
315
320
  for(int pos = 0; pos < str.length(); ++pos) {
316
 
    
 
321
    //Skip cpp comments
 
322
    if(!inString && pos + 1 < str.length() && str[pos] == '/' && str[pos+1] == '*')
 
323
    {
 
324
      pos += 2;
 
325
      while(pos + 1 < str.length()) {
 
326
        if (str[pos] == '*' && str[pos + 1] == '/') {
 
327
          ++pos;
 
328
          break;
 
329
        }
 
330
        ++pos;
 
331
      }
 
332
    }
 
333
    //Skip cstyle comments
 
334
    if(!inString && pos + 1 < str.length() && str[pos] == '/' && str[pos+1] == '/')
 
335
    {
 
336
      pos += 2;
 
337
      while(pos < str.length() && str[pos] != '\n') {
 
338
        ++pos;
 
339
      }
 
340
    }
317
341
    //Skip a character a la 'b'
318
342
    if(!inString && str[pos] == '\'' && pos + 3 <= str.length())
319
343
    {