Skip to content

Commit 4a29012

Browse files
committed
Initial commit of 0.9.x
Signed-off-by: Mart Somermaa <[email protected]>
1 parent cd006dc commit 4a29012

File tree

92 files changed

+5647
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+5647
-1
lines changed

.clang-format

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
BasedOnStyle: WebKit
2+
3+
Standard: Cpp11
4+
ColumnLimit: 100
5+
6+
# Disable reflow of qdoc comments: indentation rules are different.
7+
# Translation comments are also excluded
8+
CommentPragmas: "^!|^:"
9+
10+
# We want & and * to be attached to the type
11+
PointerBindsToType: true
12+
13+
# We want long lines to break before the operators, but not before a '='
14+
BreakBeforeBinaryOperators: NonAssignment
15+
16+
# Braces are usually attached, but not after functions or classes declaration
17+
BreakBeforeBraces: Custom
18+
BraceWrapping:
19+
AfterClass: true
20+
AfterControlStatement: false
21+
AfterEnum: false
22+
AfterFunction: true
23+
AfterNamespace: true
24+
AfterObjCDeclaration: false
25+
AfterStruct: true
26+
AfterUnion: false
27+
BeforeCatch: false
28+
BeforeElse: false
29+
IndentBraces: false
30+
31+
AlignAfterOpenBracket: true
32+
AlwaysBreakTemplateDeclarations: true
33+
AllowShortFunctionsOnASingleLine: Inline
34+
SpaceInEmptyBlock: false
35+
FixNamespaceComments: true
36+
Cpp11BracedListStyle: true
37+
BreakConstructorInitializers: AfterColon
38+
39+
SortIncludes: false
40+
41+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]

.gitattributes

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Assures that line endings are consistently normalized.
2+
#
3+
# Comments:
4+
# - use filter='...' to pass through external filters, e.g. clang-format
5+
6+
# --- Source files
7+
*.c text
8+
*.cc text
9+
*.cpp text
10+
*.cxx text
11+
*.h text
12+
*.hh text
13+
*.hpp text
14+
*.ipp text
15+
16+
*.js text
17+
*.pl text
18+
*.py text
19+
20+
# --- Resource files
21+
*.rc text eol=crlf
22+
*.rc2 text eol=crlf
23+
24+
# --- Windows and VS-specific files
25+
*.bat text eol=crlf
26+
*.cmd text eol=crlf
27+
*.cpy text eol=crlf
28+
*.ddf text eol=crlf
29+
*.def text eol=crlf
30+
*.inf text eol=crlf
31+
*.msbuild text eol=crlf
32+
*.sln text eol=crlf
33+
*.vcproj text eol=crlf
34+
*.vcxproj text eol=crlf
35+
36+
# --- Text files
37+
*.htm text
38+
*.html text
39+
*.md text
40+
*.properties text
41+
*.rst text
42+
*.txt text
43+
*.xml text
44+
45+
# --- Binary files
46+
*.bmp binary
47+
*.dll binary
48+
*.exe binary
49+
*.gif binary
50+
*.ico binary
51+
*.jpg binary
52+
*.lib binary
53+
*.png binary
54+
55+
# --- git files
56+
.gitignore text eol=lf
57+
.gitattributes text eol=lf
58+
.clang-format text eol=lf
59+
60+
# --- Makefiles
61+
Makefile text eol=lf
62+
Makefile.dep text eol=lf
63+
64+
# --- CMake files
65+
CMakeLists.txt text
66+
67+
# --- Qt files
68+
*.qml text eol=lf
69+
*.qrc text eol=lf
70+
*.pro text eol=lf
71+
72+
# --- Shell scripts, git hooks
73+
*.sh text eol=lf
74+
commit-msg text eol=lf
75+
pre-commit text eol=lf
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
# ******** NOTE ********
12+
13+
name: CodeQL code analysis
14+
15+
on:
16+
push:
17+
branches: [ main ]
18+
pull_request:
19+
# The branches below must be a subset of the branches above
20+
branches: [ main ]
21+
schedule:
22+
- cron: '18 17 * * 4'
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language: [ 'cpp' ]
34+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
35+
# Learn more...
36+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
41+
with:
42+
submodules: recursive
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# cmake ..
68+
# cmake --build .
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CMake (Ubuntu Linux)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: RelWithDebInfo
7+
QT_QPA_PLATFORM: offscreen
8+
DEBIAN_FRONTEND: noninteractive
9+
DEBFULLNAME: GitHub build
10+
DEBEMAIL: github-action@github
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
container: mrts/qt-cmake-gtest-valgrind-ubuntu
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: recursive
21+
22+
- name: Create build directory
23+
run: mkdir build
24+
25+
- name: Configure CMake
26+
working-directory: ${{github.workspace}}/build
27+
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
28+
29+
- name: Build
30+
working-directory: ${{github.workspace}}/build
31+
run: |
32+
cmake --build . --config $BUILD_TYPE
33+
cmake --build . --config $BUILD_TYPE --target installer
34+
35+
- name: Test
36+
working-directory: ${{github.workspace}}/build
37+
run: ctest -V -C $BUILD_TYPE

.github/workflows/cmake-macos.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CMake (macOS)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: RelWithDebInfo
7+
OPENSSL_ROOT_DIR: /usr/local/opt/openssl
8+
Qt5_DIR: /usr/local/opt/qt
9+
QT_QPA_PLATFORM: offscreen
10+
11+
jobs:
12+
build:
13+
runs-on: macos-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
with:
19+
submodules: recursive
20+
21+
- name: Install libraries
22+
run: |
23+
brew install web-eid/gtest/gtest qt
24+
ln -sf /usr/local/Cellar/[email protected]/1.1.1* /usr/local/opt/openssl
25+
26+
- name: Create build directory
27+
run: mkdir build
28+
29+
- name: Configure CMake
30+
working-directory: ${{github.workspace}}/build
31+
run: cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 ..
32+
33+
- name: Build
34+
working-directory: ${{github.workspace}}/build
35+
run: |
36+
cmake --build . --config ${BUILD_TYPE}
37+
cmake --build . --config ${BUILD_TYPE} --target installer
38+
39+
- name: Test
40+
working-directory: ${{github.workspace}}/build
41+
run: ctest -V -C ${BUILD_TYPE}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CMake (Windows)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: RelWithDebInfo
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
with:
16+
submodules: recursive
17+
18+
- name: Prepare vcpkg and libraries
19+
uses: lukka/run-vcpkg@v6
20+
with:
21+
vcpkgArguments: gtest:x64-windows openssl:x64-windows qt5-base[core]:x64-windows
22+
vcpkgTriplet: x64-windows
23+
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
24+
vcpkgGitCommitId: ec6fe06e8da05a8157dc8581fa96b36b571c1bd5
25+
26+
- name: Create build directory
27+
run: mkdir build
28+
29+
- name: Configure CMake
30+
working-directory: ${{github.workspace}}/build
31+
run: cmake -A x64 "-DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_BUILD_TYPE=${env:BUILD_TYPE}" ..
32+
33+
- name: Build
34+
working-directory: ${{github.workspace}}/build
35+
run: |
36+
cmake --build . --config ${env:BUILD_TYPE}
37+
cmake --build . --config ${env:BUILD_TYPE} --target installer
38+
39+
- name: Test
40+
working-directory: ${{github.workspace}}/build
41+
run: ctest -V -C ${env:BUILD_TYPE}

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
*.swp
2+
*.tmp
3+
tags
4+
Makefile
5+
.qmake*
6+
*.o
7+
*.a
8+
moc_*
9+
*.moc
10+
*.user
11+
*.autosave
12+
target_wrapper.sh
13+
qrc_qml.cpp
14+
build/
15+
src/app/web-eid
16+
tests-build/
17+
tests/tests/web-eid-tests
18+
build-web-eid-*/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "lib/libelectronic-id"]
2+
path = lib/libelectronic-id
3+
url = ../libelectronic-id

CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cmake_minimum_required(VERSION 3.8.0)
2+
if(POLICY CMP0092)
3+
cmake_policy(SET CMP0092 NEW)
4+
endif()
5+
6+
if($ENV{BUILD_NUMBER})
7+
set(BUILD_NUMBER $ENV{BUILD_NUMBER})
8+
elseif($ENV{CI_PIPELINE_IID})
9+
set(BUILD_NUMBER $ENV{CI_PIPELINE_IID})
10+
else()
11+
set(BUILD_NUMBER 0)
12+
endif()
13+
project(web-eid VERSION 0.9.3.${BUILD_NUMBER})
14+
set(FIREFOX_UUID "{89bcad3c-5c95-4a6c-a5a5-64da932f6bf7}" CACHE STRING "Firefox Extension UUID")
15+
set(FIREFOX_URL "https://web-eid.eu/files/firefox/web-eid-webextension-latest.xpi" CACHE STRING "Mozilla AMO URL")
16+
17+
find_package(Qt5 COMPONENTS Core Widgets Network Test LinguistTools REQUIRED)
18+
19+
add_subdirectory(lib/libelectronic-id)
20+
21+
set(CMAKE_AUTOMOC ON)
22+
add_subdirectory(src/ui)
23+
add_subdirectory(src/controller)
24+
add_subdirectory(src/app)
25+
26+
enable_testing()
27+
add_subdirectory(tests/mock-ui)
28+
add_subdirectory(tests/tests)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 eID on platform Web
3+
Copyright (c) 2020 The Web eID Project
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)