[Pkg-owncloud-commits] [owncloud-client] 159/470: Activity: Some documentation and better varialbe names
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:24:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit f7f412007e9dd2efc47ea73052fb8237c1e4ce01
Author: Klaas Freitag <freitag at owncloud.com>
Date: Wed Mar 16 16:31:52 2016 +0100
Activity: Some documentation and better varialbe names
---
src/gui/activitywidget.cpp | 8 ++++----
src/gui/activitywidget.h | 5 ++++-
src/gui/notificationconfirmjob.h | 14 ++++++++++++--
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp
index 86f259f..a8be244 100644
--- a/src/gui/activitywidget.cpp
+++ b/src/gui/activitywidget.cpp
@@ -51,7 +51,7 @@ namespace OCC {
ActivityWidget::ActivityWidget(QWidget *parent) :
QWidget(parent),
_ui(new Ui::ActivityWidget),
- _notificationRequests(0)
+ _notificationRequestsRunning(0)
{
_ui->setupUi(this);
@@ -103,7 +103,7 @@ void ActivityWidget::slotRefresh(AccountState *ptr)
// start a server notification handler if no notification requests
// are running
- if( _notificationRequests == 0 ) {
+ if( _notificationRequestsRunning == 0 ) {
ServerNotificationHandler *snh = new ServerNotificationHandler;
connect(snh, SIGNAL(newNotificationList(ActivityList)), this,
SLOT(slotBuildNotificationDisplay(ActivityList)));
@@ -317,7 +317,7 @@ void ActivityWidget::slotSendNotificationRequest(const QString& accountName, con
// count the number of running notification requests. If this member var
// is larger than zero, no new fetching of notifications is started
- _notificationRequests++;
+ _notificationRequestsRunning++;
}
} else {
qDebug() << Q_FUNC_INFO << "Notification Links: Invalid verb:" << verb;
@@ -326,7 +326,7 @@ void ActivityWidget::slotSendNotificationRequest(const QString& accountName, con
void ActivityWidget::endNotificationRequest( NotificationWidget *widget, int replyCode )
{
- _notificationRequests--;
+ _notificationRequestsRunning--;
if( widget ) {
widget->slotNotificationRequestFinished(replyCode);
}
diff --git a/src/gui/activitywidget.h b/src/gui/activitywidget.h
index a2d5c81..01c5914 100644
--- a/src/gui/activitywidget.h
+++ b/src/gui/activitywidget.h
@@ -90,7 +90,10 @@ private:
QMap<int, NotificationWidget*> _widgetForNotifId;
QElapsedTimer _guiLogTimer;
QSet<int> _guiLoggedNotifications;
- int _notificationRequests;
+
+ // number of currently running notification requests. If non zero,
+ // no query for notifications is started.
+ int _notificationRequestsRunning;
ActivityListModel *_model;
QVBoxLayout *_notificationsLayout;
diff --git a/src/gui/notificationconfirmjob.h b/src/gui/notificationconfirmjob.h
index 3f0e8bb..7ae57bb 100644
--- a/src/gui/notificationconfirmjob.h
+++ b/src/gui/notificationconfirmjob.h
@@ -42,19 +42,29 @@ public:
explicit NotificationConfirmJob(AccountPtr account);
/**
- * Set the verb and link for the job
+ * @brief Set the verb and link for the job
*
* @param verb currently supported GET PUT POST DELETE
*/
void setLinkAndVerb(const QUrl& link, const QString &verb);
/**
- * Start the OCS request
+ * @brief Start the OCS request
*/
void start() Q_DECL_OVERRIDE;
+ /**
+ * @brief setWidget stores the associated widget to be able to use
+ * it when the job has finished
+ * @param widget pointer to the notification widget to store
+ */
void setWidget( NotificationWidget *widget );
+ /**
+ * @brief widget - get the associated notification widget as stored
+ * with setWidget method.
+ * @return widget pointer to the notification widget
+ */
NotificationWidget *widget();
signals:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list