~ubuntu-branches/ubuntu/intrepid/kdesdk/intrepid-updates

« back to all changes in this revision

Viewing changes to kompare/libdiff2/komparemodellist.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-02-14 12:27:08 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080214122708-euc18cedpmue8v6l
Tags: 4:3.5.9-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    begin                : Tue Jun 26 2001
5
5
    copyright            : (C) 2001-2004 Otto Bruggeman
6
6
                           (C) 2001-2003 John Firebaugh
 
7
                           (C) 2007      Kevin Kofler
7
8
    email                : jfirebaugh@kde.org
8
9
                           otto.bruggeman@home.nl
9
 
 ***************************************************************************/
 
10
                           kevin.kofler@chello.at
 
11
***************************************************************************/
10
12
 
11
13
/***************************************************************************
12
14
 *                                                                         *
408
410
void KompareModelList::setEncoding( const QString& encoding )
409
411
{
410
412
        m_encoding = encoding;
411
 
        kdDebug() << "Encoding : " << encoding << endl;
412
 
        m_textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
413
 
        kdDebug() << "TextCodec: " << m_textCodec << endl;
414
 
        if ( !m_textCodec )
 
413
        if ( encoding.lower() == "default" )
 
414
        {
415
415
                m_textCodec = QTextCodec::codecForLocale();
 
416
        }
 
417
        else
 
418
        {
 
419
                kdDebug() << "Encoding : " << encoding << endl;
 
420
                m_textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
 
421
                kdDebug() << "TextCodec: " << m_textCodec << endl;
 
422
                if ( !m_textCodec )
 
423
                        m_textCodec = QTextCodec::codecForLocale();
 
424
        }
416
425
        kdDebug() << "TextCodec: " << m_textCodec << endl;
417
426
}
418
427