From 596c6587c8e5263027705426647b43a5105f3bcd Mon Sep 17 00:00:00 2001
From: Timothy Pearson <kb9vqf@pearsoncomputing.net>
Date: Sun, 24 Jul 2011 03:10:05 -0500
Subject: Fixed FTBFS due to prior commit

---
 tqtinterface/qt4/debian/rules                      |   7 +-
 tqtinterface/qt4/include/tqinputcontext.h          |   1 +
 tqtinterface/qt4/include/tqinputcontextfactory.h   |   1 +
 tqtinterface/qt4/src/__debian_export_symbols.cpp   |  63 --------
 .../qt4/src/inputmethod/qt_inputmethod.pri         |  10 ++
 .../qt4/src/inputmethod/tqinputcontextfactory.cpp  |   4 +-
 .../qt4/src/inputmethod/tqt_inputmethod.pri        |  10 --
 tqtinterface/qt4/src/kernel/tqapplication_x11.cpp  |  24 ++-
 tqtinterface/qt4/src/kernel/tqdnd_x11.cpp          |   2 +-
 tqtinterface/qt4/src/kernel/tqinputcontext.cpp     |  11 +-
 tqtinterface/qt4/src/kernel/tqinputcontext.h       |  13 +-
 tqtinterface/qt4/src/kernel/tqinputcontext_x11.cpp |   7 +-
 tqtinterface/qt4/src/kernel/tqnamespace.h          |   7 +-
 tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp       |  26 +---
 tqtinterface/qt4/src/kernel/tqwidget.h             |  24 +++
 tqtinterface/qt4/src/kernel/tqwidget_x11.cpp       | 163 +++++++++++++++++++++
 tqtinterface/qt4/src/qt.pro                        |  10 --
 tqtinterface/qt4/src/styles/tqcdestyle.h           |   1 +
 tqtinterface/qt4/src/styles/tqcommonstyle.h        |   1 +
 tqtinterface/qt4/src/styles/tqmotifplusstyle.h     |   1 +
 tqtinterface/qt4/src/styles/tqmotifstyle.h         |   1 +
 tqtinterface/qt4/src/styles/tqplatinumstyle.h      |   1 +
 tqtinterface/qt4/src/styles/tqsgistyle.h           |   1 +
 tqtinterface/qt4/src/styles/tqstyleplugin.h        |   1 +
 tqtinterface/qt4/src/styles/tqwindowsstyle.h       |   1 +
 tqtinterface/qt4/src/widgets/tqmenubar.cpp         |   2 +-
 tqtinterface/qt4/src/widgets/tqpopupmenu.cpp       |   4 +-
 tqtinterface/qt4/src/widgets/tqtextedit.cpp        |   2 +-
 tqtinterface/qt4/tools/qtconfig/mainwindow.cpp     |   2 +-
 tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui  |   4 +-
 30 files changed, 258 insertions(+), 147 deletions(-)
 create mode 120000 tqtinterface/qt4/include/tqinputcontext.h
 create mode 120000 tqtinterface/qt4/include/tqinputcontextfactory.h
 delete mode 100644 tqtinterface/qt4/src/__debian_export_symbols.cpp
 create mode 100644 tqtinterface/qt4/src/inputmethod/qt_inputmethod.pri
 delete mode 100644 tqtinterface/qt4/src/inputmethod/tqt_inputmethod.pri

diff --git a/tqtinterface/qt4/debian/rules b/tqtinterface/qt4/debian/rules
index 2c48fb4..e8b0963 100755
--- a/tqtinterface/qt4/debian/rules
+++ b/tqtinterface/qt4/debian/rules
@@ -41,7 +41,12 @@ P_QTMTDEV = $(DEBIAN)/libqt3-mt-dev
 TMP_INSTALL = $(DEBIAN)/tmp-install
 
 CONFIGURE_OPTS = \
-		-thread -debug -stl -system-zlib -system-libpng -system-libmng -system-libjpeg -qt-gif -qt-imgfmt-png -qt-imgfmt-jpeg -plugin-imgfmt-mng -prefix /usr 
+		-thread -debug -stl -system-zlib -system-libpng -system-libmng -system-libjpeg -qt-gif -qt-imgfmt-png -qt-imgfmt-jpeg -plugin-imgfmt-mng -prefix /usr \
+		-I/usr/include/mysql		\
+		-I/usr/include/freetype2	\
+		-I`pg_config --includedir`	\
+						\
+		-L/usr/lib/$(DEB_HOST_MULTIARCH)	\
 		# End of CONFIGURE_OPTS
 
 build: libqt-thread-stamp
diff --git a/tqtinterface/qt4/include/tqinputcontext.h b/tqtinterface/qt4/include/tqinputcontext.h
new file mode 120000
index 0000000..3f7a83d
--- /dev/null
+++ b/tqtinterface/qt4/include/tqinputcontext.h
@@ -0,0 +1 @@
+../src/kernel/tqinputcontext.h
\ No newline at end of file
diff --git a/tqtinterface/qt4/include/tqinputcontextfactory.h b/tqtinterface/qt4/include/tqinputcontextfactory.h
new file mode 120000
index 0000000..64e855c
--- /dev/null
+++ b/tqtinterface/qt4/include/tqinputcontextfactory.h
@@ -0,0 +1 @@
+../src/inputmethod/tqinputcontextfactory.h
\ No newline at end of file
diff --git a/tqtinterface/qt4/src/__debian_export_symbols.cpp b/tqtinterface/qt4/src/__debian_export_symbols.cpp
deleted file mode 100644
index 71e30ad..0000000
--- a/tqtinterface/qt4/src/__debian_export_symbols.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Use the __NO_INLINE__ hack below to prevent sys/stat.h from
-// exporting __extern_inline definitions of the symbols [fl]?stat64
-// with g++-4.3 or later and glibc6 >= 2.7 or later. This flag has no
-// impact on [fl]?stat(64)? symbol export for glibc6 << 2.7
-//
-#ifndef __NO_INLINE__
-# define __NO_INLINE__
-# define INLINE_ENABLED
-#endif
-
-#include <sys/stat.h>
-
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 7)
-
-// We must ensure that [fl]?stat64 are exported in the dynamic symbol
-// table of libqt-mt.so.3 as weak symbols to preserve ABI.
-int stat64 (__const char *__path, struct stat64 *__statbuf) __attribute__((weak));
-int lstat64 (__const char *__path, struct stat64 *__statbuf) __attribute__((weak));
-int fstat64 (int __fd, struct stat64 *__statbuf) __attribute__((weak));
-
-int stat64 (__const char *__path, struct stat64 *__statbuf)
-{
-    return __xstat64 (_STAT_VER, __path, __statbuf);
-}
-
-int lstat64 (__const char *__path, struct stat64 *__statbuf)
-{
-    return __lxstat64 (_STAT_VER, __path, __statbuf);
-}
-
-int fstat64 (int __fd, struct stat64 *__statbuf)
-{
-    return __fxstat64 (_STAT_VER, __fd, __statbuf);
-}
-
-#else
-# ifndef INLINE_ENABLED
-/*
- * Trigger export of the extern __inline [fl]?stat64 symbols
- * (defined at <sys/stat.h>) by referencing them in the dummy
- * hidden function below. It's very important to reference
- * [fl]?stat64 via their [fl]?stat aliases (because LARGEFILE
- * is enabled) for these weak symbols to get exported.
- *
- * This hack is compatible with libc6-dev << 2.7 headers.
- *
- * This source file must be compiled with -fno-inline to have
- * expected effect.
- **/
-void __stat_extern_inline_export_hack()
-    __attribute__((visibility("hidden")));
-
-void __stat_extern_inline_export_hack() {
-    struct stat buf;
-    stat("", &buf);
-    lstat("", &buf);
-    fstat(0, &buf);
-}
-# else
-#  error "This file must be compiled with inline disabled for the hack to be effective."
-# endif /* INLINES_ENABLED */
-
-#endif
diff --git a/tqtinterface/qt4/src/inputmethod/qt_inputmethod.pri b/tqtinterface/qt4/src/inputmethod/qt_inputmethod.pri
new file mode 100644
index 0000000..59ccd37
--- /dev/null
+++ b/tqtinterface/qt4/src/inputmethod/qt_inputmethod.pri
@@ -0,0 +1,10 @@
+# TQt inputmetod module
+
+inputmethod {
+	INPUTMETHOD_P = inputmethod
+	HEADERS +=$$INPUTMETHOD_H/tqinputcontextfactory.h \
+		  $$INPUTMETHOD_P/tqinputcontextinterface_p.h \
+		  $$INPUTMETHOD_H/tqinputcontextplugin.h
+	SOURCES +=$$INPUTMETHOD_CPP/tqinputcontextfactory.cpp \
+		  $$INPUTMETHOD_CPP/tqinputcontextplugin.cpp
+}
diff --git a/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp b/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp
index 276085d..2f0e272 100644
--- a/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp
+++ b/tqtinterface/qt4/src/inputmethod/tqinputcontextfactory.cpp
@@ -64,8 +64,8 @@ static void create_manager()
 
 #ifdef TQT_THREAD_SUPPORT
     // protect manager creation
-    TQMutexLocker locker( qt_global_mutexpool ?
-			 qt_global_mutexpool->get( &manager ) : 0);
+    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.
diff --git a/tqtinterface/qt4/src/inputmethod/tqt_inputmethod.pri b/tqtinterface/qt4/src/inputmethod/tqt_inputmethod.pri
deleted file mode 100644
index 0d48026..0000000
--- a/tqtinterface/qt4/src/inputmethod/tqt_inputmethod.pri
+++ /dev/null
@@ -1,10 +0,0 @@
-# TQt inputmetod module
-
-inputmethod {
-	INPUTMETHOD_P = inputmethod
-	HEADERS +=$$INPUTMETHOD_H/qinputcontextfactory.h \
-		  $$INPUTMETHOD_P/qinputcontextinterface_p.h \
-		  $$INPUTMETHOD_H/qinputcontextplugin.h
-	SOURCES +=$$INPUTMETHOD_CPP/qinputcontextfactory.cpp \
-		  $$INPUTMETHOD_CPP/qinputcontextplugin.cpp
-}
diff --git a/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp b/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
index e7cf92f..aaa9faf 100644
--- a/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
@@ -1791,8 +1791,8 @@ void qt_init_internal( int *argcptr, char **argv,
 #ifndef TQT_NO_XSYNC
 	// Try to initialize SYNC extension on the connected display
 	int xsync_major, xsync_minor;
-	if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) && 
-	     XSyncInitialize( appDpy, &xsync_major,  &xsync_minor ) ) {
+	if ( XSyncQueryExtension( QX11Info::display(), &xsync_eventbase, &xsync_errorbase ) &&
+	     XSyncInitialize( QX11Info::display(), &xsync_major,  &xsync_minor ) ) {
 	     qt_use_xsync = TRUE;
 	}
 #endif 
@@ -2758,6 +2758,26 @@ void qt_leave_modal( TQWidget *widget )
     }
 }
 
+int qt_x11_translateButtonState( int s )
+{
+    int bst = 0;
+    if ( s & Button1Mask )
+        bst |= Qt::LeftButton;
+    if ( s & Button2Mask )
+        bst |= Qt::MidButton;
+    if ( s & Button3Mask )
+        bst |= Qt::RightButton;
+    if ( s & ShiftMask )
+        bst |= TQt::ShiftButton;
+    if ( s & ControlMask )
+        bst |= TQt::ControlButton;
+    if ( s & qt_alt_mask )
+        bst |= TQt::AltButton;
+    if ( s & qt_meta_mask )
+        bst |= TQt::MetaButton;
+    return bst;
+}
+
 #else // USE_QT4
 
 /*****************************************************************************
diff --git a/tqtinterface/qt4/src/kernel/tqdnd_x11.cpp b/tqtinterface/qt4/src/kernel/tqdnd_x11.cpp
index 3ba66b9..56d00d4 100644
--- a/tqtinterface/qt4/src/kernel/tqdnd_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqdnd_x11.cpp
@@ -293,7 +293,7 @@ public:
     	    pm.setMask( tqmask );
     	    setMask( tqmask );
 	} else if ( pm.tqmask() ) {
-	    setMask( *mask );
+	    setMask( *pm.tqmask() );
 	} else {
 	    clearMask();
 	}
diff --git a/tqtinterface/qt4/src/kernel/tqinputcontext.cpp b/tqtinterface/qt4/src/kernel/tqinputcontext.cpp
index dfb38f7..79d9542 100644
--- a/tqtinterface/qt4/src/kernel/tqinputcontext.cpp
+++ b/tqtinterface/qt4/src/kernel/tqinputcontext.cpp
@@ -518,7 +518,7 @@ void TQInputContext::sendIMEventInternal( TQEvent::Type type,
     TQIMEvent *event = 0;
 
 #if defined(TQ_WS_X11)
-    receiver = d->composingWidget;
+    receiver = TQT_TQOBJECT(d->composingWidget);
 #elif defined(TQ_WS_TQWS)
     // just a placeholder
 #endif
@@ -793,14 +793,6 @@ TQString TQInputContext::language()
 }
 
 
-#if ([[[TQT_VERSION IS DEPRECATED]]]-0 >= 0x040000)
-/*!
-    This is a preliminary interface for TQt4
- */
-TQList<TQAction *> TQInputContext::actions()
-{
-}
-#else
 /*!
     This function can be reimplemented in a subclass to provide input
     method dependent popup menus. Return 0 if the menus are
@@ -817,7 +809,6 @@ TQPtrList<TQInputContextMenu> *TQInputContext::menus()
 {
     return 0;
 }
-#endif
 
 /*!
     Appends input method dependent submenus into \a popup. A separator
diff --git a/tqtinterface/qt4/src/kernel/tqinputcontext.h b/tqtinterface/qt4/src/kernel/tqinputcontext.h
index 9dbd9bf..14a1a7e 100644
--- a/tqtinterface/qt4/src/kernel/tqinputcontext.h
+++ b/tqtinterface/qt4/src/kernel/tqinputcontext.h
@@ -43,13 +43,8 @@
 #include "tqglobal.h"
 #include "tqevent.h"
 #include "tqstring.h"
-#if ([[[TQT_VERSION IS DEPRECATED]]]-0 >= 0x040000)
-#include "tqlist.h"
-#include "tqaction.h"
-#else
 #include "tqptrlist.h"
 #endif
-#endif
 
 class TQWidget;
 class TQFont;
@@ -62,15 +57,14 @@ struct TQInputContextMenu {
 	NoSeparator,
 	InsertSeparator
     };
-#if !([[[TQT_VERSION IS DEPRECATED]]]-0 >= 0x040000)
     TQString title;
     TQPopupMenu *popup;
-#endif
 };
 
 
 class TQInputContext : public TQObject
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
     TQInputContext( TQObject *tqparent = 0 );
@@ -94,13 +88,8 @@ public:
     virtual bool isComposing() const;
     virtual bool isPreeditRelocationEnabled();
 
-#if ([[[TQT_VERSION IS DEPRECATED]]]-0 >= 0x040000)
-    virtual TQList<TQAction *> actions();
-    void addActionsTo( TQMenu *menu, TQInputContextMenu::Action action = TQInputContextMenu::InsertSeparator );
-#else
     virtual TQPtrList<TQInputContextMenu> *menus();
     void addMenusTo( TQPopupMenu *popup, TQInputContextMenu::Action action = TQInputContextMenu::InsertSeparator );
-#endif
 
 #if defined(TQ_WS_X11)
     // these functions are not recommended for ordinary use 
diff --git a/tqtinterface/qt4/src/kernel/tqinputcontext_x11.cpp b/tqtinterface/qt4/src/kernel/tqinputcontext_x11.cpp
index e96c75c..7f7b68e 100644
--- a/tqtinterface/qt4/src/kernel/tqinputcontext_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqinputcontext_x11.cpp
@@ -66,4 +66,9 @@
     \sa filterEvent()
 */
 
-#endif //TQ_NO_IM
\ No newline at end of file
+bool TQInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
+{
+    return FALSE;
+}
+
+#endif //TQ_NO_IM
diff --git a/tqtinterface/qt4/src/kernel/tqnamespace.h b/tqtinterface/qt4/src/kernel/tqnamespace.h
index d3919c9..6c0f05a 100644
--- a/tqtinterface/qt4/src/kernel/tqnamespace.h
+++ b/tqtinterface/qt4/src/kernel/tqnamespace.h
@@ -491,7 +491,8 @@ typedef Qt::Orientation Orientation;
         WindowsStyle,
         Win3Style,
         PMStyle,
-        MotifStyle
+        MotifStyle,
+	GtkStyle = 6          // Gtk compability mode
     };
 
 #else // USE_QT4
@@ -513,7 +514,7 @@ typedef Qt::Orientation Orientation;
     enum GUIStyle {
 	WindowsStyle = 1,     // ### TQt 4.0: either remove the obsolete enums or clean up compat vs.
 	MotifStyle = 4,       // ### TQT_NO_COMPAT by reordering or combination into one enum.
-    GtkStyle = 6          // Gtk compability mode
+	GtkStyle = 6          // Gtk compability mode
     };
 #else
     enum GUIStyle {
@@ -522,7 +523,7 @@ typedef Qt::Orientation Orientation;
 	Win3Style, // OBSOLETE
 	PMStyle, // OBSOLETE
 	MotifStyle,
-    GtkStyle = 6          // Gtk compability mode
+	GtkStyle = 6          // Gtk compability mode
     };
 #endif
 
diff --git a/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp b/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
index 2a497e5..a16235c 100644
--- a/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqpixmap_x11.cpp
@@ -42,30 +42,6 @@
 
 #include "tqplatformdefs.h"
 
-#if defined(Q_OS_WIN32) && defined(TQT_MITSHM)
-#undef TQT_MITSHM
-#endif
-
-#ifdef TQT_MITSHM
-
-// Use the MIT Shared Memory extension for pixmap<->image conversions
-#define TQT_MITSHM_CONVERSIONS
-
-// Uncomment the next line to enable the MIT Shared Memory extension
-// for TQPixmap::xForm()
-//
-// WARNING:  This has some problems:
-//
-//    1. Consumes a 800x600 pixmap
-//    2. TQt does not handle the ShmCompletion message, so you will
-//        get strange effects if you xForm() repeatedly.
-//
-// #define TQT_MITSHM_XFORM
-
-#if defined(TQ_OS_WIN32) && defined(TQT_MITSHM)
-#undef TQT_MITSHM
-#endif
-
 #include "tqplatformdefs.h"
 
 #include "tqbitmap.h"
@@ -2515,4 +2491,4 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
 #endif // TQT_NO_XFTFREETYPE
 }
 
-#endif // USE_QT4
\ No newline at end of file
+#endif // USE_QT4
diff --git a/tqtinterface/qt4/src/kernel/tqwidget.h b/tqtinterface/qt4/src/kernel/tqwidget.h
index 65b424e..0a75dad 100644
--- a/tqtinterface/qt4/src/kernel/tqwidget.h
+++ b/tqtinterface/qt4/src/kernel/tqwidget.h
@@ -351,6 +351,9 @@ public:
 	void setMask( const QBitmap );
 	void setMask( const QRegion );
 
+	void sendMouseEventToInputContext( int x, TQEvent::Type type, TQt::ButtonState button, TQt::ButtonState state );
+	TQInputContext *getInputContext();
+
 #ifndef TQT_NO_STYLE
 	void setStyle( TQStyle * );
 	TQStyle* setStyle( const TQString& );
@@ -541,6 +544,12 @@ private:
 
 	friend class TQObject;
 
+protected:
+	virtual TQWidget *icHolderWidget();
+
+private:
+	void createInputContext();
+
 public Q_SLOTS:
 	virtual void tqsetUpdatesEnabled( bool enable );
 	void tqrepaint();
@@ -570,6 +579,21 @@ public Q_SLOTS:
 
 Q_SIGNALS:
 	void destroyed( TQObject* obj );
+
+public:
+#if defined(TQ_WS_X11)
+    enum X11WindowType {
+        X11WindowTypeSelect,
+        X11WindowTypeCombo,
+        X11WindowTypeDND,
+        X11WindowTypeTooltip,
+        X11WindowTypeMenu, // torn-off
+        X11WindowTypeDropdown,
+        X11WindowTypePopup
+    };
+    void x11SetWindowType( X11WindowType type = X11WindowTypeSelect );
+    void x11SetWindowTransient( TQWidget* tqparent );
+#endif
 };
 
 inline void TQWidget::drawText( const TQPoint &p, const TQString &s )
diff --git a/tqtinterface/qt4/src/kernel/tqwidget_x11.cpp b/tqtinterface/qt4/src/kernel/tqwidget_x11.cpp
index c6e7abb..0a60833 100644
--- a/tqtinterface/qt4/src/kernel/tqwidget_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqwidget_x11.cpp
@@ -291,6 +291,169 @@ void TQWidget::drawText( int x, int y, const TQString &str )
     }
 }
 
+void TQWidget::createInputContext()
+{
+#if 0
+// #if !defined(TQT_NO_IM_EXTENSIONS)
+    if( !isInputMethodEnabled() || TQApplication::closingDown() )
+        return;
+// #endif
+
+    TQWidget *icWidget = icHolderWidget();
+#ifndef TQT_NO_IM
+#if !defined(TQT_NO_IM_EXTENSIONS)
+    TQInputContext **qicp = &icWidget->ic;
+#else
+    TQInputContext **qicp = (TQInputContext **)&icWidget->topData()->xic;
+#endif
+
+    if ( ! *qicp ) {
+        // an input context of the default input method is generated.
+        TQInputContext *qic = TQInputContextFactory::create( TQApplication::defaultInputMethod(), icWidget );
+
+        *qicp = qic;
+        if ( qic ) {
+            TQObject::connect( TQT_TQOBJECT(qic), TQT_SIGNAL(imEventGenerated(TQObject *,TQIMEvent *)),
+                              tqApp, TQT_SLOT(postIMEvent(TQObject *,TQIMEvent *)) );
+            TQObject::connect( TQT_TQOBJECT(qic), TQT_SIGNAL(deletionRequested()),
+                              icWidget, TQT_SLOT(destroyInputContext()) );
+        }
+    }
+#endif // TQT_NO_IM
+#else
+    printf("[WARNING] TQWidget::createInputContext() UNIMPLEMENTED\n\r"); fflush(stdout);
+#endif
+}
+
+/*!
+    This function returns the TQInputContext instance for this widget.
+    This instance is used for text input to this widget, etc.
+    It is simply the accessor function.
+*/
+TQInputContext *TQWidget::getInputContext()
+{
+#if 0
+    TQInputContext *qic = 0;
+
+// #if !defined(TQT_NO_IM_EXTENSIONS)
+    if ( isInputMethodEnabled() ) {
+#if !defined(TQT_NO_IM_EXTENSIONS)
+        qic = icHolderWidget()->ic;
+#else
+//    {
+        // icHolderWidget is always tqtopLevelWidget
+        TQTLWExtra *topdata = icHolderWidget()->topData();
+        qic = (TQInputContext *)topdata->xic;
+#endif
+    }
+
+    return qic;
+#else
+    printf("[WARNING] TQWidget::getInputContext() UNIMPLEMENTED\n\r"); fflush(stdout);
+    return 0;
+#endif
+}
+
+/*!
+    This function returns the widget holding the TQInputContext
+    instance for this widget. The instance is used for text input to
+    this widget, switching input method, etc.
+
+    By default, this function delegates the role of returning input
+    context holder widget to TQApplication::locateICHolderWidget().
+
+    This definition enables application developer to change the
+    mapping of widgets to TQInputContext instance simply by overriding
+    TQApplication::locateICHolderWidget().
+
+    \sa TQApplication::locateICHolderWidget()
+*/
+TQWidget *TQWidget::icHolderWidget()
+{
+#if 0
+    return tqApp->locateICHolderWidget(this);
+#else
+    printf("[WARNING] TQWidget::icHolderWidget() UNIMPLEMENTED\n\r"); fflush(stdout);
+    return 0;
+#endif
+}
+
+void TQWidget::sendMouseEventToInputContext( int x, TQEvent::Type type, TQt::ButtonState button, TQt::ButtonState state ) {
+#if 0
+#ifndef TQT_NO_IM
+    // trigger input context creation if it hasn't happened already
+    createInputContext();
+
+    TQInputContext *qic = getInputContext();
+    if ( qic ) {
+        // may be causing reset() in some input methods
+        qic->mouseHandler( x, type, button, state );
+    }
+#endif // TQT_NO_IM
+#else
+    printf("[WARNING] TQWidget::sendMouseEventToInputContext() UNIMPLEMENTED\n\r"); fflush(stdout);
+#endif
+}
+
+void TQWidget::x11SetWindowTransient( TQWidget* tqparent )
+{
+    XSetTransientForHint( x11Display(), winId(), tqparent->winId());
+}
+
+// Sets the EWMH (netwm) window type. Needed as a separate function
+// because create() may be too soon in some cases.
+void TQWidget::x11SetWindowType( X11WindowType type )
+{
+    // NET window types
+    long net_wintypes[7] = { 0, 0, 0, 0, 0, 0, 0 };
+    int curr_wintype = 0;
+    if( testWFlags(WType_Desktop))
+        return;
+    if( type == X11WindowTypeSelect ) {
+        if ( testWFlags(WStyle_Splash)) {
+            if (qt_net_supports(qt_net_wm_window_type_splash)) {
+                net_wintypes[curr_wintype++] = qt_net_wm_window_type_splash;
+            }
+        } else if (inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
+            // toolbar netwm type
+            net_wintypes[curr_wintype++] = qt_net_wm_window_type_toolbar;
+        } else if (testWFlags(WStyle_Customize) && testWFlags(WStyle_Tool)) {
+            // utility netwm type
+            net_wintypes[curr_wintype++] = qt_net_wm_window_type_utility;
+        } else if (testWFlags(WType_Dialog)) {
+            // dialog netwm type
+            net_wintypes[curr_wintype++] = qt_net_wm_window_type_dialog;
+        }
+    } else if( type == X11WindowTypeCombo ) {
+        // combo netwm type
+        net_wintypes[curr_wintype++] = qt_net_wm_window_type_combo;
+    } else if( type == X11WindowTypeDND ) {
+        // dnd netwm type
+        net_wintypes[curr_wintype++] = qt_net_wm_window_type_dnd;
+    } else if( type == X11WindowTypeDropdown ) {
+        // dropdown netwm type
+        net_wintypes[curr_wintype++] = qt_net_wm_window_type_dropdown_menu;
+    } else if( type == X11WindowTypePopup ) {
+        // popup netwm type
+        net_wintypes[curr_wintype++] = qt_net_wm_window_type_popup_menu;
+    } else if( type == X11WindowTypeMenu ) {
+        // menu netwm type
+        net_wintypes[curr_wintype++] = qt_net_wm_window_type_menu;
+    } else if( type == X11WindowTypeTooltip ) {
+        // tooltip netwm type
+        net_wintypes[curr_wintype++] = qt_net_wm_window_type_tooltip;
+    }
+
+    // normal netwm type - default
+    net_wintypes[curr_wintype++] = qt_net_wm_window_type_normal;
+    // set _NET_WM_WINDOW_TYPE
+    if (curr_wintype > 0)
+        XChangeProperty(x11Display(), winId(), qt_net_wm_window_type, XA_ATOM, 32, PropModeReplace,
+                        (unsigned char *) net_wintypes, curr_wintype);
+    else
+        XDeleteProperty(x11Display(), winId(), qt_net_wm_window_type);
+}
+
 #else // USE_QT4
 
 // NOT REVISED
diff --git a/tqtinterface/qt4/src/qt.pro b/tqtinterface/qt4/src/qt.pro
index 63e75d9..070c405 100644
--- a/tqtinterface/qt4/src/qt.pro
+++ b/tqtinterface/qt4/src/qt.pro
@@ -181,16 +181,6 @@ unix {
    QMAKE_PKGCONFIG_INCDIR = $$headers.path
 }
 
-unix {
-    # Debian - compile __debian_export_symbols.cpp with -fno-inline
-    debian_no_inline.output  = .obj/${TQMAKE_FILE_BASE}.o
-    debian_no_inline.commands = $(CXX) -c $(CXXFLAGS) $(INCPATH) -fno-inline ${TQMAKE_FILE_NAME} -o ${TQMAKE_FILE_OUT}
-    debian_no_inline.input = DEBIAN_NO_INLINE
-    TQMAKE_EXTRA_UNIX_COMPILERS += debian_no_inline
-
-    DEBIAN_NO_INLINE = __debian_export_symbols.cpp
-}
-
 wince-* {
 	CONFIG -= incremental
 	message( ...removing plugin stuff... (not permanent) )
diff --git a/tqtinterface/qt4/src/styles/tqcdestyle.h b/tqtinterface/qt4/src/styles/tqcdestyle.h
index e248082..bcd7eeb 100644
--- a/tqtinterface/qt4/src/styles/tqcdestyle.h
+++ b/tqtinterface/qt4/src/styles/tqcdestyle.h
@@ -56,6 +56,7 @@
 
 class TQ_EXPORT_STYLE_CDE TQCDEStyle : public TQMotifStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
 
diff --git a/tqtinterface/qt4/src/styles/tqcommonstyle.h b/tqtinterface/qt4/src/styles/tqcommonstyle.h
index ef01d89..5f17e6d 100644
--- a/tqtinterface/qt4/src/styles/tqcommonstyle.h
+++ b/tqtinterface/qt4/src/styles/tqcommonstyle.h
@@ -49,6 +49,7 @@
 
 class TQ_EXPORT TQCommonStyle: public TQStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 
 public:
diff --git a/tqtinterface/qt4/src/styles/tqmotifplusstyle.h b/tqtinterface/qt4/src/styles/tqmotifplusstyle.h
index 0336f60..7e07e22 100644
--- a/tqtinterface/qt4/src/styles/tqmotifplusstyle.h
+++ b/tqtinterface/qt4/src/styles/tqmotifplusstyle.h
@@ -56,6 +56,7 @@
 
 class TQ_EXPORT_STYLE_MOTIFPLUS TQMotifPlusStyle : public TQMotifStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 
 public:
diff --git a/tqtinterface/qt4/src/styles/tqmotifstyle.h b/tqtinterface/qt4/src/styles/tqmotifstyle.h
index f5d6a52..28aac96 100644
--- a/tqtinterface/qt4/src/styles/tqmotifstyle.h
+++ b/tqtinterface/qt4/src/styles/tqmotifstyle.h
@@ -58,6 +58,7 @@ class TQPalette;
 
 class TQ_EXPORT_STYLE_MOTIF TQMotifStyle : public TQCommonStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
     TQMotifStyle( bool useHighlightCols=FALSE );
diff --git a/tqtinterface/qt4/src/styles/tqplatinumstyle.h b/tqtinterface/qt4/src/styles/tqplatinumstyle.h
index 0d53eb3..cd72357 100644
--- a/tqtinterface/qt4/src/styles/tqplatinumstyle.h
+++ b/tqtinterface/qt4/src/styles/tqplatinumstyle.h
@@ -57,6 +57,7 @@ class TQPalette;
 
 class TQ_EXPORT_STYLE_PLATINUM TQPlatinumStyle : public TQWindowsStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
     TQPlatinumStyle();
diff --git a/tqtinterface/qt4/src/styles/tqsgistyle.h b/tqtinterface/qt4/src/styles/tqsgistyle.h
index 5ae9889..8458a70 100644
--- a/tqtinterface/qt4/src/styles/tqsgistyle.h
+++ b/tqtinterface/qt4/src/styles/tqsgistyle.h
@@ -59,6 +59,7 @@ class TQSGIStylePrivate;
 
 class TQ_EXPORT_STYLE_SGI TQSGIStyle: public TQMotifStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
     TQSGIStyle( bool useHighlightCols = FALSE );
diff --git a/tqtinterface/qt4/src/styles/tqstyleplugin.h b/tqtinterface/qt4/src/styles/tqstyleplugin.h
index 713eae9..75245f3 100644
--- a/tqtinterface/qt4/src/styles/tqstyleplugin.h
+++ b/tqtinterface/qt4/src/styles/tqstyleplugin.h
@@ -54,6 +54,7 @@ class TQStylePluginPrivate;
 
 class TQ_EXPORT TQStylePlugin : public TQGPlugin
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
     TQStylePlugin();
diff --git a/tqtinterface/qt4/src/styles/tqwindowsstyle.h b/tqtinterface/qt4/src/styles/tqwindowsstyle.h
index a5a6fe9..0ba06a4 100644
--- a/tqtinterface/qt4/src/styles/tqwindowsstyle.h
+++ b/tqtinterface/qt4/src/styles/tqwindowsstyle.h
@@ -56,6 +56,7 @@
 
 class TQ_EXPORT_STYLE_WINDOWS TQWindowsStyle : public TQCommonStyle
 {
+    Q_OBJECT
     TQ_OBJECT
 public:
     TQWindowsStyle();
diff --git a/tqtinterface/qt4/src/widgets/tqmenubar.cpp b/tqtinterface/qt4/src/widgets/tqmenubar.cpp
index c8fed6d..0a1feba 100644
--- a/tqtinterface/qt4/src/widgets/tqmenubar.cpp
+++ b/tqtinterface/qt4/src/widgets/tqmenubar.cpp
@@ -301,7 +301,7 @@ TQMenuBar::TQMenuBar( TQWidget *tqparent, const char *name )
     TQFontMetrics fm = fontMetrics();
 
     int h;
-    int gs = style().tqstyleHint(TQStyle::SH_GUIStyle);
+    int gs = tqstyle().tqstyleHint(TQStyle::SH_GUIStyle);
     if (gs == GtkStyle) {
         h = fm.height() + gtkItemVMargin;
     } else {
diff --git a/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp b/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
index 993c065..89f525a 100644
--- a/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
+++ b/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
@@ -603,7 +603,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
         if( tqparent == NULL )
             tqparent = TQApplication::widgetAt( pos );
         if( tqparent == NULL )
-            tqparent = tqApp->activeWindow();
+            tqparent = TQT_TQWIDGET(tqApp->activeWindow());
         if( tqparent != NULL )
             x11SetWindowTransient( tqparent );
     }
@@ -2387,7 +2387,7 @@ void TQPopupMenu::subMenuTimer() {
     TQPoint p;
     TQSize ps = popup->tqsizeHint();
     // GUI Style
-    int gs = style().tqstyleHint(TQStyle::SH_GUIStyle);
+    int gs = tqstyle().tqstyleHint(TQStyle::SH_GUIStyle);
     int arrowHMargin, arrowVMargin;
     if (gs == GtkStyle) {
         arrowHMargin = gtkArrowHMargin;
diff --git a/tqtinterface/qt4/src/widgets/tqtextedit.cpp b/tqtinterface/qt4/src/widgets/tqtextedit.cpp
index e299348..c2c3141 100644
--- a/tqtinterface/qt4/src/widgets/tqtextedit.cpp
+++ b/tqtinterface/qt4/src/widgets/tqtextedit.cpp
@@ -1576,7 +1576,7 @@ bool TQTextEdit::sendMouseEventToInputContext( TQMouseEvent *e )
 #ifndef TQT_NO_IM
     if ( d->composeMode() ) {
 	TQTextCursor c( doc );
-	if ( c.place( e->pos(), doc->firstParagraph(), FALSE, FALSE, FALSE ) ) {
+	if ( c.place( e->pos(), doc->firstParagraph(), FALSE ) ) {
 	    int mousePos = c.index() - d->preeditStart;
 	    if ( cursor->globalY() == c.globalY() &&
 		 mousePos >= 0 && mousePos < d->preeditLength ) {
diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp b/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp
index 7aaf211..03c6e1d 100644
--- a/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp
+++ b/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp
@@ -424,7 +424,7 @@ MainWindow::MainWindow()
     // default input method is XIM in X11.
     TQString currentIM = settings.readEntry("/qt/DefaultInputMethod", "xim");
     {
-	int index = inputMethodIdentifiers.findIndex(currentIM);
+	int index = inputMethodIdentifiers.tqfindIndex(currentIM);
 	// set up Selected input method.
 	if (0 <= index && index < inputMethodIdentifiers.count()) {
 	    inputMethodCombo->setCurrentItem(index);
diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui b/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui
index fc770b0..5192546 100644
--- a/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui
+++ b/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui
@@ -1029,7 +1029,7 @@
                             <number>0</number>
                         </property>
                     </widget>
-                    <widget class=TQLABEL_OBJECT_NAME_STRING>
+                    <widget class="TQLabel">
                         <property name="name">
                             <cstring>inputMethodLabel</cstring>
                         </property>
@@ -1037,7 +1037,7 @@
                             <string>Default Input Method:</string>
                         </property>
                     </widget>
-                    <widget class=TQCOMBOBOX_OBJECT_NAME_STRING>
+                    <widget class="TQComboBox">
                         <property name="name">
                             <cstring>inputMethodCombo</cstring>
                         </property>
-- 
cgit v1.2.3

