Merged in dfighter1985/ryzomcore (pull request #3)

GCC build error fixes for #20
This commit is contained in:
dfighter1985 2013-02-19 17:19:51 +01:00
commit d106260646
6 changed files with 12 additions and 8 deletions

View file

@ -33,6 +33,7 @@ FIND_PACKAGE(Libwww REQUIRED)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${LIBXML2_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}
${LUA_INCLUDE_DIR}
${QT_INCLUDES}) ${QT_INCLUDES})
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
@ -108,6 +109,7 @@ TARGET_LINK_LIBRARIES(
${LUABIND_LIBRARIES} ${LUABIND_LIBRARIES}
${CURL_LIBRARIES} ${CURL_LIBRARIES}
${LIBWWW_LIBRARIES} ${LIBWWW_LIBRARIES}
${LIBXML2_LIBRARIES}
) )
NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor") NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor")

View file

@ -148,7 +148,8 @@ namespace GUIEditor
projectParser.clear(); projectParser.clear();
if( !projectParser.parseProjectFile( fileName.toStdString() ) ) std::string projectFileName = fileName.toStdString();
if( !projectParser.parseProjectFile( projectFileName ) )
{ {
QMessageBox::critical( this, QMessageBox::critical( this,
tr( "Error parsing project file" ), tr( "Error parsing project file" ),

View file

@ -137,7 +137,8 @@ namespace GUIEditor
if( item->parent() == NULL ) if( item->parent() == NULL )
return; 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 ); CWidgetManager::getInstance()->setCurrentEditorSelection( selection );
Q_EMIT selectionChanged( selection ); Q_EMIT selectionChanged( selection );

View file

@ -43,7 +43,7 @@ namespace GUIEditor
std::vector< SPropEntry >::const_iterator itr = parentInfo.props.begin(); std::vector< SPropEntry >::const_iterator itr = parentInfo.props.begin();
while( itr != parentInfo.props.end() ) while( itr != parentInfo.props.end() )
{ {
std::vector< SPropEntry >::const_iterator fItr; std::vector< SPropEntry >::iterator fItr;
fItr = std::find( props.begin(), props.end(), *itr ); fItr = std::find( props.begin(), props.end(), *itr );
if( fItr == props.end() ) if( fItr == props.end() )
continue; continue;

View file

@ -82,7 +82,7 @@ namespace GUIEditor
/// Remove child by name /// Remove child by name
bool removeChildByName( const std::string &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 ) if( ( *itr )->getInfo().name == name )
{ {
@ -98,7 +98,7 @@ namespace GUIEditor
/// Remove child by name, but don't delete the child /// Remove child by name, but don't delete the child
bool removeChildByNameND( const std::string &name ) 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 ) if( ( *itr )->getInfo().name == name )
{ {
@ -113,7 +113,7 @@ namespace GUIEditor
/// Remove child by ancestor's name /// Remove child by ancestor's name
bool removeChildByAncestor( const std::string &ancestor ) 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 ) if( ( *itr )->getInfo().ancestor == ancestor )
{ {
@ -172,7 +172,7 @@ namespace GUIEditor
/// Removes this property from the node /// Removes this property from the node
void removeProperty( const SPropEntry &prop ) 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() ) while( itr != info.props.end() )
{ {
if( ( itr->propName == prop.propName ) && if( ( itr->propName == prop.propName ) &&

View file

@ -19,7 +19,7 @@
#include "widget_info_serializer.h" #include "widget_info_serializer.h"
#include "new_property_widget.h" #include "new_property_widget.h"
#include "new_widget_widget.h" #include "new_widget_widget.h"
#include <qmessagebox> #include <QMessageBox>
namespace GUIEditor{ namespace GUIEditor{
CWidgetProperties::CWidgetProperties( QWidget *parent ) : CWidgetProperties::CWidgetProperties( QWidget *parent ) :