Various fixes after code review

Minimum required Qt lowered to 5.5.0
Added CI for Qt 5.5.1 build
Increased C++ standard to C++14
Fixed use of spaces instead of tabs
Removed duplicate constructors
This commit is contained in:
Luca Beldi 2019-01-25 16:28:36 +00:00
parent ee616c2541
commit e113790bbe
12 changed files with 54 additions and 45 deletions

View File

@ -8,6 +8,30 @@ git:
matrix:
fast_finish: true
include:
- name: Ubuntu qmake Qt5.5.1
os: linux
dist: trusty
group: stable
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:beineri/opt-qt551-trusty'
update: true
packages:
- qt55base
- qt55tools
- gcc-6
- g++-6
- libc6-i386
script:
- PATH="/opt/qt55/bin:$PATH"
- CXX="g++-6"
- CC="gcc-6"
- qt55-env.sh
- qmake
- make
- make install
- name: Ubuntu qmake dll
os: linux
dist: xenial

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.3)
set(ads_VERSION "2.3.2")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
@ -8,7 +8,7 @@ set(CMAKE_AUTORCC ON)
project(QtAdvancedDockingSystem VERSION ${ads_VERSION})
option(BUILD_STATIC "Build the static library" OFF)
option(BUILD_EXAMPLES "Build the examples" ON)
set(REQUIRED_QT_VERSION 5.7.0)
set(REQUIRED_QT_VERSION 5.5.0)
find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)

View File

@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.3)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
project(ads_demo VERSION "1.0")
set(REQUIRED_QT_VERSION 5.7.0)
set(REQUIRED_QT_VERSION 5.5.0)
find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)

View File

@ -3,7 +3,7 @@ ADS_OUT_ROOT = $${OUT_PWD}/..
TARGET = AdvancedDockingSystemDemo
DESTDIR = $${ADS_OUT_ROOT}/lib
QT += core gui widgets
CONFIG += c++11
CONFIG += c++14
CONFIG += debug_and_release
DEFINES += QT_DEPRECATED_WARNINGS

View File

@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.3)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
project(ads_example VERSION "1.0")
set(REQUIRED_QT_VERSION 5.7.0)
set(REQUIRED_QT_VERSION 5.5.0)
find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)

View File

@ -5,7 +5,7 @@ QT += core gui widgets
TARGET = Example1
DESTDIR = $${ADS_OUT_ROOT}/lib
TEMPLATE = app
CONFIG += c++11
CONFIG += c++14
CONFIG += debug_and_release
adsBuildStatic {
DEFINES += ADS_STATIC

View File

@ -90,18 +90,6 @@ void hideEmptyParentSplitters(CDockSplitter* Splitter)
}
}
CDockInsertParam::CDockInsertParam(Qt::Orientation orient, bool bottomRight)
: QPair<Qt::Orientation, bool>(orient,bottomRight)
{}
CDockInsertParam::CDockInsertParam(const CDockInsertParam &p)
: QPair<Qt::Orientation, bool>(p)
{}
CDockInsertParam::CDockInsertParam(CDockInsertParam &&p)
: QPair<Qt::Orientation, bool>(std::move(p))
{}
} // namespace internal
} // namespace ads

View File

@ -110,10 +110,7 @@ void hideEmptyParentSplitters(CDockSplitter* FirstParentSplitter);
class CDockInsertParam : public QPair<Qt::Orientation, bool>
{
public:
CDockInsertParam() = default;
CDockInsertParam(Qt::Orientation orient, bool append);
CDockInsertParam(const CDockInsertParam &p);
CDockInsertParam(CDockInsertParam &&p);
using QPair::QPair;
Qt::Orientation orientation() const {return this->first;}
bool append() const {return this->second;}
int insertOffset() const {return append() ? 1 : 0;}

View File

@ -1,5 +1,5 @@
ADS_OUT_ROOT = $${OUT_PWD}/..
CONFIG += c++11
CONFIG += c++14
CONFIG += debug_and_release
TARGET = $$qtLibraryTarget(qtadvanceddocking)
DEFINES += QT_DEPRECATED_WARNINGS