From f7962597bda9fdcd2582138fcb721fe566247201 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 19 Feb 2013 17:16:58 +0100 Subject: [PATCH] MODIFIED: #20 Resolved some GCC build in the GUI Editor. --- .../src/plugins/gui_editor/CMakeLists.txt | 2 ++ .../src/plugins/gui_editor/gui_editor_window.cpp | 3 ++- .../src/plugins/gui_editor/widget_hierarchy.cpp | 3 ++- .../src/plugins/gui_editor/widget_info_serializer.cpp | 2 +- .../src/plugins/gui_editor/widget_info_tree_node.h | 8 ++++---- .../src/plugins/gui_editor/widget_properties.cpp | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index 0e56ac8b9..0a5d8533d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -33,6 +33,7 @@ FIND_PACKAGE(Libwww REQUIRED) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} + ${LUA_INCLUDE_DIR} ${QT_INCLUDES}) FILE(GLOB SRC *.cpp *.h) @@ -108,6 +109,7 @@ TARGET_LINK_LIBRARIES( ${LUABIND_LIBRARIES} ${CURL_LIBRARIES} ${LIBWWW_LIBRARIES} + ${LIBXML2_LIBRARIES} ) NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor") diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index ec419b87b..0be53aa2b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -148,7 +148,8 @@ namespace GUIEditor projectParser.clear(); - if( !projectParser.parseProjectFile( fileName.toStdString() ) ) + std::string projectFileName = fileName.toStdString(); + if( !projectParser.parseProjectFile( projectFileName ) ) { QMessageBox::critical( this, tr( "Error parsing project file" ), diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index 3915111fc..ed93fe7f1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -137,7 +137,8 @@ namespace GUIEditor if( item->parent() == NULL ) return; - std::string selection = makeFullName( item, item->text( 0 ).toStdString() ); + std::string n = item->text( 0 ).toStdString(); + std::string selection = makeFullName( item, n ); CWidgetManager::getInstance()->setCurrentEditorSelection( selection ); Q_EMIT selectionChanged( selection ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp index 0ef767340..4c2339c40 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp @@ -43,7 +43,7 @@ namespace GUIEditor std::vector< SPropEntry >::const_iterator itr = parentInfo.props.begin(); while( itr != parentInfo.props.end() ) { - std::vector< SPropEntry >::const_iterator fItr; + std::vector< SPropEntry >::iterator fItr; fItr = std::find( props.begin(), props.end(), *itr ); if( fItr == props.end() ) continue; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h index 39068c5d1..81adfe06c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h @@ -82,7 +82,7 @@ namespace GUIEditor /// Remove child by name bool removeChildByName( const std::string &name ) { - for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) + for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr ) { if( ( *itr )->getInfo().name == name ) { @@ -98,7 +98,7 @@ namespace GUIEditor /// Remove child by name, but don't delete the child bool removeChildByNameND( const std::string &name ) { - for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) + for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr ) { if( ( *itr )->getInfo().name == name ) { @@ -113,7 +113,7 @@ namespace GUIEditor /// Remove child by ancestor's name bool removeChildByAncestor( const std::string &ancestor ) { - for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) + for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr ) { if( ( *itr )->getInfo().ancestor == ancestor ) { @@ -172,7 +172,7 @@ namespace GUIEditor /// Removes this property from the node void removeProperty( const SPropEntry &prop ) { - std::vector< SPropEntry >::const_iterator itr = info.props.begin(); + std::vector< SPropEntry >::iterator itr = info.props.begin(); while( itr != info.props.end() ) { if( ( itr->propName == prop.propName ) && diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp index dda52a4d5..7d3c725b5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp @@ -19,7 +19,7 @@ #include "widget_info_serializer.h" #include "new_property_widget.h" #include "new_widget_widget.h" -#include +#include namespace GUIEditor{ CWidgetProperties::CWidgetProperties( QWidget *parent ) :