[Pkg-owncloud-commits] [owncloud-client] 75/498: Bump to 1.9
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 77a28a81ebc2632398a1eb7103ce978563c33b27
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Wed May 6 17:01:05 2015 +0200
Bump to 1.9
---
VERSION.cmake | 4 +--
binary.rej | 5 ++++
src/mirall/qbacktrace.h | 24 ++++++++++++++++
test/mockserver/CMakeLists.txt | 21 ++++++++++++++
test/mockserver/httpserver.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++
test/mockserver/httpserver.h | 26 +++++++++++++++++
test/mockserver/main.cpp | 23 +++++++++++++++
7 files changed, 164 insertions(+), 2 deletions(-)
diff --git a/VERSION.cmake b/VERSION.cmake
index 3470991..01989bf 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -1,6 +1,6 @@
set( MIRALL_VERSION_MAJOR 1 )
-set( MIRALL_VERSION_MINOR 8 )
-set( MIRALL_VERSION_PATCH 1 )
+set( MIRALL_VERSION_MINOR 9 )
+set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_SOVERSION 0 )
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
diff --git a/binary.rej b/binary.rej
new file mode 100644
index 0000000..7e9097a
--- /dev/null
+++ b/binary.rej
@@ -0,0 +1,5 @@
+--- binary
++++ binary
+@@ -1 +1 @@
+-Subproject commit 1fb9ddfa9a9a1b4dbc447eee10dbed89172d968a
++Subproject commit 01d73965dc8b862d1b2310d3ef801c297b697ec7
diff --git a/src/mirall/qbacktrace.h b/src/mirall/qbacktrace.h
new file mode 100644
index 0000000..8d1a7a4
--- /dev/null
+++ b/src/mirall/qbacktrace.h
@@ -0,0 +1,24 @@
+
+#include <execinfo.h>
+#include <stdlib.h>
+
+static QString qBacktrace( int levels = -1 )
+{
+ QString s;
+ void* trace[256];
+ int n = backtrace(trace, 256);
+ char** strings = backtrace_symbols (trace, n);
+
+ if ( levels != -1 )
+ n = qMin( n, levels );
+ s = QString::fromLatin1("[\n");
+
+ for (int i = 0; i < n; ++i)
+ s += QString::number(i) +
+ QString::fromLatin1(": ") +
+ QString::fromLatin1(strings[i]) + QString::fromLatin1("\n");
+ s += QString::fromLatin1("]\n");
+ free (strings);
+ return s;
+}
+
diff --git a/test/mockserver/CMakeLists.txt b/test/mockserver/CMakeLists.txt
new file mode 100644
index 0000000..fecf3d6
--- /dev/null
+++ b/test/mockserver/CMakeLists.txt
@@ -0,0 +1,21 @@
+project(gui)
+set(CMAKE_AUTOMOC TRUE)
+
+set(MOCKSERVER_NAME mockserver)
+
+#qt_wrap_ui(mockserver_UI_SRCS ${mockserver_UI})
+
+set(mockserver_SRCS
+ main.cpp
+ httpserver.cpp
+)
+
+set(mockserver_HDRS
+ httpserver.h
+)
+
+# add_executable( ${MOCKSERVER_NAME} main.cpp ${final_src})
+add_executable(${MOCKSERVER_NAME} WIN32 ${mockserver_SRCS} ${mockserver_HDRS})
+qt5_use_modules(${MOCKSERVER_NAME} Network Xml)
+target_link_libraries(${MOCKSERVER_NAME} ${QT_LIBRARIES})
+
diff --git a/test/mockserver/httpserver.cpp b/test/mockserver/httpserver.cpp
new file mode 100644
index 0000000..9f3e1a1
--- /dev/null
+++ b/test/mockserver/httpserver.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) by Daniel Molkentin <danimo at owncloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#include "httpserver.h"
+
+HttpServer::HttpServer(quint16 port, QObject* parent)
+ : QTcpServer(parent)
+{
+ listen(QHostAddress::Any, port);
+}
+
+void HttpServer::readClient()
+{
+ QTcpSocket* socket = (QTcpSocket*)sender();
+ if (socket->canReadLine()) {
+ QStringList tokens = QString(socket->readLine()).split(QRegExp("[ \r\n][ \r\n]*"));
+ if (tokens[0] == "GET") {
+ QTextStream os(socket);
+ os.setAutoDetectUnicode(true);
+ os << "HTTP/1.0 200 Ok\r\n"
+ "Content-Type: text/html; charset=\"utf-8\"\r\n"
+ "\r\n"
+ "<h1>Nothing to see here</h1>\n"
+ << QDateTime::currentDateTime().toString() << "\n";
+ socket->close();
+
+ QtServiceBase::instance()->logMessage("Wrote to client");
+
+ if (socket->state() == QTcpSocket::UnconnectedState) {
+ delete socket;
+ QtServiceBase::instance()->logMessage("Connection closed");
+ }
+ }
+ }
+}
+void HttpServer::discardClient()
+{
+ QTcpSocket* socket = (QTcpSocket*)sender();
+ socket->deleteLater();
+
+ QtServiceBase::instance()->logMessage("Connection closed");
+}
+
+
+void HttpServer::incomingConnection(int socket)
+{
+ if (disabled)
+ return;
+ QTcpSocket* s = new QTcpSocket(this);
+ connect(s, SIGNAL(readyRead()), this, SLOT(readClient()));
+ connect(s, SIGNAL(disconnected()), this, SLOT(discardClient()));
+ s->setSocketDescriptor(socket);
+}
diff --git a/test/mockserver/httpserver.h b/test/mockserver/httpserver.h
new file mode 100644
index 0000000..010fd80
--- /dev/null
+++ b/test/mockserver/httpserver.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) by Daniel Molkentin <danimo at owncloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#include <QTcpServer>
+
+class HttpServer : public QTcpServer
+ {
+ Q_OBJECT
+ public:
+ HttpServer(qint16 port, QObject* parent = 0);
+ void incomingConnection(int socket);
+
+ private slots:
+ void readClient();
+ void discardClient();
+ };
diff --git a/test/mockserver/main.cpp b/test/mockserver/main.cpp
new file mode 100644
index 0000000..f35cab9
--- /dev/null
+++ b/test/mockserver/main.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) by Daniel Molkentin <danimo at owncloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#include <QCoreApplication>
+
+#include "httpserver.h"
+
+int main(int argc, char* argv[])
+{
+ QCoreApplication app(argc, argv);
+ HttpServer server;
+ return app.exec();
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list