Merge branch 'master' into add_qt6_compatibility

This commit is contained in:
jkriege2 2022-04-21 12:15:15 +02:00
commit 62adbd8036
8 changed files with 73 additions and 146 deletions

68
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,68 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '43 13 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Install dependencies
run: sudo apt -y install build-essential cmake mesa-common-dev libglu1-mesa-dev libfontconfig1 qt5-qmake qtbase5-dev-tools qt5-default libqt5opengl5-dev qtdeclarative5-dev libqt5svg5-dev libqt5x11extras5-dev
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Build JKQtPlotter
run: |
mkdir build
cd build
cmake --version
cmake -G "Unix Makefiles" "-DCMAKE_BUILD_TYPE=Release" ..
cmake --build . --config "Release"
cd ..
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@ -1,91 +0,0 @@
language: cpp
sudo: false
compiler:
- gcc
- clang
os:
- linux
- osx
dist: focal
osx_image: xcode8.3
matrix:
exclude:
# Disable all automatic entries in the test matrix
- compiler: clang
- compiler: gcc
- os: osx
- os: linux
include:
# Explicitly add tests that we want to run
- env: BUILD_DOXYGEN="yes"
compiler: gcc
os: linux
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
- clang-9
- libclang-9-dev
- libclang-cpp9
install:
- pwd
- doxygen --version
############################################################################
# All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
############################################################################
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
############################################################################
# Install a recent Doxygen
############################################################################
- DOXYGEN_URL="https://github.com/jkriege2/doxygen_bin_mirror/raw/main/doxygen-1.9.3.linux.bin.tar.gz"
- mkdir doxygen
- travis_retry wget -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen
- export PATH=${DEPS_DIR}/doxygen/bin:${PATH}
- doxygen --version
script:
- pwd
- cd ${TRAVIS_BUILD_DIR}
- cd doc
- doxygen --version
- doxygen Doxyfile
- echo "" > html/.nojekyll
- compiler: clang
os: osx
- compiler: clang
os: linux
addons:
apt:
packages:
- libglu1-mesa-dev
- compiler: gcc
os: linux
addons:
apt:
packages:
- libglu1-mesa-dev
install:
- source ci/install_travis.sh
script:
- ci/test_travis.sh
notifications:
email: false
deploy:
provider: pages
verbose: true
deployment_file: true
skip_cleanup: true
local_dir: doc/html
github_token: $GH_REPO_TOKEN
on:
branch: master
condition: $BUILD_DOXYGEN = yes

View File

@ -10,8 +10,7 @@ This software is licensed under the term of the [GNU Lesser General Public Licen
[![Qt5](https://img.shields.io/badge/Qt-5-brightgreen)](https://doc.qt.io/qt-5/)
[![Documentation](https://img.shields.io/badge/documentation-online-blue)](http://jkriege2.github.io/JKQtPlotter/index.html)
[[![Build status](https://ci.appveyor.com/api/projects/status/vq2o9pfi97isxm2a?svg=true)](https://ci.appveyor.com/project/jkriege2/jkqtplotter)
![CI: Documentation/Linux/MacOX Build](https://img.shields.io/travis/jkriege2/JKQtPlotter/master?label=CI%3A%20Documentation%2FLinux%2FMacOX%20Build)](https://travis-ci.org/jkriege2/JKQtPlotter)
[![Build status](https://ci.appveyor.com/api/projects/status/vq2o9pfi97isxm2a?svg=true)](https://ci.appveyor.com/project/jkriege2/jkqtplotter)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/jkriege2/JKQtPlotter)](https://github.com/jkriege2/JKQtPlotter/pulse)
[![Last Commit](https://img.shields.io/github/last-commit/jkriege2/JKQtPlotter)](https://github.com/jkriege2/JKQtPlotter/pulse)

View File

@ -1,37 +0,0 @@
#!/usr/bin/env bash
# Exit on error
set -e
# Echo each command
set -x
export SOURCE_DIR=`pwd`
export our_install_dir="$HOME/our_usr"
if [[ ! -d $HOME/conda_root/pkgs ]]; then
rm -rf $HOME/conda_root
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
bash miniconda.sh -b -p $HOME/conda_root
fi
export PATH="$HOME/conda_root/bin:$PATH"
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge --force
# Useful for debugging any issues with conda
conda info -a
conda_pkgs="qt cmake opencv doxygen cimg"
conda create -q -p $our_install_dir ${conda_pkgs}
# Since this script is getting sourced, remove error on exit
set +e
set +x
source activate $our_install_dir
cd $SOURCE_DIR;

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
# Exit on error
set -e
# Echo each command
set -x
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..
cmake --build . --target install

View File

@ -4,7 +4,6 @@ function(jkqtplotter_deployqt TARGET_NAME)
get_target_property(_qmake_executable Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
set(WINDEPLOYQTOPTION "--release")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -22,8 +21,8 @@ function(jkqtplotter_deployqt TARGET_NAME)
COMMAND "${CMAKE_COMMAND}" -E
env PATH="${CMAKE_CXX_COMPILER_BINPATH}\;${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}"
--compiler-runtime
-xml
-printsupport
-xml
-printsupport
${WINDEPLOYQTOPTION}
\"$<TARGET_FILE:${TARGET_NAME}>\"
COMMENT "Running windeployqt ... "

View File

@ -28,7 +28,7 @@
#include <QSvgGenerator>
#include <QDebug>
#include <QElapsedTimer>
#include <QPrintPreviewWidget>
#include <QtPrintSupport/QPrintPreviewWidget>
#include <QDialog>
#include "jkqtplotter/jkqtpbaseplotter.h"
#include "jkqtplotter/gui/jkqtpgraphsmodel.h"

View File

@ -34,7 +34,7 @@
#include <QMap>
#include <QVector>
#include <QPair>
#include <QPrintPreviewWidget>
#include <QtPrintSupport/QPrintPreviewWidget>
#include <QDoubleSpinBox>
#include <QLabel>
#include <QPointer>