~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to parts/outputviews/commandcontinuationfilter.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 1999-2001 by Bernd Gehrmann and the KDevelop Team       *
 
3
 *   bernd@kdevelop.org                                                    *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU General Public License as published by  *
 
7
 *   the Free Software Foundation; either version 2 of the License, or     *
 
8
 *   (at your option) any later version.                                   *
 
9
 *                                                                         *
 
10
 ***************************************************************************/
 
11
 
 
12
#include "commandcontinuationfilter.h"
 
13
#include <qregexp.h>
 
14
#include <kdebug.h>
 
15
 
 
16
CommandContinuationFilter::CommandContinuationFilter( OutputFilter& next )
 
17
        : OutputFilter( next )
 
18
{
 
19
}
 
20
 
 
21
void CommandContinuationFilter::processLine( const QString& line )
 
22
{
 
23
   int index=line.length()-1;
 
24
   while (index>=0)
 
25
   {
 
26
      if (line[index]=='\\')
 
27
      {
 
28
         m_text += line.left(index);
 
29
         return;
 
30
      }
 
31
 
 
32
      if (!line[index].isSpace())
 
33
         break;
 
34
      index--;
 
35
   }
 
36
 
 
37
   m_text+=line;
 
38
   OutputFilter::processLine( m_text );
 
39
   m_text = "";
 
40
}