Skip to content

Commit

Permalink
Merge pull request #3 from Gui-Yue/topic-kde-relate
Browse files Browse the repository at this point in the history
feat:upgrade to 5.103
  • Loading branch information
deepin-ci-robot authored Jun 26, 2023
2 parents 61aba3e + 9e48ff5 commit 49e2ff2
Show file tree
Hide file tree
Showing 210 changed files with 813,921 additions and 31,019 deletions.
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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(KCodecs VERSION ${KF_VERSION})

include(FeatureSummary)
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 @@ -16,6 +16,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(KDEGitCommitHooks)
include(ECMQtDeclareLoggingCategory)
include(ECMDeprecationSettings)

set(REQUIRED_QT_VERSION 5.15.2)
find_package(Qt${QT_MAJOR_VERSION}Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
Expand Down Expand Up @@ -44,8 +45,11 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KCODECS
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CodecsConfigVersion.cmake"
SOVERSION 5)

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

ecm_set_disabled_deprecation_versions(
QT 5.15.2
)

add_subdirectory(src)

Expand Down Expand Up @@ -79,7 +83,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF5CodecsConfig.cmake"
install(EXPORT KF5CodecsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5CodecsTargets.cmake NAMESPACE KF5:: )

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kcodecs_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel )
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCodecs COMPONENT Devel)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

Expand Down
20 changes: 9 additions & 11 deletions autotests/kcharsetstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "kcharsetstest.h"

#include "kcharsets_p.h"
#include <QDebug>
#include <QString>
#include <QTest>
Expand All @@ -14,12 +15,9 @@

static bool encodingNameHasADescription(const QString &encodingName, const QStringList &descriptions)
{
for (const QString &description : descriptions) {
if (description.contains(encodingName)) {
return true;
}
}
return false;
return std::any_of(descriptions.cbegin(), descriptions.cend(), [&encodingName](const QString &description) {
return description.contains(encodingName);
});
}

void KCharsetsTest::testSingleton()
Expand Down Expand Up @@ -207,7 +205,7 @@ void KCharsetsTest::testCodecForName()
}

QVERIFY(QTextCodec::codecForName(expectedCodecFromKDE.toLocal8Bit()) != nullptr);
QCOMPARE(singleton->codecForName(codec)->name(), QTextCodec::codecForName(expectedCodecFromKDE.toLocal8Bit())->name());
QCOMPARE(singleton->d->codecForName(codec)->name(), QTextCodec::codecForName(expectedCodecFromKDE.toLocal8Bit())->name());

QVERIFY(QTextCodec::codecForName(expectedCodecFromQt.toLocal8Bit()) != nullptr);
QCOMPARE(QTextCodec::codecForName(codec.toLocal8Bit())->name(), QTextCodec::codecForName(expectedCodecFromQt.toLocal8Bit())->name());
Expand Down Expand Up @@ -249,11 +247,11 @@ void KCharsetsTest::testEncodingNames()
bool ok = false;

if (encodingName == QLatin1String("ucs2") || encodingName == QLatin1String("ISO 10646-UCS-2")) {
singleton->codecForName(QStringLiteral("UTF-16"), ok);
singleton->d->codecForName(QStringLiteral("UTF-16"), ok);
} else if (encodingName == QLatin1String("utf7")) {
continue;
} else {
singleton->codecForName(encodingName, ok);
singleton->d->codecForName(encodingName, ok);
}
// The availability of some of the charsets below depends on whether Qt was built with ICU...
if (!ok) {
Expand Down Expand Up @@ -293,7 +291,7 @@ void KCharsetsTest::testUsAsciiEncoding()
KCharsets *singleton = KCharsets::charsets();

bool ok = false;
QTextCodec *codec = singleton->codecForName(codecName, ok);
QTextCodec *codec = singleton->d->codecForName(codecName, ok);
QVERIFY(ok);

// compatible text
Expand Down Expand Up @@ -334,7 +332,7 @@ void KCharsetsTest::testUsAsciiDecoding()
KCharsets *singleton = KCharsets::charsets();

bool ok = false;
QTextCodec *codec = singleton->codecForName(codecName, ok);
QTextCodec *codec = singleton->d->codecForName(codecName, ok);
QVERIFY(ok);

// compatible text
Expand Down
8 changes: 5 additions & 3 deletions autotests/kusasciitextcodectest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ void KUsAsciiTextCodecTest::testBrokenBuiltinEncoding()

QTextCodec::ConverterState failConverterState;

const QByteArray failEncoded8Bit = qtCodec->fromUnicode(failUnicodeText.constData(), failUnicodeText.length(), &failConverterState);
// Only interested in what failConverterState will be changed to
qtCodec->fromUnicode(failUnicodeText.constData(), failUnicodeText.length(), &failConverterState);

// Bug seems fixed in Qt6
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 7)
// confirm the broken result 0, which rather should be 1
QCOMPARE(failConverterState.invalidChars, 1);
#else
// confirm the broken result 0, which rather should be 1
QCOMPARE(failConverterState.invalidChars, 0);
#endif
}
Expand Down
22 changes: 0 additions & 22 deletions autotests/pythontest.py

This file was deleted.

41 changes: 0 additions & 41 deletions cmake/rules_PyKF5.py

This file was deleted.

80 changes: 75 additions & 5 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,11 +1,81 @@
kcodecs (5.90.0-1deepin1) unstable; urgency=medium
kcodecs (5.103.0-1) unstable; urgency=medium

* Release to unstable (5.90.0).
* Remove a #ifdef which no longer valid in newer Qt 5.x version
[ Aurélien COUDERC ]
* New upstream release (5.103.0).
* Update build-deps and deps with the info from cmake.

-- Aurélien COUDERC <coucouf@debian.org> Sun, 12 Feb 2023 21:44:21 +0100

kcodecs (5.102.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.102.0).
* Update build-deps and deps with the info from cmake.
* Bump Standards-Version to 4.6.2, no change required.
* Update symbols from build for 5.102.0.

-- Aurélien COUDERC <coucouf@debian.org> Sun, 22 Jan 2023 21:35:00 +0100

kcodecs (5.101.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.101.0).
* Update build-deps and deps with the info from cmake.

-- Aurélien COUDERC <coucouf@debian.org> Tue, 13 Dec 2022 07:40:20 +0100

kcodecs (5.100.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.99.0).
* Update build-deps and deps with the info from cmake.
* New upstream release (5.100.0).
* Update build-deps and deps with the info from cmake.
* Refresh copyright information.

-- Aurélien COUDERC <coucouf@debian.org> Sat, 19 Nov 2022 23:18:55 +0100

kcodecs (5.98.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.98.0).
* Update build-deps and deps with the info from cmake.

-- Aurélien COUDERC <coucouf@debian.org> Sun, 18 Sep 2022 23:11:34 +0200

kcodecs (5.97.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.97.0).

-- Aurélien COUDERC <coucouf@debian.org> Sun, 14 Aug 2022 18:55:26 +0200

kcodecs (5.96.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.96.0).
* Bump Standards-Version to 4.6.1, no change required.

-- Aurélien COUDERC <coucouf@debian.org> Sun, 31 Jul 2022 13:32:55 +0200

kcodecs (5.94.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.94.0).

-- Aurélien COUDERC <coucouf@debian.org> Thu, 19 May 2022 23:59:01 +0200

kcodecs (5.93.0-1) unstable; urgency=medium

[ Aurélien COUDERC ]
* New upstream release (5.92.0).
* Update the list of installed files.
* Refresh copyright information.
* New upstream release (5.93.0).

-- Wang Zichong <wangzichong@deepin.org> Tue, 16 May 2023 15:51:00 +0800
-- Aurélien COUDERC <coucouf@debian.org> Wed, 11 May 2022 23:22:43 +0200

kcodecs (5.90.0-1) experimental; urgency=medium
kcodecs (5.90.0-1) unstable; urgency=medium

[ Norbert Preining ]
* New upstream release (5.89.0).
Expand Down
12 changes: 6 additions & 6 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Uploaders: Aurélien COUDERC <coucouf@debian.org>,
Build-Depends: cmake (>= 3.16~),
debhelper-compat (= 13),
doxygen,
extra-cmake-modules (>= 5.90.0~),
extra-cmake-modules (>= 5.103.0~),
gperf,
libqt5sql5-sqlite:native,
pkg-kde-tools (>= 0.15.15ubuntu1~),
qtbase5-dev (>= 5.15.2~),
qttools5-dev (>= 5.4),
qttools5-dev-tools (>= 5.4),
Standards-Version: 4.6.0
Standards-Version: 4.6.2
Homepage: https://invent.kde.org/frameworks/kcodecs
Vcs-Browser: https://salsa.debian.org/qt-kde-team/kde/kcodecs
Vcs-Git: https://salsa.debian.org/qt-kde-team/kde/kcodecs.git
Expand All @@ -23,7 +23,7 @@ Rules-Requires-Root: no
Package: libkf5codecs-data
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Depends: ${misc:Depends}, ${shlibs:Depends},
Description: collection of methods to manipulate strings
KCodecs provide a collection of methods to manipulate strings
using various encodings.
Expand All @@ -37,16 +37,16 @@ Depends: libkf5codecs5 (= ${binary:Version}),
qtbase5-dev (>= 5.15.2~),
${misc:Depends},
${shlibs:Depends},
Recommends: libkf5codecs-doc (= ${source:Version})
Recommends: libkf5codecs-doc (= ${source:Version}),
Description: development files for kcodecs
This package contains development files for building software that uses
libraries from kcodecs.
Breaks: libkf5configwidgets-dev (<< 5.54)
Breaks: libkf5configwidgets-dev (<< 5.54),

Package: libkf5codecs-doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Depends: ${misc:Depends},
Description: collection of methods to manipulate strings (documentation)
KCodecs provide a collection of methods to manipulate strings
using various encodings.
Expand Down
Loading

0 comments on commit 49e2ff2

Please sign in to comment.