mirror of
https://github.com/ModOrganizer2/githubpp.git
synced 2026-07-27 14:04:49 -07:00
Merge pull request #3 from ModOrganizer2/Develop
Stage for release 2.2.1
This commit is contained in:
+1
-1
@@ -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
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user