GoogleDrive needs QT 5.4 or higher

.. so update in src.pro and MainWindow.
This commit is contained in:
Mark Liversedge
2016-03-02 07:58:46 +00:00
parent e4f815e075
commit 82fe34affc
3 changed files with 17 additions and 7 deletions

View File

@@ -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()
{

View File

@@ -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

View File

@@ -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
}
}