From 581fa38eeb36098d8a96c6443c46eaa5e6f02bc6 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Tue, 29 Sep 2015 09:22:39 +0100 Subject: [PATCH] Fix Dropbox compile error on SECRET/ID .. if the GC_DROPBOX_CLIENT_ID and SECRET are not defined in gcconfig.pri then the OAuthDialog.cpp needs to still compile ! --- src/OAuthDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OAuthDialog.cpp b/src/OAuthDialog.cpp index 4e16f44d1..ee2f1dcbd 100644 --- a/src/OAuthDialog.cpp +++ b/src/OAuthDialog.cpp @@ -66,7 +66,9 @@ OAuthDialog::OAuthDialog(Context *context, OAuthSite site) : urlstr = QString("https://www.dropbox.com/1/oauth2/authorize?"); +#ifdef GC_DROPBOX_CLIENT_ID urlstr.append("client_id=").append(GC_DROPBOX_CLIENT_ID).append("&"); +#endif urlstr.append("redirect_uri=https://goldencheetah.github.io/blank.html&"); urlstr.append("response_type=code&"); urlstr.append("force_reapprove=true"); @@ -221,7 +223,9 @@ OAuthDialog::urlChanged(const QUrl &url) urlstr = QString("https://api.dropboxapi.com/1/oauth2/token?"); urlstr.append("redirect_uri=https://goldencheetah.github.io/blank.html&"); params.addQueryItem("grant_type", "authorization_code"); +#ifdef GC_DROPBOX_CLIENT_ID params.addQueryItem("client_id", GC_DROPBOX_CLIENT_ID); +#endif #ifdef GC_DROPBOX_CLIENT_SECRET params.addQueryItem("client_secret", GC_DROPBOX_CLIENT_SECRET); #endif