Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/creds
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2014-04-14 17:08:43 +0400
committerDaniel Molkentin <danimo@owncloud.com>2014-04-14 17:08:43 +0400
commitef9a318cd9967c19919e55152782579fbc17e608 (patch)
tree096ee5b0f110613a784bb52c76f168a981f5e2f8 /src/creds
parent9f4ffd44d60c92275602b43c39732300af8af9cb (diff)
AbstractNetworkJob Allow finished() to defer Job deletion
This allows to reuse the Job
Diffstat (limited to 'src/creds')
-rw-r--r--src/creds/shibboleth/shibbolethuserjob.cpp5
-rw-r--r--src/creds/shibboleth/shibbolethuserjob.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/creds/shibboleth/shibbolethuserjob.cpp b/src/creds/shibboleth/shibbolethuserjob.cpp
index d64fd26ec..2db343edf 100644
--- a/src/creds/shibboleth/shibbolethuserjob.cpp
+++ b/src/creds/shibboleth/shibbolethuserjob.cpp
@@ -35,7 +35,7 @@ void ShibbolethUserJob::start()
AbstractNetworkJob::start();
}
-void ShibbolethUserJob::finished()
+bool ShibbolethUserJob::finished()
{
bool success = false;
QVariantMap json = QtJson::parse(QString::fromUtf8(reply()->readAll()), success).toMap();
@@ -43,12 +43,13 @@ void ShibbolethUserJob::finished()
if (!success || json.isEmpty()) {
qDebug() << "cloud/user: invalid JSON!";
emit userFetched(QString());
- return;
+ return true;
}
QString user = json.value("ocs").toMap().value("data").toMap().value("id").toString();
qDebug() << "cloud/user: " << json << "->" << user;
emit userFetched(user);
+ return true;
}
diff --git a/src/creds/shibboleth/shibbolethuserjob.h b/src/creds/shibboleth/shibbolethuserjob.h
index b6d44836f..f6427a45b 100644
--- a/src/creds/shibboleth/shibbolethuserjob.h
+++ b/src/creds/shibboleth/shibbolethuserjob.h
@@ -36,7 +36,7 @@ signals:
void tryAgain();
private slots:
- virtual void finished();
+ virtual bool finished();
};