Commit 4282d67d authored by Allen Winter's avatar Allen Winter

src/korganizer_part.cpp - dynamic_cast instead of old C-style cast

parent dae0e0f1
......@@ -51,10 +51,11 @@ KOrganizerPart::KOrganizerPart(QWidget *parentWidget, QObject *parent, const QVa
if (parentWidget) {
mTopLevelWidget = parentWidget->topLevelWidget();
} else if (parent && parent->isWidgetType()) {
mTopLevelWidget = (QWidget *)parent;
mTopLevelWidget = dynamic_cast<QWidget *>(parent);
} else {
qCCritical(KORGANIZER_LOG) << "Cannot initialize the part without a top level widget.";
KOCore::self()->addXMLGUIClient(mTopLevelWidget, this);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment