Re: [Development] platform theme plugins and automatically loading them

2017-01-19 Thread René J . V . Bertin
René J.V. Bertin wrote:


> 2. Has anything changed in the related functionality between Qt 5.7.1 and Qt
> 5.8.0? I'm currently testing 5.8.0RC installed into a "destroot" (make install

Something has indeed changed here, but apparently already in 5.7.1 . I have a 
version check in my platform theme plugin that prints a warning in case of a 
mismatch, and that always worked. AFAICR I didn't have to rebuild the plugin 
before it loaded when I upgraded from 5.6.2 to 5.7.1, I just got that warning 
every time I started an application.

The lack of feedback is quite annoying actually, esp. since other plugins load 
without problem.

R.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] platform theme plugins and automatically loading them

2017-01-19 Thread René J . V . Bertin
René J.V. Bertin wrote:

> 1. Does the platform theme plugin have to be called "kde", i.e. have the same
> name as the internal "kde" theme? IOW, are platform theme plugins matched to
> existing internal plugins themes (to extend them), or are they "plugins that
> provide additional platform themes"? In yet other words, can I call the
> platform theme plugin "cocoa" and leave out the internal QKdeTheme?

To answer this myself: No, the plugin doesn't need to be called "kde" and the 
built-in kde theme from qgenericunixthemes isn't required.
And yes, if I rename the platform theme plugin to "cocoa" it is always loaded 
without need to add an extra theme name in qcocoaintegration.

R.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] platform theme plugins and automatically loading them

2017-01-19 Thread René J . V . Bertin
Hi,

You probably remember that I have been tinkering with an auto-loading Qt 
platform theme plugin for Mac, an adapted version of the KDE platform theme 
plugin from "Plasma Integration". The goal is to provide support for KDE's 
colour & icon palettes plus font role definitions (from kdeglobals) which can 
then be used with any application style including the native macintosh style. 
This makes KF5 applications look a lot more how they are designed to look.

The set-up is simple:
- QCocoaIntegration::themeNames() returns an additional theme name, "kde"
- the build system is patched so that qgenericunixservices and 
qgenericunixthemes are built and included, so a "kde" theme is defined at that 
level
- the platform theme plugin declares a 
org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1 key "kde".
- the platform theme plugin main class has a proxy to the native theme, created 
as

nativeTheme = 
QGuiApplicationPrivate::platformIntegration()->createPlatformTheme(QGuiApplication::platformName());

That proxy is used whenever the theme plugin doesn't completely override the 
native theme choice.

I'm not really sure exactly why, but this works, nor to what extent 
QGenericUnixThemes are required (I've tried following the execution flow but 
the lldb debugger tends to get stuck).

Two questions: 

1. Does the platform theme plugin have to be called "kde", i.e. have the same 
name as the internal "kde" theme? IOW, are platform theme plugins matched to 
existing internal plugins themes (to extend them), or are they "plugins that 
provide additional platform themes"? In yet other words, can I call the 
platform theme plugin "cocoa" and leave out the internal QKdeTheme?

2. Has anything changed in the related functionality between Qt 5.7.1 and Qt 
5.8.0? I'm currently testing 5.8.0RC installed into a "destroot" (make install 
INSTALL_ROOT=foo) using DYLD_FRAMEWORK_PATH and QT_PLUGIN_PATH set 
appropriately. Existing apps run fine and even use my installed application 
styles, but apparently NOT the platform theme plugin. I thus get the KDE look 
and feel, but all platform integration is lost that is normally provided 
through the native theme proxy. My platform theme binary is loaded from what I 
can tell, but its entry point isn't called. Is that to be expected?

Thanks,
René


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development