Minor stuff.

This commit is contained in:
martinrotter 2017-03-15 09:47:04 +01:00
parent bb6ab9ee2f
commit 88b6c5d590
4 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,9 @@
3.4.1
—————
Added:
▪ Auto-update status of feeds is now more general and complete. (
Changed:
▪ Folder which holds SQL scripts got renamed to "sql".
▪ Tweaked some conditions for determining newly "updated" messages in ATOM format. (issue #103)

View File

@ -156,7 +156,9 @@ NetworkResult NetworkFactory::performNetworkOperation(const QString &url, int ti
QEventLoop loop;
NetworkResult result;
downloader.appendRawHeader("Content-Type", input_content_type.toLocal8Bit());
if (!input_content_type.isEmpty()) {
downloader.appendRawHeader("Content-Type", input_content_type.toLocal8Bit());
}
if (set_basic_header) {
QString basic_value = username + ":" + password;

View File

@ -400,13 +400,14 @@ void OwnCloudNetworkFactory::setUserId(const QString &userId) {
OwnCloudResponse::OwnCloudResponse(const QString &raw_content) {
m_rawContent = QJsonDocument::fromJson(raw_content.toUtf8()).object();
m_emptyString = raw_content.isEmpty();
}
OwnCloudResponse::~OwnCloudResponse() {
}
bool OwnCloudResponse::isLoaded() const {
return !m_rawContent.isEmpty();
return !m_emptyString && !m_rawContent.isEmpty();
}
QString OwnCloudResponse::toString() const {

View File

@ -38,6 +38,7 @@ class OwnCloudResponse {
protected:
QJsonObject m_rawContent;
bool m_emptyString;
};
class OwnCloudUserResponse : public OwnCloudResponse {