From 5c269996b81d4e192ae775b246f027473b1e2fe4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 28 Aug 2014 12:37:42 +0200 Subject: [PATCH] + restore lost changes, improve whitspaces, suppress useless MSVC warnings --- src/3rdParty/salomesmesh/CMakeLists.txt | 2 +- src/App/FeaturePython.cpp | 2 +- src/App/PropertyPythonObject.cpp | 2 +- src/Base/FileInfo.cpp | 4 ++-- src/Gui/MainWindow.cpp | 4 +++- src/Mod/Part/App/AppPart.cpp | 2 +- src/Mod/Points/Init.py | 2 +- src/Mod/ReverseEngineering/App/PreCompiled.h | 6 ++++++ 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/3rdParty/salomesmesh/CMakeLists.txt b/src/3rdParty/salomesmesh/CMakeLists.txt index 8ad5eccf2..723906340 100644 --- a/src/3rdParty/salomesmesh/CMakeLists.txt +++ b/src/3rdParty/salomesmesh/CMakeLists.txt @@ -127,7 +127,7 @@ ELSE(UNIX) ######### Windows ########### #MESSAGE("-- Windows system detected") IF(MSVC) - ADD_DEFINITIONS(-DWNT -DWIN32 -D_WINDOWS -DCSFDB -DUSE_CLOCK -DMSDOS -DNO_ONEXIT -DNO_My_ctype -DNO_ISATTY -DNO_FPINIT /wd4290 /wd4251 /wd4018 /wd4800 /wd4996 /wd4244 /wd4806 /wd4275) + ADD_DEFINITIONS(-DWNT -DWIN32 -D_WINDOWS -DCSFDB -DUSE_CLOCK -DMSDOS -DNO_ONEXIT -DNO_My_ctype -DNO_ISATTY -DNO_FPINIT /wd4290 /wd4251 /wd4018 /wd4800 /wd4996 /wd4244 /wd4806 /wd4275 /wd4005 /wd4099 /wd4101 /wd4267 /wd4390) ELSE(MSVC) ADD_DEFINITIONS(-DWNT -DWIN32 -D_WINDOWS -DCSFDB) ENDIF(MSVC) diff --git a/src/App/FeaturePython.cpp b/src/App/FeaturePython.cpp index 9af9a6527..9d936566a 100644 --- a/src/App/FeaturePython.cpp +++ b/src/App/FeaturePython.cpp @@ -54,7 +54,7 @@ DocumentObjectExecReturn *FeaturePythonImp::execute() Py::Object feature = static_cast(proxy)->getValue(); if (feature.hasAttr("__object__")) { Py::Callable method(feature.getAttr(std::string("execute"))); - Py::Tuple args; + Py::Tuple args; method.apply(args); } else { diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index 9d7a63161..facc8fe10 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -89,7 +89,7 @@ std::string PropertyPythonObject::toString() const Py::Callable method(pickle.getAttr(std::string("dumps"))); Py::Object dump; if (this->object.hasAttr("__getstate__")) { - Py::Tuple args; + Py::Tuple args; Py::Callable state(this->object.getAttr("__getstate__")); dump = state.apply(args); } diff --git a/src/Base/FileInfo.cpp b/src/Base/FileInfo.cpp index 9effd578b..4a0cee5f5 100644 --- a/src/Base/FileInfo.cpp +++ b/src/Base/FileInfo.cpp @@ -521,7 +521,7 @@ std::vector FileInfo::getDirectoryContent(void) const { std::vector List; #if defined (FC_OS_WIN32) - struct _wfinddata_t dentry; + struct _wfinddata_t dentry; intptr_t hFile; @@ -530,7 +530,7 @@ std::vector FileInfo::getDirectoryContent(void) const wstr += L"/*"; if ((hFile = _wfindfirst( wstr.c_str(), &dentry)) == -1L) - return List; + return List; while (_wfindnext(hFile, &dentry) == 0) if (wcscmp(dentry.name,L"..") != 0) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index baf6934ff..b38d930b6 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -412,7 +412,9 @@ MainWindow::MainWindow(QWidget * parent, Qt::WFlags f) (QString::fromAscii(QT_TRANSLATE_NOOP("QDockWidget","Python console"))); pDockMgr->registerDockWindow("Std_PythonView", pcPython); -#if 0 //defined(Q_OS_WIN32) this porsion of code is not able to run with a vanilla Qtlib build on Windows. Since it is not build on Linux I pressume its not needed.... (JR 8.2014) +#if 0 //defined(Q_OS_WIN32) this portion of code is not able to run with a vanilla Qtlib build on Windows. + // The MainWindowTabBar is used to show tabbed dock windows with icons + // // add our own QTabBar-derived class to the main window layout // NOTE: This uses some private stuff from QMainWindow which doesn't // seem to be accessible on all platforms. diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index c48c60629..e3b98b620 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -100,7 +100,7 @@ void PartExport initPart() #endif App::Application::Config()["OCC_VERSION"] = str.str(); - Base::Console().Log("Module: Part\n"); + Base::Console().Log("Module: Part\n"); // This is highly experimental and we should keep an eye on it // if we have mysterious crashes diff --git a/src/Mod/Points/Init.py b/src/Mod/Points/Init.py index b585e1d9b..d272555a0 100644 --- a/src/Mod/Points/Init.py +++ b/src/Mod/Points/Init.py @@ -36,6 +36,6 @@ ParGrp.SetString("WorkBenchName", "Points Design") # Append the open handler FreeCAD.EndingAdd("Point formats (*.asc)","Points") -FreeCAD.EndingAdd("Ply points (*.ply)","Points") +FreeCAD.EndingAdd("PLY points (*.ply)","Points") diff --git a/src/Mod/ReverseEngineering/App/PreCompiled.h b/src/Mod/ReverseEngineering/App/PreCompiled.h index 603a5afff..32c739207 100644 --- a/src/Mod/ReverseEngineering/App/PreCompiled.h +++ b/src/Mod/ReverseEngineering/App/PreCompiled.h @@ -39,6 +39,12 @@ # define PointsExport #endif +#ifdef _MSC_VER +# pragma warning(disable : 4181) +# pragma warning(disable : 4275) +# pragma warning(disable : 4305) +#endif + #ifdef _PreComp_ // standard