Accents don't work with native/alien widgets combination.

Roman Jarosz kedgedev at gmail.com
Sun Feb 8 20:18:23 GMT 2009


On Sun, 08 Feb 2009 17:47:12 +0100, Maksim Orlovich <mo85 at cornell.edu>  
wrote:

>> The bug can be seen in Kopete when we create new tab, after that user
>> can't type
>> accents in first tab. The problem is that the Qt::WA_NativeWindow flag  
>> is
>> set
>> in Qt/KHTML the KHTML needs the winId for
>> KIO::SchedulerPrivate::registerWindow
>> and when it calls QWidget::winId() Qt automatically sets
>> Qt::WA_NativeWindow
>> for that window;
>
> Could you please tell me where that happens? We should generally be using
> ->topLevelWidget() for such stuff anyway
>
> -Maks

The call is in Loader::servePendingRequests (khtml/misc/loader.cpp)
most likely line job->ui()->setWindow (part->widget()->topLevelWidget());

Here's backtrace:
#0  QWidget::setAttribute (this=0x9f1bf0, attribute=Qt::WA_NativeWindow,  
on=true) at kernel/qwidget.cpp:9638
#1  0x00007f880bd99d84 in QWidget::winId (this=0x9f1bf0) at  
kernel/qwidget.cpp:2141
#2  0x00007f880e2b5e95 in KIO::SchedulerPrivate::registerWindow () from  
/opt/kde-4.x/lib/libkio.so.5
#3  0x00007f87ff1de95c in khtml::Loader::servePendingRequests () from  
/opt/kde-4.x/lib/libkhtml.so.5
#4  0x00007f87ff1e122e in khtml::CachedCSSStyleSheet::CachedCSSStyleSheet  
() from /opt/kde-4.x/lib/libkhtml.so.5
#5  0x00007f87ff1e6ebb in  
khtml::Cache::requestObject<khtml::CachedCSSStyleSheet,  
(khtml::CachedObject::Type)1> ()
    from /opt/kde-4.x/lib/libkhtml.so.5
#6  0x00007f87ff1e4570 in khtml::DocLoader::requestStyleSheet () from  
/opt/kde-4.x/lib/libkhtml.so.5
#7  0x00007f87ff194ba0 in DOM::CSSImportRuleImpl::init () from  
/opt/kde-4.x/lib/libkhtml.so.5
#8  0x00007f87ff195088 in DOM::CSSImportRuleImpl::CSSImportRuleImpl ()  
 from /opt/kde-4.x/lib/libkhtml.so.5
#9  0x00007f87ff1cc1c0 in cssyyparse () from /opt/kde-4.x/lib/libkhtml.so.5
#10 0x00007f87ff1a4b84 in DOM::CSSParser::runParser () from  
/opt/kde-4.x/lib/libkhtml.so.5
#11 0x00007f87ff1a50fc in DOM::CSSParser::parseSheet () from  
/opt/kde-4.x/lib/libkhtml.so.5
#12 0x00007f87ff18fd88 in DOM::CSSStyleSheetImpl::parseString () from  
/opt/kde-4.x/lib/libkhtml.so.5
#13 0x00007f87ff0d04af in DOM::HTMLStyleElementImpl::childrenChanged ()  
 from /opt/kde-4.x/lib/libkhtml.so.5
#14 0x00007f87ff07ec1c in DOM::NodeBaseImpl::addChild () from  
/opt/kde-4.x/lib/libkhtml.so.5
#15 0x00007f87ff0bb29f in khtml::KHTMLParser::insertNode () from  
/opt/kde-4.x/lib/libkhtml.so.5
#16 0x00007f87ff0bda90 in khtml::KHTMLParser::parseToken () from  
/opt/kde-4.x/lib/libkhtml.so.5
#17 0x00007f87ff0be194 in khtml::HTMLTokenizer::processToken () from  
/opt/kde-4.x/lib/libkhtml.so.5
#18 0x00007f87ff0c555e in khtml::HTMLTokenizer::parseSpecial () from  
/opt/kde-4.x/lib/libkhtml.so.5
#19 0x00007f87ff0c7357 in khtml::HTMLTokenizer::parseTag () from  
/opt/kde-4.x/lib/libkhtml.so.5
#20 0x00007f87ff0c8933 in khtml::HTMLTokenizer::write () from  
/opt/kde-4.x/lib/libkhtml.so.5
#21 0x00007f87ff00c589 in KHTMLPart::write () from  
/opt/kde-4.x/lib/libkhtml.so.5
#22 0x00007f87fec00ad6 in ChatMessagePart::writeTemplate (this=0xa85fe0)
     at  
/home/data/kdesvn/kde4network/kopete/kopete/chatwindow/chatmessagepart.cpp:1315
#23 0x00007f87fec02921 in ChatMessagePart (this=0xa85fe0, mgr=<value  
optimized out>, parent=<value optimized out>)
     at  
/home/data/kdesvn/kde4network/kopete/kopete/chatwindow/chatmessagepart.cpp:227
#24 0x00007f87fde7b9cd in ChatView (this=0x9f1bf0, mgr=0xa86810,  
parent=<value optimized out>)
     at  
/home/data/kdesvn/kde4network/kopete/kopete/chatwindow/chatview.cpp:93
#25 0x00007f87fde7bea4 in ChatWindowPlugin::createView (this=0x9c4dd0,  
manager=0xa86810)
     at  
/home/data/kdesvn/kde4network/kopete/kopete/chatwindow/chatview.cpp:59
#26 0x00007f880f5c1ee0 in KopeteViewManager::view (this=0x978170,  
session=0xa86810, requestedPlugin=@0x7fff1892b920)
     at  
/home/data/kdesvn/kde4network/kopete/libkopete/private/kopeteviewmanager.cpp:211
#27 0x00007f880f5f39c7 in Kopete::ChatSessionManager::createView  
(this=0x7a1a10, kmm=0xa86810, requestedPlugin=@0x7fff1892b920)
     at  
/home/data/kdesvn/kde4network/kopete/libkopete/kopetechatsessionmanager.cpp:158
#28 0x00007f880f5f0976 in Kopete::ChatSession::view (this=0xa86810,  
canCreate=<value optimized out>, requestedPlugin=@0x7fff1892b920)
     at  
/home/data/kdesvn/kde4network/kopete/libkopete/kopetechatsession.cpp:468
#29 0x00007f880f5fadde in Kopete::Contact::execute (this=0x9e8650) at  
/home/data/kdesvn/kde4network/kopete/libkopete/kopetecontact.cpp:407
#30 0x00007f880f6103a8 in Kopete::MetaContact::execute (this=<value  
optimized out>)
     at  
/home/data/kdesvn/kde4network/kopete/libkopete/kopetemetacontact.cpp:409
#31 0x0000000000426ab2 in KopeteMetaContactLVI::execute (this=0x987420)
---Type <return> to continue, or q <return> to quit---q







More information about the kde-core-devel mailing list