Changed: Compilation with GCC

This commit is contained in:
kervala 2012-12-08 11:18:26 +01:00
parent cda3c970eb
commit 870c91ee50
10 changed files with 23 additions and 26 deletions

View file

@ -161,8 +161,7 @@ void CAnimationSetDialog::loadAnim()
QStringList::Iterator it = list.begin();
while(it != list.end())
{
std::string animName = it->toUtf8();
entity.loadAnimation(animName);
entity.loadAnimation(it->toUtf8().constData());
++it;
}
updateListAnim();
@ -187,8 +186,7 @@ void CAnimationSetDialog::loadSwt()
QStringList::Iterator it = list.begin();
while(it != list.end())
{
std::string swtName = it->toUtf8();
entity.loadSWT(swtName);
entity.loadSWT(it->toUtf8().constData());
++it;
}
updateListAnim();
@ -212,8 +210,7 @@ void CAnimationSetDialog::addAnim()
Q_FOREACH(QTreeWidgetItem *item, list)
{
std::string animName = item->text(0).toUtf8();
entity.addAnimToPlayList(animName);
entity.addAnimToPlayList(item->text(0).toUtf8().constData());
ui.animPlaylistWidget->addItem(item->text(0));
}
}

View file

@ -110,7 +110,7 @@ void CMorphMeshDialog::add()
shapeNames.resize(_CM->getNumShapes() + 1);
_CM->getShapesNames(&shapeNames[0]);
uint index = (uint)shapeNames.size() - 1;
shapeNames[index] = fileName.toUtf8();
shapeNames[index] = fileName.toUtf8().constData();
_CM->setShapes(&shapeNames[0], (uint)shapeNames.size());
std::vector<sint> numVerts;
_CM->getShapeNumVerts(numVerts);

View file

@ -468,7 +468,7 @@ void CObjectViewer::loadConfig()
#endif
_CameraFocal = settings->value("CameraFocal", 75).toInt();
_FontName = settings->value(Constants::FONT, "andbasr.ttf").toString().toUtf8();
_FontName = settings->value(Constants::FONT, "andbasr.ttf").toString().toUtf8().constData();
_BloomEffect = settings->value(Constants::ENABLE_BLOOM, false).toBool();
_BloomDensity = settings->value(Constants::BLOOM_DENSITY, 0).toInt();
_BloomSquare = settings->value(Constants::ENABLE_SQUARE_BLOOM, false).toBool();

View file

@ -319,7 +319,7 @@ bool CParticleTreeModel::setData(const QModelIndex &index, const QVariant &value
QList<QVariant> listData;
listData << value;
item->replace(listData);
std::string name = value.toString().toUtf8();
std::string name = value.toString().toUtf8().constData();
if (item->itemType() == ItemType::Located)
item->getLoc()->setName(name);
else

View file

@ -300,7 +300,7 @@ void CSkeletonScaleDialog::clickSaveAsSkel()
}
// bkup the valid fileName (new file edited)
_SkeletonFileName = fileName.toUtf8();
_SkeletonFileName = fileName.toUtf8().constData();
}
else
{

View file

@ -111,8 +111,8 @@ void CSlotGroupBox::updateUi()
void CSlotGroupBox::saveSlotInfo()
{
CSlotInfo slotInfo;
slotInfo.Animation = _animName.toUtf8();
slotInfo.Skeleton = _skelName.toUtf8();
slotInfo.Animation = _animName.toUtf8().constData();
slotInfo.Skeleton = _skelName.toUtf8().constData();
slotInfo.EndBlend = _ui.endBlendSpinBox->value();
slotInfo.EndTime = float(_ui.endFrameSpinBox->value()) / Modules::mainWin().getFrameRate();
slotInfo.Offset = float(_ui.offsetSpinBox->value()) / Modules::mainWin().getFrameRate();

View file

@ -86,8 +86,8 @@ void CSoundSystem::init()
QSettings *settings = Core::ICore::instance()->settings();
settings->beginGroup(Constants::OBJECT_VIEWER_SECTION);
_PackedSheetPath = settings->value(Constants::SOUND_PACKED_SHEET_PATH, "").toString().toUtf8();
_SamplePath = settings->value(Constants::SOUND_SAMPLE_PATH, "").toString().toUtf8();
_PackedSheetPath = settings->value(Constants::SOUND_PACKED_SHEET_PATH, "").toString().toUtf8().constData();
_SamplePath = settings->value(Constants::SOUND_SAMPLE_PATH, "").toString().toUtf8().constData();
_AudioMixer->setSamplePath(_SamplePath);
_AudioMixer->setPackedSheetOption(_PackedSheetPath, true);
std::vector<std::string> devices;

View file

@ -596,10 +596,10 @@ void CVegetableEditor::loadLandscapeSetup()
QSettings *settings = Core::ICore::instance()->settings();
settings->beginGroup(Constants::OBJECT_VIEWER_SECTION);
_VegetableLandscapeTileBank = settings->value(Constants::VEGET_TILE_BANK, "").toString().toUtf8();
_VegetableLandscapeTileFarBank = settings->value(Constants::VEGET_TILE_FAR_BANK, "").toString().toUtf8();
_CoarseMeshTexture = settings->value(Constants::COARSE_MESH_TEXTURE, "").toString().toUtf8();
_VegetableTexture = settings->value(Constants::VEGET_TEXTURE, "").toString().toUtf8();
_VegetableLandscapeTileBank = settings->value(Constants::VEGET_TILE_BANK, "").toString().toUtf8().constData();
_VegetableLandscapeTileFarBank = settings->value(Constants::VEGET_TILE_FAR_BANK, "").toString().toUtf8().constData();
_CoarseMeshTexture = settings->value(Constants::COARSE_MESH_TEXTURE, "").toString().toUtf8().constData();
_VegetableTexture = settings->value(Constants::VEGET_TEXTURE, "").toString().toUtf8().constData();
QStringList list = settings->value(Constants::VEGET_LANDSCAPE_ZONES).toStringList();
_VegetableLandscapeZoneNames.clear();

View file

@ -357,34 +357,34 @@ void CMainWindow::extractWords(QString typeq)
{
column_name = "item ID";
builderS.SheetExt = "sitem";
builderS.SheetPath = level_design_path.append("/game_element/sitem").toUtf8();
builderS.SheetPath = level_design_path.append("/game_element/sitem").toUtf8().constData();
isSheet = true;
}
else if(typeq.toAscii() == Constants::WK_CREATURE)
{
column_name = "creature ID";
builderS.SheetExt = "creature";
builderS.SheetPath = level_design_path.append("/Game_elem/Creature/fauna").toUtf8();
builderS.SheetPath = level_design_path.append("/Game_elem/Creature/fauna").toUtf8().constData();
isSheet = true;
}
else if(typeq.toAscii() == Constants::WK_SBRICK)
{
column_name = "sbrick ID";
builderS.SheetExt = "sbrick";
builderS.SheetPath = level_design_path.append("/game_element/sbrick").toUtf8();
builderS.SheetPath = level_design_path.append("/game_element/sbrick").toUtf8().constData();
isSheet = true;
}
else if(typeq.toAscii() == Constants::WK_SPHRASE)
{
column_name = "sphrase ID";
builderS.SheetExt = "sphrase";
builderS.SheetPath = level_design_path.append("/game_element/sphrase").toUtf8();
builderS.SheetPath = level_design_path.append("/game_element/sphrase").toUtf8().constData();
isSheet = true;
}
else if(typeq.toAscii() == Constants::WK_PLACE)
{
column_name = "placeId";
builderP.PrimPath = primitives_path.toUtf8();
builderP.PrimPath = primitives_path.toUtf8().constData();
builderP.PrimFilter.push_back("region_*.primitive");
builderP.PrimFilter.push_back("indoors_*.primitive");
isSheet = false;

View file

@ -383,7 +383,7 @@ void CTile_edit_dlg::on_loadPushButton_clicked()
void CTile_edit_dlg::on_savePushButton_clicked()
{
string fullPath = this->mainFile.absoluteFilePath().toUtf8();
string fullPath = this->mainFile.absoluteFilePath().toUtf8().constData();
if ( !fullPath.empty() )
{
COFile stream;
@ -411,7 +411,7 @@ void CTile_edit_dlg::on_saveAsPushButton_clicked()
ui.savePushButton->setEnabled(true);
string fullPath = this->mainFile.absoluteFilePath().toUtf8();
string fullPath = this->mainFile.absoluteFilePath().toUtf8().constData();
if ( !fullPath.empty() )
{
COFile stream;
@ -445,7 +445,7 @@ void CTile_edit_dlg::on_exportPushButton_clicked()
copy.cleanUnusedData ();
QFileInfo fileInfo(fileName);
string fullPath = fileInfo.absoluteFilePath().toUtf8();
string fullPath = fileInfo.absoluteFilePath().toUtf8().constData();
if ( !fullPath.empty() )
{
COFile stream;