Skip to content

Commit 1646276

Browse files
committed
Initial release
0 parents  commit 1646276

Some content is hidden

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

51 files changed

+2872
-0
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: koppi
2+
custom: 'https://koppi.github.io'

.github/workflows/c-cpp.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
name: ${{ matrix.target }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
target:
16+
- ubuntu-latest
17+
runs-on: ${{ matrix.target }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Install devscripts
22+
run: |
23+
sudo apt -qq update
24+
sudo apt -y dist-upgrade
25+
sudo DEBIAN_FRONTEND=noninteractive apt install -qq devscripts equivs lintian
26+
mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends"
27+
28+
- name: Build source package
29+
env:
30+
DEBFULLNAME: "Jakob Flierl"
31+
DEBEMAIL: "jakob.flierl@gmail.com"
32+
run: |
33+
export TARGET=$(. /etc/lsb-release && echo $DISTRIB_CODENAME)
34+
git fetch --unshallow
35+
git fetch --tags
36+
VERSION="$(git describe --tags --always | sed -e "s/^v//" -e "s/-/+git/")"
37+
dch --create \
38+
--distribution ${TARGET} \
39+
--package libqgcodeeditor \
40+
--newversion ${VERSION}~${TARGET}1 \
41+
"Automatic build from Github"
42+
debuild -S -sa -us -uc -d
43+
44+
- name: Build deb packages
45+
run: |
46+
dpkg-buildpackage -b -rfakeroot -us -uc
47+
48+
- name: Install deb packages
49+
run: |
50+
sudo dpkg -i ../libqgcodeeditor*deb
51+
sudo apt -y -f install
52+
53+
- name: Run lintian
54+
run: |
55+
lintian ../libqgcodeeditor*deb | lintian-info
56+
57+
- name: Upload artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: ${{ matrix.target }}
61+
if-no-files-found: error
62+
path: |
63+
*.buildinfo
64+
*.changes
65+
*.dsc
66+
*.tar.*
67+
*.deb
68+
~/**/*/*.buildinfo
69+
~/**/*/*.changes
70+
~/**/*/*.dsc
71+
~/**/*/*.tar.*
72+
~/**/*/*.deb
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+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '33 7 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'cpp' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
run: |
57+
sudo apt -qq update
58+
sudo apt -y dist-upgrade
59+
sudo apt -y install -qq devscripts equivs lintian qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
60+
mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends"
61+
git clone --depth 1 https://github.com/QGCoder/libqgcodeeditor
62+
cd libqgcodeeditor
63+
mk-build-deps -i -s sudo -t "apt --yes --no-install-recommends"
64+
dpkg -l | grep qt
65+
debuild --preserve-env --preserve-envvar PATH -i -us -uc -b
66+
sudo dpkg -i ../libqgcodeeditor*deb
67+
sudo apt -y -f install
68+
cd ..
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

.github/workflows/label.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler
7+
8+
name: Labeler
9+
on: [pull_request]
10+
11+
jobs:
12+
label:
13+
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
steps:
20+
- uses: actions/labeler@v2
21+
with:
22+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.qmake.cache
2+
QGCodeEditor/.moc
3+
QGCodeEditor/.obj
4+
QGCodeEditor/Makefile
5+
QGCodeEditor/libQGCodeEditor.prl
6+
QGCodeEditor/libQGCodeEditor.so*
7+
8+
debian/debhelper-build-stamp
9+
debian/files
10+
debian/libqgcodeeditor-dev-qt4.debhelper.log
11+
debian/libqgcodeeditor-dev-qt4.substvars
12+
debian/libqgcodeeditor-dev-qt4/
13+
debian/libqgcodeeditor-dev.debhelper.log
14+
debian/libqgcodeeditor-dev.substvars
15+
debian/libqgcodeeditor-dev/
16+
debian/libqgcodeeditor-doc.debhelper.log
17+
debian/libqgcodeeditor-doc.substvars
18+
debian/libqgcodeeditor-doc/
19+
debian/libqgcodeeditor-qt4.debhelper.log
20+
debian/libqgcodeeditor-qt4.substvars
21+
debian/libqgcodeeditor-qt4/
22+
debian/libqgcodeeditor.debhelper.log
23+
debian/libqgcodeeditor.substvars
24+
debian/libqgcodeeditor/
25+
debian/tmp/
26+
debian/.debhelper/
27+
28+
*.o
29+
moc_*.cpp
30+
31+
DesignerPlugin/Makefile
32+
DesignerPlugin/libqgcodeeditorplugin.so
33+
Makefile
34+
examples/Makefile
35+
examples/contextMenu/Makefile
36+
examples/contextMenu/contextMenu
37+
examples/contextMenu/ui_mainwindow.h
38+
examples/simple/Makefile
39+
examples/simple/simple
40+
examples/simple/ui_mainwindow.h
41+
examples/pipe/pipe
42+
examples/pipe/ui_mainwindow.h
43+
44+
.qmake.stash
45+
DesignerPlugin/moc_predefs.h
46+
examples/contextMenu/moc_predefs.h
47+
examples/pipe/moc_predefs.h
48+
examples/simple/moc_predefs.h
49+
50+
build-library-stamp
51+
debian/libqgcodeeditor-dbg.debhelper.log
52+
debian/libqgcodeeditor-dbg.substvars
53+
debian/libqgcodeeditor-dbg/
54+
debian/libqgcodeeditor-designer-dbg.debhelper.log
55+
debian/libqgcodeeditor-designer-dbg.substvars
56+
debian/libqgcodeeditor-designer-dbg/
57+
debian/libqgcodeeditor-designer.debhelper.log
58+
debian/libqgcodeeditor-designer.substvars
59+
debian/libqgcodeeditor-designer/
60+
libqgcodeeditor-build-deps_0.1.0-2_all.deb
61+
libqgcodeeditor-build-deps_0.1.0-2_amd64.buildinfo
62+
libqgcodeeditor-build-deps_0.1.0-2_amd64.changes
63+
64+
CMakeCache.txt
65+
CMakeFiles/
66+
QGCodeEditor/CMakeFiles/
67+
QGCodeEditor/cmake_install.cmake
68+
cmake_install.cmake

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.28)
2+
project(QGCodeEditor)
3+
4+
set(CMAKE_CXX_STANDARD 17)
5+
6+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
7+
8+
set(CMAKE_AUTOMOC ON)
9+
set(CMAKE_AUTORCC ON)
10+
set(CMAKE_AUTOUIC ON)
11+
12+
add_subdirectory(QGCodeEditor/)
13+

DesignerPlugin/DesignerPlugin.pro

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
TEMPLATE = lib
2+
3+
TARGET = qgcodeeditorplugin
4+
CONFIG *= warn_on plugin dll
5+
6+
INCLUDEPATH += ../QGCodeEditor
7+
DEPENDPATH += ../QGCodeEditor
8+
9+
LIBS += -L ../QGCodeEditor -lQGCodeEditor
10+
11+
QMAKE_CFLAGS_RELEASE -= -g
12+
QMAKE_CXXFLAGS_RELEASE -= -g
13+
14+
QT_VERSION=$$[QT_VERSION]
15+
16+
message(Plugins: $$[QT_INSTALL_PLUGINS])
17+
18+
PREFIX=$$[QT_INSTALL_PLUGINS]
19+
20+
target.path = $${PREFIX}/designer
21+
INSTALLS += target
22+
23+
HEADERS = QGCodeEditorPlugin.h QGCodeEditorWidget.h
24+
SOURCES = QGCodeEditorPlugin.cpp QGCodeEditorWidget.cpp
25+
26+
contains( QT_VERSION, "^5.*" ) {
27+
QT *= designer
28+
CONFIG *= release
29+
OTHER_FILES += designerplugindescription.json
30+
} else {
31+
contains( QT_VERSION, "^4.*" ) {
32+
CONFIG *= designer release
33+
} else {
34+
HEADERS = qgcodeeditorPlugin.Qt3.h // as of 2016 Qt3 is deprectated
35+
SOURCES = qgcodeeditorPlugin.Qt3.cpp // add these two files for Qt3 if needed
36+
}
37+
}
38+
39+
greaterThan(QT_MAJOR_VERSION,4):greaterThan(QT_MINOR_VERSION,4) {
40+
QT *= uiplugin
41+
}

0 commit comments

Comments
 (0)