summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-13 18:50:48 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-11-14 09:37:27 +0100
commit8db3e5cd59514db8ed4521fa767f482de83c4815 (patch)
tree1fb9ce162337cee8f1919342a5879e7e22b3698f
parent1163fd18c4783803a6dd69963ec7387b543d6ed8 (diff)
downloadsubsurface-8db3e5cd59514db8ed4521fa767f482de83c4815.tar.gz
Undo: remove unrelated include in command_divelist.cpp
This file included "desktop-widgets/divelistview.h" without needing it. If we want to use the undo commands on mobile we shouldn't include desktop headers. Therefore, remove the include. This has the unintended side-effect that the Qt debug headers are not included indirectly anymore. Thus, change a few "qWarning() << ..." instances to "qWarning(...)". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--desktop-widgets/command_divelist.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp
index 9438107dd..4b4ef4ab8 100644
--- a/desktop-widgets/command_divelist.cpp
+++ b/desktop-widgets/command_divelist.cpp
@@ -2,7 +2,6 @@
#include "command_divelist.h"
#include "command_private.h"
-#include "desktop-widgets/divelistview.h"
#include "core/divelist.h"
#include "core/display.h" // for amount_selected
#include "core/qthelper.h"
@@ -39,7 +38,7 @@ DiveToAdd DiveListBase::removeDive(struct dive *d, std::vector<OwningTripPtr> &t
int idx = get_divenr(d);
if (idx < 0)
- qWarning() << "Deletion of unknown dive!";
+ qWarning("Deletion of unknown dive!");
res.dive.reset(unregister_dive(idx)); // Remove dive from backend
@@ -889,7 +888,7 @@ MergeDives::MergeDives(const QVector <dive *> &dives)
// Just a safety check - if there's not two or more dives - do nothing
// The caller should have made sure that this doesn't happen.
if (dives.count() < 2) {
- qWarning() << "Merging less than two dives";
+ qWarning("Merging less than two dives");
return;
}
@@ -931,7 +930,7 @@ MergeDives::MergeDives(const QVector <dive *> &dives)
if (idx < 0 || idx + num > dive_table.nr) {
// It was the callers responsibility to pass only known dives.
// Something is seriously wrong - give up.
- qWarning() << "Merging unknown dives";
+ qWarning("Merging unknown dives");
return;
}
// std::equal compares two ranges. The parameters are (begin_range1, end_range1, begin_range2).