From 591b71cf186439583f888637ecd50985ae2b69d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Tue, 11 Sep 2012 05:21:24 +0200 Subject: [PATCH] Return QNetworkReply from remote mkdir This patch allows the client implementation to react to specific results of mkdir requests I need this patch to be able to catch errors from creating remote folders. --- src/mirall/owncloudinfo.cpp | 3 ++- src/mirall/owncloudinfo.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mirall/owncloudinfo.cpp b/src/mirall/owncloudinfo.cpp index 93e32080244..512d2f6bde3 100644 --- a/src/mirall/owncloudinfo.cpp +++ b/src/mirall/owncloudinfo.cpp @@ -185,7 +185,7 @@ void ownCloudInfo::qhttpRequestFinished(int id, bool success ) } } #else -void ownCloudInfo::mkdirRequest( const QString& dir ) +QNetworkReply* ownCloudInfo::mkdirRequest( const QString& dir ) { qDebug() << "OCInfo Making dir " << dir; _authAttempts = 0; @@ -206,6 +206,7 @@ void ownCloudInfo::mkdirRequest( const QString& dir ) connect( reply, SIGNAL(finished()), SLOT(slotMkdirFinished()) ); connect( reply, SIGNAL( error(QNetworkReply::NetworkError )), this, SLOT(slotError(QNetworkReply::NetworkError ))); + return reply; } void ownCloudInfo::slotMkdirFinished() diff --git a/src/mirall/owncloudinfo.h b/src/mirall/owncloudinfo.h index 583d1185aca..01a6fca7070 100644 --- a/src/mirall/owncloudinfo.h +++ b/src/mirall/owncloudinfo.h @@ -63,7 +63,11 @@ class ownCloudInfo : public QObject /** * Create a collection via owncloud. Provide a relative path. */ +#if QT46_IMPL void mkdirRequest( const QString& ); +#else + QNetworkReply* mkdirRequest( const QString& ); +#endif /** * Use a custom ownCloud configuration file identified by handle