Commit d3d58f26 authored by Jan Möbius's avatar Jan Möbius

cppcheck fixes

parent bc8be1bc
......@@ -114,7 +114,8 @@ FileOBJPlugin::FileOBJPlugin()
loadDefaultButton_(0),
forceTriangleMesh_(false),
forcePolyMesh_(false),
textureIndexPropFetched_(false)
textureIndexPropFetched_(false),
trimeshOptions_(OBJImporter::NONE)
{
}
......@@ -1750,9 +1751,9 @@ void FileOBJPlugin::checkTypes(QByteArray& _bufferedFile, QString _filename, OBJ
case TYPEASK: //ask
QMetaObject::invokeMethod(this,"handleTrimeshDialog",Qt::BlockingQueuedConnection);
if (trimeshOptions == OBJImporter::TRIMESH )
if (trimeshOptions_ == OBJImporter::TRIMESH )
_importer.forceMeshType( OBJImporter::TRIMESH );
else if (trimeshOptions == OBJImporter::POLYMESH)
else if (trimeshOptions_ == OBJImporter::POLYMESH)
_importer.forceMeshType( OBJImporter::POLYMESH );
break;
......@@ -1784,9 +1785,9 @@ void FileOBJPlugin::handleTrimeshDialog()
if (msgBox.clickedButton() == triButton)
trimeshOptions = OBJImporter::TRIMESH ;
trimeshOptions_ = OBJImporter::TRIMESH ;
else if (msgBox.clickedButton() == polyButton)
trimeshOptions = OBJImporter::POLYMESH ;
trimeshOptions_ = OBJImporter::POLYMESH ;
}
//-----------------------------------------------------------------------------------------------------
......
......@@ -253,7 +253,7 @@ class FileOBJPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte
QString textureIndexPropertyName_;
bool textureIndexPropFetched_;
std::map<int,QString> texIndexFileMap_;
OBJImporter::ObjectOptionsE trimeshOptions;
OBJImporter::ObjectOptionsE trimeshOptions_;
};
......
......@@ -93,7 +93,9 @@ FileOFFPlugin::FileOFFPlugin()
userWriteOptions_(0),
forceTriangleMesh_(false),
forcePolyMesh_(false),
readColorComp_(false) {
readColorComp_(false),
trimeshOptions_(OFFImporter::NONE)
{
}
//-----------------------------------------------------------------------------------------------------
......@@ -534,9 +536,9 @@ bool FileOFFPlugin::readOFFFile(QString _filename, OFFImporter& _importer) {
// Create message box
QMetaObject::invokeMethod(this,"handleTrimeshDialog",Qt::BlockingQueuedConnection);
if (trimeshOptions == OFFImporter::TRIMESH)
if (trimeshOptions_ == OFFImporter::TRIMESH)
type = DATA_TRIANGLE_MESH;
else if (trimeshOptions == OFFImporter::POLYMESH)
else if (trimeshOptions_ == OFFImporter::POLYMESH)
type = DATA_POLY_MESH;
else
type = _importer.isTriangleMesh() ? DATA_TRIANGLE_MESH : DATA_POLY_MESH;
......@@ -579,9 +581,9 @@ void FileOFFPlugin::handleTrimeshDialog()
if (msgBox.clickedButton() == triButton)
trimeshOptions = OFFImporter::TRIMESH ;
trimeshOptions_ = OFFImporter::TRIMESH ;
else if (msgBox.clickedButton() == polyButton)
trimeshOptions = OFFImporter::POLYMESH ;
trimeshOptions_ = OFFImporter::POLYMESH ;
}
//-----------------------------------------------------------------------------------------------------
......
......@@ -269,7 +269,7 @@ class FileOFFPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte
bool forceTriangleMesh_;
bool forcePolyMesh_;
bool readColorComp_;
OFFImporter::ObjectOptionsE trimeshOptions;
OFFImporter::ObjectOptionsE trimeshOptions_;
};
#if defined(INCLUDE_TEMPLATES) && !defined(FILEOFFPLUGIN_C)
......
......@@ -85,7 +85,8 @@ FileOMPlugin::FileOMPlugin() :
loadVertexColor_(0),
loadFaceColor_(0),
loadFaceNormal_(0),
loadDefaultButton_(0)
loadDefaultButton_(0),
trimeshOptions_(0)
{
}
......@@ -189,8 +190,8 @@ int FileOMPlugin::loadObject(QString _filename) {
// Note: If in non-gui mode, we will never enter this case branch
QMetaObject::invokeMethod(this,"handleTrimeshDialog",Qt::BlockingQueuedConnection);
if ((trimeshOptions == TYPEPOLY) ||
(trimeshOptions == TYPEASK && !triMesh)) {
if ((trimeshOptions_ == TYPEPOLY) ||
(trimeshOptions_ == TYPEASK && !triMesh)) {
PolyMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
......@@ -256,11 +257,11 @@ void FileOMPlugin::handleTrimeshDialog()
if (msgBox.clickedButton() == triButton)
trimeshOptions = TYPETRIANGLE ;
trimeshOptions_ = TYPETRIANGLE ;
else if (msgBox.clickedButton() == polyButton)
trimeshOptions = TYPEPOLY ;
trimeshOptions_ = TYPEPOLY ;
else
trimeshOptions = TYPEASK;
trimeshOptions_ = TYPEASK;
}
//-----------------------------------------------------------------------------------------------------
......
......@@ -169,7 +169,7 @@ class FileOMPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInter
QCheckBox* loadFaceColor_;
QCheckBox* loadFaceNormal_;
QPushButton* loadDefaultButton_;
int trimeshOptions;
int trimeshOptions_;
};
#endif //FILEOMPLUGIN_HH
......@@ -81,7 +81,8 @@ FilePLYPlugin::FilePLYPlugin()
loadVertexTexCoord_(0),
loadFaceNormal_(0),
loadFaceColor_(0),
loadDefaultButton_(0) {
loadDefaultButton_(0),
trimeshOptions_(0) {
}
//-----------------------------------------------------------------------------------------------------
......@@ -250,8 +251,8 @@ int FilePLYPlugin::loadObject(QString _filename) {
// If Ask is selected -> show dialog
QMetaObject::invokeMethod(this,"handleTrimeshDialog",Qt::BlockingQueuedConnection);
if ((trimeshOptions == TYPEPOLY) ||
(trimeshOptions == TYPEASK && !isTriMesh)) {
if ((trimeshOptions_ == TYPEPOLY) ||
(trimeshOptions_ == TYPEASK && !isTriMesh)) {
PolyMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
......@@ -317,11 +318,11 @@ void FilePLYPlugin::handleTrimeshDialog()
if (msgBox.clickedButton() == triButton)
trimeshOptions = TYPETRIANGLE ;
trimeshOptions_ = TYPETRIANGLE ;
else if (msgBox.clickedButton() == polyButton)
trimeshOptions = TYPEPOLY ;
trimeshOptions_ = TYPEPOLY ;
else
trimeshOptions = TYPEASK;
trimeshOptions_ = TYPEASK;
}
//-----------------------------------------------------------------------------------------------------
......
......@@ -175,7 +175,8 @@ class FilePLYPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte
QCheckBox* loadFaceNormal_;
QCheckBox* loadFaceColor_;
QPushButton* loadDefaultButton_;
int trimeshOptions;
int trimeshOptions_;
};
#if defined(INCLUDE_TEMPLATES) && !defined(FILEPLYPLUGIN_C)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment