Merge pull request #4 from sebasje/requestreply

Return QNetworkReply from getRequests
This commit is contained in:
dragotin 2013-02-10 02:34:14 -08:00
commit a000a7b52e
2 changed files with 6 additions and 5 deletions

View File

@ -92,12 +92,12 @@ void ownCloudInfo::checkInstallation()
getRequest( QLatin1String("status.php"), false );
}
void ownCloudInfo::getWebDAVPath( const QString& path )
QNetworkReply* ownCloudInfo::getWebDAVPath( const QString& path )
{
getRequest( path, true );
return getRequest( path, true );
}
void ownCloudInfo::getRequest( const QString& path, bool webdav )
QNetworkReply* ownCloudInfo::getRequest( const QString& path, bool webdav )
{
qDebug() << "Get Request to " << path;
@ -118,6 +118,7 @@ void ownCloudInfo::getRequest( const QString& path, bool webdav )
connect( reply, SIGNAL( error(QNetworkReply::NetworkError )),
this, SLOT(slotError( QNetworkReply::NetworkError )));
return reply;
}
#if QT46_IMPL

View File

@ -51,12 +51,12 @@ public:
* a general GET request to the ownCloud. If the second bool parameter is
* true, the WebDAV server is queried.
*/
void getRequest( const QString&, bool );
QNetworkReply* getRequest( const QString&, bool );
/**
* convenience: GET request to the WebDAV server.
*/
void getWebDAVPath( const QString& );
QNetworkReply* getWebDAVPath( const QString& );
/**
* There is a global flag here if the user once decided against trusting the