This commit fixes some logic in SegmentPinyin/SegmentJyutping involving
glob characters, where invalid sequences before glob characters would
not be added to the search term.
This commit fixes the parsing of the 'direct' field in sentence
links. Since SQLite stores booleans as integers, QJsonValue::toBool()
would always return "false", even if the stored value was 1.
This commit adds comparison of definitions and sentences when
checking for equality in the Entry class.
This commit adds additional data members to operator<< in Entry et al.
This commit adds the ability to remove all database connections, which
is useful on Windows since we cannot delete a database file that somebody
is keeping a connection open to.
Part of a series of commits for #160.
Type of change
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Tested on all three platforms.
PASS Executing test case TestSqlSearch
Qt version: 5.15.12
Qt build: Qt 5.15.12 (arm64-little_endian-lp64 shared (dynamic) release build; by Clang 15.0.0 (clang-1500.0.40.1) (Apple))
QTest version: 5.15.12
PASS Executing test function initTestCase
PASS TestSqlSearch::initTestCase
Execution took 0.038041 ms.
PASS Executing test function searchSimplified
PASS TestSqlSearch::searchSimplified
Execution took 3.75446 ms.
PASS Executing test function searchSimplifiedNoResults
PASS TestSqlSearch::searchSimplifiedNoResults
Execution took 1.11429 ms.
PASS Executing test function searchTraditional
PASS TestSqlSearch::searchTraditional
Execution took 2.98029 ms.
PASS Executing test function searchTraditionalNoResults
PASS TestSqlSearch::searchTraditionalNoResults
Execution took 0.9655 ms.
PASS Executing test function searchJyutping
PASS TestSqlSearch::searchJyutping
Execution took 5.23442 ms.
PASS Executing test function searchJyutpingNoResults
PASS TestSqlSearch::searchJyutpingNoResults
Execution took 1.93096 ms.
PASS Executing test function searchPinyin
PASS TestSqlSearch::searchPinyin
Execution took 5.00858 ms.
PASS Executing test function searchPinyinNoResults
PASS TestSqlSearch::searchPinyinNoResults
Execution took 1.70817 ms.
PASS Executing test function searchEnglish
PASS TestSqlSearch::searchEnglish
Execution took 3.71446 ms.
PASS Executing test function searchEnglishNoResults
PASS TestSqlSearch::searchEnglishNoResults
Execution took 0.59975 ms.
PASS Executing test function searchAutoDetect
PASS TestSqlSearch::searchAutoDetect
Execution took 19.7345 ms.
PASS Executing test function searchAutoDetectNoResults
PASS TestSqlSearch::searchAutoDetectNoResults
Execution took 2.96712 ms.
PASS Executing test function searchUnique
PASS TestSqlSearch::searchUnique
Execution took 0.923375 ms.
PASS Executing test function searchTraditionalSentences
PASS TestSqlSearch::searchTraditionalSentences
Execution took 0.373875 ms.
PASS Executing test function cleanupTestCase
PASS TestSqlSearch::cleanupTestCase
Execution took 0.001458 ms.
Test execution took 51.1339 ms.
Checklist:
[x] My code follows the style guidelines of this project (black for Python
code, .clang-format in the src/jyut-dict directory for C++)
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have translated my user-facing strings to all currently-supported languages
[x] I have made corresponding changes to the documentation
Description
Part of a series of commits for #160.
Type of change
How Has This Been Tested?
Tested on all three platforms.
Checklist:
black
for Python code,.clang-format
in thesrc/jyut-dict
directory for C++)