-
Notifications
You must be signed in to change notification settings - Fork 27
Feature/qt4 qt5 #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/qt4 qt5 #80
Conversation
Remove remaining dependencies to qt4
…s part of the exported include path
Need to remove the prefixes
This avoids doing unnecessary work and prevents osgViz from trying to swap buffers on an unmapped window. This methods falls flat once more than one Vizkit3DWidget gets instanciated, but that seems to be not handled correctly in any case: The update frequency multiplies by the number of Vizkit3DWidgets, because osgviz always updates all windows.
Instead, move the bits we actually use(not much) into Vizkit3DWidget. This allows to call osgViewer::CompositeViewer::frame() only when the widget actually is visible. Calling frame() while invisible makes QOpenGLContext::swapBuffers() warn about being called with a non-exposed window.
This reverts commit 6af0401.
This reverts commit 6af0401.
Revert "openscenegraph-osgQt renamed to openscenegraph-osgQt5"
… into feature/qt5
Also makes the plugin information visible
Make Qts moc look at the headers needing MOCing
Because that way, they get installed.
…n PropertyBrowserWidget
fix: catch segmentation failed, if string property can not be set
Because that way, they get installed.
planthaber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, bu i didn't test the qt4 version
|
Right. So Qt4 plugins can't be built on Qt5 and Qt5 on Qt4. My question for you guys is: wouldn't it make more sense to create a separate package for qt5 support instead of this ? It's a lot of if (qt4/qt5) and a lot of optional dependencies. |
|
No, this would tear the development apart, new features will probably not be merged and only available for qt4 or qt5, not both. This way, those are instantly available in all rock flavors, no difference if qt4/5 or soon 6 is used. The other packages have a lot less changes, as most differences are handled in the base classes here (Plugins, Widgets) The majority of code is still shared between qt4 and 5, changes are mostly only needed on plugins (e.g. QT designer interface) #if QT_VERSION >= 0x050000
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#else
#include <QtDesigner/QDesignerCustomWidgetInterface>
#endifAns those parts are also a nice documantation on which parts probably have to be changed when porting to another future version. Even the rock_widget_collection has fixes that are not in master yet: rock-core/gui-rock_widget_collection@master...feature/qt4-qt5 |
|
I would actually appreciate if we could improve the cmake-macros such that instead of writing (e.g. for the base-viz plugin) One could simply write Of course something equivalent like On platforms without qt4-support the With a global configuration option one could even easily deactivate everything qt-related (e.g., when building on robots with limited HD space, or non x86-architectures without qt implementations -- or just to save some build time). |
I do admit that the CMakeLists.txt do not look pretty. I have people asking about making macros to unify the qt library creation, but i don't see how to do that while retaining the users ability to see what library targets exist. The best i could come up with is setting variables with the file lists and then have the if(ROCK_QT_4)/if(ROCK_QT_5) sections with their respective differences. I am open to suggestions on how to improve the cmake integration. Maybe documenting that a new macro produces more than one target, and under what circumstances it does so, is enough? Users can also check for the targets existence, if they need to. On the cpp/hpp side, the Qts do not differ much. vizkit3d is especially hit because the Qts plugin system changed. Simple plugins generally don't need care at all, and plugins with multiple visualizations look like this: base types PluginLoader.hpp base types PluginLoader.cpp. Visualizations can even depend on the Qts pulled by vizkit3d in their manifest.xml. (The other changes that i am hitting a lot is around the toAscii(removed)/toUtf8/toLatin1/toLocal8Bit/toStdString area, and include renaming around uitools, widgets, gui.) If we split vizkit3d and visualizaions, we'd have the visualizations each in their own package(base/types-viz-qt4 and base/types-viz-qt5 separate from base/types), the former two with extremely similar code(if not exactly the same code) that needs to be maintained with exactly the same patches, when changing cpp/hpp files. If we only split vizkit3d, we'd have each visualization with a pair of optional vizkit3d dependencies, while still duplicating most of vizkit3ds code, and the visualizations still need to figure out what Qt is available. There is another option to create two vizkit3d packages from the same source(using a cmake parameter to differentiate the qt version), which has the same effect for visualizations as above, but does not duplicate actual code. |
|
I'd rather see so there is no confusion that this sometimes creates a |
Fine for me as well.
Yes, but also |
This reverts commit 0075fe4.
Plugin type independent implementation to set other default options in vizkit3d plugins after loading the plugin.
Add optional override of plugin default settings
|
@pierrewillenbrockdfki thanks for all that work. Feel free to merge as you see fit ;-) |
This makes the vizkit3d-qt5 library available on systems having the required qt5 prerequisites. Qt4 using packages should (and have been tested to) be unaffected.