Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:upgrade to 5.103 #1

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 14 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.16)

set(KF_VERSION "5.90.0") # handled by release scripts
set(KF_VERSION "5.103.0") # handled by release scripts
project(Sonnet VERSION ${KF_VERSION})

include(FeatureSummary)
include(CMakeDependentOption)
find_package(ECM 5.90.0 NO_MODULE)
find_package(ECM 5.103.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)

Expand All @@ -21,10 +21,12 @@ include(ECMGenerateExportHeader)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMGenerateQmlTypes)
include(ECMQMLModules)

include(ECMFindQmlModule)
include(ECMQmlModule)
include(ECMDeprecationSettings)
include(ECMAddQch)
include(ECMPoQmTools)
include(CMakeDependentOption)

set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")

Expand Down Expand Up @@ -55,12 +57,16 @@ option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant,
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")

if(SONNET_USE_WIDGETS)
option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON)
cmake_dependent_option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON "NOT CMAKE_CROSSCOMPILING" OFF)
add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer")
endif()

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
ecm_install_po_files_as_qm(po)
ecm_install_po_files_as_qm(poqm)

ecm_set_disabled_deprecation_versions(
QT 5.15.2
)

add_subdirectory(data)
add_subdirectory(src)
if (BUILD_TESTING)
Expand Down Expand Up @@ -98,7 +104,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF5SonnetConfig.cmake"
install(EXPORT KF5SonnetTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5SonnetTargets.cmake NAMESPACE KF5:: )

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sonnet_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel)
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/Sonnet COMPONENT Devel)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

Expand Down
6 changes: 3 additions & 3 deletions autotests/test_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void SonnetSettingsTest::testSpellerAPIChangeSaves()
bool checkUppercase = speller.testAttribute(Speller::CheckUppercase);
bool settingsUppercase = settings.value(QStringLiteral("checkUppercase"), true).toBool();
QCOMPARE(checkUppercase, settingsUppercase);
// Change the atribute
// Change the attribute
speller.setAttribute(Speller::CheckUppercase, !checkUppercase);
settingsUppercase = settings.value(QStringLiteral("checkUppercase"), true).toBool();
QCOMPARE(!checkUppercase, settingsUppercase);
Expand All @@ -135,7 +135,7 @@ void SonnetSettingsTest::testSpellerAPIChangeSaves()
bool skipRunTogether = speller.testAttribute(Speller::SkipRunTogether);
bool settingsSkipRunTogether = settings.value(QStringLiteral("skipRunTogether"), true).toBool();
QCOMPARE(skipRunTogether, settingsSkipRunTogether);
// Change the atribute
// Change the attribute
speller.setAttribute(Speller::SkipRunTogether, !skipRunTogether);
settingsSkipRunTogether = settings.value(QStringLiteral("skipRunTogether"), true).toBool();
QCOMPARE(!skipRunTogether, settingsSkipRunTogether);
Expand All @@ -150,7 +150,7 @@ void SonnetSettingsTest::testSpellerAPIChangeSaves()
bool autodetectLanguage = speller.testAttribute(Speller::AutoDetectLanguage);
bool settingsAutoDetectLanguage = settings.value(QStringLiteral("autodetectLanguage"), true).toBool();
QCOMPARE(autodetectLanguage, settingsAutoDetectLanguage);
// Change the atribute
// Change the attribute
speller.setAttribute(Speller::AutoDetectLanguage, !autodetectLanguage);
settingsAutoDetectLanguage = settings.value(QStringLiteral("autodetectLanguage"), true).toBool();
QCOMPARE(!autodetectLanguage, settingsAutoDetectLanguage);
Expand Down
1 change: 1 addition & 0 deletions autotests/test_suggest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ void SuggestTest::aspell_english_data()
QTest::newRow("helo") << QStringLiteral("helo") << false << QStringList{QStringLiteral("hello"), QStringLiteral("hell"), QStringLiteral("help")};
QTest::newRow("enviroment") << QStringLiteral("enviroment") << false << QStringList{QStringLiteral("environment")};
QTest::newRow("guvernment") << QStringLiteral("guvernment") << false << QStringList{QStringLiteral("government")};
QTest::newRow("dictionaies") << QStringLiteral("dictionaies") << false << QStringList{QStringLiteral("dictionaries")};
}

void SuggestTest::aspell_english()
Expand Down
4 changes: 2 additions & 2 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if(NOT CMAKE_CROSSCOMPILING)

TARGET_LINK_LIBRARIES(parsetrigrams PUBLIC Qt${QT_MAJOR_VERSION}::Core)
TARGET_LINK_LIBRARIES(gentrigrams PUBLIC Qt${QT_MAJOR_VERSION}::Core KF5::SonnetCore)
INSTALL(TARGETS parsetrigrams ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
INSTALL(TARGETS gentrigrams ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
INSTALL(TARGETS parsetrigrams ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
INSTALL(TARGETS gentrigrams ${KF_INSTALL_TARGETS_DEFAULT_ARGS})

add_executable(KF5::parsetrigrams ALIAS parsetrigrams)
else()
Expand Down
Loading