Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 223092aa authored by Jonathan Doman's avatar Jonathan Doman Committed by Albert Astals Cid

Fix embed mode detection

Wow, I have no idea how this happened. I wrote an big test case and spent a lot of time playing with tabs. Stephan Binner even told me about this a month ago, but I didn't quite understand the problem...
Broken embed mode detection means that the tabbed interface is disabled. It actually made it into release... ugh

REVIEW: 123680
parent cb9aa155
......@@ -125,7 +125,7 @@ static KJSObject docGetExternal( KJSContext *, void *object )
const bool isShell = ( widget
&& widget->parentWidget()
&& widget->parentWidget()->objectName() == QLatin1String( "okular::Shell" ) );
&& widget->parentWidget()->objectName().startsWith( QLatin1String( "okular::Shell" ) ) );
return KJSBoolean( !isShell );
}
......
......@@ -239,8 +239,8 @@ static Okular::EmbedMode detectEmbedMode( QWidget *parentWidget, QObject *parent
Q_UNUSED( parentWidget );
if ( parent
&& ( parent->objectName() == QLatin1String( "okular::Shell" )
|| parent->objectName() == QLatin1String( "okular/okular__Shell" ) ) )
&& ( parent->objectName().startsWith( QLatin1String( "okular::Shell" ) )
|| parent->objectName().startsWith( QLatin1String( "okular/okular__Shell" ) ) ) )
return Okular::NativeShellMode;
if ( parent
......
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