From abddb3ecb9d93d44bb0071ea369c98499105b9f0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 17 Jan 2015 08:43:49 +1300 Subject: Make Facebook support a config option By default it is turned off, turn on by calling qmake with CONFIG+=FBSUPPORT. Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-ui/maintab.cpp') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 492753d25..629b36ad7 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -16,7 +16,10 @@ #include "qthelper.h" #include "display.h" #include "divepicturewidget.h" + +#if defined(FBSUPPORT) #include "socialnetworks.h" +#endif #include #include @@ -190,11 +193,15 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui.photosView->setSelectionMode(QAbstractItemView::SingleSelection); connect(deletePhoto, SIGNAL(triggered(bool)), this, SLOT(removeSelectedPhotos())); +#if defined(FBSUPPORT) FacebookManager *fb = FacebookManager::instance(); connect(fb, &FacebookManager::justLoggedIn, ui.facebookPublish, &QPushButton::show); connect(fb, &FacebookManager::justLoggedOut, ui.facebookPublish, &QPushButton::hide); connect(ui.facebookPublish, &QPushButton::clicked, fb, &FacebookManager::sendDive); ui.facebookPublish->setVisible(fb->loggedIn()); +#else + ui.facebookPublish->setVisible(false); +#endif acceptingEdit = false; } -- cgit v1.2.3-70-g09d2