[Pkg-owncloud-commits] [owncloud-client] 46/94: Protocol: Remove entries for auto resolved conflicts #6316
Sandro Knauß
hefee at debian.org
Thu Mar 29 11:12:13 UTC 2018
This is an automated email from the git hooks/post-receive script.
hefee pushed a commit to branch upstream
in repository owncloud-client.
commit d831369f86ffd1782113869eba3970e4cdfb4f8c
Author: Christian Kamm <mail at ckamm.de>
Date: Mon Jan 22 10:51:53 2018 +0100
Protocol: Remove entries for auto resolved conflicts #6316
---
src/gui/issueswidget.cpp | 2 +-
src/gui/protocolwidget.cpp | 2 +-
src/libsync/syncfileitem.h | 23 ++++++++++++++++++-----
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/gui/issueswidget.cpp b/src/gui/issueswidget.cpp
index 0ebb5da..82db7c9 100644
--- a/src/gui/issueswidget.cpp
+++ b/src/gui/issueswidget.cpp
@@ -216,7 +216,7 @@ void IssuesWidget::slotProgressInfo(const QString &folder, const ProgressInfo &p
void IssuesWidget::slotItemCompleted(const QString &folder, const SyncFileItemPtr &item)
{
- if (!item->hasErrorStatus())
+ if (!item->showInIssuesTab())
return;
QTreeWidgetItem *line = ProtocolWidget::createCompletedTreewidgetItem(folder, *item);
if (!line)
diff --git a/src/gui/protocolwidget.cpp b/src/gui/protocolwidget.cpp
index e271525..14b2fa2 100644
--- a/src/gui/protocolwidget.cpp
+++ b/src/gui/protocolwidget.cpp
@@ -195,7 +195,7 @@ QTreeWidgetItem *ProtocolWidget::createCompletedTreewidgetItem(const QString &fo
void ProtocolWidget::slotItemCompleted(const QString &folder, const SyncFileItemPtr &item)
{
- if (item->hasErrorStatus())
+ if (!item->showInProtocolTab())
return;
QTreeWidgetItem *line = createCompletedTreewidgetItem(folder, *item);
if (line) {
diff --git a/src/libsync/syncfileitem.h b/src/libsync/syncfileitem.h
index dd364ae..c723639 100644
--- a/src/libsync/syncfileitem.h
+++ b/src/libsync/syncfileitem.h
@@ -178,20 +178,33 @@ public:
/**
* True if the item had any kind of error.
- *
- * Used for deciding whether an item belongs to the protocol or the
- * issues list on the activity page and for checking whether an
- * item should be announced in the notification message.
*/
bool hasErrorStatus() const
{
return _status == SyncFileItem::SoftError
|| _status == SyncFileItem::NormalError
|| _status == SyncFileItem::FatalError
- || _status == SyncFileItem::Conflict
|| !_errorString.isEmpty();
}
+ /**
+ * Whether this item should appear on the issues tab.
+ */
+ bool showInIssuesTab() const
+ {
+ return hasErrorStatus() || _status == SyncFileItem::Conflict;
+ }
+
+ /**
+ * Whether this item should appear on the protocol tab.
+ */
+ bool showInProtocolTab() const
+ {
+ return !showInIssuesTab()
+ // Don't show conflicts that were resolved as "not a conflict after all"
+ && !(_instruction == CSYNC_INSTRUCTION_CONFLICT && _status == SyncFileItem::Success);
+ }
+
// Variables useful for everybody
QString _file;
QString _renameTarget;
--
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