Skip to content

Commit 47c7fe0

Browse files
Merge remote-tracking branch 'upstream/master' into multidatabasecapabilitySecondtry
2 parents c8eb66b + e071c4c commit 47c7fe0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2457
-142
lines changed

.appveyor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@ build_script:
9898
- cd RESTWebService
9999
- qmake RESTWebService.pro
100100
- mingw32-make -j 8
101+
102+
- cd ..
103+
- cd ORM
104+
- qmake ORM.pro
105+
- mingw32-make -j 8

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ script:
4141
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm *tst_*; fi
4242
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm main*; fi
4343
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm moc*; fi
44-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then coveralls --exclude lib --exclude tests --exclude *Qt* --exclude */usr/* --gcov-options '\-lp'; fi
44+
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then coveralls --exclude lib --exclude tests --exclude *Qt* --exclude */usr/* --gcov-options '\-lp'; fi
4545
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean; fi
4646

4747
- cd cwf
@@ -130,3 +130,7 @@ script:
130130
- qmake RESTWebService.pro
131131
- make -j 8
132132

133+
- cd ..
134+
- cd ORM
135+
- qmake ORM.pro
136+
- make -j 8

CPPWebFramework/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ set(CPP_WebFrameWork_SRCS
3232
cwf/session.cpp
3333
cwf/cppwebcontroller.cpp
3434
cwf/sslloader.cpp
35+
cwf/model.cpp
36+
cwf/modelbasicoperation.cpp
37+
cwf/sqlquerymanager.cpp
3538
cwf/cstlcompilerobject.h
3639
cwf/variant.h
40+
cwf/dbstorage.h
3741
)
3842

3943
add_library(CPPWebFramework SHARED ${CPP_WebFrameWork_SRCS} )

CPPWebFramework/CPPWebFramework.pro

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
QT += network xml sql
88
QT -= gui
99

10-
TARGET = CPPWebFramework
1110
TEMPLATE = lib
1211

1312
DEFINES += CPPWEBFRAMEWORK_LIBRARY
@@ -48,10 +47,13 @@ SOURCES += \
4847
cwf/session.cpp \
4948
cwf/cppwebcontroller.cpp \
5049
cwf/sslloader.cpp \
51-
cwf/filter.cpp
50+
cwf/filter.cpp \
51+
cwf/model.cpp \
52+
cwf/modelbasicoperation.cpp \
53+
cwf/sqlquerymanager.cpp
5254

5355
HEADERS += \
54-
cwf/cppwebframework_global.h \
56+
cwf/cppwebframework_global.h \
5557
cwf/configuration.h \
5658
cwf/constants.h \
5759
cwf/cppwebapplication.h \
@@ -82,7 +84,10 @@ HEADERS += \
8284
cwf/response.h \
8385
cwf/session.h \
8486
cwf/cppwebcontroller.h \
85-
cwf/sslloader.h
87+
cwf/sslloader.h \
88+
cwf/model.h \
89+
cwf/modelbasicoperation.h \
90+
cwf/sqlquerymanager.h
8691

8792
DISTFILES += \
8893
server/config/ssl/my.key \
@@ -120,14 +125,22 @@ win32 {
120125
config.files = server/*
121126
}
122127

128+
CONFIG += debug_and_release
129+
CONFIG += build_all
130+
131+
CONFIG(debug, debug|release) {
132+
TARGET = CPPWebFrameworkd
133+
} else {
134+
TARGET = CPPWebFramework
135+
QMAKE_CXXFLAGS_RELEASE -= -O1
136+
QMAKE_CXXFLAGS_RELEASE -= -O2
137+
QMAKE_CXXFLAGS_RELEASE += -O3
138+
}
139+
123140
INSTALLS += target
124141
INSTALLS += headers
125142
INSTALLS += config
126143

127-
QMAKE_CXXFLAGS_RELEASE -= -O1
128-
QMAKE_CXXFLAGS_RELEASE -= -O2
129-
QMAKE_CXXFLAGS_RELEASE += -O3
130-
131144
QMAKE_CXXFLAGS += -std=c++11
132145

133146
#Strongly recommended

CPPWebFramework/cwf/constants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ namespace HTTP
126126
const QByteArray END_LINE = "\r\n";
127127
const QByteArray SEPARATOR = ": ";
128128
const QByteArray HTTP_1_1 = "HTTP/1.1 ";
129-
const QByteArray END_OF_MENSAGE = "\r\n\r\n";
130-
const QByteArray END_OF_MENSAGE_WITH_ZERO = "0\r\n\r\n";
129+
const QByteArray END_OF_MESSAGE = "\r\n\r\n";
130+
const QByteArray END_OF_MESSAGE_WITH_ZERO = "0\r\n\r\n";
131131
const QByteArray CONTENT_TYPE = "Content-Type";
132132
const QByteArray CONTENT_LENGTH = "Content-Length";
133133
const QByteArray CONTENT_DISPOSITION = "Content-Disposition";

CPPWebFramework/cwf/controller.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ void Controller::doMessage(Request &req, Response &resp, const QString &method)
2020
resp.sendError(Response::SC_BAD_REQUEST, msg.toLatin1());
2121
}
2222

23-
Controller::~Controller()
24-
{
25-
}
26-
2723
void Controller::doDelete(Request &req, Response &resp) const
2824
{
2925
doMessage(req, resp, HTTP::METHOD::DELETE);

CPPWebFramework/cwf/controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CPPWEBFRAMEWORKSHARED_EXPORT Controller
3838
/**
3939
* @brief Destructor.
4040
*/
41-
virtual ~Controller();
41+
virtual ~Controller() = default;
4242
/**
4343
* @brief This is an virtual method that can be overloaded to attend the delete request method.
4444
* @param req : This is a reference to the Request.

CPPWebFramework/cwf/filter.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
CWF_BEGIN_NAMESPACE
44

5-
Filter::~Filter()
6-
{
7-
}
8-
95
void Filter::doFilter(Request &request, Response &response, FilterChain &chain)
106
{
117
chain.doFilter(request, response);

CPPWebFramework/cwf/filter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CPPWEBFRAMEWORKSHARED_EXPORT Filter
2626
/**
2727
* @brief Virtual destructor.
2828
*/
29-
virtual ~Filter();
29+
virtual ~Filter() = default;
3030
/**
3131
* @brief This method will be called always that the CppWebServer receives a requisition.
3232
* @param request : This is a reference to the Request.

CPPWebFramework/cwf/httpparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CWF_BEGIN_NAMESPACE
1515

1616
bool HttpParser::extractHeaderAndBody(QByteArray &httpMessage)
1717
{
18-
int index = httpMessage.indexOf(HTTP::END_OF_MENSAGE);
18+
int index = httpMessage.indexOf(HTTP::END_OF_MESSAGE);
1919
if(index != -1)
2020
{
2121
index += 4;

0 commit comments

Comments
 (0)