Bug 260882 - Sometimes the textfield of the composer vanishes. (A central widget is lost or not created.)
Summary: Sometimes the textfield of the composer vanishes. (A central widget is lost o...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: KMail Mobile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Windows CE Microsoft Windows CE
: VHI major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 259745 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-21 14:46 UTC by Ludwig Reiter
Modified: 2016-09-29 07:51 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Reiter 2010-12-21 14:46:13 UTC
Version:           unspecified (using Devel) 
OS:                Windows CE

version: 20101219 svn 1207720

Reproducible: Sometimes

Steps to Reproduce:
Sometimes after opening the composer and waiting for some seconds (or if incoming new mail appears) the textarea of the message text vanishs.
I don't see a pattern when it happens. Perhaps in 1 of 5-10 tests.

Actual Results:  
The textarea vanishs.

Expected Results:  
The textarea should not vanish.
Comment 1 Bernhard E. Reiter 2011-01-05 11:20:04 UTC
I did see this in a 2 hours session testing Mail and Calendar
that the text entry field dissappeard
  Kontact Touch CAB from:
  snapshots/kdepim-ce-package_2011-01-04-09-32
  HTC Touch Pro2, _NEW_ ROM: CE OS 5.2.21887, 2.07.407.1 (80303) GER 02/04/10

I could trigger this by trying to write a new email,
entered a bit in the title the first line and then the last line and a few more lines. I could trigger this in one session, but after rebooting I could not reproduce. This hints towards a resource being depleted.

In #259745 this could be triggered by trying to enter recipients.

Andy's hypothesis is that some widgets are lost, probably they cannot be created, maybe because of memory problems. Testing this idea is difficult, because we do not have debug builds of the composer.
Comment 2 Bernhard E. Reiter 2011-01-05 11:21:38 UTC
*** Bug 259745 has been marked as a duplicate of this bug. ***
Comment 3 Bernhard E. Reiter 2011-01-05 11:24:48 UTC
Maybe related to Bug 262164 -  Month view: Swiping to previous or next month can bring up a blank view area
Comment 4 Andreas Holzammer 2011-01-18 16:22:50 UTC
commit 63c9088c79a87ccb8a6a24e71851002aea345f11
branch master
Author: Andreas Holzammer <andreas.holzammer@kdab.com>
Date:   Tue Jan 18 16:19:52 2011 +0100

    fix that widgets get lost
    It seems that widgets get a setVisiable(false) from somewhere in qt,
    to fix this issue we revert its hiding. This should be fixed in qt.
    But i didnt found where it is called.
    
    BUG:260882

diff --git a/mobile/lib/declarativewidgetbase.cpp b/mobile/lib/declarativewidgetbase.cpp
index 6ba5a75..65f25b4 100644
--- a/mobile/lib/declarativewidgetbase.cpp
+++ b/mobile/lib/declarativewidgetbase.cpp
@@ -24,6 +24,19 @@
 #include <QtGui/QGraphicsScene>
 #include <QtGui/QWidget>
 
+#ifdef _WIN32_WCE
+bool DeclarativeWidgetBaseHelper::eventFilter(QObject *obj, QEvent *event)
+{
+    if (event->type() == QEvent::Hide) {
+        QWidget *wid = static_cast<QWidget *>(obj);
+        wid->show();
+        qDebug("Ate hide event");
+    }
+   
+    return QObject::eventFilter(obj, event);
+}
+#endif
+
 DeclarativeWidgetBaseHelper::DeclarativeWidgetBaseHelper( QWidget * widget, QGraphicsItem * parent, const RegisterFunction & registerFunc )
     : QGraphicsProxyWidget( parent ),
       m_registerFunc( registerFunc ),
@@ -37,9 +50,17 @@ DeclarativeWidgetBaseHelper::DeclarativeWidgetBaseHelper( QWidget * widget, QGra
     StyleSheetLoader::applyStyle( m_widget );
     setWidget( m_widget );
     setFocusPolicy( Qt::StrongFocus );
+#ifdef _WIN32_WCE
+    m_widget->installEventFilter(this);
+#endif
 }
 
-DeclarativeWidgetBaseHelper::~DeclarativeWidgetBaseHelper() {}
+DeclarativeWidgetBaseHelper::~DeclarativeWidgetBaseHelper()
+{
+#ifdef _WIN32_WCE
+    m_widget->removeEventFilter(this);
+#endif
+}
 
 QVariant DeclarativeWidgetBaseHelper::itemChange( GraphicsItemChange change, const QVariant & value )
 {
diff --git a/mobile/lib/declarativewidgetbase.h b/mobile/lib/declarativewidgetbase.h
index fee4a58..b849c12 100644
--- a/mobile/lib/declarativewidgetbase.h
+++ b/mobile/lib/declarativewidgetbase.h
@@ -43,6 +43,9 @@ protected:
 
 protected:
     /* reimp */ QVariant itemChange( GraphicsItemChange change, const QVariant & value );
+#ifdef _WIN32_WCE
+    bool eventFilter(QObject *obj, QEvent *event);
+#endif
 
 private:
     const RegisterFunction m_registerFunc;
Comment 5 Andre Heinecke 2011-03-02 14:48:26 UTC
With snapshot version 2011-03-01-23-23 i have this problem in the messagecomposer again.
Comment 6 Andre Heinecke 2011-03-07 12:09:25 UTC
Prio HI > VHI this is the worst bug we have in komo afaik