MODIFIED: #20 Resolved some GCC build in the GUI Editor.

This commit is contained in:
dfighter1985 2013-02-19 17:16:58 +01:00
parent ecbcdf388f
commit f7962597bd
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}
${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")

View file

@ -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" ),

View file

@ -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 );

View file

@ -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;

View file

@ -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 ) &&

View file

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