From 8db3e5cd59514db8ed4521fa767f482de83c4815 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 13 Nov 2019 18:50:48 +0100 Subject: 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 --- desktop-widgets/command_divelist.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'desktop-widgets') 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 &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 &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 &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). -- cgit v1.2.3-70-g09d2