Build fixes.

This commit is contained in:
dfighter1985 2014-04-23 00:49:17 +02:00
parent e24447e98c
commit 324aa7f851
4 changed files with 28 additions and 30 deletions

View file

@ -83,7 +83,7 @@ namespace GeorgesQt
}
else
{
m_oldValue = QString::fromStdString(array->Elements[m_item->structId()].Name);
m_oldValue = QString(array->Elements[m_item->structId()].Name.c_str());
}
}
@ -94,8 +94,8 @@ namespace GeorgesQt
value = m_oldValue;
array->Elements[m_item->structId()].Name = value.toStdString();
m_item->setName(value.toStdString());
array->Elements[m_item->structId()].Name = value.toAscii().data();
m_item->setName(value.toAscii().data());
m_model->emitDataChanged(m_model->index(m_item->row(), 0, m_item));
}

View file

@ -108,30 +108,30 @@ namespace GeorgesQt
NLGEORGES::CForm* CGeorgesTreeViewDialog::getFormByName(const QString formName)
{
if(NLMISC::CPath::exists(formName.toStdString()))
if(NLMISC::CPath::exists(formName.toAscii().data()))
{
//NLGEORGES::CForm *form = dynamic_cast<NLGEORGES::CForm*>(m_georges->loadForm(formName.toStdString()));
return (NLGEORGES::CForm *)m_georges->loadForm(formName.toStdString());
//NLGEORGES::CForm *form = dynamic_cast<NLGEORGES::CForm*>(m_georges->loadForm(formName.toAscii().data()));
return (NLGEORGES::CForm *)m_georges->loadForm(formName.toAscii().data());
}
//else
//{
// CForm *form = 0;
// // Load the DFN
// std::string extStr = NLMISC::CFile::getExtension( formName.toStdString() );
// std::string extStr = NLMISC::CFile::getExtension( formName.toAscii().data() );
// QString dfnName = QString("%1.dfn").arg(extStr.c_str());
// UFormDfn *formdfn;
// if (NLMISC::CPath::exists(dfnName.toStdString()))
// if (NLMISC::CPath::exists(dfnName.toAscii().data()))
// {
// formdfn = _georges->loadFormDfn (dfnName.toStdString());
// formdfn = _georges->loadFormDfn (dfnName.toAscii().data());
// if (!formdfn)
// {
// nlwarning("Failed to load dfn: %s", dfnName.toStdString().c_str());
// nlwarning("Failed to load dfn: %s", dfnName.toAscii().data());
// return 0;
// }
// }
// else
// {
// nlwarning("Cannot find dfn: %s", dfnName.toStdString().c_str());
// nlwarning("Cannot find dfn: %s", dfnName.toAscii().data());
// return 0;
// }
@ -147,20 +147,20 @@ namespace GeorgesQt
// }
// return form;
//}
nlinfo("File '%s' does not exist!", formName.toStdString().c_str());
nlinfo("File '%s' does not exist!", formName.toAscii().data());
return 0;
}
NLGEORGES::CForm* CGeorgesTreeViewDialog::getFormByDfnName(const QString dfnName)
{
if(NLMISC::CPath::exists(dfnName.toStdString()))
if(NLMISC::CPath::exists(dfnName.toAscii().data()))
{
// Create a new form object.
NLGEORGES::CForm *form = new NLGEORGES::CForm();
m_form = form;
// Retrieve a copy of the root definition.
NLGEORGES::CFormDfn *formDfn = dynamic_cast<NLGEORGES::CFormDfn *>(m_georges->loadFormDfn(dfnName.toStdString()));
NLGEORGES::CFormDfn *formDfn = dynamic_cast<NLGEORGES::CFormDfn *>(m_georges->loadFormDfn(dfnName.toAscii().data()));
// Next we'll use the root node to build a new form.
NLGEORGES::CFormElmStruct *fes = dynamic_cast<NLGEORGES::CFormElmStruct *>(getRootNode(0));
@ -175,7 +175,7 @@ namespace GeorgesQt
return form;
}
nlinfo("File '%s' does not exist!", dfnName.toStdString().c_str());
nlinfo("File '%s' does not exist!", dfnName.toAscii().data());
return NULL;
}
@ -243,7 +243,7 @@ namespace GeorgesQt
nlinfo("typ's %d",deps["typ"].count());
nlinfo("dfn's %d",deps["dfn"].count());
//nlwarning(strList.join(";").toStdString().c_str());
//nlwarning(strList.join(";").toAscii().data());
if (root)
{
loadedForm = m_form->getFilename().c_str();
@ -263,7 +263,7 @@ namespace GeorgesQt
void CGeorgesTreeViewDialog::addParentForm(QString parentFormNm)
{
// Try to load the form
NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toStdString());
NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toAscii().data());
NLGEORGES::CForm *parentForm = dynamic_cast<NLGEORGES::CForm*>(uParentForm);
NLGEORGES::CForm *mainForm = static_cast<NLGEORGES::CForm*>(m_form);
@ -277,11 +277,11 @@ namespace GeorgesQt
if (parentForm->Elements.FormDfn == mainForm->Elements.FormDfn)
{
// This is the parent form selector
if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toStdString().c_str(), parentForm))
nlwarning("Failed to add parent form: %s", parentFormNm.toStdString().c_str());
if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toAscii().data(), parentForm))
nlwarning("Failed to add parent form: %s", parentFormNm.toAscii().data());
else
{
nlinfo("Successfullyadded parent form: %s", parentFormNm.toStdString().c_str());
nlinfo("Successfullyadded parent form: %s", parentFormNm.toAscii().data());
model->addParentForm(parentFormNm);
}
}
@ -303,7 +303,7 @@ namespace GeorgesQt
{
NLMISC::COFile file;
std::string s = NLMISC::CPath::lookup(loadedForm.toStdString(), false);
std::string s = NLMISC::CPath::lookup(loadedForm.toAscii().data(), false);
if(file.open (s))
{
try
@ -387,7 +387,7 @@ namespace GeorgesQt
//if (item->parent() && item->parent()->data(0) == "parents")
//{
// Q_EMIT changeFile(CPath::lookup(item->data(0).toString().toStdString(),false).c_str());
// Q_EMIT changeFile(CPath::lookup(item->data(0).toString().toAscii().data(),false).c_str());
//}
//// col containing additional stuff like icons
@ -397,7 +397,7 @@ namespace GeorgesQt
// CFormItem *item = m->getItem(in2);
// QString value = item->data(1).toString();
// QString path = CPath::lookup(value.toStdString(),false).c_str();
// QString path = CPath::lookup(value.toAscii().data(),false).c_str();
// if(value.contains(".tga") || value.contains(".png"))
// {
@ -425,7 +425,7 @@ namespace GeorgesQt
// {
// Modules::objViewInt()->resetScene();
// //Modules::config().configRemapExtensions();
// Modules::objViewInt()->loadMesh(path.toStdString(),"");
// Modules::objViewInt()->loadMesh(path.toAscii().data(),"");
// }
// return;
// }
@ -551,7 +551,7 @@ namespace GeorgesQt
// file = file.remove(0,file.indexOf(".")+1);
// QString filePattern = "Parent Sheets (*."+file+")";
//
// nlinfo("parent defn name '%s'", file.toStdString().c_str());
// nlinfo("parent defn name '%s'", file.toAscii().data());
// QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select parent sheets..."), m_lastSheetDir, filePattern);
// if(!fileNames.isEmpty())
// {
@ -561,7 +561,7 @@ namespace GeorgesQt
// QFileInfo pathInfo( fileToParent );
// QString tmpFileName( pathInfo.fileName() );
// nlinfo("requesting to add parent form '%s'", tmpFileName.toStdString().c_str());
// nlinfo("requesting to add parent form '%s'", tmpFileName.toAscii().data());
//
// // Call to add the form and load it into the Georges form.
// addParentForm(tmpFileName);

View file

@ -223,7 +223,7 @@ TileItemNode::TileItemNode(int tileId, TileModel::TTileChannel channel, QString
{
m_tileFilename[channel] = filename;
m_parentItem = parent;
//nlinfo("dispalying tile %d - %s", m_tileId, m_tileFilename[TileModel::TileDiffuse].toStdString().c_str());
//nlinfo("dispalying tile %d - %s", m_tileId, m_tileFilename[TileModel::TileDiffuse].toAscii().data());
}
TileItemNode::~TileItemNode()
@ -255,7 +255,7 @@ QVariant TileItemNode::data(int column, int role) const
QPixmap pixmap;// = new QPixmap();
if(!pixmap.load(tileFilename))
nlinfo("failed to load %s", tileFilename.toStdString().c_str());
nlinfo("failed to load %s", tileFilename.toAscii().data());
if(TileModel::CurrentZoomFactor == TileModel::TileZoom200)
tileSize *= 2;

View file

@ -20,8 +20,6 @@
#include <QPixmap>
#include <QStyledItemDelegate>
#include "ui_tile_widget.h"
#include <nel/misc/types_nl.h>
class TileItemDelegate : public QStyledItemDelegate