mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-13 10:49:11 +00:00
MODIFIED: #20 Resolved build errors with stlport.
This commit is contained in:
parent
d5363b521b
commit
956c83feda
14 changed files with 62 additions and 62 deletions
|
@ -50,8 +50,8 @@ namespace GUIEditor
|
||||||
|
|
||||||
void ActionEditor::onOkButtonClicked()
|
void ActionEditor::onOkButtonClicked()
|
||||||
{
|
{
|
||||||
currentAction->Parameters = paramsEdit->text().toStdString();
|
currentAction->Parameters = paramsEdit->text().toUtf8().constData();
|
||||||
currentAction->Conditions = condEdit->text().toStdString();
|
currentAction->Conditions = condEdit->text().toUtf8().constData();
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace GUIEditor
|
||||||
|
|
||||||
projectParser.clear();
|
projectParser.clear();
|
||||||
|
|
||||||
std::string projectFileName = fileName.toStdString();
|
std::string projectFileName = fileName.toUtf8().constData();
|
||||||
if( !projectParser.parseProjectFile( projectFileName ) )
|
if( !projectParser.parseProjectFile( projectFileName ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this,
|
QMessageBox::critical( this,
|
||||||
|
@ -186,7 +186,7 @@ namespace GUIEditor
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CProjectFileSerializer serializer;
|
CProjectFileSerializer serializer;
|
||||||
serializer.setFile( currentProjectFile.toStdString() );
|
serializer.setFile( currentProjectFile.toUtf8().constData() );
|
||||||
if( !serializer.serialize( projectFiles ) )
|
if( !serializer.serialize( projectFiles ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this,
|
QMessageBox::critical( this,
|
||||||
|
@ -221,7 +221,7 @@ namespace GUIEditor
|
||||||
dir + "/" + projectFiles.projectName.c_str() + ".xml";
|
dir + "/" + projectFiles.projectName.c_str() + ".xml";
|
||||||
|
|
||||||
CProjectFileSerializer serializer;
|
CProjectFileSerializer serializer;
|
||||||
serializer.setFile( newFile.toStdString() );
|
serializer.setFile( newFile.toUtf8().constData() );
|
||||||
if( !serializer.serialize( projectFiles ) )
|
if( !serializer.serialize( projectFiles ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this,
|
QMessageBox::critical( this,
|
||||||
|
@ -231,7 +231,7 @@ namespace GUIEditor
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string guiFile =
|
std::string guiFile =
|
||||||
dir.toStdString() + "/" + "ui_" + projectFiles.projectName + ".xml";
|
std::string( dir.toUtf8().constData() ) + "/" + "ui_" + projectFiles.projectName + ".xml";
|
||||||
|
|
||||||
WidgetSerializer widgetSerializer;
|
WidgetSerializer widgetSerializer;
|
||||||
widgetSerializer.setFile( guiFile );
|
widgetSerializer.setFile( guiFile );
|
||||||
|
|
|
@ -78,11 +78,11 @@ namespace GUIEditor
|
||||||
if( !parser->getLinkData( currentLinkId, data ) )
|
if( !parser->getLinkData( currentLinkId, data ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
data.expr = expressionEdit->toPlainText().toStdString();
|
data.expr = expressionEdit->toPlainText().toUtf8().constData();
|
||||||
data.target = targetEdit->text().toStdString();
|
data.target = targetEdit->text().toUtf8().constData();
|
||||||
data.action = ahEdit->text().toStdString();
|
data.action = ahEdit->text().toUtf8().constData();
|
||||||
data.params = ahParamEdit->text().toStdString();
|
data.params = ahParamEdit->text().toUtf8().constData();
|
||||||
data.cond = condEdit->text().toStdString();
|
data.cond = condEdit->text().toUtf8().constData();
|
||||||
parser->updateLinkData( data.id, data );
|
parser->updateLinkData( data.id, data );
|
||||||
|
|
||||||
Q_EMIT okClicked();
|
Q_EMIT okClicked();
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace GUIEditor
|
||||||
&ok );
|
&ok );
|
||||||
if( ok )
|
if( ok )
|
||||||
{
|
{
|
||||||
if( CWidgetManager::getInstance()->getElementFromId( parent.toStdString() ) == NULL )
|
if( CWidgetManager::getInstance()->getElementFromId( parent.toUtf8().constData() ) == NULL )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this,
|
QMessageBox::critical( this,
|
||||||
tr( "Parent group doesn't exist" ),
|
tr( "Parent group doesn't exist" ),
|
||||||
|
@ -96,7 +96,7 @@ namespace GUIEditor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SLinkData data;
|
SLinkData data;
|
||||||
data.parent = parent.toStdString();
|
data.parent = parent.toUtf8().constData();
|
||||||
|
|
||||||
uint32 id = CWidgetManager::getInstance()->getParser()->addLinkData( data );
|
uint32 id = CWidgetManager::getInstance()->getParser()->addLinkData( data );
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,9 @@ namespace GUIEditor
|
||||||
}
|
}
|
||||||
|
|
||||||
SPropEntry prop;
|
SPropEntry prop;
|
||||||
prop.propName = nameEdit->text().toStdString();
|
prop.propName = nameEdit->text().toUtf8().constData();
|
||||||
prop.propType = typeCB->currentText().toStdString();
|
prop.propType = typeCB->currentText().toUtf8().constData();
|
||||||
prop.propDefault = defvalEdit->text().toStdString();
|
prop.propDefault = defvalEdit->text().toUtf8().constData();
|
||||||
widgetInfoTreeNode->addPropertyToAll( prop );
|
widgetInfoTreeNode->addPropertyToAll( prop );
|
||||||
|
|
||||||
widgetInfoTreeNode = NULL;
|
widgetInfoTreeNode = NULL;
|
||||||
|
@ -84,7 +84,7 @@ namespace GUIEditor
|
||||||
if( widgetInfoTreeNode == NULL )
|
if( widgetInfoTreeNode == NULL )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( widgetInfoTreeNode->hasProperty( nameEdit->text().toStdString() ) )
|
if( widgetInfoTreeNode->hasProperty( nameEdit->text().toUtf8().constData() ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace GUIEditor
|
||||||
|
|
||||||
bool NewWidgetWidget::checkNameField()
|
bool NewWidgetWidget::checkNameField()
|
||||||
{
|
{
|
||||||
if( nameEdit->text().toStdString().empty() )
|
if( nameEdit->text().isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -88,7 +88,7 @@ namespace GUIEditor
|
||||||
if( widgetInfoTree == NULL )
|
if( widgetInfoTree == NULL )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( nameEdit->text().toStdString() );
|
CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( nameEdit->text().toUtf8().constData() );
|
||||||
if( node != NULL )
|
if( node != NULL )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -98,16 +98,16 @@ namespace GUIEditor
|
||||||
|
|
||||||
void NewWidgetWidget::addNewWidget()
|
void NewWidgetWidget::addNewWidget()
|
||||||
{
|
{
|
||||||
CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( ancestorCB->currentText().toStdString() );
|
CWidgetInfoTreeNode *node = widgetInfoTree->findNodeByName( ancestorCB->currentText().toUtf8().constData() );
|
||||||
if( node == NULL )
|
if( node == NULL )
|
||||||
{
|
{
|
||||||
nlerror( "Ancestor %s doesn't exist! Aborting addition!", ancestorCB->currentText().toStdString().c_str() );
|
nlerror( "Ancestor %s doesn't exist! Aborting addition!", ancestorCB->currentText().toUtf8().constData() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWidgetInfo info;
|
SWidgetInfo info;
|
||||||
info.ancestor = ancestorCB->currentText().toStdString();
|
info.ancestor = ancestorCB->currentText().toUtf8().constData();
|
||||||
info.name = nameEdit->text().toStdString();
|
info.name = nameEdit->text().toUtf8().constData();
|
||||||
info.GUIName = "C" + info.name;
|
info.GUIName = "C" + info.name;
|
||||||
info.isAbstract = false;
|
info.isAbstract = false;
|
||||||
info.resolved = true;
|
info.resolved = true;
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace GUIEditor
|
||||||
|
|
||||||
currentProc = name;
|
currentProc = name;
|
||||||
IParser *parser = CWidgetManager::getInstance()->getParser();
|
IParser *parser = CWidgetManager::getInstance()->getParser();
|
||||||
CProcedure *proc = parser->getProc( name.toStdString() );
|
CProcedure *proc = parser->getProc( name.toUtf8().constData() );
|
||||||
|
|
||||||
std::vector< CProcAction >::const_iterator itr;
|
std::vector< CProcAction >::const_iterator itr;
|
||||||
for( itr = proc->Actions.begin(); itr != proc->Actions.end(); ++itr )
|
for( itr = proc->Actions.begin(); itr != proc->Actions.end(); ++itr )
|
||||||
|
@ -74,7 +74,7 @@ namespace GUIEditor
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CProcedure *proc =
|
CProcedure *proc =
|
||||||
CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() );
|
CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() );
|
||||||
if( proc == NULL )
|
if( proc == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -96,14 +96,14 @@ namespace GUIEditor
|
||||||
if( ok )
|
if( ok )
|
||||||
{
|
{
|
||||||
CProcedure *proc =
|
CProcedure *proc =
|
||||||
CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() );
|
CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() );
|
||||||
if( proc != NULL )
|
if( proc != NULL )
|
||||||
{
|
{
|
||||||
proc->addAction( name.toStdString() );
|
proc->addAction( name.toUtf8().constData() );
|
||||||
actionList->addItem( name );
|
actionList->addItem( name );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nlinfo( "Cannot find procedure %s", currentProc.toStdString().c_str() );
|
nlinfo( "Cannot find procedure %s", currentProc.toUtf8().constData() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,17 +123,17 @@ namespace GUIEditor
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CProcedure *proc =
|
CProcedure *proc =
|
||||||
CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() );
|
CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() );
|
||||||
|
|
||||||
if( proc != NULL )
|
if( proc != NULL )
|
||||||
{
|
{
|
||||||
if( !proc->removeAction( static_cast< uint32 >( actionList->currentRow() ) ) )
|
if( !proc->removeAction( static_cast< uint32 >( actionList->currentRow() ) ) )
|
||||||
nlinfo( "Action #%d not found in procedure %s.", actionList->currentRow(), currentProc.toStdString().c_str() );
|
nlinfo( "Action #%d not found in procedure %s.", actionList->currentRow(), currentProc.toUtf8().constData() );
|
||||||
item = actionList->takeItem( actionList->currentRow() );
|
item = actionList->takeItem( actionList->currentRow() );
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nlinfo( "Cannot find procedure %s", currentProc.toStdString().c_str() );
|
nlinfo( "Cannot find procedure %s", currentProc.toUtf8().constData() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcEditor::onUpButtonClicked()
|
void ProcEditor::onUpButtonClicked()
|
||||||
|
@ -149,7 +149,7 @@ namespace GUIEditor
|
||||||
if( prevItem == NULL )
|
if( prevItem == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() );
|
CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() );
|
||||||
if( proc == NULL )
|
if( proc == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ namespace GUIEditor
|
||||||
if( nextItem == NULL )
|
if( nextItem == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toStdString() );
|
CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() );
|
||||||
if( proc == NULL )
|
if( proc == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace GUIEditor
|
||||||
if( item == NULL )
|
if( item == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CProcedure *proc = parser->getProc( item->text().toStdString() );
|
CProcedure *proc = parser->getProc( item->text().toUtf8().constData() );
|
||||||
if( proc == NULL )
|
if( proc == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ namespace GUIEditor
|
||||||
if( ok )
|
if( ok )
|
||||||
{
|
{
|
||||||
IParser *parser = CWidgetManager::getInstance()->getParser();
|
IParser *parser = CWidgetManager::getInstance()->getParser();
|
||||||
if( !parser->addProc( newProc.toStdString() ) )
|
if( !parser->addProc( newProc.toUtf8().constData() ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this,
|
QMessageBox::critical( this,
|
||||||
tr( "Cannot add new procedure" ),
|
tr( "Cannot add new procedure" ),
|
||||||
|
@ -113,7 +113,7 @@ namespace GUIEditor
|
||||||
if( button != QMessageBox::Yes )
|
if( button != QMessageBox::Yes )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !parser->removeProc( item->text().toStdString() ) )
|
if( !parser->removeProc( item->text().toUtf8().constData() ) )
|
||||||
return;
|
return;
|
||||||
item = procList->takeItem( procList->currentRow() );
|
item = procList->takeItem( procList->currentRow() );
|
||||||
delete item;
|
delete item;
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace GUIEditor
|
||||||
QString name = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
QString name = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
||||||
if( name.isEmpty() )
|
if( name.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
files.projectName = name.toStdString();
|
files.projectName = name.toUtf8().constData();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if( reader.name() == "version" )
|
if( reader.name() == "version" )
|
||||||
|
@ -137,7 +137,7 @@ namespace GUIEditor
|
||||||
QString mg = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
QString mg = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
||||||
if( mg.isEmpty() )
|
if( mg.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
files.masterGroup = mg.toStdString();
|
files.masterGroup = mg.toUtf8().constData();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if( reader.name() == "activegroup" )
|
if( reader.name() == "activegroup" )
|
||||||
|
@ -145,7 +145,7 @@ namespace GUIEditor
|
||||||
QString ag = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
QString ag = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
||||||
if( ag.isEmpty() )
|
if( ag.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
files.activeGroup = ag.toStdString();
|
files.activeGroup = ag.toUtf8().constData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ namespace GUIEditor
|
||||||
QString fileName = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
QString fileName = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
||||||
if( fileName.isEmpty() )
|
if( fileName.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
files.guiFiles.push_back( fileName.toStdString() );
|
files.guiFiles.push_back( fileName.toUtf8().constData() );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ namespace GUIEditor
|
||||||
QString fileName = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
QString fileName = reader.readElementText( QXmlStreamReader::ErrorOnUnexpectedElement );
|
||||||
if( fileName.isEmpty() )
|
if( fileName.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
files.mapFiles.push_back( fileName.toStdString() );
|
files.mapFiles.push_back( fileName.toUtf8().constData() );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace GUIEditor
|
||||||
for( int i = 0; i < c; i++ )
|
for( int i = 0; i < c; i++ )
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *item = topItem->child( i );
|
QTreeWidgetItem *item = topItem->child( i );
|
||||||
projectFiles.guiFiles.push_back( item->text( 0 ).toStdString() );
|
projectFiles.guiFiles.push_back( item->text( 0 ).toUtf8().constData() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ namespace GUIEditor
|
||||||
for( int i = 0; i < c; i++ )
|
for( int i = 0; i < c; i++ )
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *item = topItem->child( i );
|
QTreeWidgetItem *item = topItem->child( i );
|
||||||
projectFiles.mapFiles.push_back( item->text( 0 ).toStdString() );
|
projectFiles.mapFiles.push_back( item->text( 0 ).toUtf8().constData() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace GUIEditor
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
||||||
if( e == NULL )
|
if( e == NULL )
|
||||||
return;
|
return;
|
||||||
e->setProperty( propName.toStdString(), propValue.toStdString() );
|
e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element )
|
void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element )
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace
|
||||||
item = item->parent();
|
item = item->parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
name = s.toStdString();
|
name = s.toUtf8().constData();
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ namespace GUIEditor
|
||||||
if( item->parent() == NULL )
|
if( item->parent() == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string n = item->text( 0 ).toStdString();
|
std::string n = item->text( 0 ).toUtf8().constData();
|
||||||
std::string selection = makeFullName( item, n );
|
std::string selection = makeFullName( item, n );
|
||||||
CWidgetManager::getInstance()->setCurrentEditorSelection( selection );
|
CWidgetManager::getInstance()->setCurrentEditorSelection( selection );
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace GUIEditor{
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QListWidgetItem *item = widgetList->item( i );
|
QListWidgetItem *item = widgetList->item( i );
|
||||||
setPropsOf( item->text().toStdString().c_str() );
|
setPropsOf( item->text().toUtf8().constData() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ namespace GUIEditor{
|
||||||
if( reply != QMessageBox::Yes )
|
if( reply != QMessageBox::Yes )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tree->removeNode( widgetName.toStdString() );
|
tree->removeNode( widgetName.toUtf8().constData() );
|
||||||
widgetPropTree->clear();
|
widgetPropTree->clear();
|
||||||
buildWidgetList();
|
buildWidgetList();
|
||||||
}
|
}
|
||||||
|
@ -91,12 +91,12 @@ namespace GUIEditor{
|
||||||
void CWidgetProperties::onRemovePButtonClicked()
|
void CWidgetProperties::onRemovePButtonClicked()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *item = widgetPropTree->currentItem();
|
QTreeWidgetItem *item = widgetPropTree->currentItem();
|
||||||
CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toStdString() );
|
CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toUtf8().constData() );
|
||||||
|
|
||||||
if( ( item == NULL ) || ( node == NULL ) )
|
if( ( item == NULL ) || ( node == NULL ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string name = item->text( 0 ).toStdString();
|
std::string name = item->text( 0 ).toUtf8().constData();
|
||||||
|
|
||||||
std::vector< SPropEntry >::const_iterator itr = node->getInfo().findProp( name );
|
std::vector< SPropEntry >::const_iterator itr = node->getInfo().findProp( name );
|
||||||
if( itr == node->getInfo().props.end() )
|
if( itr == node->getInfo().props.end() )
|
||||||
|
@ -133,7 +133,7 @@ namespace GUIEditor{
|
||||||
if( ( widgetList->currentRow() >= widgetList->count() ) || ( widgetList->currentRow() < 0 ) )
|
if( ( widgetList->currentRow() >= widgetList->count() ) || ( widgetList->currentRow() < 0 ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toStdString() );
|
CWidgetInfoTreeNode *node = tree->findNodeByName( widgetList->currentItem()->text().toUtf8().constData() );
|
||||||
if( node == NULL )
|
if( node == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace GUIEditor
|
||||||
f.close();
|
f.close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nlwarning( QString( "File %1 cannot be opened!" ).arg( file ).toStdString().c_str() );
|
nlwarning( QString( "File %1 cannot be opened!" ).arg( file ).toUtf8().constData() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWidgetPropParser::parseGUIWidgetXML( QFile &file )
|
void CWidgetPropParser::parseGUIWidgetXML( QFile &file )
|
||||||
|
@ -126,19 +126,19 @@ namespace GUIEditor
|
||||||
if( !reader.hasError() )
|
if( !reader.hasError() )
|
||||||
{
|
{
|
||||||
if( key == "name" )
|
if( key == "name" )
|
||||||
info.name = value.toStdString();
|
info.name = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "guiname" )
|
if( key == "guiname" )
|
||||||
info.GUIName = value.toStdString();
|
info.GUIName = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "ancestor" )
|
if( key == "ancestor" )
|
||||||
info.ancestor = value.toStdString();
|
info.ancestor = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "description" )
|
if( key == "description" )
|
||||||
info.description = value.toStdString();
|
info.description = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "icon" )
|
if( key == "icon" )
|
||||||
info.icon == value.toStdString();
|
info.icon == value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "abstract" )
|
if( key == "abstract" )
|
||||||
{
|
{
|
||||||
|
@ -169,7 +169,7 @@ namespace GUIEditor
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::map< std::string, SWidgetInfo >::iterator itr =
|
std::map< std::string, SWidgetInfo >::iterator itr =
|
||||||
widgetInfo->find( widgetName.toStdString() );
|
widgetInfo->find( widgetName.toUtf8().constData() );
|
||||||
if( itr == widgetInfo->end() )
|
if( itr == widgetInfo->end() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -192,15 +192,15 @@ namespace GUIEditor
|
||||||
if( !reader.hasError() )
|
if( !reader.hasError() )
|
||||||
{
|
{
|
||||||
if( key == "name" )
|
if( key == "name" )
|
||||||
prop.propName = value.toStdString();
|
prop.propName = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "type" )
|
if( key == "type" )
|
||||||
prop.propType = value.toStdString();
|
prop.propType = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
if( key == "default" )
|
if( key == "default" )
|
||||||
prop.propDefault = value.toStdString();
|
prop.propDefault = value.toUtf8().constData();
|
||||||
else
|
else
|
||||||
nlwarning( QString( "Unknown tag %1 within a property" ).arg( key ).toStdString().c_str() );
|
nlwarning( QString( "Unknown tag %1 within a property" ).arg( key ).toUtf8().constData() );
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue