Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
Conflicts:
	QEverCloud/headers/generated/services.h
  • Loading branch information
d1vanov committed Dec 7, 2017
2 parents 3c9d979 + 4fc7e58 commit eaab31a
Show file tree
Hide file tree
Showing 49 changed files with 14,991 additions and 6,570 deletions.
67 changes: 67 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
version: '3.0.2-{build}'

branches:
only:
- development
- master

environment:
matrix:
- name: win32
platform: amd64_x86
qt: msvc2015
- name: win64
platform: amd64
qt: msvc2015_64
- name: win32
platform: mingw
qt: mingw492_32

clone_folder: c:\dev\qevercloud

init:
- if %platform%==mingw set PATH=C:\Qt\5.5\%qt%\bin;%PATH%
- if not %platform%==mingw set PATH=C:\Qt\5.7\%qt%\bin;%PATH%
- set ORIGPATH=%PATH%
- if %platform%==mingw (set DEPLOYMENT_TARGET=qevercloud-qt55-%qt%-%APPVEYOR_BUILD_VERSION%_%APPVEYOR_REPO_COMMIT:~0,7%.zip) else (set DEPLOYMENT_TARGET=qevercloud-qt57-%qt%-%APPVEYOR_BUILD_VERSION%_%APPVEYOR_REPO_COMMIT:~0,7%.zip)
- if not %platform%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform%
- if not %platform%==mingw (set makefiles="NMake Makefiles") else (set makefiles="MinGW Makefiles")
- if %platform%==mingw (set use_webkit=1) else (set use_webkit=0)

before_build:
- cd c:\dev\qevercloud
- md build

build_script:
- if %platform%==mingw set PATH=C:\Qt\5.5\%qt%\bin;C:\Qt\Tools\mingw492_32\bin;C:\Program Files (x86)\CMake\bin
- cd build
- if %platform%==mingw cmake .. -G %makefiles% -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="c:/dev/install" -DUSE_QT5_WEBKIT=%use_webkit% -DCMAKE_PREFIX_PATH="C:/Qt/55"
- if not %platform%==mingw cmake .. -G %makefiles% -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="c:/dev/install" -DUSE_QT5_WEBKIT=%use_webkit% -DCMAKE_PREFIX_PATH="C:/Qt/57"
- if not %platform%==mingw (nmake) else (mingw32-make)
- if not %platform%==mingw (nmake install) else (mingw32-make install)
- if %platform%==mingw set PATH=%ORIGPATH%

after_build:
- cd c:\dev
- 7z a %DEPLOYMENT_TARGET% c:\dev\install\*
- cp %DEPLOYMENT_TARGET% %APPVEYOR_BUILD_FOLDER%

artifacts:
- path: '*.zip'
name: archive

deploy:
- provider: GitHub
artifact: archive
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only

test_script:
- cd c:\dev\install\bin
- ..\..\qevercloud\build\QEverCloud\test_QEverCloud.exe

matrix:
fast_finish: true
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ install:
fi
;
else
export DISPLAY=:99.0 &&
sh -e /etc/init.d/xvfb start &&
sudo apt-get -qq update &&
if [ "${COMPILER}" = "g++-4.6" ]; then
sudo apt-get -qq install g++-4.6 gcc-4.6 &&
Expand Down
81 changes: 81 additions & 0 deletions API_breaks_3_to_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# QEverCloud API breaks from major version 3 to major version 4

The API breaks of QEverCloud between major versions 3 and 4 are caused by the migration from Evernote API 1.25 to Evernote API 1.28.
This document attempts to build a comprehensive list of QEverCloud API breaks, however, this list might be incomplete since
Evernote themselves haven't provided any changelog for their API update so far.

## struct User
* added fields:
* `serviceLevel` of `ServiceLevel::type` (new enumeration)
* `photoUrl` of `QString` type
* `photoUrlLastUpdated` of `Timestamp` type
* `accountLimits` of `AccountLimits` type (new struct)
* removed fields:
* `premiumInfo` - it appears the `PremiumInfo` should now be requested from Evernote API separately, if needed

## struct UserAttributes
* added fields:
* `emailAddressLastConfirmed` of `Timestamp` type
* `passwordUpdated` of `Timestamp` type
* `salesforcePushEnabled` of `bool` type
* `shouldLogClientEvent` of `bool` type
* removed fields:
* `taxExempt`

## struct Accounting
* added fields:
* `availablePoints` of `qint32` type - not documented, no clue what it does, probably it just occasionally got to the public API
but only really used by the official Evernote client apps.
* removed fields:
* `uploadLimit` - use that from `User`'s `accountLimits` field instead
* deprecated fields (still present in the API but should not be used):
* `businessId` - use that from `User`'s `businessUserInfo` field instead
* `businessName` - use that from `User`'s `businessUserInfo` field instead
* `businessRole` - use that from `User`'s `businessUserInfo` field instead

## struct LinkedNotebook
* renamed fields:
* `shareKey` was renamed to `sharedNotebookGlobalId`

## struct Notebook
* added fields:
* `recipientSettings` of `SharedNotebookRecipientSettings` type (new struct)

## struct NotebookRestrictions
* added fields:
* `noShareNotesWithBusiness` of `bool` type
* `noRenameNotebook` of `bool` type

## struct SharedNotebookInstanceRestrictions
* renamed enum items:
* `ONLY_JOINED_OR_PREVIEW` was renamed to `ASSIGNED`

## struct SharedNotebook
* added fields:
* `recipientIdentityId` of `IdentityID` type (new typedef for `qint64` type)
* `globalId` of `QString` type
* `sharerUserId` of `UserID` type
* `recipientUsername` of `QString` type
* `recipientUserId` of `UserID` type
* `serviceAssigned` of `Timestamp` type
* removed fields:
* `shareKey` - use `globalId` instead

## struct Note
* added fields:
* `sharedNotes` of `QList<SharedNote>` type (`SharedNote` is a new struct)
* `restrictions` of `NoteRestrictions` type (new struct)
* `limits` of `NoteLimits` type (new struct)

## struct NoteAttributes
* added fields:
* `sharedWithBusiness` of `bool` type
* `conflictSourceNoteGuid` of `QString` type
* `noteTitleQuality` of `qint32` type

## struct ClientUsageMetrics
* this struct was completely removed from Evernote API and seemingly has no replacement. It was not really much useful
for Evernote client apps so it shouldn't be a big loss.

## class UserStore
* Methods refreshAuthentication and refreshAuthenticatonAsync were removed as their counterparts were removed from Evernote API. It is not a big loss since these methods were available only to Evernote internal applications anyway.
53 changes: 32 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
# Changelog

## 4.0.0
* Migrate to Evernote API 1.28 from 1.25. Unfortunately, the changes in Evernote API are quite sufficient and hence
the migration to it has introduced a lot of API breaks in QEverCloud. Please refer to [API breaks from 3 to 4](API_breaks_3_to_4.md)
documentation for details.
* Add new CMake options:
* add QEverCloud's major version as a suffix to the library name
* add QEverCloud's major version as a suffix to the name of the folder with development headers
* build QEverCloud library without OAuth support and thus without QtWebKit/QtWebEngine dependency
* Add new class: `InkNoteImageDownloader` intended, as its name suggests, for downloading the static images generated
from ink notes.

## 3.0.3
* Fix building the pdf version of the doc from latex
* Use three-digit version for the installed library on Linux, have symlink with only the major version number

## 3.0.2
* Add CMake option `USE_QT5_WEBKIT` to build QEverCloud library with Qt5WebKit instead of Qt5WebEngine for Qt >= 5.4
* Add CMake option `USE_QT5_WEBKIT` to build QEverCloud library with Qt5WebKit instead of Qt5WebEngine for Qt >= 5.4.

## 3.0.1
* Add missing globals.cpp to qmake project file
* Add missing implementations of some declared methods in Thumbnail class
* Fix a couple of typos in Thumbnail class' documentation
* Add missing globals.cpp to qmake project file.
* Add missing implementations of some declared methods in Thumbnail class.
* Fix a couple of typos in Thumbnail class' documentation.

## 3.0.0
* The build system was changed from qmake to CMake; qmake .pro file was left within the package for backward compatibility
* Build shared library by default instead of static one
* Add unit test for Optional template class
* Rearrange the location of installed library's headers, now it is dependent on Qt version used to build the library
* The build system was changed from qmake to CMake; qmake .pro file was left within the package for backward compatibility.
* Build shared library by default instead of static one.
* Add unit test for Optional template class.
* Rearrange the location of installed library's headers, now it is dependent on Qt version used to build the library.

## 2.2.1
* Fix a bug with incompatible signal/slot connection signatures for Qt4
* Fix a bug with incompatible signal/slot connection signatures for Qt4.

## 2.2
* The support for Qt 4 was returned back
* Added the option to use classes from QWebEngine component instead of the ones from QtWebKit for OAuth
* The support for Qt 4 was returned back.
* Added the option to use classes from QWebEngine component instead of the ones from QtWebKit for OAuth.

## 2.1
* == and != operators for Evernote structs are available now
* Asynchronous thumbnail download is added
* Special exception types for AUTH_EXPIRED and RATE_LIMIT_REACHED errors
* == and != operators for Evernote structs are available now.
* Asynchronous thumbnail download is added.
* Special exception types for AUTH_EXPIRED and RATE_LIMIT_REACHED errors.
* Move semantics for Optional is implemented. As a result moving is working for Evernote structs under a conforming compiler (and it's NOT VS2012).

## 2.0
Expand All @@ -37,15 +48,15 @@
* Various non-critical fixes and improvements.

## 1.2
* Fixed reported issues when compiling under Qt 4, should be no problems now
* This is the last version then will try to be compatible with Qt 4
* Some optimizations
* Fixed reported issues when compiling under Qt 4, should be no problems now.
* This is the last version then will try to be compatible with Qt 4.
* Some optimizations.

## 1.1
* EvernoteOAuthDialog::open() now works as expected
* qsrand() is no longer called by the library
* Default algorithm for nonce generation can be replaced, see setNonceGenerator
* EvernoteOAuthDialog::open() now works as expected.
* qsrand() is no longer called by the library.
* Default algorithm for nonce generation can be replaced, see setNonceGenerator.

## 1.0
* Initial release
* Initial release.

65 changes: 57 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ SET_POLICIES()

if("${CMAKE_MAJOR_VERSION}" GREATER "2")
project(QEverCloud
VERSION 3.0.3)
VERSION 4.0.0)
else()
project(QEverCloud)
set(PROJECT_VERSION_MAJOR "3")
set(PROJECT_VERSION_MAJOR "4")
set(PROJECT_VERSION_MINOR "0")
set(PROJECT_VERSION_PATCH "3")
set(PROJECT_VERSION_PATCH "0")
set(PROJECT_VERSION_COUNT 3)
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
endif()
Expand All @@ -26,6 +26,7 @@ include(QEverCloudDoxygen)

set(BUILD_DOCUMENTATION ON CACHE BOOL "Build documentation for QEverCloud")
set(BUILD_QCH_DOCUMENTATION OFF CACHE BOOL "Build documentation for QEverCloud in qch format")
set(BUILD_WITH_OAUTH_SUPPORT ON CACHE BOOL "Build QEverCloud with OAuth support")

if(BUILD_DOCUMENTATION)
# set Doxygen documentation properties
Expand Down Expand Up @@ -67,26 +68,74 @@ if(NOT CMAKE_INSTALL_INCLUDEDIR)
set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include")
endif()

if(WIN32 AND NOT CYGWIN)
set(DEF_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/CMake")
else()
set(DEF_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/QEverCloud-${QEVERCLOUD_QT_VERSION}")
if(NOT INSTALL_CMAKE_DIR)
if(WIN32 AND NOT CYGWIN)
set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/CMake")
else()
set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/QEverCloud-${QEVERCLOUD_QT_VERSION}")
endif()
endif()
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")

set(BUILD_SHARED ON CACHE BOOL "Build shared library, otherwise static library")
set(MAJOR_VERSION_LIB_NAME_SUFFIX OFF CACHE BOOL "If on, the project's major version would be added to the library's name as a suffix")
set(MAJOR_VERSION_DEV_HEADERS_FOLDER_NAME_SUFFIX OFF CACHE BOOL "If on, the project's major version would be added to the library's development headers' folder name as a suffix")

if(MSVC)
set(QEVERCLOUD_LIBNAME_PREFIX "lib")
else()
set(QEVERCLOUD_LIBNAME_PREFIX "")
endif()

set(QEVERCLOUD_LIBNAME_SUFFIX "")
if(MAJOR_VERSION_LIB_NAME_SUFFIX)
set(QEVERCLOUD_LIBNAME_SUFFIX "${PROJECT_VERSION_MAJOR}")
endif()

if(QEVERCLOUD_USE_QT_WEB_ENGINE)
set(QEVERCLOUD_USES_QT_WEB_ENGINE "set(QEVERCLOUD_USE_QT_WEB_ENGINE TRUE)")
else()
set(QEVERCLOUD_USES_QT_WEB_ENGINE "set(QEVERCLOUD_USE_QT_WEB_ENGINE FALSE)")
endif()

if(BUILD_WITH_OAUTH_SUPPORT)
set(QEVERCLOUD_HAS_OAUTH "set(QEVERCLOUD_HAS_OAUTH TRUE)")
else()
set(QEVERCLOUD_HAS_OAUTH "set(QEVERCLOUD_HAS_OAUTH FALSE)")
endif()

configure_file(QEverCloud/cmake/modules/QEverCloudBuildTreeSettings.cmake.in
${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}BuildTreeSettings.cmake @ONLY)
configure_file(QEverCloud/cmake/modules/QEverCloudConfig.cmake.in
${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}Config.cmake @ONLY)
configure_file(QEverCloud/cmake/modules/QEverCloudConfigVersion.cmake.in
${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}ConfigVersion.cmake @ONLY)

if(USE_QT5)
file(COPY QEverCloud/cmake/modules/QEverCloudFindQt5DependenciesCore.cmake DESTINATION ${PROJECT_BINARY_DIR})
file(RENAME ${PROJECT_BINARY_DIR}/QEverCloudFindQt5DependenciesCore.cmake ${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}FindQtDependencies.cmake)

if(BUILD_WITH_OAUTH_SUPPORT)
if(USE_QT5_WEBKIT OR (Qt5Core_VERSION VERSION_LESS "5.4.0"))
file(READ QEverCloud/cmake/modules/QEverCloudFindQt5DependenciesWebKit.cmake WEBKIT_DEPS_FILE)
file(APPEND ${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}FindQtDependencies.cmake "${WEBKIT_DEPS_FILE}")
elseif(Qt5Core_VERSION VERSION_LESS "5.6.0")
file(READ QEverCloud/cmake/modules/QEverCloudFindQt5DependenciesWebEngineNoCore.cmake WEBENGINE_NO_CORE_DEPS_FILE)
file(APPEND ${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}FindQtDependencies.cmake "${WEBENGINE_NO_CORE_DEPS_FILE}")
else()
file(READ QEverCloud/cmake/modules/QEverCloudFindQt5DependenciesWebEngineCore.cmake WEBENGINE_CORE_DEPS_FILE)
file(APPEND ${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}FindQtDependencies.cmake "${WEBENGINE_CORE_DEPS_FILE}")
endif()
endif()
else()
if(BUILD_WITH_OAUTH_SUPPORT)
file(COPY QEverCloud/cmake/modules/QEverCloudFindQt4DependenciesWithWebKit.cmake DESTINATION ${PROJECT_BINARY_DIR})
file(RENAME ${PROJECT_BINARY_DIR}/QEverCloudFindQt4DependenciesWithWebKit.cmake ${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}FindQtDependencies.cmake)
else()
file(COPY QEverCloud/cmake/modules/QEverCloudFindQt4Dependencies.cmake DESTINATION ${PROJECT_BINARY_DIR})
file(RENAME ${PROJECT_BINARY_DIR}/QEverCloudFindQt4Dependencies.cmake ${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}FindQtDependencies.cmake)
endif()
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
enable_testing()

Expand Down
Loading

0 comments on commit eaab31a

Please sign in to comment.