~ubuntu-branches/ubuntu/precise/uim/precise

« back to all changes in this revision

Viewing changes to qt4/immodule/quiminputcontext_with_slave.cpp

  • Committer: Package Import Robot
  • Author(s): Ilya Barygin
  • Date: 2011-12-18 16:35:38 UTC
  • mfrom: (1.1.13) (15.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20111218163538-8ktir39z2mjpii8z
Tags: 1:1.7.1-3ubuntu1
* Merge from Debian testing (LP: #818199).
* Remaining changes:
  - debian/uim-qt.install: Fix plugin path for multiarch location.
* Dropped changes:
  - uim-applet-gnome removal (GNOME 3 applet is available)
  - 19_as-needed_compile_fix.dpatch (accepted into Debian package)
* translations.patch: add several files to POTFILE.in to prevent
  intltool-update failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
3
3
  Copyright (c) 2004-2005 Kazuki Ohta <mover@hct.zaq.ne.jp>
4
 
  Copyright (c) 2005-2009 uim Project http://code.google.com/p/uim/
 
4
  Copyright (c) 2005-2011 uim Project http://code.google.com/p/uim/
5
5
 
6
6
  All rights reserved.
7
7
 
34
34
 
35
35
#include "quiminputcontext_with_slave.h"
36
36
 
37
 
#include <qinputcontextfactory.h>
 
37
#include <QtGui/QInputContextFactory>
38
38
 
39
39
QUimInputContextWithSlave::QUimInputContextWithSlave( const char *imname, const char *lang )
40
40
        : QUimInputContext( imname, lang )
41
41
{
42
 
    slave = QInputContextFactory::create( "simple", NULL );
 
42
    slave = QInputContextFactory::create( "simple", 0 );
43
43
    if ( slave )
44
44
    {
45
45
        slave->setParent( this );
46
46
 
47
47
        /*
48
 
        QObject::connect( slave, SIGNAL( imEventGenerated( QObject *, QIMEvent * ) ),
 
48
        connect( slave, SIGNAL( imEventGenerated( QObject *, QIMEvent * ) ),
49
49
                          this, SIGNAL( imEventGenerated( QObject *, QIMEvent * ) ) );
50
50
        */
51
 
        QObject::connect( slave, SIGNAL( deletionRequested() ),
 
51
        connect( slave, SIGNAL( deletionRequested() ),
52
52
                          this, SLOT( destroyInputContext() ) );
53
53
    }
54
54
}
63
63
    if ( slave )
64
64
    {
65
65
        slave->setFocus();
66
 
        slave->setFocusWidget( focusWidget() );
 
66
        slave->setFocusWidget( QApplication::focusWidget() );
67
67
    }
68
68
}
69
69
 
109
109
    {
110
110
        // slave->reset() may not properly work in the case, so we
111
111
        // manually resets the composing state of text widget
112
 
        if ( slave->focusWidget() )
 
112
        if ( QApplication::focusWidget() )
113
113
        {
114
 
            //            emit imEventGenerated( slave->focusWidget(), new QIMEvent( QEvent::IMEnd, QString::null, -1 ) );
 
114
            //            emit imEventGenerated( QApplication::focusWidget(), new QIMEvent( QEvent::IMEnd, QString::null, -1 ) );
115
115
        }
116
116
        slave->deleteLater();
117
117
        slave = 0;