From 870c91ee50c7ba9aaa477098c6f09f5f6156c1df Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 8 Dec 2012 11:18:26 +0100 Subject: [PATCH] Changed: Compilation with GCC --- .../src/plugins/object_viewer/animation_set_dialog.cpp | 9 +++------ .../src/plugins/object_viewer/morph_mesh_dialog.cpp | 2 +- .../src/plugins/object_viewer/object_viewer.cpp | 2 +- .../src/plugins/object_viewer/particle_tree_model.cpp | 2 +- .../plugins/object_viewer/skeleton_scale_dialog.cpp | 2 +- .../src/plugins/object_viewer/slot_manager_dialog.cpp | 4 ++-- .../src/plugins/object_viewer/sound_system.cpp | 4 ++-- .../src/plugins/object_viewer/vegetable_editor.cpp | 8 ++++---- .../translation_manager_main_window.cpp | 10 +++++----- code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp | 6 +++--- 10 files changed, 23 insertions(+), 26 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_dialog.cpp index f73aa4055..f2d5e6567 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_dialog.cpp @@ -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)); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_dialog.cpp index b6b1ec14c..20e19b539 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_dialog.cpp @@ -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 numVerts; _CM->getShapeNumVerts(numVerts); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp index a07623cde..48c679455 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp @@ -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(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp index fc284f865..1d9574b6d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp @@ -319,7 +319,7 @@ bool CParticleTreeModel::setData(const QModelIndex &index, const QVariant &value QList 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 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/skeleton_scale_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/skeleton_scale_dialog.cpp index 2d1d92dd1..8145c0bcc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/skeleton_scale_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/skeleton_scale_dialog.cpp @@ -300,7 +300,7 @@ void CSkeletonScaleDialog::clickSaveAsSkel() } // bkup the valid fileName (new file edited) - _SkeletonFileName = fileName.toUtf8(); + _SkeletonFileName = fileName.toUtf8().constData(); } else { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/slot_manager_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/slot_manager_dialog.cpp index e9c23779a..f846bdf4a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/slot_manager_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/slot_manager_dialog.cpp @@ -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(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp index 361b0100c..afa315e0f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp @@ -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 devices; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_editor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_editor.cpp index cdd311302..73b639647 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_editor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_editor.cpp @@ -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(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp index 6da8bba7b..9fcb9626a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp @@ -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; diff --git a/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp b/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp index 45c5b389c..595067cd2 100644 --- a/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp +++ b/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp @@ -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;