diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-04-21 23:28:33 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-04-21 23:28:33 +0900 |
| commit | 1df632a0e6e550a5a100247c6b4713078e78f413 (patch) | |
| tree | e8577c3d310285ebb4c8beea37998f408286bda3 /tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp | |
| parent | 012b00740f33c01949c88d7ea97e2dee81fabb41 (diff) | |
| download | experimental-1df632a0e6e550a5a100247c6b4713078e78f413.tar.gz experimental-1df632a0e6e550a5a100247c6b4713078e78f413.zip | |
Removed unnecessary and/or TDE-unrelated code.r14.0.7
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp')
| -rw-r--r-- | tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp | 186 |
1 files changed, 0 insertions, 186 deletions
diff --git a/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp b/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp deleted file mode 100644 index 2f0e272..0000000 --- a/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** $Id: qinputcontextfactory.cpp,v 1.2 2004/06/20 18:43:11 daisuke Exp $ -** -** Implementation of TQInputContextFactory class -** -** Created : 001103 -** -** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.TQPL included in the packaging of this file. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition licenses may use this -** file in accordance with the TQt Commercial License Agreement provided -** with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for TQPL licensing information. -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "tqinputcontextinterface_p.h" // up here for GCC 2.7.* compatibility -#include "tqinputcontextfactory.h" -#include "tqinputcontext.h" - -#ifndef TQT_NO_IM - -#include "tqapplication.h" - -#ifdef TQT_THREAD_SUPPORT -#include <private/tqmutexpool_p.h> -#endif // TQT_THREAD_SUPPORT - -#include <stdlib.h> - -#include "tqcleanuphandler.h" -#include <private/tqpluginmanager_p.h> -#ifndef TQT_NO_COMPONENT - - -static TQPluginManager<TQInputContextFactoryInterface> *manager = 0; -static TQSingleCleanupHandler< TQPluginManager<TQInputContextFactoryInterface> > cleanup_manager; - -static void create_manager() -{ - if( manager ) // already created - return; - -#ifdef TQT_THREAD_SUPPORT - // protect manager creation - TQMutexLocker locker( tqt_global_mutexpool ? - tqt_global_mutexpool->get( &manager ) : 0); - - // we check the manager pointer again to make sure that another thread - // has not created the manager before us. - - if ( manager ) // already created - return; -#endif - - manager = new TQPluginManager<TQInputContextFactoryInterface>( IID_TQInputContextFactory, TQApplication::libraryPaths(), "/inputmethods", FALSE ); - - Q_CHECK_PTR( manager ); - cleanup_manager.set( &manager ); -} - -#endif //TQT_NO_COMPONENT - - -/*! - This function generates the input context that has the identifier - name which is in agreement with \a key. \a widget is the client - widget of TQInputContext. \a widget may be null. -*/ -TQInputContext *TQInputContextFactory::create( const TQString& key, TQWidget *widget ) -{ - TQInputContext *ret = 0; - TQString inputcontext = key; -#ifndef TQT_NO_COMPONENT - // make sure the manager is created - create_manager(); - - TQInterfacePtr<TQInputContextFactoryInterface> iface; - manager->queryInterface( inputcontext, &iface ); - - if ( iface ) { - ret = iface->create( inputcontext ); -#ifdef TQ_WS_X11 - if ( ret ) - ret->setHolderWidget( widget ); -#endif - } -#endif - return ret; -} - - -/*! - This function returns the list of the names input methods. - Only input methods included in default and placed under - $TQTDIR/plugins/inputmethods are listed. -*/ -TQStringList TQInputContextFactory::keys() -{ - TQStringList list; -#ifndef TQT_NO_COMPONENT - // make sure the manager is created - create_manager(); - - list = manager->featureList(); -#endif //TQT_NO_COMPONENT - - return list; -} - - -TQStringList TQInputContextFactory::languages( const TQString &key ) -{ - TQStringList result; -#ifndef TQT_NO_COMPONENT - // make sure the manager is created - create_manager(); - - TQInterfacePtr<TQInputContextFactoryInterface> iface; - manager->queryInterface( key, &iface ); - - if ( iface ) - result = iface->languages( key ); -#endif //TQT_NO_COMPONENT - - return result; -} - - -TQString TQInputContextFactory::displayName( const TQString &key ) -{ - TQString result( "" ); -#ifndef TQT_NO_COMPONENT - // make sure the manager is created - create_manager(); - - TQInterfacePtr<TQInputContextFactoryInterface> iface; - manager->queryInterface( key, &iface ); - - if ( iface ) - result = iface->displayName( key ); -#endif //TQT_NO_COMPONENT - - return result; -} - - -TQString TQInputContextFactory::description( const TQString &key ) -{ - TQString result( "" ); -#ifndef TQT_NO_COMPONENT - // make sure the manager is created - create_manager(); - - TQInterfacePtr<TQInputContextFactoryInterface> iface; - manager->queryInterface( key, &iface ); - - if ( iface ) - result = iface->description( key ); -#endif //TQT_NO_COMPONENT - - return result; -} - -#endif // TQT_NO_IM |
