From dc28187530a24f49077cc11b564fdc80c3dd48ef Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Tue, 6 Feb 2024 17:33:27 +0100 Subject: [PATCH] Feature/studio qt5 (#703) migrate studio to qt5 --- .github/workflows/build-studio.yml | 57 ++++++++ CMakeModules/FindQtPropertyBrowser.cmake | 43 ++++++ CMakeModules/nel.cmake | 2 +- studio/src/3rdparty/README.md | 2 + studio/src/CMakeLists.txt | 30 ++++- studio/src/extension_system/iplugin.h | 1 + studio/src/extension_system/plugin_spec.cpp | 2 +- .../libqtpropertybrowser-text/CMakeLists.txt | 32 +++++ .../QtTextEditWidget.cpp | 126 ++++++++++++++++++ .../QtTextEditWidget.h | 42 ++++++ .../QtTextEditorFactory.cpp | 105 +++++++++++++++ .../QtTextEditorFactory.h | 43 ++++++ .../QtTextPropertyManager.cpp | 27 ++++ .../QtTextPropertyManager.h | 25 ++++ studio/src/main.cpp | 9 +- studio/src/plugins/bnp_manager/CMakeLists.txt | 6 +- .../bnp_manager/bnp_dirtree_dialog.cpp | 1 - .../plugins/bnp_manager/bnp_dirtree_dialog.h | 1 - .../bnp_manager/bnp_filelist_dialog.cpp | 5 +- .../plugins/bnp_manager/bnp_filelist_dialog.h | 1 - .../bnp_manager/bnp_filesystem_model.h | 2 +- .../bnp_manager/bnp_manager_plugin.cpp | 4 +- .../plugins/bnp_manager/bnp_manager_plugin.h | 1 + .../plugins/bnp_manager/bnp_manager_window.h | 8 +- .../plugins/bnp_manager/plugin-metadata.json | 6 + studio/src/plugins/core/CMakeLists.txt | 8 +- .../plugins/core/Nel3DWidget/nel3d_widget.cpp | 5 +- .../plugins/core/Nel3DWidget/nel3d_widget.h | 5 +- studio/src/plugins/core/context_manager.cpp | 4 +- studio/src/plugins/core/core_plugin.cpp | 12 +- studio/src/plugins/core/core_plugin.h | 1 + .../plugins/core/general_settings_page.cpp | 10 +- studio/src/plugins/core/main_window.cpp | 7 +- studio/src/plugins/core/main_window.h | 6 +- studio/src/plugins/core/menu_manager.h | 6 +- studio/src/plugins/core/plugin-metadata.json | 6 + .../src/plugins/core/plugin_view_dialog.cpp | 4 +- .../core/search_paths_settings_page.cpp | 4 +- studio/src/plugins/core/settings_dialog.cpp | 4 +- .../src/plugins/disp_sheet_id/CMakeLists.txt | 4 +- .../disp_sheet_id/disp_sheet_id_plugin.cpp | 12 +- .../disp_sheet_id/disp_sheet_id_plugin.h | 1 + .../disp_sheet_id/plugin-metadata.json | 6 + .../plugins/disp_sheet_id/sheet_id_view.cpp | 4 +- .../src/plugins/disp_sheet_id/sheet_id_view.h | 2 +- studio/src/plugins/example/CMakeLists.txt | 4 +- studio/src/plugins/example/example_plugin.cpp | 20 +-- studio/src/plugins/example/example_plugin.h | 1 + .../plugins/example/example_settings_page.cpp | 2 +- .../src/plugins/example/plugin-metadata.json | 6 + studio/src/plugins/example/qnel_widget.cpp | 8 +- studio/src/plugins/example/qnel_widget.h | 3 +- studio/src/plugins/example/simple_viewer.cpp | 6 +- studio/src/plugins/example/simple_viewer.h | 2 +- .../src/plugins/georges_editor/CMakeLists.txt | 12 +- studio/src/plugins/georges_editor/actions.cpp | 4 +- studio/src/plugins/georges_editor/actions.h | 2 +- .../plugins/georges_editor/browser_ctrl.cpp | 4 +- .../georges_editor/browser_ctrl_pvt.cpp | 7 +- .../plugins/georges_editor/browser_ctrl_pvt.h | 1 + .../georges_editor/dfn_browser_ctrl.cpp | 8 +- .../filepath_property_manager.h | 2 +- .../georges_editor/georges_dfn_dialog.cpp | 2 + .../georges_editor/georges_dirtree_dialog.cpp | 2 +- .../georges_editor/georges_dirtree_dialog.h | 2 +- .../georges_editor/georges_dock_widget.cpp | 2 + .../georges_editor/georges_editor_form.cpp | 1 + .../georges_editor/georges_editor_form.h | 2 +- .../georges_editor/georges_editor_plugin.cpp | 2 - .../georges_editor/georges_editor_plugin.h | 1 + .../georges_editor/georges_filesystem_model.h | 2 +- .../georges_treeview_dialog.cpp | 17 +-- .../georges_editor/georges_treeview_dialog.h | 6 +- .../georges_editor/georges_typ_dialog.cpp | 3 + .../georges_editor/georgesform_model.h | 1 + .../georges_editor/plugin-metadata.json | 6 + .../georges_editor/typ_browser_ctrl.cpp | 8 +- studio/src/plugins/gui_editor/CMakeLists.txt | 8 +- .../gui_editor/action_property_manager.h | 2 +- .../plugins/gui_editor/gui_editor_plugin.cpp | 2 - .../plugins/gui_editor/gui_editor_plugin.h | 1 + .../plugins/gui_editor/gui_editor_window.cpp | 6 +- .../plugins/gui_editor/gui_editor_window.h | 2 +- .../plugins/gui_editor/plugin-metadata.json | 6 + .../gui_editor/property_browser_ctrl.cpp | 8 +- .../gui_editor/texture_property_manager.h | 2 +- .../plugins/landscape_editor/CMakeLists.txt | 6 +- .../plugins/landscape_editor/builder_zone.cpp | 4 +- .../plugins/landscape_editor/builder_zone.h | 6 +- .../landscape_editor/builder_zone_base.cpp | 4 +- .../landscape_editor/builder_zone_base.h | 4 +- .../landscape_editor/landscape_actions.h | 6 +- .../landscape_editor_plugin.cpp | 1 - .../landscape_editor_plugin.h | 3 +- .../landscape_editor_window.cpp | 8 +- .../landscape_editor_window.h | 8 +- .../landscape_editor/landscape_scene.cpp | 14 +- .../landscape_editor/landscape_scene.h | 4 +- .../landscape_editor/landscape_scene_base.cpp | 6 +- .../landscape_editor/landscape_scene_base.h | 4 +- .../plugins/landscape_editor/landscape_view.h | 4 +- .../landscape_editor/list_zones_model.cpp | 2 +- .../landscape_editor/list_zones_model.h | 2 +- .../landscape_editor/list_zones_widget.cpp | 2 +- .../landscape_editor/pixmap_database.cpp | 8 +- .../landscape_editor/pixmap_database.h | 2 +- .../landscape_editor/plugin-metadata.json | 6 + .../project_settings_dialog.cpp | 4 +- .../landscape_editor/snapshot_dialog.cpp | 2 +- .../landscape_editor/zone_region_editor.cpp | 2 +- studio/src/plugins/log/CMakeLists.txt | 4 +- studio/src/plugins/log/log_plugin.cpp | 15 +-- studio/src/plugins/log/log_plugin.h | 3 +- studio/src/plugins/log/log_settings_page.cpp | 4 +- studio/src/plugins/log/plugin-metadata.json | 6 + .../plugins/mission_compiler/CMakeLists.txt | 6 +- .../mission_compiler_main_window.cpp | 4 +- .../mission_compiler_main_window.h | 2 +- .../mission_compiler_plugin.cpp | 14 +- .../mission_compiler_plugin.h | 1 + .../mission_compiler_settings_page.cpp | 8 +- .../mission_compiler/plugin-metadata.json | 6 + .../mission_compiler/validation_file.cpp | 2 +- .../src/plugins/object_viewer/CMakeLists.txt | 6 +- .../object_viewer/graphics_settings_page.cpp | 4 +- .../object_viewer/graphics_viewport.cpp | 12 +- .../src/plugins/object_viewer/main_window.cpp | 4 +- .../src/plugins/object_viewer/main_window.h | 6 +- .../object_viewer/object_viewer_plugin.cpp | 2 - .../object_viewer/object_viewer_plugin.h | 1 + .../particle_system/attrib_widget.cpp | 2 +- .../particle_system/attrib_widget.h | 2 +- .../particle_system/bin_op_dialog.h | 12 +- .../particle_system/curve_dialog.h | 8 +- .../particle_system/direction_widget.cpp | 6 +- .../particle_system/emitter_page.cpp | 2 +- .../particle_system/follow_path_dialog.h | 12 +- .../particle_system/located_page.cpp | 4 +- .../particle_system/mesh_widget.cpp | 6 +- .../particle_system/morph_mesh_dialog.cpp | 2 +- .../particle_system/particle_force_page.cpp | 2 +- .../particle_link_skeleton_dialog.cpp | 2 +- .../particle_property_dialog.h | 10 +- .../particle_system/particle_sound_page.cpp | 10 +- .../particle_system/particle_system_page.cpp | 8 +- .../particle_texture_widget.cpp | 4 +- .../particle_workspace_dialog.cpp | 8 +- .../particle_workspace_page.cpp | 6 +- .../particle_system/spinner_dialog.h | 6 +- .../particle_system/value_blender_dialog.h | 10 +- .../value_from_emitter_dialog.h | 8 +- .../particle_system/value_gradient_dialog.cpp | 2 +- .../particle_system/value_gradient_dialog.h | 20 +-- .../object_viewer/plugin-metadata.json | 6 + .../scene/animation_set_dialog.cpp | 2 +- .../object_viewer/scene/camera_control.h | 14 +- .../object_viewer/scene/setup_fog_dialog.cpp | 6 +- .../scene/skeleton_scale_dialog.cpp | 4 +- .../scene/slot_manager_dialog.cpp | 2 +- .../object_viewer/scene/slot_manager_dialog.h | 5 +- .../object_viewer/sound_settings_page.cpp | 6 +- .../plugins/object_viewer/sound_system.cpp | 6 +- .../vegetable/vegetable_appearance_page.cpp | 6 +- .../vegetable/vegetable_density_page.cpp | 4 +- .../vegetable/vegetable_dialog.cpp | 4 +- .../vegetable/vegetable_editor.cpp | 10 +- .../object_viewer/vegetable_settings_page.cpp | 8 +- .../widgets/color_edit_widget.cpp | 6 +- .../object_viewer/widgets/hoverpoints.cpp | 2 + .../object_viewer/widgets/hoverpoints.h | 3 +- .../plugins/ovqt_sheet_builder/CMakeLists.txt | 2 +- .../ovqt_sheet_builder/ovqt_sheet_builder.cpp | 14 +- .../ovqt_sheet_builder/ovqt_sheet_builder.h | 3 +- .../ovqt_sheet_builder/plugin-metadata.json | 6 + .../plugins/ovqt_sheet_builder/sheetbuilder.h | 3 +- studio/src/plugins/tile_editor/CMakeLists.txt | 6 +- .../plugins/tile_editor/plugin-metadata.json | 6 + .../tile_editor/tile_editor_main_window.cpp | 6 +- .../tile_editor/tile_editor_main_window.h | 2 +- .../tile_editor/tile_editor_plugin.cpp | 14 +- .../plugins/tile_editor/tile_editor_plugin.h | 1 + .../tile_editor/tile_item_delegate.cpp | 1 + .../plugins/tile_editor/tile_item_delegate.h | 2 +- .../translation_manager/CMakeLists.txt | 4 +- .../translation_manager/editor_phrase.cpp | 16 +-- .../translation_manager/editor_phrase.h | 22 +-- .../translation_manager/editor_worksheet.cpp | 14 +- .../translation_manager/editor_worksheet.h | 14 +- .../translation_manager/ftp_selection.cpp | 6 +- .../translation_manager/ftp_selection.h | 14 +- .../translation_manager/plugin-metadata.json | 6 + .../translation_manager/source_selection.cpp | 2 +- .../translation_manager/source_selection.h | 8 +- .../translation_manager_editor.h | 12 +- .../translation_manager_main_window.h | 16 +-- .../translation_manager_plugin.cpp | 16 +-- .../translation_manager_plugin.h | 5 +- .../translation_manager_settings_page.cpp | 8 +- .../src/plugins/world_editor/CMakeLists.txt | 13 +- .../const_string_array_property.h | 2 +- .../plugins/world_editor/plugin-metadata.json | 6 + .../plugins/world_editor/primitives_view.cpp | 4 +- .../plugins/world_editor/primitives_view.h | 8 +- .../world_editor/project_settings_dialog.cpp | 4 +- .../world_editor/property_editor_widget.cpp | 3 + .../world_editor/property_editor_widget.h | 6 +- .../world_editor/world_editor_actions.h | 8 +- .../world_editor/world_editor_plugin.cpp | 2 - .../world_editor/world_editor_plugin.h | 3 +- .../world_editor/world_editor_scene.cpp | 6 +- .../plugins/world_editor/world_editor_scene.h | 2 +- .../world_editor/world_editor_scene_item.cpp | 2 +- .../world_editor/world_editor_scene_item.h | 10 +- .../world_editor_settings_page.cpp | 2 +- .../world_editor/world_editor_window.cpp | 6 +- .../world_editor/world_editor_window.h | 4 +- .../src/plugins/zone_painter/CMakeLists.txt | 6 +- .../plugins/zone_painter/plugin-metadata.json | 6 + studio/src/plugins/zone_painter/qnel_widget.h | 4 +- .../zone_painter/zone_painter_main_window.h | 2 +- .../zone_painter/zone_painter_plugin.cpp | 2 - .../zone_painter/zone_painter_plugin.h | 1 + studio/src/splash_screen.cpp | 2 +- 223 files changed, 1161 insertions(+), 528 deletions(-) create mode 100644 .github/workflows/build-studio.yml create mode 100644 CMakeModules/FindQtPropertyBrowser.cmake create mode 100644 studio/src/3rdparty/README.md create mode 100644 studio/src/libqtpropertybrowser-text/CMakeLists.txt create mode 100644 studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp create mode 100644 studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.h create mode 100644 studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp create mode 100644 studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h create mode 100644 studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp create mode 100644 studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h create mode 100644 studio/src/plugins/bnp_manager/plugin-metadata.json create mode 100644 studio/src/plugins/core/plugin-metadata.json create mode 100644 studio/src/plugins/disp_sheet_id/plugin-metadata.json create mode 100644 studio/src/plugins/example/plugin-metadata.json create mode 100644 studio/src/plugins/georges_editor/plugin-metadata.json create mode 100644 studio/src/plugins/gui_editor/plugin-metadata.json create mode 100644 studio/src/plugins/landscape_editor/plugin-metadata.json create mode 100644 studio/src/plugins/log/plugin-metadata.json create mode 100644 studio/src/plugins/mission_compiler/plugin-metadata.json create mode 100644 studio/src/plugins/object_viewer/plugin-metadata.json create mode 100644 studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json create mode 100644 studio/src/plugins/tile_editor/plugin-metadata.json create mode 100644 studio/src/plugins/translation_manager/plugin-metadata.json create mode 100644 studio/src/plugins/world_editor/plugin-metadata.json create mode 100644 studio/src/plugins/zone_painter/plugin-metadata.json diff --git a/.github/workflows/build-studio.yml b/.github/workflows/build-studio.yml new file mode 100644 index 0000000000..fff2ed94e6 --- /dev/null +++ b/.github/workflows/build-studio.yml @@ -0,0 +1,57 @@ +name: build studio + +on: + push: + branches: [ "core4", "feature/*" ] + pull_request: + branches: [ "core4" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Dependencies + run: | + sudo apt update + sudo apt install --yes software-properties-common + sudo apt update + sudo apt install --yes \ + cmake build-essential ninja-build ccache \ + bison autoconf automake \ + libpng-dev \ + libjpeg-dev \ + libgif-dev libfreetype6-dev \ + freeglut3-dev \ + liblua5.2-dev libluabind-dev libcpptest-dev \ + libogg-dev libvorbis-dev libopenal-dev \ + libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev \ + libmysqlclient-dev \ + libxml2-dev \ + libcurl4-openssl-dev libssl-dev \ + libsquish-dev \ + liblzma-dev \ + libgsf-1-dev \ + qtbase5-dev qttools5-dev qttools5-dev-tools libqtpropertybrowser-dev + + - name: Configure CMake + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -G "Ninja" + -DWITH_QT5=ON + -DWITH_STUDIO=ON + -DWITH_RYZOM=OFF + -DWITH_NEL_TOOLS=OFF + -DWITH_NEL_SAMPLES=OFF + -DWITH_NEL_TESTS=OFF + -S ${{ github.workspace }} + + - name: Build + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target studio diff --git a/CMakeModules/FindQtPropertyBrowser.cmake b/CMakeModules/FindQtPropertyBrowser.cmake new file mode 100644 index 0000000000..27b0fefd9b --- /dev/null +++ b/CMakeModules/FindQtPropertyBrowser.cmake @@ -0,0 +1,43 @@ +# Locate QtPropertyBrowser library +# This module defines +# QtPropertyBrowser_FOUND, if false, do not try to link to QtPropertyBrowser +# QtPropertyBrowser_LIBRARY +# QtPropertyBrowser_INCLUDE_DIR, where to find qtpropertybrowser.h +# QtPropertyBrowser_DIR - Can be set to QtPropertyBrowser install path or Windows build path + +find_path(QtPropertyBrowser_INCLUDE_DIR qtpropertybrowser.h + HINTS ${QTPROPERTYBROWSER_DIR} + PATH_SUFFIXES include QtPropertyBrowser qtpropertybrowser + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt +) + +find_library(QtPropertyBrowser_LIBRARY + NAMES QtPropertyBrowser qtpropertybrowser + HINTS ${QTPROPERTYBROWSER_DIR} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt +) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set QtPropertyBrowser_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(QtPropertyBrowser DEFAULT_MSG QtPropertyBrowser_LIBRARY QtPropertyBrowser_INCLUDE_DIR) + +mark_as_advanced(QtPropertyBrowser_INCLUDE_DIR QtPropertyBrowser_LIBRARY) + diff --git a/CMakeModules/nel.cmake b/CMakeModules/nel.cmake index 98610c9d6a..ffefe398a1 100644 --- a/CMakeModules/nel.cmake +++ b/CMakeModules/nel.cmake @@ -234,7 +234,7 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.: ENDMACRO(CHECK_OUT_OF_SOURCE) MACRO(NL_SETUP_DEFAULT_OPTIONS) - IF(WITH_QT) + IF(WITH_QT5) OPTION(WITH_STUDIO "Build Core Studio" OFF ) ENDIF() diff --git a/studio/src/3rdparty/README.md b/studio/src/3rdparty/README.md new file mode 100644 index 0000000000..033680332c --- /dev/null +++ b/studio/src/3rdparty/README.md @@ -0,0 +1,2 @@ +also see: +https://github.com/greenjava/QtPropertyBrowser \ No newline at end of file diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 6083805f82..81c3eee110 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -1,7 +1,6 @@ -ADD_SUBDIRECTORY(3rdparty) +#ADD_SUBDIRECTORY(3rdparty) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES}) -INCLUDE( ${QT_USE_FILE} ) CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY) @@ -31,10 +30,10 @@ IF(WIN32) SET(STUDIO_RC studio.rc) ENDIF() -QT4_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS}) -QT4_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS}) -QT4_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} ) -QT4_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS}) +QT5_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS}) +QT5_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS}) +QT5_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} ) +QT5_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS}) SOURCE_GROUP(QtResources FILES ${STUDIO_RCS} ${STUDIO_PLUGIN_UIS} ) SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${STUDIO_MOC_SRCS} ${STUDIO_RC_SRCS}) @@ -55,6 +54,25 @@ ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${QT_DEFINITIONS}) NL_DEFAULT_PROPS(studio "Tools: Studio") NL_ADD_RUNTIME_FLAGS(studio) +ADD_SUBDIRECTORY(libqtpropertybrowser-text) ADD_SUBDIRECTORY(plugins) +add_dependencies(studio + studio_plugin_bnp_manager + studio_plugin_core + studio_plugin_disp_sheet_id + studio_plugin_example + studio_plugin_georges_editor + studio_plugin_gui_editor + studio_plugin_landscape_editor + studio_plugin_log + studio_plugin_mission_compiler + studio_plugin_object_viewer + studio_plugin_sheet_builder + studio_plugin_tile_editor +# studio_plugin_translation_manager # requires QFtp which is removed in qt5 + studio_plugin_world_editor +# studio_plugin_zone_painter +) + INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/extension_system/iplugin.h b/studio/src/extension_system/iplugin.h index 01f337df1d..ba41cec3bd 100644 --- a/studio/src/extension_system/iplugin.h +++ b/studio/src/extension_system/iplugin.h @@ -100,6 +100,7 @@ class IPlugin }; //namespace ExtensionSystem +#define IPlugin_iid "dev.ryzom.com.ObjectViewerQt.IPlugin/0.9.2" Q_DECLARE_INTERFACE(ExtensionSystem::IPlugin, "dev.ryzom.com.ObjectViewerQt.IPlugin/0.9.2") #endif // IPLUGIN_H diff --git a/studio/src/extension_system/plugin_spec.cpp b/studio/src/extension_system/plugin_spec.cpp index 53250cebeb..85c61245c5 100644 --- a/studio/src/extension_system/plugin_spec.cpp +++ b/studio/src/extension_system/plugin_spec.cpp @@ -429,7 +429,7 @@ void PluginSpec::kill() bool b = loader->unload(); if( !b ) { - nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toAscii().data() ); + nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toLatin1().data() ); } //delete m_plugin; diff --git a/studio/src/libqtpropertybrowser-text/CMakeLists.txt b/studio/src/libqtpropertybrowser-text/CMakeLists.txt new file mode 100644 index 0000000000..c35020dabb --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/CMakeLists.txt @@ -0,0 +1,32 @@ +FIND_PACKAGE(QtPropertyBrowser REQUIRED) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_AUTOMOC ON) + +set(SRC + libqtpropertybrowser-text/QtTextEditorFactory.cpp + libqtpropertybrowser-text/QtTextEditWidget.cpp + libqtpropertybrowser-text/QtTextPropertyManager.cpp +) + +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(QtPropertyBrowserText ${SRC}) + +ADD_LIBRARY(QtPropertyBrowser::Text ALIAS QtPropertyBrowserText) + +TARGET_LINK_LIBRARIES(QtPropertyBrowserText ${QT_LIBRARIES} ${QtPropertyBrowser_LIBRARY}) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} + ${QT_INCLUDES} + ${QtPropertyBrowser_INCLUDE_DIR} +) + +TARGET_INCLUDE_DIRECTORIES(QtPropertyBrowserText + INTERFACE + $ + $ +) diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp new file mode 100644 index 0000000000..10267c23a4 --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp @@ -0,0 +1,126 @@ +#include +#include +#include +#include +#include + +#include + +#if defined(Q_CC_MSVC) +# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ +#endif + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + + +QtTextEditWidget::QtTextEditWidget(QWidget *parent) : + QWidget(parent), + m_lineEdit(new QLineEdit), + m_defaultButton(new QToolButton), + m_button(new QToolButton) +{ + QHBoxLayout *lt = new QHBoxLayout(this); + lt->setContentsMargins(0, 0, 0, 0); + lt->setSpacing(0); + lt->addWidget(m_lineEdit); + m_lineEdit->setReadOnly(true); + + m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored); + m_button->setFixedWidth(20); + m_button->setText(tr("...")); + m_button->installEventFilter(this); + + setFocusProxy(m_button); + setFocusPolicy(m_button->focusPolicy()); + + m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); + m_defaultButton->setMaximumWidth(16); + + connect(m_button, SIGNAL(clicked()), this, SLOT(buttonClicked())); + connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); + lt->addWidget(m_button); + lt->addWidget(m_defaultButton); + m_defaultButton->setEnabled(false); +} + +void QtTextEditWidget::setValue(const QString &value) +{ + if (m_lineEdit->text() != value) + m_lineEdit->setText(value); +} + +void QtTextEditWidget::setStateResetButton(bool enabled) +{ + m_defaultButton->setEnabled(enabled); +} + +void QtTextEditWidget::buttonClicked() +{ + QGridLayout *gridLayout; + QPlainTextEdit *plainTextEdit; + QDialogButtonBox *buttonBox; + QDialog *dialog; + + dialog = new QDialog(this); + dialog->resize(400, 300); + gridLayout = new QGridLayout(dialog); + plainTextEdit = new QPlainTextEdit(dialog); + + gridLayout->addWidget(plainTextEdit, 0, 0, 1, 1); + + buttonBox = new QDialogButtonBox(dialog); + buttonBox->setOrientation(Qt::Horizontal); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + gridLayout->addWidget(buttonBox, 1, 0, 1, 1); + + QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); + QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); + + plainTextEdit->textCursor().insertText(m_lineEdit->text()); + + dialog->setModal(true); + dialog->show(); + int result = dialog->exec(); + + if (result == QDialog::Accepted) + { + QString newText = plainTextEdit->document()->toPlainText(); + + setValue(newText); + if (plainTextEdit->document()->isModified()) + Q_EMIT valueChanged(newText); + } + + delete dialog; +} + +bool QtTextEditWidget::eventFilter(QObject *obj, QEvent *ev) +{ + if (obj == m_button) { + switch (ev->type()) { + case QEvent::KeyPress: + case QEvent::KeyRelease: { // Prevent the QToolButton from handling Enter/Escape meant control the delegate + switch (static_cast(ev)->key()) { + case Qt::Key_Escape: + case Qt::Key_Enter: + case Qt::Key_Return: + ev->ignore(); + return true; + default: + break; + } + } + break; + default: + break; + } + } + return QWidget::eventFilter(obj, ev); +} + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.h new file mode 100644 index 0000000000..cfcd666194 --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.h @@ -0,0 +1,42 @@ +#ifndef LIBQTPROPERTYMANAGER_TEXT_EDIT_WIDGET_H +#define LIBQTPROPERTYMANAGER_TEXT_EDIT_WIDGET_H + +#include +#include +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QtTextEditWidget : public QWidget +{ + Q_OBJECT + +public: + QtTextEditWidget(QWidget *parent); + + bool eventFilter(QObject *obj, QEvent *ev); + +public Q_SLOTS: + void setValue(const QString &value); + void setStateResetButton(bool enabled); + +private Q_SLOTS: + void buttonClicked(); + +Q_SIGNALS: + void valueChanged(const QString &value); + void resetProperty(); + +private: + QLineEdit *m_lineEdit; + QToolButton *m_defaultButton; + QToolButton *m_button; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif // LIBQTPROPERTYMANAGER_TEXT_EDIT_WIDGET_H diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp new file mode 100644 index 0000000000..30245399f3 --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp @@ -0,0 +1,105 @@ +#include + +#if defined(Q_CC_MSVC) +#pragma warning(disable : 4786) /* MS VS 6: truncating debug info after 255 characters */ +#endif + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +QtTextEditorFactory::QtTextEditorFactory(QObject *parent) + : QtAbstractEditorFactory(parent) +{ +} + +QtTextEditorFactory::~QtTextEditorFactory() +{ + qDeleteAll(editorToProperty.keys()); +} + +QWidget *QtTextEditorFactory::createEditor(QtTextPropertyManager *manager, QtProperty *property, QWidget *parent) +{ + auto *editor = new Editor(parent); + auto it = createdEditors.find(property); + if (it == createdEditors.end()) + { + it = createdEditors.insert(property, EditorList()); + } + it.value().append(editor); + editorToProperty.insert(editor, property); + + editor->setValue(manager->value(property)); + editor->setStateResetButton(property->isModified()); + + connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); + connect(editor, SIGNAL(valueChanged(QString)), this, SLOT(slotSetValue(QString))); + connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + return editor; +} + +void QtTextEditorFactory::connectPropertyManager(QtTextPropertyManager *manager) +{ + connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); +} + +void QtTextEditorFactory::disconnectPropertyManager(QtTextPropertyManager *manager) +{ + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); +} + +void QtTextEditorFactory::slotPropertyChanged(QtProperty *property, const QString &value) +{ + const PropertyToEditorListMap::iterator it = createdEditors.find(property); + if (it == createdEditors.end()) + { + return; + } + QListIterator itEditor(it.value()); + + while (itEditor.hasNext()) + { + QtTextEditWidget *editor = itEditor.next(); + editor->setValue(value); + editor->setStateResetButton(property->isModified()); + } +} + +void QtTextEditorFactory::slotSetValue(const QString &value) +{ + QObject *object = sender(); + const EditorToPropertyMap::ConstIterator ecend = editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) + { + QtProperty *property = itEditor.value(); + QtTextPropertyManager *manager = propertyManager(property); + if (!manager) + return; + manager->setValue(property, value); + return; + } +} + +void QtTextEditorFactory::slotResetProperty() +{ + QObject *object = sender(); + const EditorToPropertyMap::ConstIterator ecend = editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) + { + QtProperty *property = itEditor.value(); + QtTextPropertyManager *manager = propertyManager(property); + if (!manager) + return; + // not supported anymore + // manager->emitResetProperty(property); + return; + } +} + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h new file mode 100644 index 0000000000..88f27eb796 --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h @@ -0,0 +1,43 @@ +#ifndef LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H +#define LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H + +#include +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QtTextEditorFactory : public QtAbstractEditorFactory +{ + Q_OBJECT + +public: + typedef QtTextEditWidget Editor; + typedef QList EditorList; + typedef QMap PropertyToEditorListMap; + typedef QMap EditorToPropertyMap; + + QtTextEditorFactory(QObject *parent = nullptr); + ~QtTextEditorFactory() override; + +protected: + QWidget *createEditor(QtTextPropertyManager *manager, QtProperty *property, QWidget *parent) override; + void connectPropertyManager(QtTextPropertyManager *manager) override; + void disconnectPropertyManager(QtTextPropertyManager *manager) override; + +private Q_SLOTS: + void slotPropertyChanged(QtProperty *property, const QString &value); + void slotSetValue(const QString &value); + void slotResetProperty(); + +private: + PropertyToEditorListMap createdEditors; + EditorToPropertyMap editorToProperty; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif // LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp new file mode 100644 index 0000000000..a46b7d7b60 --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp @@ -0,0 +1,27 @@ +#include + +#if defined(Q_CC_MSVC) +# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ +#endif + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +QString QtTextPropertyManager::valueText(const QtProperty *property) const +{ + QString text = QtStringPropertyManager::valueText(property); + for (int i = 0; i < text.size(); i++) + { + if (text.at(i) == '\n') + { + QStringRef ret(&text, 0, i); + return ret.toString() + " ..."; + } + } + return text; +} + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h new file mode 100644 index 0000000000..4e662fe4bc --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h @@ -0,0 +1,25 @@ +#ifndef LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H +#define LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H + +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + + +class QT_QTPROPERTYBROWSER_EXPORT QtTextPropertyManager : public QtStringPropertyManager +{ + Q_OBJECT +public: + QtTextPropertyManager(QObject *parent = 0):QtStringPropertyManager(parent) {} + +protected: + virtual QString valueText(const QtProperty *property) const; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif // LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H diff --git a/studio/src/main.cpp b/studio/src/main.cpp index 787e579306..22629e039b 100644 --- a/studio/src/main.cpp +++ b/studio/src/main.cpp @@ -39,11 +39,11 @@ #include #include #include -#include -#include +#include +#include //#include -#include -#include +#include +#include #include "startup_settings_dlg.h" #include "splash_screen.h" @@ -142,7 +142,6 @@ int main(int argc, char **argv) nlinfo("Welcome to NeL Object Viewer Qt!"); } - QApplication::setGraphicsSystem("raster"); #ifdef NL_OS_WINDOWS QApplication app(__argc, __argv); #else // NL_OS_WINDOWS diff --git a/studio/src/plugins/bnp_manager/CMakeLists.txt b/studio/src/plugins/bnp_manager/CMakeLists.txt index 883d10fd28..29830e5e16 100644 --- a/studio/src/plugins/bnp_manager/CMakeLists.txt +++ b/studio/src/plugins/bnp_manager/CMakeLists.txt @@ -23,9 +23,9 @@ SET(OVQT_PLUGIN_BNP_MANAGER_RCS bnp_manager.qrc) SET(QT_USE_QTGUI TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_BNP_MANAGER_RC_SRCS ${OVQT_PLUGIN_BNP_MANAGER_RCS}) -QT4_WRAP_CPP(OVQT_PLUG_BNP_MANAGER_MOC_SRC ${OVQT_PLUG_BNP_MANAGER_HDR}) -QT4_WRAP_UI(OVQT_PLUG_BNP_MANAGER_UI_HDRS ${OVQT_PLUG_BNP_MANAGER_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_BNP_MANAGER_RC_SRCS ${OVQT_PLUGIN_BNP_MANAGER_RCS}) +QT5_WRAP_CPP(OVQT_PLUG_BNP_MANAGER_MOC_SRC ${OVQT_PLUG_BNP_MANAGER_HDR}) +QT5_WRAP_UI(OVQT_PLUG_BNP_MANAGER_UI_HDRS ${OVQT_PLUG_BNP_MANAGER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_BNP_MANAGER_UIS} ${OVQT_PLUGIN_BNP_MANAGER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_BNP_MANAGER_UI_HDRS}) diff --git a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp index 1ddb25df1e..702e2ca1d3 100644 --- a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp +++ b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp @@ -20,7 +20,6 @@ #include "bnp_proxy_model.h" // Qt includes -#include // NeL includes #include diff --git a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h index a4ca1850e1..9abcb65937 100644 --- a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h +++ b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h @@ -18,7 +18,6 @@ #define BNP_DIRTREE_DIALOG_H // Qt includes -#include // STL includes diff --git a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp index 1efa6aab06..2175b6445e 100644 --- a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp +++ b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp @@ -19,7 +19,6 @@ #include "bnp_file.h" // Qt includes -#include // NeL includes #include @@ -60,8 +59,8 @@ void BnpFileListDialog::setupTable(int nbrows) labels << tr("Filename") << tr("Size"); m_ui.tableWidget->setHorizontalHeaderLabels(labels); - m_ui.tableWidget->horizontalHeader()->setResizeMode(0, QHeaderView::Interactive); - m_ui.tableWidget->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch ); + m_ui.tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Interactive); + m_ui.tableWidget->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch ); m_ui.tableWidget->verticalHeader()->hide(); // set vertical size a little bit smaller diff --git a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h index fa1dff7c85..b9201f165f 100644 --- a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h +++ b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h @@ -18,7 +18,6 @@ #define BNP_FILELIST_DIALOG_H // Qt includes -#include // STL includes #include diff --git a/studio/src/plugins/bnp_manager/bnp_filesystem_model.h b/studio/src/plugins/bnp_manager/bnp_filesystem_model.h index dabd33bd68..abf92e7ebf 100644 --- a/studio/src/plugins/bnp_manager/bnp_filesystem_model.h +++ b/studio/src/plugins/bnp_manager/bnp_filesystem_model.h @@ -17,7 +17,7 @@ #ifndef BNP_FILESYSTEM_MODEL_H #define BNP_FILESYSTEM_MODEL_H -#include +#include namespace BNPManager { diff --git a/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp b/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp index 8941410d82..36954670f5 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp +++ b/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp @@ -30,7 +30,7 @@ // Qt includes #include -#include +#include namespace BNPManager { @@ -91,5 +91,3 @@ void BNPManagerPlugin::addAutoReleasedObject(QObject *obj) m_BnpManagerWindow->open(); }*/ } - -Q_EXPORT_PLUGIN(BNPManager::BNPManagerPlugin) diff --git a/studio/src/plugins/bnp_manager/bnp_manager_plugin.h b/studio/src/plugins/bnp_manager/bnp_manager_plugin.h index 4736a4b99f..df9c40203f 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_plugin.h +++ b/studio/src/plugins/bnp_manager/bnp_manager_plugin.h @@ -47,6 +47,7 @@ class m_BnpManagerWindow; class BNPManagerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/bnp_manager/bnp_manager_window.h b/studio/src/plugins/bnp_manager/bnp_manager_window.h index 887394b00d..4b6d160cb4 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_window.h +++ b/studio/src/plugins/bnp_manager/bnp_manager_window.h @@ -21,10 +21,10 @@ //#include "ui_bnp_manager_window.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace BNPManager diff --git a/studio/src/plugins/bnp_manager/plugin-metadata.json b/studio/src/plugins/bnp_manager/plugin-metadata.json new file mode 100644 index 0000000000..69f124b567 --- /dev/null +++ b/studio/src/plugins/bnp_manager/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "BNPManager", + "Version" : "0.1", + "Vendor": "Krolock", + "Description": "Edit BNP Files" +} \ No newline at end of file diff --git a/studio/src/plugins/core/CMakeLists.txt b/studio/src/plugins/core/CMakeLists.txt index fefecf5aca..6f8294fb38 100644 --- a/studio/src/plugins/core/CMakeLists.txt +++ b/studio/src/plugins/core/CMakeLists.txt @@ -44,9 +44,9 @@ ENDIF() SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS}) -QT4_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR}) -QT4_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS}) +QT5_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS}) +QT5_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR}) +QT5_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_CORE_PLUGIN_UIS} ${OVQT_CORE_PLUGIN_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_CORE_PLUGIN_UI_HDRS}) @@ -62,7 +62,7 @@ NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core") NL_ADD_RUNTIME_FLAGS(studio_plugin_core) NL_ADD_LIB_SUFFIX(studio_plugin_core) -ADD_DEFINITIONS(-DCORE_LIBRARY -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) +ADD_DEFINITIONS(-DCORE_LIBRARY -DQT_PLUGIN -DQT_SHARED -DMESA_GL_NO_X11_HEADERS ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) diff --git a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp index 80e5a8db84..1905e3c7ef 100644 --- a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp +++ b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp @@ -17,6 +17,9 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// needs to be included before x11 due to some collisions +#include + #include "nel3d_widget.h" #include "nel/3d/u_driver.h" #include "nel/3d/text_context.h" @@ -28,8 +31,6 @@ #include #endif -#include - Nel3DWidget::Nel3DWidget( QWidget *parent ) : NEL3DWIDGET( parent ) { diff --git a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h index 27b6dd84cf..3f72942a2e 100644 --- a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h +++ b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h @@ -36,9 +36,12 @@ #define NEL3DWIDGET QGLWidget #endif - #include "../core_global.h" +#ifdef NL_OS_UNIX +#include +#endif + namespace NL3D { class UDriver; diff --git a/studio/src/plugins/core/context_manager.cpp b/studio/src/plugins/core/context_manager.cpp index a44cb41e4b..a3124e1cdb 100644 --- a/studio/src/plugins/core/context_manager.cpp +++ b/studio/src/plugins/core/context_manager.cpp @@ -27,8 +27,8 @@ #include // Qt includes -#include -#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/core_plugin.cpp b/studio/src/plugins/core/core_plugin.cpp index 1d7ebf47c2..7693fc95f7 100644 --- a/studio/src/plugins/core/core_plugin.cpp +++ b/studio/src/plugins/core/core_plugin.cpp @@ -31,11 +31,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include using namespace Core; @@ -103,5 +103,3 @@ void CorePlugin::addAutoReleasedObject(QObject *obj) m_plugMan->addObject(obj); m_autoReleaseObjects.prepend(obj); } - -Q_EXPORT_PLUGIN(CorePlugin) diff --git a/studio/src/plugins/core/core_plugin.h b/studio/src/plugins/core/core_plugin.h index aeddb967bd..04feead5e6 100644 --- a/studio/src/plugins/core/core_plugin.h +++ b/studio/src/plugins/core/core_plugin.h @@ -44,6 +44,7 @@ namespace Core class CorePlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/core/general_settings_page.cpp b/studio/src/plugins/core/general_settings_page.cpp index af2ede1b79..a46bc49da2 100644 --- a/studio/src/plugins/core/general_settings_page.cpp +++ b/studio/src/plugins/core/general_settings_page.cpp @@ -29,11 +29,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/studio/src/plugins/core/main_window.cpp b/studio/src/plugins/core/main_window.cpp index 95b3e2320e..3939a1dadc 100644 --- a/studio/src/plugins/core/main_window.cpp +++ b/studio/src/plugins/core/main_window.cpp @@ -33,8 +33,11 @@ // Qt includes #include -#include -#include +#include +#include +#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/main_window.h b/studio/src/plugins/core/main_window.h index ba31aece4e..706e67a348 100644 --- a/studio/src/plugins/core/main_window.h +++ b/studio/src/plugins/core/main_window.h @@ -28,9 +28,9 @@ // STL includes // Qt includes -#include -#include -#include +#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/menu_manager.h b/studio/src/plugins/core/menu_manager.h index afcc88facf..4f2c3a1beb 100644 --- a/studio/src/plugins/core/menu_manager.h +++ b/studio/src/plugins/core/menu_manager.h @@ -28,9 +28,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/plugin-metadata.json b/studio/src/plugins/core/plugin-metadata.json new file mode 100644 index 0000000000..d453d851c9 --- /dev/null +++ b/studio/src/plugins/core/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "Core", + "Version" : "0.8", + "Vendor": "Ryzom Core", + "Description": "Core plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/core/plugin_view_dialog.cpp b/studio/src/plugins/core/plugin_view_dialog.cpp index 76cbc828e4..e1d43bd3c8 100644 --- a/studio/src/plugins/core/plugin_view_dialog.cpp +++ b/studio/src/plugins/core/plugin_view_dialog.cpp @@ -26,8 +26,8 @@ // Qt includes #include #include -#include -#include +#include +#include #include #include diff --git a/studio/src/plugins/core/search_paths_settings_page.cpp b/studio/src/plugins/core/search_paths_settings_page.cpp index 918b58a7c7..df4f1547ec 100644 --- a/studio/src/plugins/core/search_paths_settings_page.cpp +++ b/studio/src/plugins/core/search_paths_settings_page.cpp @@ -28,8 +28,8 @@ // Qt includes #include -#include -#include +#include +#include #if !defined NL_OS_WINDOWS #include "core_config.h" diff --git a/studio/src/plugins/core/settings_dialog.cpp b/studio/src/plugins/core/settings_dialog.cpp index b0cc329646..39c2432fb1 100644 --- a/studio/src/plugins/core/settings_dialog.cpp +++ b/studio/src/plugins/core/settings_dialog.cpp @@ -23,8 +23,8 @@ #include "ioptions_page.h" // Qt includes -#include -#include +#include +#include struct PageData { diff --git a/studio/src/plugins/disp_sheet_id/CMakeLists.txt b/studio/src/plugins/disp_sheet_id/CMakeLists.txt index ffccb97b35..bdedf5dc79 100644 --- a/studio/src/plugins/disp_sheet_id/CMakeLists.txt +++ b/studio/src/plugins/disp_sheet_id/CMakeLists.txt @@ -17,8 +17,8 @@ SET(OVQT_DISP_SHEET_ID_PLUGIN_UIS SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC ${OVQT_DISP_SHEET_ID_PLUGIN_HDR}) -QT4_WRAP_UI(OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS ${OVQT_DISP_SHEET_ID_PLUGIN_UIS}) +QT5_WRAP_CPP(OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC ${OVQT_DISP_SHEET_ID_PLUGIN_HDR}) +QT5_WRAP_UI(OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS ${OVQT_DISP_SHEET_ID_PLUGIN_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC}) diff --git a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp index 7a5b110a6f..f5e3b0785a 100644 --- a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp +++ b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp @@ -26,11 +26,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // NeL includes #include "nel/misc/debug.h" @@ -87,5 +87,3 @@ void DispSheetIdPlugin::setNelContext(NLMISC::INelContext *nelContext) #endif // NL_OS_WINDOWS m_LibContext = new NLMISC::CLibraryContext(*nelContext); } - -Q_EXPORT_PLUGIN(DispSheetIdPlugin) diff --git a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h index a340637777..1c6105662a 100644 --- a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h +++ b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h @@ -38,6 +38,7 @@ namespace SheetIdViewPlugin class DispSheetIdPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/disp_sheet_id/plugin-metadata.json b/studio/src/plugins/disp_sheet_id/plugin-metadata.json new file mode 100644 index 0000000000..5a3b538d85 --- /dev/null +++ b/studio/src/plugins/disp_sheet_id/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "DisplaySheetId", + "Version" : "1.0", + "Vendor": "pemeon", + "Description": "Display sheet id." +} \ No newline at end of file diff --git a/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp b/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp index e27ef94059..6cd9f61afb 100644 --- a/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp +++ b/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp @@ -21,8 +21,8 @@ #include "nel/misc/path.h" -#include -#include +#include +#include class CPred { diff --git a/studio/src/plugins/disp_sheet_id/sheet_id_view.h b/studio/src/plugins/disp_sheet_id/sheet_id_view.h index ac5022328e..d28f4b06a1 100644 --- a/studio/src/plugins/disp_sheet_id/sheet_id_view.h +++ b/studio/src/plugins/disp_sheet_id/sheet_id_view.h @@ -25,7 +25,7 @@ #include "nel/misc/types_nl.h" #include "nel/misc/sheet_id.h" -#include +#include class SheetIdView : public QDialog { diff --git a/studio/src/plugins/example/CMakeLists.txt b/studio/src/plugins/example/CMakeLists.txt index 6b7e86962b..5c35f32bcd 100644 --- a/studio/src/plugins/example/CMakeLists.txt +++ b/studio/src/plugins/example/CMakeLists.txt @@ -18,8 +18,8 @@ SET(OVQT_PLUG_EXAMPLE_UIS example_settings_page.ui) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_EXAMPLE_MOC_SRC ${OVQT_PLUG_EXAMPLE_HDR}) -QT4_WRAP_UI(OVQT_PLUG_EXAMPLE_UI_HDRS ${OVQT_PLUG_EXAMPLE_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_EXAMPLE_MOC_SRC ${OVQT_PLUG_EXAMPLE_HDR}) +QT5_WRAP_UI(OVQT_PLUG_EXAMPLE_UI_HDRS ${OVQT_PLUG_EXAMPLE_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_EXAMPLE_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_EXAMPLE_UI_HDRS}) diff --git a/studio/src/plugins/example/example_plugin.cpp b/studio/src/plugins/example/example_plugin.cpp index cf13867c73..00dfbdbe7f 100644 --- a/studio/src/plugins/example/example_plugin.cpp +++ b/studio/src/plugins/example/example_plugin.cpp @@ -1,3 +1,13 @@ +// Qt includes +#include +#include +#include +#include +#include +#include +#include +#include + // Project includes #include "example_plugin.h" #include "example_settings_page.h" @@ -12,14 +22,6 @@ // NeL includes #include "nel/misc/debug.h" -// Qt includes -#include -#include -#include -#include -#include -#include - namespace Plugin { @@ -79,5 +81,3 @@ void ExamplePlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(Plugin::ExamplePlugin) \ No newline at end of file diff --git a/studio/src/plugins/example/example_plugin.h b/studio/src/plugins/example/example_plugin.h index bfb400651e..c2dbbc021d 100644 --- a/studio/src/plugins/example/example_plugin.h +++ b/studio/src/plugins/example/example_plugin.h @@ -24,6 +24,7 @@ namespace Plugin class ExamplePlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: ExamplePlugin(); diff --git a/studio/src/plugins/example/example_settings_page.cpp b/studio/src/plugins/example/example_settings_page.cpp index 8b12aea0b7..48820b6fb2 100644 --- a/studio/src/plugins/example/example_settings_page.cpp +++ b/studio/src/plugins/example/example_settings_page.cpp @@ -20,7 +20,7 @@ #include "example_settings_page.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/example/plugin-metadata.json b/studio/src/plugins/example/plugin-metadata.json new file mode 100644 index 0000000000..3ffefbc7b7 --- /dev/null +++ b/studio/src/plugins/example/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "ExamplePlugin", + "Version" : "0.2", + "Vendor": "dnk-88", + "Description": "Example ovqt plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/example/qnel_widget.cpp b/studio/src/plugins/example/qnel_widget.cpp index d0821eb6ba..341d1dba4f 100644 --- a/studio/src/plugins/example/qnel_widget.cpp +++ b/studio/src/plugins/example/qnel_widget.cpp @@ -17,14 +17,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "qnel_widget.h" - -// STL includes - // Qt includes #include #include +#include "qnel_widget.h" + +// STL includes + // NeL includes #include #include diff --git a/studio/src/plugins/example/qnel_widget.h b/studio/src/plugins/example/qnel_widget.h index 795a0b7a75..48c6513b77 100644 --- a/studio/src/plugins/example/qnel_widget.h +++ b/studio/src/plugins/example/qnel_widget.h @@ -27,7 +27,7 @@ // Qt includes #include -#include +#include class QAction; @@ -38,6 +38,7 @@ typedef QWidget QNeLWidget; typedef QWidget QNeLWidget; #elif defined(NL_OS_UNIX) typedef QGLWidget QNeLWidget; +#include #endif // NL_OS_UNIX namespace NL3D diff --git a/studio/src/plugins/example/simple_viewer.cpp b/studio/src/plugins/example/simple_viewer.cpp index 89a5e88c8b..8b39eba83d 100644 --- a/studio/src/plugins/example/simple_viewer.cpp +++ b/studio/src/plugins/example/simple_viewer.cpp @@ -20,9 +20,9 @@ #include "simple_viewer.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes diff --git a/studio/src/plugins/example/simple_viewer.h b/studio/src/plugins/example/simple_viewer.h index d1a2a19e0a..b6bd3e0c3b 100644 --- a/studio/src/plugins/example/simple_viewer.h +++ b/studio/src/plugins/example/simple_viewer.h @@ -27,7 +27,7 @@ // Qt includes #include -#include +#include class QWidget; namespace Plugin diff --git a/studio/src/plugins/georges_editor/CMakeLists.txt b/studio/src/plugins/georges_editor/CMakeLists.txt index abe7eb3edd..7e9ce571ea 100644 --- a/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/studio/src/plugins/georges_editor/CMakeLists.txt @@ -1,8 +1,10 @@ +FIND_PACKAGE(QtPropertyBrowser REQUIRED) + INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} ${LIBXML2_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser) + ${QtPropertyBrowser_INCLUDE_DIR}) FILE(GLOB SRC *.cpp *.h) SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h @@ -38,9 +40,9 @@ SET(OVQT_PLUGIN_GEORGES_EDITOR_RCS georges_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS ${OVQT_PLUGIN_GEORGES_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUG_GEORGES_EDITOR_MOC_SRC ${OVQT_PLUG_GEORGES_EDITOR_HDR}) -QT4_WRAP_UI( OVQT_PLUG_GEORGES_EDITOR_UI_HDRS ${OVQT_PLUG_GEORGES_EDITOR_UIS} ) +QT5_ADD_RESOURCES(OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS ${OVQT_PLUGIN_GEORGES_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUG_GEORGES_EDITOR_MOC_SRC ${OVQT_PLUG_GEORGES_EDITOR_HDR}) +QT5_WRAP_UI( OVQT_PLUG_GEORGES_EDITOR_UI_HDRS ${OVQT_PLUG_GEORGES_EDITOR_UIS} ) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_GEORGES_EDITOR_UIS} ${OVQT_PLUGIN_GEORGES_EDITOR_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS}) @@ -50,7 +52,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) ADD_LIBRARY(studio_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS}) -TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qt_property_browser ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qtpropertybrowser ${QtPropertyBrowser_LIBRARY} ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) NL_DEFAULT_PROPS(studio_plugin_georges_editor "Tools: Studio Plugin: Georges Editor") NL_ADD_RUNTIME_FLAGS(studio_plugin_georges_editor) diff --git a/studio/src/plugins/georges_editor/actions.cpp b/studio/src/plugins/georges_editor/actions.cpp index 54819dc18d..82e6d345b9 100644 --- a/studio/src/plugins/georges_editor/actions.cpp +++ b/studio/src/plugins/georges_editor/actions.cpp @@ -98,8 +98,8 @@ namespace GeorgesQt value = m_oldValue; - array->Elements[m_item->structId()].Name = value.toAscii().data(); - m_item->setName(value.toAscii().data()); + array->Elements[m_item->structId()].Name = value.toLatin1().data(); + m_item->setName(value.toLatin1().data()); m_model->emitDataChanged(m_model->index(m_item->row(), 0, m_item)); } diff --git a/studio/src/plugins/georges_editor/actions.h b/studio/src/plugins/georges_editor/actions.h index 019316e583..3231c3beee 100644 --- a/studio/src/plugins/georges_editor/actions.h +++ b/studio/src/plugins/georges_editor/actions.h @@ -20,7 +20,7 @@ #ifndef ACTIONS_H #define ACTIONS_H -#include +#include #include namespace GeorgesQt diff --git a/studio/src/plugins/georges_editor/browser_ctrl.cpp b/studio/src/plugins/georges_editor/browser_ctrl.cpp index 4d93556f42..f632814e43 100644 --- a/studio/src/plugins/georges_editor/browser_ctrl.cpp +++ b/studio/src/plugins/georges_editor/browser_ctrl.cpp @@ -20,8 +20,8 @@ #include "browser_ctrl.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" +#include +#include #include "filepath_property_manager.h" #include diff --git a/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp b/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp index 3abf3f9881..62f9084fd6 100644 --- a/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp +++ b/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp @@ -19,9 +19,10 @@ // along with this program. If not, see . #include "browser_ctrl_pvt.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" +#include +#include #include +#include #include "formitem.h" #include "nel/georges/form.h" @@ -517,7 +518,7 @@ void BrowserCtrlPvt::onArrayValueChanged( QtProperty *p, const QVariant &value ) void BrowserCtrlPvt::onAtomValueChanged( QtProperty *p, const QVariant &value ) { NLGEORGES::CFormElmAtom *atom = static_cast< NLGEORGES::CFormElmAtom* >( getCurrentNode() ); - atom->setValue( value.toString().toUtf8() ); + atom->setValue( value.toString().toUtf8().constData() ); Q_EMIT modified(); Q_EMIT valueChanged( m_currentNode.name, value.toString() ); diff --git a/studio/src/plugins/georges_editor/browser_ctrl_pvt.h b/studio/src/plugins/georges_editor/browser_ctrl_pvt.h index 704e63b0c2..d0ec984ab8 100644 --- a/studio/src/plugins/georges_editor/browser_ctrl_pvt.h +++ b/studio/src/plugins/georges_editor/browser_ctrl_pvt.h @@ -19,6 +19,7 @@ #define BROWSER_CTRL_PVT_H #include +#include namespace NLGEORGES { diff --git a/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp b/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp index ed992f7d36..d71909ce0e 100644 --- a/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp +++ b/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp @@ -16,10 +16,10 @@ // along with this program. If not, see . #include "dfn_browser_ctrl.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" -#include "3rdparty/qtpropertybrowser/qteditorfactory.h" -#include "3rdparty/qtpropertybrowser/qtpropertymanager.h" +#include +#include +#include +#include #include "filepath_property_manager.h" diff --git a/studio/src/plugins/georges_editor/filepath_property_manager.h b/studio/src/plugins/georges_editor/filepath_property_manager.h index 88cc9c31c0..c3700fe3ba 100644 --- a/studio/src/plugins/georges_editor/filepath_property_manager.h +++ b/studio/src/plugins/georges_editor/filepath_property_manager.h @@ -21,7 +21,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT #include -#include <3rdparty/qtpropertybrowser/qtpropertymanager.h> +#include /////////////////////////////////////////////////////////////////////// Manager ///////////////////////////////////////////////////////////////// diff --git a/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp b/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp index 7b0b180567..b86176beaf 100644 --- a/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp @@ -18,6 +18,7 @@ #include "georges_dfn_dialog.h" #include #include +#include #include "georges.h" #include "dfn_browser_ctrl.h" @@ -25,6 +26,7 @@ #include "nel/misc/file.h" #include "nel/misc/o_xml.h" #include "nel/misc/path.h" +#include "nel/georges/form_dfn.h" class GeorgesDFNDialogPvt { diff --git a/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp b/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp index 9599aa3737..6a0c9b348a 100644 --- a/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp @@ -23,7 +23,7 @@ #include "georges_dirtree_dialog.h" // Qt includes -#include +#include #include // NeL includes diff --git a/studio/src/plugins/georges_editor/georges_dirtree_dialog.h b/studio/src/plugins/georges_editor/georges_dirtree_dialog.h index 106f69a012..974a555cde 100644 --- a/studio/src/plugins/georges_editor/georges_dirtree_dialog.h +++ b/studio/src/plugins/georges_editor/georges_dirtree_dialog.h @@ -21,7 +21,7 @@ #define GEORGES_DIRTREE_DIALOG_H // Qt includes -#include +#include // STL includes diff --git a/studio/src/plugins/georges_editor/georges_dock_widget.cpp b/studio/src/plugins/georges_editor/georges_dock_widget.cpp index f301db0f88..30697af0f0 100644 --- a/studio/src/plugins/georges_editor/georges_dock_widget.cpp +++ b/studio/src/plugins/georges_editor/georges_dock_widget.cpp @@ -17,6 +17,8 @@ #include "georges_dock_widget.h" #include +#include +#include GeorgesDockWidget::GeorgesDockWidget( QWidget *parent ) : QDockWidget( parent ) diff --git a/studio/src/plugins/georges_editor/georges_editor_form.cpp b/studio/src/plugins/georges_editor/georges_editor_form.cpp index 89d8dfd197..56cf439088 100644 --- a/studio/src/plugins/georges_editor/georges_editor_form.cpp +++ b/studio/src/plugins/georges_editor/georges_editor_form.cpp @@ -41,6 +41,7 @@ #include #include #include +#include namespace GeorgesQt { diff --git a/studio/src/plugins/georges_editor/georges_editor_form.h b/studio/src/plugins/georges_editor/georges_editor_form.h index a1d33e65eb..c90bd86200 100644 --- a/studio/src/plugins/georges_editor/georges_editor_form.h +++ b/studio/src/plugins/georges_editor/georges_editor_form.h @@ -25,7 +25,7 @@ #include "ui_georges_editor_form.h" // Qt includes -#include +#include class GeorgesDockWidget; diff --git a/studio/src/plugins/georges_editor/georges_editor_plugin.cpp b/studio/src/plugins/georges_editor/georges_editor_plugin.cpp index 8fa764a5ad..6de11d7a1f 100644 --- a/studio/src/plugins/georges_editor/georges_editor_plugin.cpp +++ b/studio/src/plugins/georges_editor/georges_editor_plugin.cpp @@ -109,5 +109,3 @@ QWidget *GeorgesEditorContext::widget() } } - -Q_EXPORT_PLUGIN(GeorgesQt::GeorgesEditorPlugin) \ No newline at end of file diff --git a/studio/src/plugins/georges_editor/georges_editor_plugin.h b/studio/src/plugins/georges_editor/georges_editor_plugin.h index 960cb943bb..2b39267e91 100644 --- a/studio/src/plugins/georges_editor/georges_editor_plugin.h +++ b/studio/src/plugins/georges_editor/georges_editor_plugin.h @@ -48,6 +48,7 @@ class GeorgesEditorForm; class GeorgesEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/georges_editor/georges_filesystem_model.h b/studio/src/plugins/georges_editor/georges_filesystem_model.h index 7d1e16cb14..43bb23e4d9 100644 --- a/studio/src/plugins/georges_editor/georges_filesystem_model.h +++ b/studio/src/plugins/georges_editor/georges_filesystem_model.h @@ -17,7 +17,7 @@ #ifndef GEORGES_FILESYSTEM_MODEL_H #define GEORGES_FILESYSTEM_MODEL_H -#include +#include #include namespace GeorgesQt diff --git a/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp b/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp index b6b6a8f92b..48ac5b3ef1 100644 --- a/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp @@ -22,11 +22,12 @@ #include "georges_treeview_dialog.h" // Qt includes -#include +#include #include #include #include #include +#include // NeL includes #include @@ -73,7 +74,7 @@ namespace GeorgesQt m_ui.setupUi(this); m_header = new ExpandableHeaderView(Qt::Horizontal, m_ui.treeView); m_ui.treeView->setHeader(m_header); - m_ui.treeView->header()->setResizeMode(QHeaderView::ResizeToContents); + m_ui.treeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); m_ui.treeView->header()->setStretchLastSection(true); m_form = 0; @@ -126,7 +127,7 @@ namespace GeorgesQt NLGEORGES::CForm* CGeorgesTreeViewDialog::getFormByName(const QString formName) { - return (NLGEORGES::CForm *)m_georges->loadForm(formName.toAscii().data()); + return (NLGEORGES::CForm *)m_georges->loadForm(formName.toLatin1().data()); //else //{ // CForm *form = 0; @@ -171,7 +172,7 @@ namespace GeorgesQt m_form = form; // Retrieve a copy of the root definition. - NLGEORGES::CFormDfn *formDfn = dynamic_cast(m_georges->loadFormDfn(dfnName.toAscii().data())); + NLGEORGES::CFormDfn *formDfn = dynamic_cast(m_georges->loadFormDfn(dfnName.toLatin1().data())); // Next we'll use the root node to build a new form. NLGEORGES::CFormElmStruct *fes = dynamic_cast(getRootNode(0)); @@ -274,7 +275,7 @@ namespace GeorgesQt void CGeorgesTreeViewDialog::addParentForm(QString parentFormNm) { // Try to load the form - NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toAscii().data()); + NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toLatin1().data()); NLGEORGES::CForm *parentForm = dynamic_cast(uParentForm); NLGEORGES::CForm *mainForm = static_cast(m_form); @@ -288,11 +289,11 @@ namespace GeorgesQt if (parentForm->Elements.FormDfn == mainForm->Elements.FormDfn) { // This is the parent form selector - if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toAscii().data(), parentForm)) - nlwarning("Failed to add parent form: %s", parentFormNm.toAscii().data()); + if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toLatin1().data(), parentForm)) + nlwarning("Failed to add parent form: %s", parentFormNm.toLatin1().data()); else { - nlinfo("Successfullyadded parent form: %s", parentFormNm.toAscii().data()); + nlinfo("Successfullyadded parent form: %s", parentFormNm.toLatin1().data()); model->addParentForm(parentFormNm); } } diff --git a/studio/src/plugins/georges_editor/georges_treeview_dialog.h b/studio/src/plugins/georges_editor/georges_treeview_dialog.h index eea41c3872..122f56d6e0 100644 --- a/studio/src/plugins/georges_editor/georges_treeview_dialog.h +++ b/studio/src/plugins/georges_editor/georges_treeview_dialog.h @@ -26,9 +26,9 @@ #include "expandable_headerview.h" // Qt includes -#include -#include -#include +#include +#include +#include // STL includes diff --git a/studio/src/plugins/georges_editor/georges_typ_dialog.cpp b/studio/src/plugins/georges_editor/georges_typ_dialog.cpp index 666793c257..b0b2e11fbb 100644 --- a/studio/src/plugins/georges_editor/georges_typ_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_typ_dialog.cpp @@ -21,10 +21,13 @@ #include #include +#include #include "nel/misc/file.h" #include "nel/misc/o_xml.h" #include "nel/misc/path.h" +#include "nel/georges/u_type.h" +#include "nel/georges/type.h" class GeorgesTypDialogPvt { diff --git a/studio/src/plugins/georges_editor/georgesform_model.h b/studio/src/plugins/georges_editor/georgesform_model.h index 42bf9fad8f..291ab1e768 100644 --- a/studio/src/plugins/georges_editor/georgesform_model.h +++ b/studio/src/plugins/georges_editor/georgesform_model.h @@ -35,6 +35,7 @@ namespace NLGEORGES { class UForm; class CFormElmStruct; class CFormDfn; + class CFormElm; class CFormElmArray; } diff --git a/studio/src/plugins/georges_editor/plugin-metadata.json b/studio/src/plugins/georges_editor/plugin-metadata.json new file mode 100644 index 0000000000..defc0b3b8e --- /dev/null +++ b/studio/src/plugins/georges_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "GeorgesEditor", + "Version" : "0.4", + "Vendor": "aquiles", + "Description": "Tool to create and edit sheets or forms." +} \ No newline at end of file diff --git a/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp b/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp index 906135daea..14affe1b94 100644 --- a/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp +++ b/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp @@ -17,10 +17,10 @@ #include "typ_browser_ctrl.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" -#include "3rdparty/qtpropertybrowser/qtpropertymanager.h" -#include "3rdparty/qtpropertybrowser/qteditorfactory.h" +#include +#include +#include +#include #include "nel/georges/type.h" diff --git a/studio/src/plugins/gui_editor/CMakeLists.txt b/studio/src/plugins/gui_editor/CMakeLists.txt index cdcd196127..cdeb310963 100644 --- a/studio/src/plugins/gui_editor/CMakeLists.txt +++ b/studio/src/plugins/gui_editor/CMakeLists.txt @@ -64,9 +64,9 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_GUI_EDITOR_RC_SRCS ${OVQT_PLUGIN_GUI_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUGIN_GUI_EDITOR_MOC_SRC ${OVQT_PLUGIN_GUI_EDITOR_HDR}) -QT4_WRAP_UI(OVQT_PLUGIN_GUI_EDITOR_UI_HDRS ${OVQT_PLUGIN_GUI_EDITOR_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_GUI_EDITOR_RC_SRCS ${OVQT_PLUGIN_GUI_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUGIN_GUI_EDITOR_MOC_SRC ${OVQT_PLUGIN_GUI_EDITOR_HDR}) +QT5_WRAP_UI(OVQT_PLUGIN_GUI_EDITOR_UI_HDRS ${OVQT_PLUGIN_GUI_EDITOR_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUGIN_GUI_EDITOR_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUGIN_GUI_EDITOR_UI_HDRS}) @@ -89,7 +89,7 @@ TARGET_LINK_LIBRARIES( nelgui ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} - qt_property_browser + ${QtPropertyBrowser_LIBRARY} ) NL_DEFAULT_PROPS(studio_plugin_gui_editor "Tools: Studio Plugin: GUI Editor") diff --git a/studio/src/plugins/gui_editor/action_property_manager.h b/studio/src/plugins/gui_editor/action_property_manager.h index 9bc187dd92..2b77995d86 100644 --- a/studio/src/plugins/gui_editor/action_property_manager.h +++ b/studio/src/plugins/gui_editor/action_property_manager.h @@ -23,7 +23,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT -#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include #include /////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// diff --git a/studio/src/plugins/gui_editor/gui_editor_plugin.cpp b/studio/src/plugins/gui_editor/gui_editor_plugin.cpp index a75190fa39..488570fe4f 100644 --- a/studio/src/plugins/gui_editor/gui_editor_plugin.cpp +++ b/studio/src/plugins/gui_editor/gui_editor_plugin.cpp @@ -84,5 +84,3 @@ namespace GUIEditor } } - -Q_EXPORT_PLUGIN(GUIEditor::GUIEditorPlugin) \ No newline at end of file diff --git a/studio/src/plugins/gui_editor/gui_editor_plugin.h b/studio/src/plugins/gui_editor/gui_editor_plugin.h index 30d4f3f452..800d108c2a 100644 --- a/studio/src/plugins/gui_editor/gui_editor_plugin.h +++ b/studio/src/plugins/gui_editor/gui_editor_plugin.h @@ -46,6 +46,7 @@ namespace GUIEditor class GUIEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: virtual ~GUIEditorPlugin(); diff --git a/studio/src/plugins/gui_editor/gui_editor_window.cpp b/studio/src/plugins/gui_editor/gui_editor_window.cpp index 74ff0791ae..b722a7336d 100644 --- a/studio/src/plugins/gui_editor/gui_editor_window.cpp +++ b/studio/src/plugins/gui_editor/gui_editor_window.cpp @@ -27,11 +27,11 @@ #include -#include -#include +#include +#include #include #include -#include "../../3rdparty/qtpropertybrowser/QtTreePropertyBrowser" +#include #include "widget_properties.h" #include "widget_info_tree.h" diff --git a/studio/src/plugins/gui_editor/gui_editor_window.h b/studio/src/plugins/gui_editor/gui_editor_window.h index 57ac32020e..1eab073c71 100644 --- a/studio/src/plugins/gui_editor/gui_editor_window.h +++ b/studio/src/plugins/gui_editor/gui_editor_window.h @@ -21,7 +21,7 @@ #define GUI_EDITOR_WINDOW_H #include "ui_gui_editor_window.h" -#include +#include #include #include #include "widget_info.h" diff --git a/studio/src/plugins/gui_editor/plugin-metadata.json b/studio/src/plugins/gui_editor/plugin-metadata.json new file mode 100644 index 0000000000..abbd16327e --- /dev/null +++ b/studio/src/plugins/gui_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "GUI Editor", + "Version" : "0.0.1", + "Vendor": "Ryzom Core", + "Description": "GUI Editor plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/gui_editor/property_browser_ctrl.cpp b/studio/src/plugins/gui_editor/property_browser_ctrl.cpp index b8a38ad930..8461ddc8c8 100644 --- a/studio/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/studio/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -19,10 +19,10 @@ #include "property_browser_ctrl.h" -#include "../../3rdparty/qtpropertybrowser/QtVariantPropertyManager" -#include "../../3rdparty/qtpropertybrowser/QtEnumPropertyManager" -#include "../../3rdparty/qtpropertybrowser/QtTreePropertyBrowser" -#include "../../3rdparty/qtpropertybrowser/QtEnumEditorFactory" +#include +#include +#include +#include #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" #include diff --git a/studio/src/plugins/gui_editor/texture_property_manager.h b/studio/src/plugins/gui_editor/texture_property_manager.h index 9af7de8c4e..2355f7e47b 100644 --- a/studio/src/plugins/gui_editor/texture_property_manager.h +++ b/studio/src/plugins/gui_editor/texture_property_manager.h @@ -23,7 +23,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT -#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include #include /////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// diff --git a/studio/src/plugins/landscape_editor/CMakeLists.txt b/studio/src/plugins/landscape_editor/CMakeLists.txt index fe5a558307..c917f23ef6 100644 --- a/studio/src/plugins/landscape_editor/CMakeLists.txt +++ b/studio/src/plugins/landscape_editor/CMakeLists.txt @@ -30,9 +30,9 @@ SET(OVQT_PLUGIN_LANDSCAPE_EDITOR_RCS landscape_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_LANDSCAPE_EDITOR_RC_SRCS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUGIN_LANDSCAPE_EDITOR_MOC_SRC ${OVQT_PLUGIN_LANDSCAPE_EDITOR_HDR}) -QT4_WRAP_UI(OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_LANDSCAPE_EDITOR_RC_SRCS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUGIN_LANDSCAPE_EDITOR_MOC_SRC ${OVQT_PLUGIN_LANDSCAPE_EDITOR_HDR}) +QT5_WRAP_UI(OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS}) diff --git a/studio/src/plugins/landscape_editor/builder_zone.cpp b/studio/src/plugins/landscape_editor/builder_zone.cpp index 8ed5121a49..b569f1485d 100644 --- a/studio/src/plugins/landscape_editor/builder_zone.cpp +++ b/studio/src/plugins/landscape_editor/builder_zone.cpp @@ -27,8 +27,8 @@ // Qt includes #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/builder_zone.h b/studio/src/plugins/landscape_editor/builder_zone.h index 7fde90e28f..fbf309a2bc 100644 --- a/studio/src/plugins/landscape_editor/builder_zone.h +++ b/studio/src/plugins/landscape_editor/builder_zone.h @@ -39,9 +39,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/builder_zone_base.cpp b/studio/src/plugins/landscape_editor/builder_zone_base.cpp index 0c0fd49cb2..416db4b122 100644 --- a/studio/src/plugins/landscape_editor/builder_zone_base.cpp +++ b/studio/src/plugins/landscape_editor/builder_zone_base.cpp @@ -28,8 +28,8 @@ // Qt includes #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/builder_zone_base.h b/studio/src/plugins/landscape_editor/builder_zone_base.h index 9e53551b5d..e2f7ebaba7 100644 --- a/studio/src/plugins/landscape_editor/builder_zone_base.h +++ b/studio/src/plugins/landscape_editor/builder_zone_base.h @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_actions.h b/studio/src/plugins/landscape_editor/landscape_actions.h index 9579417d08..523277c9ff 100644 --- a/studio/src/plugins/landscape_editor/landscape_actions.h +++ b/studio/src/plugins/landscape_editor/landscape_actions.h @@ -27,9 +27,9 @@ // NeL includes // Qt includes -#include -#include -#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp b/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp index b9078d0592..d28c303b5e 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp +++ b/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp @@ -103,4 +103,3 @@ QWidget *LandscapeEditorContext::widget() } } -Q_EXPORT_PLUGIN(LandscapeEditor::LandscapeEditorPlugin) diff --git a/studio/src/plugins/landscape_editor/landscape_editor_plugin.h b/studio/src/plugins/landscape_editor/landscape_editor_plugin.h index 5af2e64366..a4a4e695c2 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_plugin.h +++ b/studio/src/plugins/landscape_editor/landscape_editor_plugin.h @@ -27,7 +27,7 @@ // Qt includes #include -#include +#include namespace NLMISC { @@ -41,6 +41,7 @@ class LandscapeEditorWindow; class LandscapeEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/landscape_editor/landscape_editor_window.cpp b/studio/src/plugins/landscape_editor/landscape_editor_window.cpp index a7be907012..3a1b86ed1b 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_window.cpp +++ b/studio/src/plugins/landscape_editor/landscape_editor_window.cpp @@ -35,10 +35,10 @@ // Qt includes #include -#include -#include -#include -#include +#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_editor_window.h b/studio/src/plugins/landscape_editor/landscape_editor_window.h index b1ddd81ae7..a4d2c691ca 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_window.h +++ b/studio/src/plugins/landscape_editor/landscape_editor_window.h @@ -21,10 +21,10 @@ #include "ui_landscape_editor_window.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_scene.cpp b/studio/src/plugins/landscape_editor/landscape_scene.cpp index f877935b54..8aa3e5c851 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene.cpp +++ b/studio/src/plugins/landscape_editor/landscape_scene.cpp @@ -22,9 +22,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include namespace LandscapeEditor @@ -218,7 +218,9 @@ QGraphicsRectItem *LandscapeScene::createLayerBlackout(const NLLIGO::CZoneRegion void LandscapeScene::deleteItemZone(const ZonePosition &zonePos) { - QGraphicsItem *item = itemAt(zonePos.x * m_cellSize, abs(zonePos.y) * m_cellSize); + // ignore transform + QTransform viewportTransform; + QGraphicsItem *item = itemAt(zonePos.x * m_cellSize, abs(zonePos.y) * m_cellSize, viewportTransform); if ((item != 0) && (item->data(ZONE_NAME).toString() != QString(LAYER_BLACKOUT_NAME))) { removeItem(item); @@ -370,7 +372,9 @@ void LandscapeScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) bool LandscapeScene::checkUnderZone(const int posX, const int posY) { - QGraphicsItem *item = itemAt((posX * m_cellSize), abs(posY) * m_cellSize); + // ignore transform + QTransform viewportTransform; + QGraphicsItem *item = itemAt((posX * m_cellSize), abs(posY) * m_cellSize, viewportTransform); if (item != 0) { //if (item->data(ZONE_NAME) == QString(LAYER_BLACKOUT_NAME)) diff --git a/studio/src/plugins/landscape_editor/landscape_scene.h b/studio/src/plugins/landscape_editor/landscape_scene.h index 9d77fe7c47..0ad17ba10b 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene.h +++ b/studio/src/plugins/landscape_editor/landscape_scene.h @@ -29,8 +29,8 @@ #include // Qt includes -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_scene_base.cpp b/studio/src/plugins/landscape_editor/landscape_scene_base.cpp index d6d9b1d7ac..28c4334373 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene_base.cpp +++ b/studio/src/plugins/landscape_editor/landscape_scene_base.cpp @@ -22,9 +22,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/landscape_editor/landscape_scene_base.h b/studio/src/plugins/landscape_editor/landscape_scene_base.h index 2f13583ce8..82a23751e6 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene_base.h +++ b/studio/src/plugins/landscape_editor/landscape_scene_base.h @@ -26,8 +26,8 @@ #include // Qt includes -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_view.h b/studio/src/plugins/landscape_editor/landscape_view.h index 2b20bf7490..9acf486e60 100644 --- a/studio/src/plugins/landscape_editor/landscape_view.h +++ b/studio/src/plugins/landscape_editor/landscape_view.h @@ -21,8 +21,8 @@ #include "landscape_editor_global.h" // Qt includes -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/list_zones_model.cpp b/studio/src/plugins/landscape_editor/list_zones_model.cpp index c0bfdba68b..ded79006f9 100644 --- a/studio/src/plugins/landscape_editor/list_zones_model.cpp +++ b/studio/src/plugins/landscape_editor/list_zones_model.cpp @@ -30,7 +30,7 @@ // Qt includes #include -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/list_zones_model.h b/studio/src/plugins/landscape_editor/list_zones_model.h index f8a85c03c4..4222799731 100644 --- a/studio/src/plugins/landscape_editor/list_zones_model.h +++ b/studio/src/plugins/landscape_editor/list_zones_model.h @@ -28,7 +28,7 @@ // Qt includes #include #include -#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/landscape_editor/list_zones_widget.cpp b/studio/src/plugins/landscape_editor/list_zones_widget.cpp index 389aa98d9c..fd67e0474c 100644 --- a/studio/src/plugins/landscape_editor/list_zones_widget.cpp +++ b/studio/src/plugins/landscape_editor/list_zones_widget.cpp @@ -32,7 +32,7 @@ #include // Qt includes -#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/landscape_editor/pixmap_database.cpp b/studio/src/plugins/landscape_editor/pixmap_database.cpp index 0f5426209b..72a1cb4fb3 100644 --- a/studio/src/plugins/landscape_editor/pixmap_database.cpp +++ b/studio/src/plugins/landscape_editor/pixmap_database.cpp @@ -27,10 +27,10 @@ // Qt includes #include -#include -#include -#include -#include +#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/pixmap_database.h b/studio/src/plugins/landscape_editor/pixmap_database.h index c4c67aacff..08c315b880 100644 --- a/studio/src/plugins/landscape_editor/pixmap_database.h +++ b/studio/src/plugins/landscape_editor/pixmap_database.h @@ -26,7 +26,7 @@ // Qt includes #include #include -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/plugin-metadata.json b/studio/src/plugins/landscape_editor/plugin-metadata.json new file mode 100644 index 0000000000..b95ac5484e --- /dev/null +++ b/studio/src/plugins/landscape_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "LandscapeEditor", + "Version" : "0.8", + "Vendor": "GSoC2011_dnk-88", + "Description": "Landscape editor ovqt plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/landscape_editor/project_settings_dialog.cpp b/studio/src/plugins/landscape_editor/project_settings_dialog.cpp index 5bc8eeda9f..6d2f188750 100644 --- a/studio/src/plugins/landscape_editor/project_settings_dialog.cpp +++ b/studio/src/plugins/landscape_editor/project_settings_dialog.cpp @@ -26,8 +26,8 @@ // Qt includes #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/snapshot_dialog.cpp b/studio/src/plugins/landscape_editor/snapshot_dialog.cpp index b13ba791dc..386b9ae496 100644 --- a/studio/src/plugins/landscape_editor/snapshot_dialog.cpp +++ b/studio/src/plugins/landscape_editor/snapshot_dialog.cpp @@ -26,7 +26,7 @@ // Qt includes #include -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/zone_region_editor.cpp b/studio/src/plugins/landscape_editor/zone_region_editor.cpp index d295fdf317..ff0807585b 100644 --- a/studio/src/plugins/landscape_editor/zone_region_editor.cpp +++ b/studio/src/plugins/landscape_editor/zone_region_editor.cpp @@ -27,7 +27,7 @@ #include // Qt includes -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/log/CMakeLists.txt b/studio/src/plugins/log/CMakeLists.txt index 9b042a3f3d..bb2b81d5ea 100644 --- a/studio/src/plugins/log/CMakeLists.txt +++ b/studio/src/plugins/log/CMakeLists.txt @@ -14,8 +14,8 @@ SET(OVQT_PLUG_LOG_UIS log_form.ui SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_LOG_MOC_SRC ${OVQT_PLUG_LOG_HDR}) -QT4_WRAP_UI( OVQT_PLUG_LOG_UI_HDRS ${OVQT_PLUG_LOG_UIS} ) +QT5_WRAP_CPP(OVQT_PLUG_LOG_MOC_SRC ${OVQT_PLUG_LOG_HDR}) +QT5_WRAP_UI( OVQT_PLUG_LOG_UI_HDRS ${OVQT_PLUG_LOG_UIS} ) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_LOG_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_LOG_UI_HDRS}) diff --git a/studio/src/plugins/log/log_plugin.cpp b/studio/src/plugins/log/log_plugin.cpp index b5cdec4be3..34c4b1290d 100644 --- a/studio/src/plugins/log/log_plugin.cpp +++ b/studio/src/plugins/log/log_plugin.cpp @@ -30,13 +30,13 @@ #include "../../extension_system/iplugin_spec.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -202,4 +202,3 @@ namespace Plugin } } } -Q_EXPORT_PLUGIN(Plugin::CLogPlugin) diff --git a/studio/src/plugins/log/log_plugin.h b/studio/src/plugins/log/log_plugin.h index 9e4f644194..247300df69 100644 --- a/studio/src/plugins/log/log_plugin.h +++ b/studio/src/plugins/log/log_plugin.h @@ -52,7 +52,8 @@ namespace Plugin class CLogPlugin : public QDockWidget, public ExtensionSystem::IPlugin { Q_OBJECT - Q_INTERFACES(ExtensionSystem::IPlugin) + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") + Q_INTERFACES(ExtensionSystem::IPlugin) public: CLogPlugin(QWidget *parent = 0); ~CLogPlugin(); diff --git a/studio/src/plugins/log/log_settings_page.cpp b/studio/src/plugins/log/log_settings_page.cpp index 3fd336097a..2414cc6868 100644 --- a/studio/src/plugins/log/log_settings_page.cpp +++ b/studio/src/plugins/log/log_settings_page.cpp @@ -29,8 +29,8 @@ // NeL includes // Qt includes -#include -#include +#include +#include namespace ExtensionSystem { diff --git a/studio/src/plugins/log/plugin-metadata.json b/studio/src/plugins/log/plugin-metadata.json new file mode 100644 index 0000000000..c65a6101c9 --- /dev/null +++ b/studio/src/plugins/log/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "LogPlugin", + "Version" : "1.1", + "Vendor": "aquiles", + "Description": "DockWidget to display all log messages from NeL." +} \ No newline at end of file diff --git a/studio/src/plugins/mission_compiler/CMakeLists.txt b/studio/src/plugins/mission_compiler/CMakeLists.txt index a3748d559d..7a5a3da4d0 100644 --- a/studio/src/plugins/mission_compiler/CMakeLists.txt +++ b/studio/src/plugins/mission_compiler/CMakeLists.txt @@ -19,9 +19,9 @@ SET(OVQT_PLUG_MISSION_COMPILER_RCS mission_compiler.qrc) SET(QT_USE_QTGUI TRUE) -QT4_WRAP_CPP(OVQT_PLUG_MISSION_COMPILER_MOC_SRC ${OVQT_PLUG_MISSION_COMPILER_HDR}) -QT4_ADD_RESOURCES( OVQT_PLUG_MISSION_COMPILER_RC_SRCS ${OVQT_PLUG_MISSION_COMPILER_RCS}) -QT4_WRAP_UI(OVQT_PLUG_MISSION_COMPILER_UI_HDRS ${OVQT_PLUG_MISSION_COMPILER_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_MISSION_COMPILER_MOC_SRC ${OVQT_PLUG_MISSION_COMPILER_HDR}) +QT5_ADD_RESOURCES( OVQT_PLUG_MISSION_COMPILER_RC_SRCS ${OVQT_PLUG_MISSION_COMPILER_RCS}) +QT5_WRAP_UI(OVQT_PLUG_MISSION_COMPILER_UI_HDRS ${OVQT_PLUG_MISSION_COMPILER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_MISSION_COMPILER_UIS} ${OVQT_PLUG_MISSION_COMPILER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) diff --git a/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp index a8088adedb..3b647b2c54 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -242,7 +242,7 @@ void MissionCompilerMainWindow::compileMission(bool publish) NLLIGO::CPrimitives primDoc; NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = &primDoc; - NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toAscii().data(), false), m_ligoConfig); + NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toLatin1().data(), false), m_ligoConfig); NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = NULL; try @@ -354,7 +354,7 @@ void MissionCompilerMainWindow::handleValidation() TMissionContainer missions; NLLIGO::CPrimitives primDoc; NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = &primDoc; - NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toAscii().data(), false), m_ligoConfig); + NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toLatin1().data(), false), m_ligoConfig); parsePrimForMissions(primDoc.RootNode, missions); // Parse missions to check modification diff --git a/studio/src/plugins/mission_compiler/mission_compiler_main_window.h b/studio/src/plugins/mission_compiler/mission_compiler_main_window.h index 3d59e206a9..8142185ee0 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_main_window.h +++ b/studio/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp b/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp index 46e51f36d1..5ed32d3c7c 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp +++ b/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp @@ -10,12 +10,12 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "mission_compiler_settings_page.h" @@ -75,5 +75,3 @@ void MissionCompilerPlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(MissionCompiler::MissionCompilerPlugin) \ No newline at end of file diff --git a/studio/src/plugins/mission_compiler/mission_compiler_plugin.h b/studio/src/plugins/mission_compiler/mission_compiler_plugin.h index cc2cac47c0..c0bcfff32c 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_plugin.h +++ b/studio/src/plugins/mission_compiler/mission_compiler_plugin.h @@ -30,6 +30,7 @@ namespace MissionCompiler class MissionCompilerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp b/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp index 1701c04716..71f512cc68 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp +++ b/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp @@ -31,10 +31,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace MissionCompiler { diff --git a/studio/src/plugins/mission_compiler/plugin-metadata.json b/studio/src/plugins/mission_compiler/plugin-metadata.json new file mode 100644 index 0000000000..9ca3a586f0 --- /dev/null +++ b/studio/src/plugins/mission_compiler/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "MissionCompiler", + "Version" : "0.1", + "Vendor": "Ryzom Core", + "Description": "Mission Compiler Plugin" +} \ No newline at end of file diff --git a/studio/src/plugins/mission_compiler/validation_file.cpp b/studio/src/plugins/mission_compiler/validation_file.cpp index c284f50cd7..a08a25d2fa 100644 --- a/studio/src/plugins/mission_compiler/validation_file.cpp +++ b/studio/src/plugins/mission_compiler/validation_file.cpp @@ -54,7 +54,7 @@ void CValidationFile::saveMissionValidationFile(std::string filename) nlwarning("Can't find index file '%s' in search path, no mission will be valid", filename.c_str()); return; } - FILE* file = nlfopen(pathName, "w"); + FILE* file = NLMISC::nlfopen(pathName, "w"); nlassert(file!=NULL); // AuthorizedStates diff --git a/studio/src/plugins/object_viewer/CMakeLists.txt b/studio/src/plugins/object_viewer/CMakeLists.txt index 4cc41d1574..ed2be87f8c 100644 --- a/studio/src/plugins/object_viewer/CMakeLists.txt +++ b/studio/src/plugins/object_viewer/CMakeLists.txt @@ -149,9 +149,9 @@ SET(OBJECT_VIEWER_PLUGIN_RCS object_viewer.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OBJECT_VIEWER_PLUGIN_RC_SRCS ${OBJECT_VIEWER_PLUGIN_RCS}) -QT4_WRAP_CPP(OBJECT_VIEWER_PLUGIN_MOC_SRC ${OBJECT_VIEWER_PLUGIN_QT_HDR}) -QT4_WRAP_UI(OBJECT_VIEWER_PLUGIN_UI_HDRS ${OBJECT_VIEWER_PLUGIN_UIS}) +QT5_ADD_RESOURCES(OBJECT_VIEWER_PLUGIN_RC_SRCS ${OBJECT_VIEWER_PLUGIN_RCS}) +QT5_WRAP_CPP(OBJECT_VIEWER_PLUGIN_MOC_SRC ${OBJECT_VIEWER_PLUGIN_QT_HDR}) +QT5_WRAP_UI(OBJECT_VIEWER_PLUGIN_UI_HDRS ${OBJECT_VIEWER_PLUGIN_UIS}) SOURCE_GROUP(QtResources FILES ${OBJECT_VIEWER_PLUGIN_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OBJECT_VIEWER_PLUGIN_UI_HDRS}) diff --git a/studio/src/plugins/object_viewer/graphics_settings_page.cpp b/studio/src/plugins/object_viewer/graphics_settings_page.cpp index 870af9bf22..4053b452c1 100644 --- a/studio/src/plugins/object_viewer/graphics_settings_page.cpp +++ b/studio/src/plugins/object_viewer/graphics_settings_page.cpp @@ -25,8 +25,8 @@ #include "modules.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/graphics_viewport.cpp b/studio/src/plugins/object_viewer/graphics_viewport.cpp index 0cec0be104..cb7240f651 100644 --- a/studio/src/plugins/object_viewer/graphics_viewport.cpp +++ b/studio/src/plugins/object_viewer/graphics_viewport.cpp @@ -17,18 +17,18 @@ */ +// Qt includes +#include +#include +#include +#include + #include "stdpch.h" #include "graphics_viewport.h" #include "../core/Nel3DWidget/nel3d_widget.h" // STL includes -// Qt includes -#include -#include -#include -#include - // NeL includes #include diff --git a/studio/src/plugins/object_viewer/main_window.cpp b/studio/src/plugins/object_viewer/main_window.cpp index dc0c221ccf..7e121bafeb 100644 --- a/studio/src/plugins/object_viewer/main_window.cpp +++ b/studio/src/plugins/object_viewer/main_window.cpp @@ -23,7 +23,9 @@ // STL includes // Qt includes -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/main_window.h b/studio/src/plugins/object_viewer/main_window.h index dff4d9b4b8..f7b0ead8d7 100644 --- a/studio/src/plugins/object_viewer/main_window.h +++ b/studio/src/plugins/object_viewer/main_window.h @@ -23,9 +23,9 @@ // STL includes // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/object_viewer_plugin.cpp b/studio/src/plugins/object_viewer/object_viewer_plugin.cpp index a4c9481402..14a7d1a844 100644 --- a/studio/src/plugins/object_viewer/object_viewer_plugin.cpp +++ b/studio/src/plugins/object_viewer/object_viewer_plugin.cpp @@ -84,5 +84,3 @@ QWidget *CObjectViewerContext::widget() } } - -Q_EXPORT_PLUGIN(NLQT::ObjectViewerPlugin) \ No newline at end of file diff --git a/studio/src/plugins/object_viewer/object_viewer_plugin.h b/studio/src/plugins/object_viewer/object_viewer_plugin.h index 5018501bf2..311a2af8f7 100644 --- a/studio/src/plugins/object_viewer/object_viewer_plugin.h +++ b/studio/src/plugins/object_viewer/object_viewer_plugin.h @@ -28,6 +28,7 @@ namespace NLQT class ObjectViewerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp b/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp index e00d07cecf..32096cc920 100644 --- a/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp @@ -21,7 +21,7 @@ #include "attrib_widget.h" // Qt includes -#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/attrib_widget.h b/studio/src/plugins/object_viewer/particle_system/attrib_widget.h index da308aba79..cc2a62d01c 100644 --- a/studio/src/plugins/object_viewer/particle_system/attrib_widget.h +++ b/studio/src/plugins/object_viewer/particle_system/attrib_widget.h @@ -24,7 +24,7 @@ #include "ui_attrib_form.h" // Qt includes -#include +#include // STL includes diff --git a/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h b/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h index 3180e5d849..4c44fa9166 100644 --- a/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h @@ -24,12 +24,12 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // NeL includes #include "nel/3d/ps_attrib_maker_bin_op.h" diff --git a/studio/src/plugins/object_viewer/particle_system/curve_dialog.h b/studio/src/plugins/object_viewer/particle_system/curve_dialog.h index 29a1baec5d..2f5fc3ba05 100644 --- a/studio/src/plugins/object_viewer/particle_system/curve_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/curve_dialog.h @@ -27,10 +27,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // Project includes #include "hoverpoints.h" diff --git a/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp b/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp index 2bef5e9b5e..d122c0513c 100644 --- a/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp @@ -21,9 +21,9 @@ #include "direction_widget.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp b/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp index fe81a245af..67f68e437e 100644 --- a/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp @@ -21,7 +21,7 @@ #include "emitter_page.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h b/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h index cf7040d4d8..92c528fb95 100644 --- a/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h @@ -20,12 +20,12 @@ #ifndef FOLLOW_PATH_DIALOG_H #define FOLLOW_PATH_DIALOG_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace NL3D { diff --git a/studio/src/plugins/object_viewer/particle_system/located_page.cpp b/studio/src/plugins/object_viewer/particle_system/located_page.cpp index adc38dbee8..0d950edf25 100644 --- a/studio/src/plugins/object_viewer/particle_system/located_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/located_page.cpp @@ -21,8 +21,8 @@ #include "located_page.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp b/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp index e92ca7e203..aa66d7f1f2 100644 --- a/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp @@ -20,9 +20,9 @@ #include "stdpch.h" // Qt include -#include -#include -#include +#include +#include +#include // NeL include #include diff --git a/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp index 20e19b5397..7825edb5d0 100644 --- a/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp @@ -21,7 +21,7 @@ #include "morph_mesh_dialog.h" // Qt include -#include +#include // NeL includes #include "nel/3d/ps_mesh.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp index 2f9135e3da..bc67409e8b 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp @@ -21,7 +21,7 @@ #include "particle_force_page.h" // Qt includes -#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp index ba5a8efaab..6f500b4136 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp @@ -21,7 +21,7 @@ #include "particle_link_skeleton_dialog.h" // Qt includes -#include +#include // Project includes #include "modules.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h b/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h index dc7e5dfe88..ad6a8c4db4 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h @@ -21,11 +21,11 @@ #define PARTICLE_PROPERTY_DIALOG_H // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // NeL includes #include "nel/misc/smart_ptr.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp index ee9e77466a..dcbdc589ac 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp @@ -21,7 +21,7 @@ #include "particle_sound_page.h" // Qt includes -#include +#include // NeL includes #include "nel/3d/ps_located.h" @@ -86,7 +86,7 @@ void CSoundPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBindab _ui.pitchWidget->setWorkspaceNode(_Node); _ui.pitchWidget->updateUi(); - _ui.soundNameLineEdit->setText(QString(_Sound->getSoundName().toString().c_str())); + _ui.soundNameLineEdit->setText(QString(_Sound->getSoundName()->c_str())); _ui.spawnCheckBox->setChecked(_Sound->getSpawn()); _ui.muteCheckBox->setChecked(_Sound->getMute()); @@ -95,7 +95,7 @@ void CSoundPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBindab void CSoundPage::browse() { - std::vector names; + std::vector names; NLSOUND::UAudioMixer *audioMixer = Modules::sound().getAudioMixer(); @@ -108,7 +108,7 @@ void CSoundPage::browse() QStringList items; items << tr(""); for(size_t i = 0; i < names.size(); ++i) - items << QString(names[i].toString().c_str()); + items << QString(names[i]->c_str()); bool ok; QString item = QInputDialog::getItem(this, tr("Select your sound"), @@ -162,7 +162,7 @@ void CSoundPage::setKeepPitch(bool state) void CSoundPage::setSoundName(const QString &text) { - _Sound->setSoundName(NLMISC::CSheetId(text.toUtf8().constData())); + _Sound->setSoundName(NLMISC::CStringMapper::map(text.toUtf8().constData())); } void CSoundPage::setEmissionPercent(float value) diff --git a/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp index 7cdf0895b5..9fcc4824fc 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp @@ -21,10 +21,10 @@ #include "particle_system_page.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp b/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp index 82e171f19d..e0c77d551c 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp @@ -21,8 +21,8 @@ #include "particle_texture_widget.h" // Qt include -#include -#include +#include +#include // NeL includes #include "nel/3d/texture_file.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp index 4c92a5fc45..029f33e833 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp @@ -33,10 +33,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // Project includes #include "dup_ps.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp index 62ffb6d3b3..af886b9842 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp @@ -21,9 +21,9 @@ #include "particle_workspace_page.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h b/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h index 4d5839a5a1..298e5fe7ac 100644 --- a/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h @@ -21,9 +21,9 @@ #define SPINNER_DIALOG_H // Qt includes -#include -#include -#include +#include +#include +#include // Nel include #include "nel/3d/ps_plane_basis_maker.h" diff --git a/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h b/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h index 764160916a..f586290394 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h @@ -23,11 +23,11 @@ #include // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // STL includes diff --git a/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h b/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h index 2600e0bb8f..df2ef6a8c5 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h @@ -23,10 +23,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // NeL include #include "nel/3d/ps_attrib_maker.h" diff --git a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp index 5754b181e6..a6cc6329eb 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp @@ -23,7 +23,7 @@ #include "value_gradient_dialog.h" // Qt include -#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h index afa67e8431..f17edf4826 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h @@ -29,16 +29,16 @@ #include "particle_node.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/plugin-metadata.json b/studio/src/plugins/object_viewer/plugin-metadata.json new file mode 100644 index 0000000000..ef4345b8c3 --- /dev/null +++ b/studio/src/plugins/object_viewer/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "ObjectViewer", + "Version" : "0.8", + "Vendor": "Ryzom Core", + "Description": "Object Viewer plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp b/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp index f2d5e65671..0a73a5ccca 100644 --- a/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp @@ -21,7 +21,7 @@ #include "animation_set_dialog.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/scene/camera_control.h b/studio/src/plugins/object_viewer/scene/camera_control.h index 50d10a2303..97281b9048 100644 --- a/studio/src/plugins/object_viewer/scene/camera_control.h +++ b/studio/src/plugins/object_viewer/scene/camera_control.h @@ -23,13 +23,13 @@ // STL includes // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp b/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp index 2e3184367d..30d4d8bcbf 100644 --- a/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp @@ -25,9 +25,9 @@ #include "modules.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp b/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp index 8145c0bcc4..c8daa71ef3 100644 --- a/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp @@ -21,8 +21,8 @@ #include "skeleton_scale_dialog.h" // Qt include -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp index f846bdf4a6..0230f32901 100644 --- a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp @@ -21,7 +21,7 @@ #include "slot_manager_dialog.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h index a25d4121a9..0f71838ae1 100644 --- a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h +++ b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h @@ -23,8 +23,9 @@ #include #include "ui_slot_form.h" -#include -#include +#include +#include +#include #include "nel/3d/channel_mixer.h" diff --git a/studio/src/plugins/object_viewer/sound_settings_page.cpp b/studio/src/plugins/object_viewer/sound_settings_page.cpp index 02815919b7..90dfc902af 100644 --- a/studio/src/plugins/object_viewer/sound_settings_page.cpp +++ b/studio/src/plugins/object_viewer/sound_settings_page.cpp @@ -25,9 +25,9 @@ #include "modules.h" // Qt includes -#include -#include -#include +#include +#include +#include namespace NLQT { diff --git a/studio/src/plugins/object_viewer/sound_system.cpp b/studio/src/plugins/object_viewer/sound_system.cpp index 702e963f09..fcc39c15df 100644 --- a/studio/src/plugins/object_viewer/sound_system.cpp +++ b/studio/src/plugins/object_viewer/sound_system.cpp @@ -99,7 +99,7 @@ void CSoundSystem::init() _AudioMixer->getDevices(devices); NLSOUND::UAudioMixer::CInitInfo audioInfo; audioInfo.AutoLoadSample = settings->value(Constants::SOUND_AUTO_LOAD_SAMPLE, true).toBool(); - audioInfo.EnableOccludeObstruct = settings->value(Constants::SOUND_ENABLE_OCCLUDE_OBSTRUCT, true).toBool(); + audioInfo.EnableOcclusionObstruction = settings->value(Constants::SOUND_ENABLE_OCCLUDE_OBSTRUCT, true).toBool(); audioInfo.EnableReverb = settings->value(Constants::SOUND_ENABLE_REVERB, true).toBool(); audioInfo.ManualRolloff = settings->value(Constants::SOUND_MANUAL_ROLL_OFF, true).toBool(); audioInfo.ForceSoftware = settings->value(Constants::SOUND_FORCE_SOFTWARE, false).toBool(); @@ -162,7 +162,7 @@ void CSoundSystem::play(const std::string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), true); + NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CStringMapper::map(soundName), true); if (src) { // FIXME: Use relative positioning, and set pos to 0,0,0 @@ -182,7 +182,7 @@ NLSOUND::USource *CSoundSystem::create(const std::string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), false); + NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CStringMapper::map(soundName), false); if (src) { // FIXME: Use relative positioning, and set pos to 0,0,0 diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp index 0366bc11f9..e453c664e0 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp @@ -21,9 +21,9 @@ #include "vegetable_appearance_page.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp index ba70b4c9fd..5d516b115e 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp @@ -21,8 +21,8 @@ #include "vegetable_density_page.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp index 2fc621411c..e726bbe78f 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp @@ -21,8 +21,8 @@ #include "vegetable_dialog.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp index 73b6396477..3dfce2209d 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp @@ -25,11 +25,11 @@ #include "../core/icore.h" // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable_settings_page.cpp b/studio/src/plugins/object_viewer/vegetable_settings_page.cpp index cdf0ce4be8..6ace4ad6a8 100644 --- a/studio/src/plugins/object_viewer/vegetable_settings_page.cpp +++ b/studio/src/plugins/object_viewer/vegetable_settings_page.cpp @@ -25,10 +25,10 @@ #include "modules.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace NLQT { diff --git a/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp b/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp index 65d9db58d5..9b9ff993c8 100644 --- a/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp +++ b/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp @@ -21,9 +21,9 @@ #include "color_edit_widget.h" // Qt includes -#include -#include -#include +#include +#include +#include // Nel includes #include diff --git a/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp b/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp index 184053ab9d..c3f3ec7ade 100644 --- a/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp +++ b/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp @@ -20,6 +20,8 @@ #include "stdpch.h" #include "hoverpoints.h" +#include + #define printf HoverPoints::HoverPoints(QWidget *widget, PointShape shape) diff --git a/studio/src/plugins/object_viewer/widgets/hoverpoints.h b/studio/src/plugins/object_viewer/widgets/hoverpoints.h index f6a6e8b764..b4e2fbf222 100644 --- a/studio/src/plugins/object_viewer/widgets/hoverpoints.h +++ b/studio/src/plugins/object_viewer/widgets/hoverpoints.h @@ -20,7 +20,8 @@ #ifndef HOVERPOINTS_H #define HOVERPOINTS_H -#include +#include +#include QT_FORWARD_DECLARE_CLASS(QBypassWidget) diff --git a/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt index 07e16b4fcf..607d1c5295 100644 --- a/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ b/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -12,7 +12,7 @@ SET(OVQT_PLUG_SHEET_BUILDER_HDR sheetbuilderconfgdialog.h sheetbuilderdialog.h o SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_SHEET_BUILDER_MOC_SRC ${OVQT_PLUG_SHEET_BUILDER_HDR}) +QT5_WRAP_CPP(OVQT_PLUG_SHEET_BUILDER_MOC_SRC ${OVQT_PLUG_SHEET_BUILDER_HDR}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC}) SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC}) diff --git a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp index ecb7c8d316..3c1c72af6c 100644 --- a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp +++ b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp @@ -30,12 +30,12 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include using namespace Plugin; @@ -90,5 +90,3 @@ void SheetBuilderPlugin::setNelContext(NLMISC::INelContext *nelContext) #endif // NL_OS_WINDOWS m_LibContext = new NLMISC::CLibraryContext(*nelContext); } - -Q_EXPORT_PLUGIN(SheetBuilderPlugin) diff --git a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h index 2a1328caf5..f9841acbef 100644 --- a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h +++ b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h @@ -25,7 +25,7 @@ #include "nel/misc/app_context.h" -#include +#include namespace NLMISC { @@ -38,6 +38,7 @@ namespace Plugin class SheetBuilderPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: SheetBuilderPlugin(); diff --git a/studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json b/studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json new file mode 100644 index 0000000000..4756ee852a --- /dev/null +++ b/studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "SheetBuilder", + "Version" : "1.0", + "Vendor": "kharvd", + "Description": "make_sheet_id equivalent" +} \ No newline at end of file diff --git a/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h b/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h index f976513f7d..e8eabc995b 100644 --- a/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h +++ b/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h @@ -145,7 +145,8 @@ void readFormId( string &outputFileName ) map::iterator itFT = FileTypeToId.find(fileType); if( itFT == FileTypeToId.end() ) { - FileTypeToId.insert( make_pair(fileType,fid.FormIDInfos.Type) ); + uint8 type ( fid.FormIDInfos.Type); + FileTypeToId.insert( make_pair(fileType,type) ); } } else diff --git a/studio/src/plugins/tile_editor/CMakeLists.txt b/studio/src/plugins/tile_editor/CMakeLists.txt index 85d6ea737d..f8e5645c0b 100644 --- a/studio/src/plugins/tile_editor/CMakeLists.txt +++ b/studio/src/plugins/tile_editor/CMakeLists.txt @@ -22,9 +22,9 @@ SET(OVQT_PLUG_TILE_EDITOR_RCS tile_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_TILE_EDITOR_PLUGIN_MOC_SRC ${OVQT_TILE_EDITOR_PLUGIN_HDR}) -QT4_ADD_RESOURCES( OVQT_PLUG_TILE_EDITOR_RC_SRCS ${OVQT_PLUG_TILE_EDITOR_RCS}) -QT4_WRAP_UI(OVQT_TILE_EDITOR_PLUGIN_UI_HDRS ${OVQT_TILE_EDITOR_PLUGIN_UIS}) +QT5_WRAP_CPP(OVQT_TILE_EDITOR_PLUGIN_MOC_SRC ${OVQT_TILE_EDITOR_PLUGIN_HDR}) +QT5_ADD_RESOURCES( OVQT_PLUG_TILE_EDITOR_RC_SRCS ${OVQT_PLUG_TILE_EDITOR_RCS}) +QT5_WRAP_UI(OVQT_TILE_EDITOR_PLUGIN_UI_HDRS ${OVQT_TILE_EDITOR_PLUGIN_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_TILE_EDITOR_PLUGIN_UI_HDRS}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_TILE_EDITOR_PLUGIN_MOC_SRC} ${OVQT_PLUG_TILE_EDITOR_RC_SRCS}) diff --git a/studio/src/plugins/tile_editor/plugin-metadata.json b/studio/src/plugins/tile_editor/plugin-metadata.json new file mode 100644 index 0000000000..2712d52404 --- /dev/null +++ b/studio/src/plugins/tile_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "TileEditor", + "Version" : "1.0", + "Vendor": "Ryzom Core", + "Description": "Tile bank editing plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/tile_editor/tile_editor_main_window.cpp b/studio/src/plugins/tile_editor/tile_editor_main_window.cpp index d0dd5faa47..e698952c0f 100644 --- a/studio/src/plugins/tile_editor/tile_editor_main_window.cpp +++ b/studio/src/plugins/tile_editor/tile_editor_main_window.cpp @@ -22,9 +22,9 @@ #include "nel/misc/path.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/studio/src/plugins/tile_editor/tile_editor_main_window.h b/studio/src/plugins/tile_editor/tile_editor_main_window.h index 628bf3d495..f2e0ce6138 100644 --- a/studio/src/plugins/tile_editor/tile_editor_main_window.h +++ b/studio/src/plugins/tile_editor/tile_editor_main_window.h @@ -26,7 +26,7 @@ #include "nel/misc/types_nl.h" #include "nel/misc/sheet_id.h" -#include +#include #include namespace Ui { diff --git a/studio/src/plugins/tile_editor/tile_editor_plugin.cpp b/studio/src/plugins/tile_editor/tile_editor_plugin.cpp index ac1bc225e3..0c5cce9867 100644 --- a/studio/src/plugins/tile_editor/tile_editor_plugin.cpp +++ b/studio/src/plugins/tile_editor/tile_editor_plugin.cpp @@ -26,12 +26,12 @@ #include "../core/core_constants.h" // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // NeL includes #include "nel/misc/debug.h" @@ -78,5 +78,3 @@ void TileEditorPlugin::addAutoReleasedObject(QObject *obj) m_plugMan->addObject(obj); m_autoReleaseObjects.prepend(obj); } - -Q_EXPORT_PLUGIN(TileEditorPlugin) diff --git a/studio/src/plugins/tile_editor/tile_editor_plugin.h b/studio/src/plugins/tile_editor/tile_editor_plugin.h index 20a20111e3..c5fe65ed5b 100644 --- a/studio/src/plugins/tile_editor/tile_editor_plugin.h +++ b/studio/src/plugins/tile_editor/tile_editor_plugin.h @@ -41,6 +41,7 @@ namespace TileEditorPluginQt class TileEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/tile_editor/tile_item_delegate.cpp b/studio/src/plugins/tile_editor/tile_item_delegate.cpp index a3f50e691a..26654e9838 100644 --- a/studio/src/plugins/tile_editor/tile_item_delegate.cpp +++ b/studio/src/plugins/tile_editor/tile_item_delegate.cpp @@ -18,6 +18,7 @@ // along with this program. If not, see . #include +#include #include diff --git a/studio/src/plugins/tile_editor/tile_item_delegate.h b/studio/src/plugins/tile_editor/tile_item_delegate.h index 00bd521c0f..ac9d7632be 100644 --- a/studio/src/plugins/tile_editor/tile_item_delegate.h +++ b/studio/src/plugins/tile_editor/tile_item_delegate.h @@ -20,7 +20,7 @@ #ifndef TILE_ITEM_DELEGATE_H #define TILE_ITEM_DELEGATE_H -#include +#include #include #include diff --git a/studio/src/plugins/translation_manager/CMakeLists.txt b/studio/src/plugins/translation_manager/CMakeLists.txt index 62b60f9304..059f4d5556 100644 --- a/studio/src/plugins/translation_manager/CMakeLists.txt +++ b/studio/src/plugins/translation_manager/CMakeLists.txt @@ -29,8 +29,8 @@ SET(OVQT_PLUG_TRANSLATION_MANAGER_RCS ftp_selection.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTNETWORK TRUE) -QT4_WRAP_CPP(OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC ${OVQT_PLUG_TRANSLATION_MANAGER_HDR}) -QT4_WRAP_UI(OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC ${OVQT_PLUG_TRANSLATION_MANAGER_HDR}) +QT5_WRAP_UI(OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) diff --git a/studio/src/plugins/translation_manager/editor_phrase.cpp b/studio/src/plugins/translation_manager/editor_phrase.cpp index 510255828d..8ea09f0229 100644 --- a/studio/src/plugins/translation_manager/editor_phrase.cpp +++ b/studio/src/plugins/translation_manager/editor_phrase.cpp @@ -23,14 +23,14 @@ #include "nel/misc/diff_tool.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace std; diff --git a/studio/src/plugins/translation_manager/editor_phrase.h b/studio/src/plugins/translation_manager/editor_phrase.h index 404a17d515..63eee91257 100644 --- a/studio/src/plugins/translation_manager/editor_phrase.h +++ b/studio/src/plugins/translation_manager/editor_phrase.h @@ -24,17 +24,17 @@ #include "translation_manager_editor.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace TranslationManager diff --git a/studio/src/plugins/translation_manager/editor_worksheet.cpp b/studio/src/plugins/translation_manager/editor_worksheet.cpp index 4ea127527a..4c3164a5c6 100644 --- a/studio/src/plugins/translation_manager/editor_worksheet.cpp +++ b/studio/src/plugins/translation_manager/editor_worksheet.cpp @@ -23,13 +23,13 @@ #include "translation_manager_constants.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include using namespace std; diff --git a/studio/src/plugins/translation_manager/editor_worksheet.h b/studio/src/plugins/translation_manager/editor_worksheet.h index 498f51564f..ed3b6c2a87 100644 --- a/studio/src/plugins/translation_manager/editor_worksheet.h +++ b/studio/src/plugins/translation_manager/editor_worksheet.h @@ -32,13 +32,13 @@ #include "nel/ligo/ligo_config.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace TranslationManager diff --git a/studio/src/plugins/translation_manager/ftp_selection.cpp b/studio/src/plugins/translation_manager/ftp_selection.cpp index ddaad8745a..de016b9d31 100644 --- a/studio/src/plugins/translation_manager/ftp_selection.cpp +++ b/studio/src/plugins/translation_manager/ftp_selection.cpp @@ -19,8 +19,8 @@ #include "ftp_selection.h" -#include -#include +#include +#include namespace TranslationManager { @@ -49,7 +49,7 @@ CFtpSelection::CFtpSelection(QWidget *parent): QDialog(parent) // Connection with the FTP Server. We retrieve the file list. void CFtpSelection::ConnectButtonClicked() { - conn = new QFtp(this); + conn = new QNetworkAccessManager(this); connect(conn, SIGNAL(commandFinished(int,bool)), this, SLOT(FtpCommandFinished(int,bool))); connect(conn, SIGNAL(listInfo(QUrlInfo)), this, SLOT(AddToList(QUrlInfo))); diff --git a/studio/src/plugins/translation_manager/ftp_selection.h b/studio/src/plugins/translation_manager/ftp_selection.h index 9f8af85ddd..f5825c941f 100644 --- a/studio/src/plugins/translation_manager/ftp_selection.h +++ b/studio/src/plugins/translation_manager/ftp_selection.h @@ -10,12 +10,12 @@ #include "ui_ftp_selection.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include namespace TranslationManager @@ -41,7 +41,7 @@ private Q_SLOTS: private: Ui::FtpSelectionDialog _ui; - QFtp *conn; + QNetworkAccessManager *conn; QHash isDirectory; QString currentPath; }; diff --git a/studio/src/plugins/translation_manager/plugin-metadata.json b/studio/src/plugins/translation_manager/plugin-metadata.json new file mode 100644 index 0000000000..dbd62bb14f --- /dev/null +++ b/studio/src/plugins/translation_manager/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "TranslationManager", + "Version" : "0.8", + "Vendor": "Ryzom Core", + "Description": "Translation Manager plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/translation_manager/source_selection.cpp b/studio/src/plugins/translation_manager/source_selection.cpp index 043d82b3d8..bf06745135 100644 --- a/studio/src/plugins/translation_manager/source_selection.cpp +++ b/studio/src/plugins/translation_manager/source_selection.cpp @@ -21,7 +21,7 @@ #include "source_selection.h" -#include +#include namespace TranslationManager { diff --git a/studio/src/plugins/translation_manager/source_selection.h b/studio/src/plugins/translation_manager/source_selection.h index 5d7c7b4601..29de4f1d8f 100644 --- a/studio/src/plugins/translation_manager/source_selection.h +++ b/studio/src/plugins/translation_manager/source_selection.h @@ -22,10 +22,10 @@ #include "ui_source_selection.h" -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/studio/src/plugins/translation_manager/translation_manager_editor.h b/studio/src/plugins/translation_manager/translation_manager_editor.h index 1141f43fdb..c94c95c49f 100644 --- a/studio/src/plugins/translation_manager/translation_manager_editor.h +++ b/studio/src/plugins/translation_manager/translation_manager_editor.h @@ -21,12 +21,12 @@ #ifndef TRANSLATION_MANAGER_EDITOR_H #define TRANSLATION_MANAGER_EDITOR_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace TranslationManager { diff --git a/studio/src/plugins/translation_manager/translation_manager_main_window.h b/studio/src/plugins/translation_manager/translation_manager_main_window.h index d278a02b97..506dc4a1f1 100644 --- a/studio/src/plugins/translation_manager/translation_manager_main_window.h +++ b/studio/src/plugins/translation_manager/translation_manager_main_window.h @@ -32,14 +32,14 @@ #include "../core/icore_listener.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // STL includes #include diff --git a/studio/src/plugins/translation_manager/translation_manager_plugin.cpp b/studio/src/plugins/translation_manager/translation_manager_plugin.cpp index 1e4db0c18b..945d212c85 100644 --- a/studio/src/plugins/translation_manager/translation_manager_plugin.cpp +++ b/studio/src/plugins/translation_manager/translation_manager_plugin.cpp @@ -34,13 +34,13 @@ #include "nel/misc/debug.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace TranslationManager { @@ -92,5 +92,3 @@ void TranslationManagerPlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(TranslationManager::TranslationManagerPlugin) \ No newline at end of file diff --git a/studio/src/plugins/translation_manager/translation_manager_plugin.h b/studio/src/plugins/translation_manager/translation_manager_plugin.h index 0b3fb1f1e4..4c81e20abb 100644 --- a/studio/src/plugins/translation_manager/translation_manager_plugin.h +++ b/studio/src/plugins/translation_manager/translation_manager_plugin.h @@ -30,8 +30,8 @@ #include "nel/misc/app_context.h" // Qt includes -#include -#include +#include +#include using namespace std; @@ -53,6 +53,7 @@ class CTranslationManagerContext; class TranslationManagerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: virtual ~TranslationManagerPlugin(); diff --git a/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp b/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp index 54fcd473c3..2c0cae2920 100644 --- a/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp +++ b/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp @@ -23,10 +23,10 @@ #include "../core/icore.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace TranslationManager { diff --git a/studio/src/plugins/world_editor/CMakeLists.txt b/studio/src/plugins/world_editor/CMakeLists.txt index 8b4586a1f8..ad0c8914f0 100644 --- a/studio/src/plugins/world_editor/CMakeLists.txt +++ b/studio/src/plugins/world_editor/CMakeLists.txt @@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} ${LIBXML2_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser + ${QtPropertyBrowser_INCLUDE_DIR} ) FILE(GLOB SRC *.cpp *.h) @@ -36,9 +36,9 @@ SET(OVQT_PLUGIN_WORLD_EDITOR_RCS world_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_WORLD_EDITOR_RC_SRCS ${OVQT_PLUGIN_WORLD_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUGIN_WORLD_EDITOR_MOC_SRC ${OVQT_PLUGIN_WORLD_EDITOR_HDR}) -QT4_WRAP_UI(OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS ${OVQT_PLUGIN_WORLD_EDITOR_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_WORLD_EDITOR_RC_SRCS ${OVQT_PLUGIN_WORLD_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUGIN_WORLD_EDITOR_MOC_SRC ${OVQT_PLUGIN_WORLD_EDITOR_HDR}) +QT5_WRAP_UI(OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS ${OVQT_PLUGIN_WORLD_EDITOR_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUGIN_WORLD_EDITOR_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS}) @@ -57,8 +57,9 @@ TARGET_LINK_LIBRARIES( studio_plugin_world_editor studio_plugin_landscape_editor nelmisc nel3d - qt_property_browser - ${QT_LIBRARIES} + ${QtPropertyBrowser_LIBRARY} + QtPropertyBrowser::Text + ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${LIBXML2_LIBRARIES} ) diff --git a/studio/src/plugins/world_editor/const_string_array_property.h b/studio/src/plugins/world_editor/const_string_array_property.h index 78070ef576..e14642f218 100644 --- a/studio/src/plugins/world_editor/const_string_array_property.h +++ b/studio/src/plugins/world_editor/const_string_array_property.h @@ -23,7 +23,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT -#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include #include #include diff --git a/studio/src/plugins/world_editor/plugin-metadata.json b/studio/src/plugins/world_editor/plugin-metadata.json new file mode 100644 index 0000000000..a5089798c6 --- /dev/null +++ b/studio/src/plugins/world_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "WorldEditor", + "Version" : "0.6", + "Vendor": "GSoC2011_dnk-88", + "Description": "Landscape editor ovqt plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/world_editor/primitives_view.cpp b/studio/src/plugins/world_editor/primitives_view.cpp index 0f54af5f42..82d581f5dd 100644 --- a/studio/src/plugins/world_editor/primitives_view.cpp +++ b/studio/src/plugins/world_editor/primitives_view.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/primitives_view.h b/studio/src/plugins/world_editor/primitives_view.h index 0a1745360e..6c6b2f8ec2 100644 --- a/studio/src/plugins/world_editor/primitives_view.h +++ b/studio/src/plugins/world_editor/primitives_view.h @@ -25,13 +25,13 @@ #include // Qt includes -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/world_editor/project_settings_dialog.cpp b/studio/src/plugins/world_editor/project_settings_dialog.cpp index 80bede1582..40ba276e68 100644 --- a/studio/src/plugins/world_editor/project_settings_dialog.cpp +++ b/studio/src/plugins/world_editor/project_settings_dialog.cpp @@ -27,8 +27,8 @@ // Qt includes #include -#include -#include +#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/property_editor_widget.cpp b/studio/src/plugins/world_editor/property_editor_widget.cpp index 1356413fb4..93ae8faf4e 100644 --- a/studio/src/plugins/world_editor/property_editor_widget.cpp +++ b/studio/src/plugins/world_editor/property_editor_widget.cpp @@ -31,7 +31,10 @@ // Qt includes #include +#include #include +#include +#include #include "const_string_array_property.h" diff --git a/studio/src/plugins/world_editor/property_editor_widget.h b/studio/src/plugins/world_editor/property_editor_widget.h index 8a695efa3b..795fe9126f 100644 --- a/studio/src/plugins/world_editor/property_editor_widget.h +++ b/studio/src/plugins/world_editor/property_editor_widget.h @@ -28,9 +28,9 @@ // 3rdparty -#include "qtvariantproperty.h" -#include "qtpropertymanager.h" -#include "qteditorfactory.h" +#include +#include +#include // NeL includes diff --git a/studio/src/plugins/world_editor/world_editor_actions.h b/studio/src/plugins/world_editor/world_editor_actions.h index 4ac39ed90c..4a602207d8 100644 --- a/studio/src/plugins/world_editor/world_editor_actions.h +++ b/studio/src/plugins/world_editor/world_editor_actions.h @@ -26,10 +26,10 @@ // NeL includes // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/world_editor/world_editor_plugin.cpp b/studio/src/plugins/world_editor/world_editor_plugin.cpp index 45548fc004..072dbcd321 100644 --- a/studio/src/plugins/world_editor/world_editor_plugin.cpp +++ b/studio/src/plugins/world_editor/world_editor_plugin.cpp @@ -140,5 +140,3 @@ QWidget *WorldEditorContext::widget() } } - -Q_EXPORT_PLUGIN(WorldEditor::WorldEditorPlugin) diff --git a/studio/src/plugins/world_editor/world_editor_plugin.h b/studio/src/plugins/world_editor/world_editor_plugin.h index 8788c3d3f4..7c46aab749 100644 --- a/studio/src/plugins/world_editor/world_editor_plugin.h +++ b/studio/src/plugins/world_editor/world_editor_plugin.h @@ -32,7 +32,7 @@ // Qt includes #include -#include +#include namespace NLMISC { @@ -46,6 +46,7 @@ class WorldEditorWindow; class WorldEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/world_editor/world_editor_scene.cpp b/studio/src/plugins/world_editor/world_editor_scene.cpp index d86a2d57c4..56cf39a8ae 100644 --- a/studio/src/plugins/world_editor/world_editor_scene.cpp +++ b/studio/src/plugins/world_editor/world_editor_scene.cpp @@ -23,9 +23,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include namespace WorldEditor diff --git a/studio/src/plugins/world_editor/world_editor_scene.h b/studio/src/plugins/world_editor/world_editor_scene.h index f88b82c096..74403f1501 100644 --- a/studio/src/plugins/world_editor/world_editor_scene.h +++ b/studio/src/plugins/world_editor/world_editor_scene.h @@ -25,7 +25,7 @@ // NeL includes // Qt includes -#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/world_editor_scene_item.cpp b/studio/src/plugins/world_editor/world_editor_scene_item.cpp index b94e48a0fa..73e6fcec1b 100644 --- a/studio/src/plugins/world_editor/world_editor_scene_item.cpp +++ b/studio/src/plugins/world_editor/world_editor_scene_item.cpp @@ -21,7 +21,7 @@ #include // Qt includes -#include +#include #include #include #include diff --git a/studio/src/plugins/world_editor/world_editor_scene_item.h b/studio/src/plugins/world_editor/world_editor_scene_item.h index 0579ef32a2..80cde1e9fb 100644 --- a/studio/src/plugins/world_editor/world_editor_scene_item.h +++ b/studio/src/plugins/world_editor/world_editor_scene_item.h @@ -24,11 +24,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/world_editor_settings_page.cpp b/studio/src/plugins/world_editor/world_editor_settings_page.cpp index dc15dc83a5..e56cfcea92 100644 --- a/studio/src/plugins/world_editor/world_editor_settings_page.cpp +++ b/studio/src/plugins/world_editor/world_editor_settings_page.cpp @@ -23,7 +23,7 @@ #include "../core/icore.h" // Qt includes -#include +#include #include // NeL includes diff --git a/studio/src/plugins/world_editor/world_editor_window.cpp b/studio/src/plugins/world_editor/world_editor_window.cpp index 0dcd8c9320..f851c51a20 100644 --- a/studio/src/plugins/world_editor/world_editor_window.cpp +++ b/studio/src/plugins/world_editor/world_editor_window.cpp @@ -39,9 +39,9 @@ // Qt includes #include -#include -#include -#include +#include +#include +#include #include namespace WorldEditor diff --git a/studio/src/plugins/world_editor/world_editor_window.h b/studio/src/plugins/world_editor/world_editor_window.h index 3abd8bd43f..135ae851c0 100644 --- a/studio/src/plugins/world_editor/world_editor_window.h +++ b/studio/src/plugins/world_editor/world_editor_window.h @@ -24,8 +24,8 @@ #include "ui_world_editor_window.h" // Qt includes -#include -#include +#include +#include #include #include #include diff --git a/studio/src/plugins/zone_painter/CMakeLists.txt b/studio/src/plugins/zone_painter/CMakeLists.txt index fef437ec09..783f8a6202 100644 --- a/studio/src/plugins/zone_painter/CMakeLists.txt +++ b/studio/src/plugins/zone_painter/CMakeLists.txt @@ -21,9 +21,9 @@ SET(OVQT_PLUG_ZONE_PAINTER_RCS zone_painter.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_ZONE_PAINTER_MOC_SRC ${OVQT_PLUG_ZONE_PAINTER_HDR}) -QT4_ADD_RESOURCES( OVQT_PLUG_ZONE_PAINTER_RC_SRCS ${OVQT_PLUG_ZONE_PAINTER_RCS}) -QT4_WRAP_UI(OVQT_PLUG_ZONE_PAINTER_UI_HDRS ${OVQT_PLUG_ZONE_PAINTER_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_ZONE_PAINTER_MOC_SRC ${OVQT_PLUG_ZONE_PAINTER_HDR}) +QT5_ADD_RESOURCES( OVQT_PLUG_ZONE_PAINTER_RC_SRCS ${OVQT_PLUG_ZONE_PAINTER_RCS}) +QT5_WRAP_UI(OVQT_PLUG_ZONE_PAINTER_UI_HDRS ${OVQT_PLUG_ZONE_PAINTER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_ZONE_PAINTER_UIS} ${OVQT_PLUG_ZONE_PAINTER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_ZONE_PAINTER_UI_HDRS}) diff --git a/studio/src/plugins/zone_painter/plugin-metadata.json b/studio/src/plugins/zone_painter/plugin-metadata.json new file mode 100644 index 0000000000..5eccd229c8 --- /dev/null +++ b/studio/src/plugins/zone_painter/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "ZonePainter", + "Version" : "0.0", + "Vendor": "Ryzom Core", + "Description": "Zone Painter Plugin" +} \ No newline at end of file diff --git a/studio/src/plugins/zone_painter/qnel_widget.h b/studio/src/plugins/zone_painter/qnel_widget.h index 77ecf6da36..79a2f0171f 100644 --- a/studio/src/plugins/zone_painter/qnel_widget.h +++ b/studio/src/plugins/zone_painter/qnel_widget.h @@ -27,8 +27,8 @@ #include // Qt includes -#include -#include +#include +#include class QAction; diff --git a/studio/src/plugins/zone_painter/zone_painter_main_window.h b/studio/src/plugins/zone_painter/zone_painter_main_window.h index caa4433e42..56ac90d58e 100644 --- a/studio/src/plugins/zone_painter/zone_painter_main_window.h +++ b/studio/src/plugins/zone_painter/zone_painter_main_window.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include namespace NLQT { class QNLWidget; diff --git a/studio/src/plugins/zone_painter/zone_painter_plugin.cpp b/studio/src/plugins/zone_painter/zone_painter_plugin.cpp index 085a18634d..c8faa28fd9 100644 --- a/studio/src/plugins/zone_painter/zone_painter_plugin.cpp +++ b/studio/src/plugins/zone_painter/zone_painter_plugin.cpp @@ -85,5 +85,3 @@ void ZonePainterPlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(Plugin::ZonePainterPlugin) \ No newline at end of file diff --git a/studio/src/plugins/zone_painter/zone_painter_plugin.h b/studio/src/plugins/zone_painter/zone_painter_plugin.h index a3def41bac..47140b4089 100644 --- a/studio/src/plugins/zone_painter/zone_painter_plugin.h +++ b/studio/src/plugins/zone_painter/zone_painter_plugin.h @@ -45,6 +45,7 @@ namespace Plugin class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/splash_screen.cpp b/studio/src/splash_screen.cpp index 6d8360b9f0..67c9dbc1ad 100644 --- a/studio/src/splash_screen.cpp +++ b/studio/src/splash_screen.cpp @@ -85,7 +85,7 @@ void SplashScreen::drawContents( QPainter *painter ) if( progressBarEnabled ) { - QStyleOptionProgressBarV2 pbStyle; + QStyleOptionProgressBar pbStyle; pbStyle.initFrom( this ); pbStyle.state = QStyle::State_Enabled; pbStyle.textVisible = false;