Skip to content

Commit af5813b

Browse files
committed
upgrade to Qt6
1 parent cad8924 commit af5813b

File tree

11 files changed

+73
-655
lines changed

11 files changed

+73
-655
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

CMakeLists.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(
4+
Geist
5+
VERSION 0.1.0
6+
LANGUAGES CXX
7+
)
8+
9+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
10+
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
11+
12+
set(CMAKE_AUTOMOC ON)
13+
set(CMAKE_AUTOUIC ON)
14+
set(CMAKE_CXX_STANDARD 17)
15+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
16+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
17+
18+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
19+
set(NO_CACHEGEN "NO_CACHEGEN")
20+
endif()
21+
22+
include(FeatureSummary)
23+
24+
find_package(
25+
Qt6
26+
COMPONENTS Core Widgets Core5Compat
27+
REQUIRED
28+
)
29+
30+
include_directories(src)
31+
32+
set(PROJECT_SOURCES
33+
src/files.cpp
34+
src/highlighter.cpp
35+
src/files.h
36+
src/highlighter.h
37+
src/main.cpp
38+
src/mainwindow.cpp
39+
src/mainwindow.ui
40+
src/mainwindow.h
41+
src/search.cpp
42+
src/utils/conversion.cpp
43+
src/utils/templates.cpp
44+
src/utils/conversion.h
45+
src/utils/templates.h
46+
src/widgets/geisttextedit.cpp
47+
src/widgets/geisttextedit.h
48+
)
49+
50+
qt_add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES})
51+
target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core Qt::Widgets Qt::Core5Compat)
52+
target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
53+
54+
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Try it online](https://img.shields.io/badge/Try%20it%20online!-informational)](https://wasm-apps.netlify.app/geist/)
44

5-
Geist is an all purpose text/code editor written in C++ and using the Qt framework.
5+
Geist is an all purpose text/code editor written in C++ and using the Qt6 framework.
66

77
## Screenshot
88
![Geist](https://github.com/jubal-R/Geist/blob/master/Screenshots/geist.png)
@@ -20,26 +20,33 @@ Note: Font settings to be added in the future
2020
- Anonymous Pro - http://www.marksimonson.com/fonts/view/anonymous-pro
2121

2222
## Dependencies
23-
qt5-default qt5-qmake
23+
24+
- Qt6 {Core, Widgets & Core5Compat (QRegExp)}
25+
- CMake
2426

2527
## Building Geist
26-
`git clone https://github.com/jubal-R/Geist.git`
27-
`mkdir build`
28-
`cd build`
29-
`qmake ../Geist/Geist.pro`
30-
`make`
28+
29+
```bash
30+
git clone https://github.com/jubal-R/Geist.git
31+
cd Geist
32+
cmake -B build -DCMAKE_BUILD_TYPE=RelMinSize
33+
cmake --build build --config release --parallel
34+
```
3135

3236
## Features To Be Added
37+
3338
- Additional preference options
3439
- Auto-completion
3540

3641
## License
42+
3743
Geist - All purpose text/code editor Copyright (C) 2017
3844
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
3945
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
4046
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
4147

4248
## Acknowledgements
49+
4350
highlighter.cpp and highlighter.h
4451
Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
4552
Full copyright notice is maintained within these files.

src/Geist.pro

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Geist.pro.user

Lines changed: 0 additions & 338 deletions
This file was deleted.

src/Geist.pro.user.2cbb2e6.4.8-pre1

Lines changed: 0 additions & 271 deletions
This file was deleted.

src/highlighter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include <QtGui>
2-
32
#include "highlighter.h"
43

54
Highlighter::Highlighter(QString filetype, QString theme, QTextDocument *parent)

src/highlighter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <QSyntaxHighlighter>
4545
#include <QHash>
4646
#include <QTextCharFormat>
47+
#include <QRegExp>
4748

4849
class QTextDocument;
4950

src/mainwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ void MainWindow::setTabWidth(int width){
11501150

11511151
for(int i = 0; i < ui->tabWidget->count(); i++){
11521152
ui->tabWidget->setCurrentIndex(i);
1153-
currentEditorWidget->setTabStopWidth(width * metrics.width(' ') );
1153+
currentEditorWidget->setTabStopDistance(width * metrics.maxWidth() );
11541154
}
11551155

11561156
ui->tabWidget->setCurrentIndex(current);

src/mainwindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define MAINWINDOW_H
33

44
#include <QMainWindow>
5-
#include <highlighter.h>
5+
#include "highlighter.h"
66
#include <QShortcut>
77
#include "QSettings"
88
#include <QPlainTextEdit>

0 commit comments

Comments
 (0)