Skip to content

Commit

Permalink
Merge pull request #778 from TheComputerGuy96/implicit-qchar
Browse files Browse the repository at this point in the history
Remove implicit QChar conversions
  • Loading branch information
kevinhendricks authored Oct 19, 2024
2 parents 2744369 + 08ed327 commit 49112b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Parsers/qCSSParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ QString CSSParser::unicode(QString& istring, int& i)
(CSSUtils::hexdec(add) > 96 && CSSUtils::hexdec(add) < 123))
{
QString msg = "Replaced unicode notation: Changed \\" + CSSUtils::rtrim(add) + " to ";
add = static_cast<int>(CSSUtils::hexdec(add));
add = QChar(static_cast<int>(CSSUtils::hexdec(add)));
msg += add;
log(msg,Information);
replaced = true;
Expand Down
4 changes: 2 additions & 2 deletions src/Parsers/qCSSUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ QChar CSSUtils::s_at(const QString &istring, const int pos)
{
if(pos > (istring.length()-1) || pos < 0)
{
return 0;
return QChar(0);
}
else
{
Expand Down Expand Up @@ -168,7 +168,7 @@ QString CSSUtils::build_value(const QVector<QString> subvalues)

bool CSSUtils::ctype_space(const QChar c)
{
return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == 11);
return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == QChar(11));
}


Expand Down
4 changes: 0 additions & 4 deletions src/qt6sigil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# Build Sigil against Qt6 - requires cmake 3.16+ and a C++17 compiler
#############################################################################

# quiet Qt 6 deprecat4ed warnings
# add_definitions(-DQT_NO_DEPRECATED_WARNINGS)
add_definitions(-DQT_IMPLICIT_QCHAR_CONSTRUCTION)

if (CMAKE_VERSION VERSION_GREATER "3.27.9")
cmake_policy(SET CMP0153 OLD)
endif()
Expand Down

0 comments on commit 49112b2

Please sign in to comment.