diff --git a/qt-x11-opensource-src-4.4.3-im.patch b/qt-x11-opensource-src-4.4.3-im.patch new file mode 100644 index 0000000..e75d2bb --- /dev/null +++ b/qt-x11-opensource-src-4.4.3-im.patch @@ -0,0 +1,67 @@ +diff -up qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp.orig qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp +--- qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp.orig 2008-11-06 14:19:08.000000000 +0100 ++++ qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp 2008-11-06 14:18:34.000000000 +0100 +@@ -69,12 +69,15 @@ QMultiInputContext::QMultiInputContext() + if (keys.at(i).contains(QLatin1String("imsw"))) + keys.removeAt(i); + ++ m_keys = keys; ++ + QString def = QLatin1String(getenv("QT_IM_MODULE")); + if (def.isEmpty()) { +- QSettings settings; +- def = settings.value(QLatin1String("/qt/DefaultInputMethod"), QLatin1String("xim")).toString(); ++ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); ++ settings.beginGroup(QLatin1String("Qt")); ++ def = settings.value(QLatin1String("DefaultInputMethod"), QLatin1String("xim")).toString(); + } +- current = keys.indexOf(def); ++ current = m_keys.indexOf(def); + if (current < 0) + current = 0; + +@@ -83,13 +86,16 @@ QMultiInputContext::QMultiInputContext() + separator->setSeparator(true); + + QActionGroup *group = new QActionGroup(this); +- for (int i = 0; i < keys.size(); ++i) { +- slaves.append(QInputContextFactory::create(keys.at(i), this)); +- QAction *a = menu->addAction(slaves.at(i)->identifierName()); ++ for (int i = 0; i < m_keys.size(); ++i) { ++ //slaves.append(QInputContextFactory::create(keys.at(i), this)); ++ slaves.append(NULL); ++ QAction *a = menu->addAction(m_keys.at(i)); + a->setCheckable(true); + group->addAction(a); +- if (i == current) ++ if (i == current) { ++ slaves.replace(current, QInputContextFactory::create(m_keys.at(i), this)); + a->setChecked(true); ++ } + } + connect(group, SIGNAL(triggered(QAction*)), this, SLOT(changeSlave(QAction*))); + +@@ -181,8 +187,10 @@ QList QMultiInputContext::act + + void QMultiInputContext::changeSlave(QAction *a) + { +- for (int i = 0; i < slaves.size(); ++i) { +- if (slaves.at(i)->identifierName() == a->text()) { ++ for (int i = 0; i < m_keys.size(); ++i) { ++ if (m_keys.at(i) == a->text()) { ++ if (NULL == slaves.at(i)) ++ slaves.replace(i, QInputContextFactory::create(m_keys.at(i), this)); + current = i; + return; + } +diff -up qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h.orig qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h +--- qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h.orig 2008-09-27 10:58:48.000000000 +0200 ++++ qt-x11-opensource-src-4.4.3/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h 2008-11-06 14:19:53.000000000 +0100 +@@ -103,6 +103,7 @@ private: + QList slaves; + QMenu *menu; + QAction *separator; ++ QStringList m_keys; + }; + + #endif // Q_NO_IM diff --git a/qt.spec b/qt.spec index a62fe4e..72470b5 100644 --- a/qt.spec +++ b/qt.spec @@ -9,7 +9,7 @@ Epoch: 1 Name: qt4 %endif Version: 4.4.3 -Release: 1%{?dist} +Release: 2%{?dist} # GPLv2 exceptions(see GPL_EXCEPTIONS*.txt) License: GPLv3 with exceptions or GPLv2 with exceptions @@ -38,6 +38,7 @@ Patch8: qt-x11-opensource-src-4.3.4-no-hardcoded-font-aliases.patch # under GNOME, default to QGtkStyle if available # (otherwise fall back to QCleanlooksStyle) Patch9: qt-x11-opensource-src-4.4.0-qgtkstyle.patch +Patch10: qt-x11-opensource-src-4.4.3-im.patch ## qt-copy patches %define qt_copy 20080920 @@ -284,6 +285,7 @@ test -x apply_patches && ./apply_patches %patch5 -p1 -b .bz#437440-as_IN-437440 %patch8 -p1 -b .font-aliases %patch9 -p1 -b .qgtkstyle +%patch10 -p1 -b .im # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -731,6 +733,11 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: %changelog +* Thu Nov 06 2008 Than Ngo 4.4.3-2 +- bz#468814, immodule selection behavior is unpredictable without QT_IM_MODULE, + patch from Peng Wu +- backport fix from 4.5 + * Sun Sep 28 2008 Rex Dieter 4.4.3-1 - 4.4.3