summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-12-16 18:05:53 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-12-17 10:48:39 +0200
commitb303e4d39bd89e4a7b8578fb8d04fd59ccdb86db (patch)
tree8b44c5928a8cfd22cfd612c4bfa82a9093eecf69
parent1cacd3fbe4e60e7aa91acb0d435def1746f87b06 (diff)
downloadtdewebdev-b303e4d39bd89e4a7b8578fb8d04fd59ccdb86db.tar.gz
tdewebdev-b303e4d39bd89e4a7b8578fb8d04fd59ccdb86db.zip
Quanta: Enable and use TQt input methods in Kafka (VPL) part.
This resolves issue #14. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp
index a1e78aa5..545dec8c 100644
--- a/quanta/parts/kafka/kafkahtmlpart.cpp
+++ b/quanta/parts/kafka/kafkahtmlpart.cpp
@@ -99,6 +99,8 @@ KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument
m_modifs = 0L;
+ view()->setInputMethodEnabled(true);
+
// With the mix of Leo Savernik's caret Mode and the current editing
// functions, it will be kind of VERY messy
setCaretMode(true);
@@ -504,7 +506,7 @@ bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
emit hasFocus(false);
}
- if(event->type() == TQEvent::KeyPress)
+ if(event->type() == TQEvent::KeyPress || event->type() == TQEvent::IMEnd)
{
TQKeyEvent *keyevent = TQT_TQKEYEVENT(event);
@@ -661,7 +663,7 @@ bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
!( keyevent->state() & AltButton ) &&
!( keyevent->state() & MetaButton ) ||
( ( (keyevent->state()&ControlButton) | AltButton ) == (ControlButton|AltButton) ) ) &&
- ( !keyevent->ascii() || keyevent->ascii() >= 32 || keyevent->text() == "\t" ) )
+ ( !keyevent->ascii() || keyevent->ascii() >= 32 || keyevent->text() == "\t" ) || event->type() == TQEvent::IMEnd )
{
if(hasSelection())
removeSelection();