Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
312d984
Req. Qt5.15 in preparation to support for Qt6
tibirna Jan 28, 2024
1cb9acf
port to qt6: QRegExp -> QRegularExpression
tibirna Dec 21, 2024
7b3e0be
Convert all .ui files to Qt6
tibirna Dec 21, 2024
4437370
Merge branch 'master' into compile-w-qt6
tibirna Apr 26, 2025
a75ea1a
Instruct CMake to require Qt6
tibirna Apr 26, 2025
501edd9
toTime_t -> toSecsSinceEpoch
tibirna Apr 26, 2025
17a6611
Remove conflicting declaration of QPair
tibirna Apr 26, 2025
bbf4ebc
Remove redecl of QStringList
tibirna Apr 26, 2025
bcb84cf
FIX type mismatch in std::min
tibirna Apr 26, 2025
9ae01de
QPoint::pos() to QPoint.position().toPoint()
tibirna Apr 26, 2025
a7f2fd4
QEvent::keyboardModifiers -> QEvent::modifiers
tibirna Apr 26, 2025
879df64
FIX compile error from bad use of regex wildcard
tibirna Apr 26, 2025
609a249
Fix use of QRegularExpression
hartwork May 1, 2025
07decc2
Resolve use of QDateTime::setTime_t for Qt 6
hartwork May 1, 2025
a4e132f
build.yaml: Migrate CI from Qt 5 to Qt 6
hartwork May 1, 2025
4d40ad9
CMake: Lower minimum Qt version to 6.2.4 for Ubuntu 22.04
hartwork May 1, 2025
399d1eb
Add Core5Compat to allow use of QTextCodec with Qt 6
hartwork May 1, 2025
4257cac
Merge pull request #153 from hartwork/compile-w-qt6-PLUS-experiments
tibirna May 2, 2025
42e55b7
Use the new QMessageBox API --> avoids deprecation warnings at compil…
tibirna May 3, 2025
22990c7
Avoid incorrect type conversion warnings
tibirna May 3, 2025
5d539e3
{QVariant}.type() -> {QVariant}.metaType().id()
tibirna May 3, 2025
0e6240a
UseHighDpiPixmaps is now the default (remove line to to remove warning)
tibirna May 3, 2025
ee33571
Merge branch 'master' into compile-w-qt6
tibirna May 3, 2025
459998e
Update Sebastian's copyright years
tibirna May 3, 2025
c14304e
Restore ability to compile w/ Qt5
tibirna May 5, 2025
dcd9ba0
Merge (and solve conflicts with) latest master, including support for…
tibirna May 5, 2025
20c8d01
build.yaml: Build with both Qt 5 and Qt 6
hartwork Jul 7, 2025
d09dc22
Merge pull request #159 from hartwork/compile-w-qt6-or-qt5
tibirna Jul 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,39 @@ on:

jobs:
build:
name: Build (Linux, Ubuntu 22.04 LTS)
name: Build (Linux, Qt ${{ matrix.qt_major }}, Ubuntu 22.04 LTS)
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- qt_major: 5
packages: qtbase5-dev
- qt_major: 6
packages: libgl1-mesa-dev libglx-dev libqt6core5compat6-dev qt6-base-dev
steps:
- name: 'Install build dependencies'
env:
packages: ${{ matrix.packages }}
run: |-
set -e
sudo apt-get update
sudo apt-get install --yes --no-install-recommends \
build-essential \
cmake \
qtbase5-dev
${packages}

- name: 'Checkout Git branch'
uses: actions/checkout@v2.0.0

- name: 'Configure'
env:
qt_major: ${{ matrix.qt_major }}
run: |-
set -e
mkdir build
cd build
cmake ..
cmake -DQT_PACKAGE="Qt${qt_major}" ..

- name: 'Build'
run: |-
Expand Down
65 changes: 42 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,49 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

option(UseQt5 "Use Qt5?" ON)
if (UseQt5)
set(QT_MIN_VERSION 5.11.0)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Gui Widgets)
set(QT_LIBRARIES Qt5::Widgets)

macro(qt_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
macro(qt_add_resources)
qt5_add_resources(${ARGN})
endmacro()
else()
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui)
include(${QT_USE_FILE})

macro(qt_wrap_ui)
qt4_wrap_ui(${ARGN})
endmacro()
macro(qt_add_resources)
qt4_add_resources(${ARGN})
endmacro()
endif()
# Select the Qt major version and its dependencies\
set(QT_PACKAGE "Qt6" CACHE STRING "Major Qt version")
set_property(CACHE QT_PACKAGE PROPERTY STRINGS "Qt6" "Qt5" "Qt4")

find_package(QT NAMES ${QT_PACKAGE} REQUIRED)
set(QT Qt${QT_VERSION_MAJOR})
message(STATUS "Using ${QT}")

if (QT_VERSION_MAJOR EQUAL 6)
set(QT_MIN_VERSION 6.2.4)
set(QT_MODULES Core Gui Widgets Core5Compat)
set(QT_LIBRARIES Qt6::Widgets Qt6::Core5Compat)
elseif (QT_VERSION_MAJOR EQUAL 5)
set(QT_MIN_VERSION 5.11.0)
set(QT_MODULES Core Gui Widgets)
set(QT_LIBRARIES Qt5::Widgets)
elseif (QT_MAJOR_VERSION EQUAL 4)
set(QT_MODULES QtCore QtGui)
include(${QT_USE_FILE})
endif()

find_package(${QT} ${QT_MIN_VERSION} REQUIRED COMPONENTS ${QT_MODULES})

if (QT_VERSION VERSION_LESS 5.15)
if (QT_VERSION_MAJOR EQUAL 4)
macro(qt_wrap_ui)
qt4_wrap_ui(${ARGN})
endmacro()
macro(qt_add_resources)
qt4_add_resources(${ARGN})
endmacro()
elseif(QT_VERSION_MAJOR EQUAL 5)
macro(qt_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
macro(qt_add_resources)
qt5_add_resources(${ARGN})
endmacro()
endif()
endif()


# Sources
include_directories(
${CMAKE_SOURCE_DIR}/src
)
Expand Down
4 changes: 4 additions & 0 deletions src/FileHistory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ void FileHistory::clear(bool complete) {
rowData.clear();

if (testFlag(REL_DATE_F)) {
#if QT_VERSION >= 0x06000
secs = QDateTime::currentDateTime().toSecsSinceEpoch();
#else
secs = QDateTime::currentDateTime().toTime_t();
#endif
#ifdef HAVE_COLUMNTYPE
headerInfo[ColumnType::TIME_COL] = "Last Change";
#else
Expand Down
Loading
Loading