r16114 by avox - dead key fix
scribus-commit
scribus-commit at lists.scribus.net
Sun Dec 19 16:49:33 CET 2010
Author: avox
Date: Sun Dec 19 15:49:33 2010
New Revision: 16114
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16114
Log:
dead key fix
Modified:
branches/Version135/Scribus/scribus/scribusview.cpp
branches/Version135/Scribus/scribus/scribusview.h
Modified: branches/Version135/Scribus/scribus/scribusview.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16114&path=/branches/Version135/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scribusview.cpp (original)
+++ branches/Version135/Scribus/scribus/scribusview.cpp Sun Dec 19 15:49:33 2010
@@ -162,6 +162,7 @@
{
setObjectName("s");
setAttribute(Qt::WA_StaticContents);
+ setAttribute(Qt::WA_InputMethodEnabled, true);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
setViewportMargins(m_vhRulerHW, m_vhRulerHW, 0, 0);
@@ -4645,6 +4646,22 @@
m_ScMW->keyReleaseEvent(k);
}
+void ScribusView::inputMethodEvent ( QInputMethodEvent * event )
+{
+// qDebug() << "IME" << event->commitString() << event->preeditString() << "attributes:" << event->attributes().count();
+ for(int i = 0; i < event->commitString().length(); ++i)
+ {
+ QKeyEvent ev( QEvent::KeyPress, 0, Qt::NoModifier, event->commitString().mid(i,1));
+ keyPressEvent(&ev);
+ }
+}
+
+QVariant ScribusView::inputMethodQuery ( Qt::InputMethodQuery query ) const
+{
+// qDebug() << "IMQ" << query;
+ return QVariant();
+}
+
void ScribusView::wheelEvent(QWheelEvent *w)
{
//QScrollArea::contentsWheelEvent(w);
Modified: branches/Version135/Scribus/scribus/scribusview.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16114&path=/branches/Version135/Scribus/scribus/scribusview.h
==============================================================================
--- branches/Version135/Scribus/scribus/scribusview.h (original)
+++ branches/Version135/Scribus/scribus/scribusview.h Sun Dec 19 15:49:33 2010
@@ -362,6 +362,8 @@
void keyPressEvent(QKeyEvent *k);
void keyReleaseEvent(QKeyEvent *k);
+ void inputMethodEvent ( QInputMethodEvent * event );
+ QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const ;
inline void registerMousePress(QPoint p);
bool mousePressed();
More information about the scribus-commit
mailing list