2011/6/23 Raphael Kubo da Costa <[email protected]>
> JonAnder Peñalba <[email protected]> writes:
>
> > This is not the result I get. When I compile with this define, I get
> strange
> > results that vary from weird behavior to segfaults.
>
> Are you sure these are related to KDE_NO_DEPRECATED?
>
Pretty sure yes.
For example, this code works fine without KDE_NO_DEPRECATED, but segfaults
when defined:
MainWindow::MainWindow(QWidget *parent)
: KParts::MainWindow()
{
KService::Ptr service = KService::serviceByStorageId("katepart.desktop");
if (service)
m_part = service->createInstance<KParts::ReadWritePart>(0);
}
Here the backtrace:
Application: KPart Basic Demo (kpartbasic), signal: Segmentation fault
[KCrash Handler]
#6 0x00007fe8ce0b6e7c in QObject::isWidgetType (this=0x7fe8ce0d69c0) at
/opt/project-neon/include/QtCore/qobject.h:156
#7 0x00007fe8ce0c655d in KParts::Factory::createObject (this=0x113dc50,
parent=0x7fe8ce0d69c0, classname=0x0, args=...) at
/build/buildd/project-neon-kdelibs-2+git20110624+r91969/kparts/factory.cpp:77
#8 0x000000000040508e in create<KParts::ReadWritePart> (this=0x11245e0,
parent=<value optimized out>, __in_chrg=<value optimized out>,
__vtt_parm=<value optimized out>) at
/opt/project-neon/include/kpluginfactory.h:531
#9 createInstance<KParts::ReadWritePart> (this=0x11245e0, parent=<value
optimized out>, __in_chrg=<value optimized out>, __vtt_parm=<value optimized
out>) at /opt/project-neon/include/KDE/../kservice.h:551
#10 createInstance<KParts::ReadWritePart> (this=0x11245e0, parent=<value
optimized out>, __in_chrg=<value optimized out>, __vtt_parm=<value optimized
out>) at /opt/project-neon/include/KDE/../kservice.h:528
#11 MainWindow::MainWindow (this=0x11245e0, parent=<value optimized out>,
__in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at
/home/jonan/kdeexamples/kpart/basic/mainwindow.cpp:43
#12 0x0000000000404f1d in main (argc=1, argv=0x7fff68fafa08) at
/home/jonan/kdeexamples/kpart/basic/main.cpp:42
I've also noticed strange behavior in other classes such as KLineEdit and
KFileDialog. I'll investigate deeper and report.
BTW I'm using KDE git from project neon.
Cheers,
Jonan
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<