Merge pull request #3 from ModOrganizer2/Develop

Stage for release 2.2.1
This commit is contained in:
Jeremy Rimpo
2019-07-14 17:53:09 -05:00
committed by GitHub
2 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
ADD_COMPILE_OPTIONS($<$<CXX_COMPILER_ID:MSVC>:/MP>)
ADD_COMPILE_OPTIONS($<$<CXX_COMPILER_ID:MSVC>:/MP> $<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELEASE>:/O2>> $<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:RELWITHDEBINFO>:/O2>>)
SET(PROJ_NAME githubpp)
PROJECT(${PROJ_NAME})
+1 -6
View File
@@ -28,9 +28,6 @@ QJsonArray GitHub::releases(const Repository &repo)
QString("repos/%1/%2/releases").arg(repo.owner, repo.project),
QByteArray(),
true);
if (!result.isArray()) {
throw GitHubException(result.object());
}
return result.array();
}
@@ -40,9 +37,6 @@ void GitHub::releases(const Repository &repo,
request(Method::GET,
QString("repos/%1/%2/releases").arg(repo.owner, repo.project),
QByteArray(), [callback](const QJsonDocument &result) {
if (!result.isArray()) {
throw GitHubException(result.object());
}
callback(result.array());
}, true);
}
@@ -144,6 +138,7 @@ void GitHub::request(Method method, const QString &path, const QByteArray &data,
[reply, timer, callback](QNetworkReply::NetworkError error) {
qDebug("network error %d", error);
timer->stop();
reply->disconnect();
callback(QJsonDocument(
QJsonObject({{"network_error", reply->errorString()}})));
reply->deleteLater();