Skip to content

Commit

Permalink
#670 - dapps packages
Browse files Browse the repository at this point in the history
  • Loading branch information
chapati committed Jul 29, 2021
1 parent 43f55df commit 10f3d76
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 15 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ set(PROJECT_VERSION_MINOR 0)
set(PROJECT_VERSION_PATCH 1)
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})

# Build a shared library by default
option(BUILD_SHARED_LIBS "Build QHttpEngine as a shared library" ON)

set(BIN_INSTALL_DIR bin CACHE STRING "Binary runtime installation directory relative to the install prefix")
set(LIB_INSTALL_DIR lib CACHE STRING "Library installation directory relative to the install prefix")
set(INCLUDE_INSTALL_DIR include CACHE STRING "Header installation directory relative to the install prefix")
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if(WIN32)
set(SRC ${SRC} "${CMAKE_CURRENT_BINARY_DIR}/resource.rc")
endif()

add_library(qhttpengine ${HEADERS} ${SRC})
add_library(qhttpengine STATIC ${HEADERS} ${SRC})

set_target_properties(qhttpengine PROPERTIES
CXX_STANDARD 11
Expand Down
2 changes: 1 addition & 1 deletion src/include/qhttpengine/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class QHTTPENGINE_EXPORT Range
*
* // When resource size is unknown
* range = QHttpEngine::Range(512, 1024);
* range.contentRange(); // "512-1024/*"
* range.contentRange(); // "512-1024"
*
* // if range request was bad, return resource size
* range = QHttpEngine::Range(1, 0, 1200);
Expand Down
2 changes: 0 additions & 2 deletions src/qhttpengine_export.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#define QHTTPENGINE_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define QHTTPENGINE_VERSION "@PROJECT_VERSION@"

#cmakedefine BUILD_SHARED_LIBS

#if defined(BUILD_SHARED_LIBS)
# if defined(QHTTPENGINE_LIBRARY)
# define QHTTPENGINE_EXPORT Q_DECL_EXPORT
Expand Down
2 changes: 1 addition & 1 deletion src/src/proxysocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ProxySocket::ProxySocket(Socket *socket, const QString &path, const QHostAddress
connect(&mUpstreamSocket, &QTcpSocket::readyRead, this, &ProxySocket::onUpstreamReadyRead);
connect(
&mUpstreamSocket,
static_cast<void(QAbstractSocket::*)(QAbstractSocket::SocketError)>(&QAbstractSocket::error),
static_cast<void(QAbstractSocket::*)(QAbstractSocket::SocketError)>(&QAbstractSocket::errorOccurred),
this,
&ProxySocket::onUpstreamError
);
Expand Down
4 changes: 2 additions & 2 deletions src/src/qiodevicecopier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ const qint64 DefaultBufferSize = 65536;

QIODeviceCopierPrivate::QIODeviceCopierPrivate(QIODeviceCopier *copier, QIODevice *srcDevice, QIODevice *destDevice)
: QObject(copier),
q(copier),
src(srcDevice),
dest(destDevice),
bufferSize(DefaultBufferSize),
rangeFrom(0),
rangeTo(-1)
rangeTo(-1),
q(copier)
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ using namespace QHttpEngine;

ServerPrivate::ServerPrivate(Server *httpServer)
: QObject(httpServer),
q(httpServer),
handler(0)
handler(0),
q(httpServer)
{
}

Expand Down Expand Up @@ -91,7 +91,7 @@ void Server::incomingConnection(qintptr socketDescriptor)
});

// If an error occurs, delete the socket
connect(socket, static_cast<void(QAbstractSocket::*)(QAbstractSocket::SocketError)>(&QAbstractSocket::error),
connect(socket, static_cast<void(QAbstractSocket::*)(QAbstractSocket::SocketError)>(&QAbstractSocket::errorOccurred),
socket, &QSslSocket::deleteLater);

socket->setSocketDescriptor(socketDescriptor);
Expand Down
6 changes: 4 additions & 2 deletions src/src/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ const QString ErrorTemplate =

SocketPrivate::SocketPrivate(Socket *httpSocket, QTcpSocket *tcpSocket)
: QObject(httpSocket),
q(httpSocket),
socket(tcpSocket),
readState(ReadHeaders),
requestDataRead(0),
requestDataTotal(-1),
writeState(WriteNone),
responseStatusCode(200),
responseStatusReason(statusReason(200))
responseStatusReason(statusReason(200)),
q(httpSocket)
{
socket->setParent(this);

Expand Down Expand Up @@ -116,6 +116,8 @@ void SocketPrivate::onReadyRead()
case ReadFinished:
readBuffer.clear();
break;
default:
break;
}
}

Expand Down

0 comments on commit 10f3d76

Please sign in to comment.