aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 381d97c2..8fd960b6 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -65,6 +65,10 @@ HashT erase_if(HashT& hashMap, Pred pred)
return removals;
}
+#ifndef TRIM_RAW_DATA
+#define TRIM_RAW_DATA 65535
+#endif
+
class Connection::Private
{
public:
@@ -198,7 +202,8 @@ void Connection::doConnectToServer(const QString& user, const QString& password,
});
connect(loginJob, &BaseJob::failure, this,
[this, loginJob] {
- emit loginError(loginJob->errorString(), loginJob->rawData());
+ emit loginError(loginJob->errorString(),
+ loginJob->rawData(TRIM_RAW_DATA));
});
}
@@ -275,7 +280,7 @@ void Connection::sync(int timeout)
connect( job, &SyncJob::retryScheduled, this,
[this,job] (int retriesTaken, int nextInMilliseconds)
{
- emit networkError(job->errorString(), job->rawData(),
+ emit networkError(job->errorString(), job->rawData(TRIM_RAW_DATA),
retriesTaken, nextInMilliseconds);
});
connect( job, &SyncJob::failure, this, [this, job] {
@@ -284,10 +289,10 @@ void Connection::sync(int timeout)
{
qCWarning(SYNCJOB)
<< "Sync job failed with ContentAccessError - login expired?";
- emit loginError(job->errorString(), job->rawData());
+ emit loginError(job->errorString(), job->rawData(TRIM_RAW_DATA));
}
else
- emit syncError(job->errorString(), job->rawData());
+ emit syncError(job->errorString(), job->rawData(TRIM_RAW_DATA));
});
}