https://bugs.kde.org/show_bug.cgi?id=205713
--- Comment #18 from Jan Lepper <[email protected]> --- On Sat, 18 Aug 2012 21:12:25 +0000 Allen Winter <[email protected]> wrote: > https://bugs.kde.org/show_bug.cgi?id=205713 > > Allen Winter <[email protected]> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |[email protected] > > --- Comment #17 from Allen Winter <[email protected]> --- > Like this? > > > --- a/korganizer/korganizer_part.cpp > +++ b/korganizer/korganizer_part.cpp > @@ -49,7 +49,7 @@ K_PLUGIN_FACTORY( KOrganizerFactory, > registerPlugin<KOrganizerPart>(); ) > K_EXPORT_PLUGIN( KOrganizerFactory( createAboutData() ) ) > > KOrganizerPart::KOrganizerPart( QWidget *parentWidget, QObject > *parent, const QVariantList & ) > - : KParts::ReadOnlyPart(parent), mTopLevelWidget( > parentWidget->topLevelWidget() ) > + : KParts::ReadOnlyPart( parent ) > { > KGlobal::locale()->insertCatalog( "libkcalutils" ); > KGlobal::locale()->insertCatalog( "calendarsupport" ); > @@ -59,6 +59,11 @@ KOrganizerPart::KOrganizerPart( QWidget > *parentWidget, QObject *parent, const QV > KGlobal::locale()->insertCatalog( "libincidenceeditors" ); > KGlobal::locale()->insertCatalog( "libkpimutils" ); > > + if ( parentWidget ) { > + mTopLevelWidget = parentWidget->topLevelWidget(); > + } else { > + mTopLevelWidget = (QWidget *)parent; > + } > > KOCore::self()->addXMLGUIClient( mTopLevelWidget, this ); > Of course you will have to check if parent is actually a QWidget. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Kdepim-bugs mailing list [email protected] https://mail.kde.org/mailman/listinfo/kdepim-bugs
