profile: don't compile ProfileWidget2 on mobile

Since there (currently) is no interactive widget on mobile, there
is no point in compiling it. This was a bit more complicated than
expected, since there were other source files (divehandler.cpp
and ruleritem.cpp) which reference ProfileWidget2 and therefore
need to be removed. Otherwise, the dreadful MOC produces unresolved
references.

We could now remove all the conditional compiles in
profilewidget2.cpp, but let's keep them for now. We might have
to readd a number of them later, when making the mobile-profile
interactive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-08-04 09:11:32 +02:00 committed by Dirk Hohndel
parent 4fb2cc8267
commit d28f4d5347
3 changed files with 10 additions and 13 deletions

View file

@ -169,14 +169,11 @@ SOURCES += subsurface-mobile-main.cpp \
profile-widget/divecartesianaxis.cpp \
profile-widget/diveeventitem.cpp \
profile-widget/diveprofileitem.cpp \
profile-widget/profilewidget2.cpp \
profile-widget/profilescene.cpp \
profile-widget/ruleritem.cpp \
profile-widget/animationfunctions.cpp \
profile-widget/divepixmapitem.cpp \
profile-widget/divetooltipitem.cpp \
profile-widget/tankitem.cpp \
profile-widget/divehandler.cpp \
profile-widget/divelineitem.cpp \
profile-widget/diverectitem.cpp \
profile-widget/divetextitem.cpp
@ -325,15 +322,12 @@ HEADERS += \
qt-models/filterpresetmodel.h \
profile-widget/qmlprofile.h \
profile-widget/diveprofileitem.h \
profile-widget/profilewidget2.h \
profile-widget/profilescene.h \
profile-widget/ruleritem.h \
profile-widget/diveeventitem.h \
profile-widget/divetooltipitem.h \
profile-widget/tankitem.h \
profile-widget/animationfunctions.h \
profile-widget/divecartesianaxis.h \
profile-widget/divehandler.h \
profile-widget/divelineitem.h \
profile-widget/divepixmapitem.h \
profile-widget/diverectitem.h \

View file

@ -6,7 +6,6 @@
#include "core/selection.h"
#include "core/subsurface-qt/divelistnotifier.h"
#include "qt-models/filtermodels.h"
#include "../profile-widget/profilewidget2.h"
#include "core/divefilter.h"
#include <array>

View file

@ -6,8 +6,6 @@ set(SUBSURFACE_PROFILE_LIB_SRCS
divecartesianaxis.h
diveeventitem.cpp
diveeventitem.h
divehandler.cpp
divehandler.h
divelineitem.cpp
divelineitem.h
divepixmapitem.cpp
@ -20,12 +18,8 @@ set(SUBSURFACE_PROFILE_LIB_SRCS
divetextitem.h
divetooltipitem.cpp
divetooltipitem.h
profilewidget2.cpp
profilewidget2.h
profilescene.cpp
profilescene.h
ruleritem.cpp
ruleritem.h
tankitem.cpp
tankitem.h
)
@ -35,6 +29,16 @@ set(SUBSURFACE_PROFILE_LIB_SRCS
qmlprofile.cpp
qmlprofile.h
)
else ()
set(SUBSURFACE_PROFILE_LIB_SRCS
${SUBSURFACE_PROFILE_LIB_SRCS}
divehandler.cpp
divehandler.h
profilewidget2.cpp
profilewidget2.h
ruleritem.cpp
ruleritem.h
)
endif ()
source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})