refs #751, detect invalid JSON message

(which normally means a PHP error message in HTML)
* utility function to remove HTML parts
* adjustments
This commit is contained in:
Klaus Basan
2016-08-31 17:13:40 +02:00
committed by Roland Winklmeier
parent 2cc88d9c6a
commit 03c642d88a
4 changed files with 22 additions and 5 deletions

View File

@@ -39,7 +39,6 @@ namespace BlackMisc
class BLACKMISC_EXPORT CNetworkUtils
{
public:
//! Request type
enum RequestType
{
@@ -125,6 +124,9 @@ namespace BlackMisc
//! Last modified from reply
static qint64 lastModifiedMsSinceEpoch(QNetworkReply *nwReply);
//! Remove the HTML formatting from a PHP error message
static QString removeHtmlPartsFromPhpErrorMessage(const QString &errorMessage);
private:
//! Hidden constructor
CNetworkUtils() {}
@@ -133,4 +135,3 @@ namespace BlackMisc
} // namespace
#endif // guard