From ece15c790c5cc2d30f094d9f4cf651f72da3c899 Mon Sep 17 00:00:00 2001 From: Karsten Rink <karsten.rink@ufz.de> Date: Tue, 12 Mar 2013 14:43:36 +0100 Subject: [PATCH] removed linux warnings --- .../DiagramView/DiagramPrefsDialog.cpp | 2 +- Gui/DataView/DiagramView/DiagramPrefsDialog.h | 5 +---- Gui/DataView/DirectConditionGenerator.cpp | 3 +++ Gui/DataView/MshView.cpp | 4 ++-- Gui/VtkAct/VtkCustomInteractorStyle.cpp | 22 ------------------- Gui/VtkVis/VtkVisTabWidget.cpp | 1 - Gui/mainwindow.cpp | 1 + ThirdParty/gtest/CMakeLists.txt | 4 ++++ 8 files changed, 12 insertions(+), 30 deletions(-) diff --git a/Gui/DataView/DiagramView/DiagramPrefsDialog.cpp b/Gui/DataView/DiagramView/DiagramPrefsDialog.cpp index 02728f620ae..e0cf6b07431 100644 --- a/Gui/DataView/DiagramView/DiagramPrefsDialog.cpp +++ b/Gui/DataView/DiagramView/DiagramPrefsDialog.cpp @@ -24,7 +24,7 @@ DiagramPrefsDialog::DiagramPrefsDialog(const GeoLib::Station* stn, const QString &listName, - DatabaseConnection* db, + //DatabaseConnection* db, QDialog* parent) : QDialog(parent), _window(NULL) { diff --git a/Gui/DataView/DiagramView/DiagramPrefsDialog.h b/Gui/DataView/DiagramView/DiagramPrefsDialog.h index e1936d58cd2..da7a8c521e8 100644 --- a/Gui/DataView/DiagramView/DiagramPrefsDialog.h +++ b/Gui/DataView/DiagramView/DiagramPrefsDialog.h @@ -18,7 +18,6 @@ #include "ui_DiagramPrefs.h" #include <QtGui/QMainWindow> -class DatabaseConnection; class DetailWindow; class DiagramList; class QCheckBox; @@ -47,12 +46,11 @@ public: * loaded from a file. * \param stn The station object associated the diagram. * \param listName The station list the station belongs to. - * \param db The database connection were the diagram-related data can be found * \param parent The parent QDialog. */ DiagramPrefsDialog(const GeoLib::Station* stn, const QString &listName, - DatabaseConnection* db, + //DatabaseConnection* db, QDialog* parent = 0); /** @@ -98,7 +96,6 @@ private: std::vector<DiagramList*> _list; std::vector<QCheckBox*> _visability; - DatabaseConnection* _db; int _listID; int _stationID; DetailWindow* _window; diff --git a/Gui/DataView/DirectConditionGenerator.cpp b/Gui/DataView/DirectConditionGenerator.cpp index cc47af71af1..a6f18b78282 100644 --- a/Gui/DataView/DirectConditionGenerator.cpp +++ b/Gui/DataView/DirectConditionGenerator.cpp @@ -79,6 +79,9 @@ const std::vector< std::pair<size_t,double> >& DirectConditionGenerator::directT const std::vector< std::pair<size_t,double> >& DirectConditionGenerator::directWithSurfaceIntegration(MeshLib::Mesh &mesh, const std::string &filename, double scaling) { + (void)mesh; + (void)filename; + (void)scaling; /* TODO6 double no_data_value (-9999); // TODO: get this from asc-reader! diff --git a/Gui/DataView/MshView.cpp b/Gui/DataView/MshView.cpp index 5f3c981faf9..0fd3ae090ae 100644 --- a/Gui/DataView/MshView.cpp +++ b/Gui/DataView/MshView.cpp @@ -209,8 +209,8 @@ void MshView::addDIRECTSourceTerms() void MshView::loadDIRECTSourceTerms() { - QModelIndex index = this->selectionModel()->currentIndex(); - const MeshLib::Mesh* grid = static_cast<MshModel*>(this->model())->getMesh(index); + // TODO6 QModelIndex index = this->selectionModel()->currentIndex(); + // TODO6 const MeshLib::Mesh* grid = static_cast<MshModel*>(this->model())->getMesh(index); // TODO6 const std::vector<MeshLib::Node*>* nodes = grid->getNodes(); // TODO6 emit requestDIRECTSourceTerms(grid->getName(), nodes); } diff --git a/Gui/VtkAct/VtkCustomInteractorStyle.cpp b/Gui/VtkAct/VtkCustomInteractorStyle.cpp index f61dafe01c9..ebf8559be25 100644 --- a/Gui/VtkAct/VtkCustomInteractorStyle.cpp +++ b/Gui/VtkAct/VtkCustomInteractorStyle.cpp @@ -186,28 +186,6 @@ void VtkCustomInteractorStyle::OnLeftButtonDown() VtkMeshSource* source = dynamic_cast<VtkMeshSource*>(data_set); if (source) emit elementPicked(source->GetMesh(), picker->GetCellId()); -/* test for picking on selection filters - else - { -/* - vtkAlgorithm* data_set2 = picker->GetActor()->GetMapper()->GetInputConnection(0,0)->GetProducer() - ->GetInputConnection(0,0)->GetProducer() - ->GetInputConnection(0,0)->GetProducer() - ->GetInputConnection(0,0)->GetProducer() - ->GetInputConnection(0,0)->GetProducer() - ->GetInputConnection(0,0)->GetProducer(); - - VtkCompositeSelectionFilter* source = dynamic_cast<VtkCompositeSelectionFilter*>(data_set->GetInputConnection(0,0)->GetProducer()->GetInputConnection(0,0)->GetProducer()->GetInputConnection(0,0)->GetProducer()); - if (source) - { - vtkUnstructuredGridAlgorithm* data_set = vtkUnstructuredGridAlgorithm::SafeDownCast(picker->GetActor()->GetMapper()->GetInputConnection(0,0)->GetProducer()); - vtkUnstructuredGrid* grid = vtkUnstructuredGrid::SafeDownCast(data_set->GetOutputDataObject(0)); - vtkDataArray* scalar_array = grid->GetCellData()->GetArray("vtkIdFilter_Ids"); - double test = scalar_array->GetTuple1(picker->GetCellId()); - //emit elementPicked(source->GetMesh(), test); - } - } -*/ selectedMapper->SetInputConnection(selected->GetProducerPort()); this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()-> diff --git a/Gui/VtkVis/VtkVisTabWidget.cpp b/Gui/VtkVis/VtkVisTabWidget.cpp index f9ee964597d..42a604ffbe3 100644 --- a/Gui/VtkVis/VtkVisTabWidget.cpp +++ b/Gui/VtkVis/VtkVisTabWidget.cpp @@ -353,7 +353,6 @@ void VtkVisTabWidget::buildScalarArrayComboBox(VtkVisPipelineItem* item) item->SetActiveAttribute(*it); else { - unsigned nArrays (dataSetAttributesList.size()); int idx(0); for (it=dataSetAttributesList.begin(); it!=dataSetAttributesList.end(); ++it) if (active_array_name.compare((*it).right((*it).length()-2))==0) diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp index b43a5dfb827..f0bf22a475e 100644 --- a/Gui/mainwindow.cpp +++ b/Gui/mainwindow.cpp @@ -846,6 +846,7 @@ void MainWindow::loadFEMConditions(std::string geoName) void MainWindow::loadFEMConditionsFromFile(const QString &fileName, std::string geoName) { + Q_UNUSED(geoName); QFileInfo fi(fileName); if (fi.suffix().toLower() == "cnd") { diff --git a/ThirdParty/gtest/CMakeLists.txt b/ThirdParty/gtest/CMakeLists.txt index 525aa6d973f..24fd2b93599 100644 --- a/ThirdParty/gtest/CMakeLists.txt +++ b/ThirdParty/gtest/CMakeLists.txt @@ -1,5 +1,9 @@ # This is Googletest 1.6 compressed to 2 source files +IF (MSVC) + ADD_DEFINITIONS (/D_VARIADIC_MAX=10) +ENDIF () + IF (HAVE_PTHREADS) ADD_DEFINITIONS (-DGTEST_HAS_PTHREAD=1) ELSE () -- GitLab