Juergen Spitzmueller wrote:
> Perhaps the easiest solution (for 1.3.6) is to disable the QIMEvent stuff
> for Mac. For 1.4, I think we have to investigate further.
>
> Did the qt-immodule problem (bug 1830) occur on Mac or is qt/mac not
> patched with qt-immodule at all?

After some more investigation on the web, I think the safest is to enable it  
just for Q_WS_X11. It seems that the qt-immodule patches are only available 
for qt/x11 anyway. See attached.

Agreed? Also for 1.4?

Jürgen
Index: QContentPane.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.C,v
retrieving revision 1.18.2.3
diff -u -r1.18.2.3 QContentPane.C
--- QContentPane.C	28 May 2005 11:07:45 -0000	1.18.2.3
+++ QContentPane.C	3 Jun 2005 06:57:15 -0000
@@ -96,10 +96,12 @@
 	setFocusPolicy(QWidget::WheelFocus);
 	setFocus();
 	setCursor(ibeamCursor);
+#ifdef Q_WS_X11
 #if QT_VERSION >= 0x030200
 	// to make qt-immodule work
 	setInputMethodEnabled(true);
-#endif
+#endif //QT_VERSION
+#endif //Q_WS_X11
 
 	// stupid moc strikes again
 	connect(wa_->scrollbar_, SIGNAL(valueChanged(int)),
@@ -108,6 +110,7 @@
 }
 
 
+#ifdef Q_WS_X11
 #if QT_VERSION >= 0x030200
 // to make qt-immodule work
 void QContentPane::imStartEvent(QIMEvent *e)
@@ -136,7 +139,8 @@
 	}
 	e->accept();
 }
-#endif
+#endif //QT_VERSION
+#endif //Q_WS_X11
 
 
 void QContentPane::scrollBarChanged(int val)
Index: QContentPane.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.h,v
retrieving revision 1.7.2.3
diff -u -r1.7.2.3 QContentPane.h
--- QContentPane.h	28 May 2005 11:07:45 -0000	1.7.2.3
+++ QContentPane.h	3 Jun 2005 06:57:15 -0000
@@ -97,12 +97,14 @@
 	void wheelEvent(QWheelEvent * e);
 	/// key press
 	void keyPressEvent(QKeyEvent * e);
+#ifdef Q_WS_X11
 #if QT_VERSION >= 0x030200
 	/// IM events
 	void imStartEvent(QIMEvent *);
 	void imComposeEvent(QIMEvent *);
 	void imEndEvent(QIMEvent *);
-#endif
+#endif //QT_VERSION
+#endif //Q_WS_X11
 
 public slots:
 	void doubleClickTimeout();

Reply via email to