[Web] App: enable precompiled headers

- also remove a unused header
This commit is contained in:
Uwe
2022-12-14 04:04:42 +01:00
parent 4531349539
commit cfe33d7145
5 changed files with 10 additions and 8 deletions

View File

@@ -22,7 +22,6 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <climits>
# include <sstream>
#endif
@@ -68,13 +67,13 @@ public:
add_varargs_method("startServer",&Module::startServer,
"startServer(address=127.0.0.1,port=0) -- Start a server."
);
add_varargs_method("waitForConnection",&Module::waitForConnection,
add_varargs_method("waitForConnection", &Module::waitForConnection,
"waitForConnection(address=127.0.0.1,port=0,timeout=0)\n"
"Start a server, wait for connection and close server.\n"
"Its use is disadvised in a the GUI version, since it will\n"
"stop responding until the function returns."
);
add_varargs_method("registerServerFirewall",&Module::registerServerFirewall,
add_varargs_method("registerServerFirewall", &Module::registerServerFirewall,
"registerServerFirewall(callable(string)) -- Register a firewall."
);
initialize("This module is the Web module."); // register with Python
@@ -87,7 +86,7 @@ private:
{
const char* addr = "127.0.0.1";
int port=0;
if (!PyArg_ParseTuple(args.ptr(), "|si",&addr,&port))
if (!PyArg_ParseTuple(args.ptr(), "|si", &addr, &port))
throw Py::Exception();
if (port > USHRT_MAX) {
throw Py::OverflowError("port number is greater than maximum");

View File

@@ -23,10 +23,15 @@ SET(Web_SRCS
Server.h
)
if(FREECAD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Web_SRCS})
ADD_MSVC_PRECOMPILED_HEADER(Web PreCompiled.h PreCompiled.cpp PCH_SRCS)
endif(FREECAD_USE_PCH)
add_library(Web SHARED ${Web_SRCS})
target_link_libraries(Web ${Web_LIBS})
SET_BIN_DIR(Web Web /Mod/Web)
SET_PYTHON_PREFIX_SUFFIX(Web)

View File

@@ -20,5 +20,4 @@
* *
***************************************************************************/
#include "PreCompiled.h"

View File

@@ -28,7 +28,6 @@
#ifdef _PreComp_
// standard
#include <climits>
#include <stdexcept>
// STL

View File

@@ -22,8 +22,8 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <stdexcept>
# include <memory>
# include <stdexcept>
# include <QCoreApplication>
# include <QTcpSocket>
#endif