Skip to content

Commit c4cd957

Browse files
committed
qt6 support
1 parent be77e90 commit c4cd957

Some content is hidden

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

60 files changed

+392
-291
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ project(qtnote VERSION ${QTNOTE_VERSION})
2323

2424
option(QTNOTE_DEVEL "Enable development mode (adjusts some paths and output)" OFF)
2525

26-
find_package(Qt5 COMPONENTS Widgets Core Gui PrintSupport REQUIRED)
27-
if (Qt5Widgets_VERSION VERSION_LESS 5.10.0)
26+
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Widgets Core Gui PrintSupport REQUIRED)
27+
if (Qt${QT_DEFAULT_MAJOR_VERSION}Widgets_VERSION VERSION_LESS 5.10.0)
2828
message(FATAL_ERROR "Minimum supported Qt5 version is 5.10!")
2929
endif()
3030

PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pkgname=qtnote
2-
pkgver=3.0.5
2+
pkgver=3.2.0
33
pkgrel=1
44
pkgdesc="Note-taking application written with Qt in mind"
55
arch=('i686' 'x86_64')

debian/changelog

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
qtnote (3.1.20) UNRELEASED; urgency=medium
1+
qtnote (3.2.0) noble; urgency=medium
22

3-
* New release
4-
* New release
3+
* Qt6 support
54

6-
-- Sergei Ilinykh <[email protected]> Thu, 10 Mar 2022 23:03:38 +0300
5+
-- Sergei Ilinykh <[email protected]> Wed, 01 May 2024 00:34:00 +0300
76

87
qtnote (3.1.5) impish; urgency=medium
98

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Source: qtnote
22
Section: text
33
Priority: optional
44
Maintainer: Sergei Ilinykh <[email protected]>
5-
Build-Depends: cmake (>= 3.10.0), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, debhelper (>= 11), qtbase5-dev, libqt5x11extras5-dev, libhunspell-dev, qttools5-dev, pkg-config, libsingleapplication-dev
5+
Build-Depends: cmake (>= 3.10.0), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, debhelper (>= 11), qtbase5-dev, libqt5x11extras5-dev, libhunspell-dev, qttools5-dev, pkgconf, libsingleapplication-dev
66
Standards-Version: 4.5.1
77
Homepage: http://ri0n.github.io/QtNote
88
Vcs-Git: https://github.com/Ri0n/QtNote.git

debian/rules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/usr/bin/make -f
22

3+
#export DH_VERBOSE = 1
4+
35
%:
46
dh $@ --buildsystem=cmake
7+
8+
override_dh_auto_configure:
9+
dh_auto_configure -- \
10+
-DQT_DEFAULT_MAJOR_VERSION=5

installer.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
3-
<Product Id="2638A138-1A17-40AF-9414-9E5C9441C365" Name="QtNote" Language="1033" Version="3.0.3" Manufacturer="R-Soft" UpgradeCode="E12D6C7A-8F57-479B-8AE9-49C411B82843">
3+
<Product Id="2638A138-1A17-40AF-9414-9E5C9441C365" Name="QtNote" Language="1033" Version="3.2.0" Manufacturer="R-Soft" UpgradeCode="E12D6C7A-8F57-479B-8AE9-49C411B82843">
44
<Package Description="QtNote - note taking application" Comments="Simple test" InstallerVersion="405" Compressed="yes" Manufacturer="R-Soft" Platform="x64" />
55
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
66
<Directory Id="TARGETDIR" Name="SourceDir">

langs/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(langs)
22
file(GLOB qtnote_TRS "${CMAKE_CURRENT_SOURCE_DIR}/qtnote_*.ts")
33

4-
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
4+
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS LinguistTools REQUIRED)
55

66
set(PROJECT_DIRS
77
${CMAKE_SOURCE_DIR}
@@ -17,7 +17,7 @@ foreach(_LANG ${qtnote_TRS})
1717
string(REPLACE "@" "_" _SHORT_LANG ${_SHORT_LANG})
1818
add_custom_command(TARGET lupdate
1919
PRE_BUILD
20-
COMMAND ${Qt5_LUPDATE_EXECUTABLE}
20+
COMMAND ${Qt${QT_DEFAULT_MAJOR_VERSION}_LUPDATE_EXECUTABLE}
2121
ARGS -no-obsolete -recursive ${PROJECT_DIRS} -ts ${_LANG}
2222
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
2323
VERBATIM
@@ -27,7 +27,7 @@ endforeach()
2727
if(WIN32)
2828
set_source_files_properties(${qtnote_TRS} PROPERTIES OUTPUT_LOCATION "${EXECUTABLE_OUTPUT_PATH}/langs")
2929
endif()
30-
qt5_add_translation(qtnote_QM ${qtnote_TRS})
30+
qt_add_translation(qtnote_QM ${qtnote_TRS})
3131

3232
add_custom_target(build_translations ALL DEPENDS ${qtnote_QM})
3333

libqtnote/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ set_target_properties(qtnote
4141
RUNTIME_OUTPUT_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
4242
)
4343
endif()
44-
target_link_libraries(qtnote PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
44+
target_link_libraries(qtnote PUBLIC Qt${QT_DEFAULT_MAJOR_VERSION}::Core Qt${QT_DEFAULT_MAJOR_VERSION}::Gui Qt${QT_DEFAULT_MAJOR_VERSION}::Widgets Qt${QT_DEFAULT_MAJOR_VERSION}::PrintSupport)
4545
if (APPLE)
4646
target_link_libraries(qtnote PUBLIC "-framework CoreFoundation" "-framework Carbon")
4747
endif()

libqtnote/colorbutton.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ void ColorButton::paintEvent(QPaintEvent *pe)
4343
{
4444
Q_UNUSED(pe);
4545
QStyleOption opt;
46+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
4647
opt.init(this);
48+
#else
49+
opt.initFrom(this);
50+
#endif
4751
QPainter p(this);
4852
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
4953
}

0 commit comments

Comments
 (0)