diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 01deb607d..ec0bb52c1 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -81,6 +81,8 @@ #include "CalendarDownload.h" #if QT_VERSION > 0x050000 #include "Dropbox.h" +#endif +#if QT_VERSION >= 0x050400 #include "GoogleDrive.h" #endif #include "LocalFileStore.h" @@ -558,11 +560,11 @@ MainWindow::MainWindow(const QDir &home) shareMenu->addSeparator (); shareMenu->addAction(tr("Upload to &Dropbox"), this, SLOT(uploadDropbox()), tr("Ctrl+R")); shareMenu->addAction(tr("Synchronise Dropbox..."), this, SLOT(syncDropbox()), tr("Ctrl+O")); +#endif +#if QT_VERSION > 0x050400 shareMenu->addSeparator (); - shareMenu->addAction(tr("Upload to &GoogleDrive"), this, - SLOT(uploadGoogleDrive()), tr("")); - shareMenu->addAction(tr("Synchronise GoogleDrive..."), this, - SLOT(syncGoogleDrive()), tr("Ctrl+P")); + shareMenu->addAction(tr("Upload to &GoogleDrive"), this, SLOT(uploadGoogleDrive()), tr("")); + shareMenu->addAction(tr("Synchronise GoogleDrive..."), this, SLOT(syncGoogleDrive()), tr("Ctrl+P")); #endif #ifdef GC_HAVE_SOAP shareMenu->addSeparator (); @@ -2069,7 +2071,9 @@ MainWindow::syncDropbox() FileStoreSyncDialog upload(currentTab->context, &db); upload.exec(); } +#endif +#if QT_VERSION > 0x050400 void MainWindow::uploadGoogleDrive() { diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 84e163d0a..7716a3647 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -205,7 +205,9 @@ class MainWindow : public QMainWindow #if QT_VERSION > 0x050000 void uploadDropbox(); void syncDropbox(); +#endif +#if QT_VERSION >= 0x050400 void uploadGoogleDrive(); void syncGoogleDrive(); #endif diff --git a/src/src.pro b/src/src.pro index e7d422754..91c889f97 100644 --- a/src/src.pro +++ b/src/src.pro @@ -519,13 +519,17 @@ equals(CloudDB, active) { greaterThan(QT_MAJOR_VERSION, 4) { - # Features that only work with QT5 or higher + # Features that only work with QT5.0 or higher SOURCES += Cloud/Dropbox.cpp HEADERS += Cloud/Dropbox.h - SOURCES += Cloud/GoogleDrive.cpp - HEADERS += Cloud/GoogleDrive.h SOURCES += Train/Monark.cpp Train/MonarkController.cpp Train/MonarkConnection.cpp HEADERS += Train/Monark.h Train/MonarkController.h Train/MonarkConnection.h + + # GoogleDrive needs QT5.4 or higher + greaterThan(QT_MINOR_VERSION, 3) { + SOURCES += Cloud/GoogleDrive.cpp + HEADERS += Cloud/GoogleDrive.h + } }