From 48e86eedee0806db59e42e60eeee40bc5be3ad9d Mon Sep 17 00:00:00 2001 From: Gary Preston Date: Wed, 17 Feb 2016 14:03:57 +0000 Subject: [PATCH 1/3] Fix qt4 build error. --HG-- branch : develop --- code/nel/tools/3d/tile_edit_qt/tiles_model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp b/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp index d05495eb7..5640ae077 100644 --- a/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp +++ b/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp @@ -63,7 +63,7 @@ QVariant tiles_model::data(const QModelIndex &index, int role) const #ifdef USE_QT5 QPixmap pixpix = wiwi.grab(wiwi.contentsRect()); #else - QPixmap::grabWidget(wiwi, wiwi.contentsRect()); + QPixmap pixpix = QPixmap::grabWidget(&wiwi, wiwi.contentsRect()); #endif return pixpix; } From 7281c405776e5a002d19914280c677183b81b27b Mon Sep 17 00:00:00 2001 From: Gary Preston Date: Wed, 17 Feb 2016 14:07:19 +0000 Subject: [PATCH 2/3] Update indentation of tiles_model::data to match coding standard use of tabs. --HG-- branch : develop --- code/nel/tools/3d/tile_edit_qt/tiles_model.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp b/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp index 5640ae077..cabd810d7 100644 --- a/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp +++ b/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp @@ -53,10 +53,10 @@ tiles_model::tiles_model(QObject *parent) QVariant tiles_model::data(const QModelIndex &index, int role) const { - if (!index.isValid()) - return QVariant(); + if (!index.isValid()) + return QVariant(); - if (role == Qt::DecorationRole || role == Qt::UserRole) + if (role == Qt::DecorationRole || role == Qt::UserRole) { CTile_Widget wiwi; wiwi.initWidget(tiles.value(index.row()).getPixmap(), tiles.value(index.row()).getPixmapSide(), tiles.value(index.row()).getTileLabel()); @@ -67,18 +67,17 @@ QVariant tiles_model::data(const QModelIndex &index, int role) const #endif return pixpix; } - else if (role == Qt::UserRole + 1) + else if (role == Qt::UserRole + 1) { - return tiles.value(index.row()).getIndex(); + return tiles.value(index.row()).getIndex(); } - return QVariant(); + return QVariant(); } void tiles_model::sort ( int column, Qt::SortOrder order) { qSort(tiles.begin(), tiles.end(), caseInsensitiveLessThan); - } From c2084480c822828abfaafde4ae03648195838a4b Mon Sep 17 00:00:00 2001 From: Gary Preston Date: Wed, 17 Feb 2016 14:52:01 +0000 Subject: [PATCH 3/3] libxml include/lib related build errors for studio. --HG-- branch : develop --- code/studio/src/plugins/georges_editor/CMakeLists.txt | 7 ++++--- code/studio/src/plugins/gui_editor/widget_serializer.cpp | 3 +++ code/studio/src/plugins/world_editor/CMakeLists.txt | 2 ++ .../src/plugins/world_editor/world_editor_actions.cpp | 4 ++++ code/studio/src/plugins/world_editor/world_editor_misc.cpp | 3 +-- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/code/studio/src/plugins/georges_editor/CMakeLists.txt b/code/studio/src/plugins/georges_editor/CMakeLists.txt index 68b37421d..216034fea 100644 --- a/code/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/code/studio/src/plugins/georges_editor/CMakeLists.txt @@ -1,13 +1,14 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser) + ${LIBXML2_INCLUDE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser) FILE(GLOB SRC *.cpp *.h) SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) SET(OVQT_PLUG_GEORGES_EDITOR_HDR georges_editor_plugin.h georges_editor_form.h @@ -49,7 +50,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}) +TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qt_property_browser ${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/code/studio/src/plugins/gui_editor/widget_serializer.cpp b/code/studio/src/plugins/gui_editor/widget_serializer.cpp index 8006a6b50..a8594afed 100644 --- a/code/studio/src/plugins/gui_editor/widget_serializer.cpp +++ b/code/studio/src/plugins/gui_editor/widget_serializer.cpp @@ -19,6 +19,9 @@ #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" +#include +#include + namespace GUIEditor { bool WidgetSerializer::serialize( const std::string &masterGroup ) diff --git a/code/studio/src/plugins/world_editor/CMakeLists.txt b/code/studio/src/plugins/world_editor/CMakeLists.txt index 1a7ff652d..b494f3f21 100644 --- a/code/studio/src/plugins/world_editor/CMakeLists.txt +++ b/code/studio/src/plugins/world_editor/CMakeLists.txt @@ -1,6 +1,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} + ${LIBXML2_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser ) @@ -59,6 +60,7 @@ TARGET_LINK_LIBRARIES( studio_plugin_world_editor qt_property_browser ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} + ${LIBXML2_LIBRARIES} ) NL_DEFAULT_PROPS(studio_plugin_world_editor "Tools: Studio Plugin: World Editor") diff --git a/code/studio/src/plugins/world_editor/world_editor_actions.cpp b/code/studio/src/plugins/world_editor/world_editor_actions.cpp index 5255e976f..a25cb5e18 100644 --- a/code/studio/src/plugins/world_editor/world_editor_actions.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_actions.cpp @@ -41,6 +41,10 @@ #include #include +// libxml +#include +#include + namespace WorldEditor { diff --git a/code/studio/src/plugins/world_editor/world_editor_misc.cpp b/code/studio/src/plugins/world_editor/world_editor_misc.cpp index a2736b1c5..2dd86df15 100644 --- a/code/studio/src/plugins/world_editor/world_editor_misc.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_misc.cpp @@ -26,8 +26,7 @@ #include #include - -// Qt includes +#include namespace WorldEditor {