-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from QuasarApp/requestPerformanceLimit
Request performance limit
- Loading branch information
Showing
26 changed files
with
689 additions
and
793 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//# | ||
//# Copyright (C) 2023-2024 QuasarApp. | ||
//# Distributed under the GPLv3 software license, see the accompanying | ||
//# Everyone is permitted to copy and distribute verbatim copies | ||
//# of this license document, but changing it is not allowed. | ||
//# | ||
|
||
#include "httpexception.h" | ||
|
||
namespace qTbot { | ||
|
||
HttpException::HttpException(QNetworkReply::NetworkError code, | ||
const QByteArray &erroString) { | ||
|
||
_code = code; | ||
|
||
if (erroString.size()) { | ||
_errText = erroString; | ||
} else { | ||
|
||
_errText = QByteArray("Http request finished with code: "). | ||
append(QString::number(code).toLatin1()); | ||
} | ||
} | ||
|
||
const char *HttpException::what() const noexcept { | ||
return _errText.constData(); | ||
} | ||
|
||
void HttpException::raise() const { | ||
throw *this; | ||
} | ||
|
||
QException *HttpException::clone() const { | ||
return new HttpException(QNetworkReply::NetworkError(0), | ||
_errText); | ||
} | ||
|
||
QNetworkReply::NetworkError HttpException::code() const { | ||
return _code; | ||
} | ||
} |
Oops, something went wrong.