Added controlled conversions to char* instead of automatic ascii conversions.

The definition of -UTQT_NO_ASCII_CAST is no longer needed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 5 years ago
parent c582b3bf38
commit 3744170241
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -58,7 +58,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings ###### global compiler settings
add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )

@ -159,7 +159,7 @@ namespace KioSword {
else if (!strcmp(tag.getName(), "RX")) { else if (!strcmp(tag.getName(), "RX")) {
buf += "<a href=\""; buf += "<a href=\"";
buf += swordUrlForSearch(DEFBIBLE, token + 3, m_swordoptions); buf += swordUrlForSearch(DEFBIBLE, token + 3, m_swordoptions).utf8();
/* FIXME - restore this, work out what it does /* FIXME - restore this, work out what it does
for (tok = token + 3; *tok; tok++) { for (tok = token + 3; *tok; tok++) {

@ -150,7 +150,7 @@ namespace KioSword
else else
setGlobalOption("Variants", "Primary Readings"); setGlobalOption("Variants", "Primary Readings");
LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(options.locale()); LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(options.locale().latin1());
} }
/** Return an HTML hyperlinked list of all modules, /** Return an HTML hyperlinked list of all modules,
@ -481,7 +481,7 @@ namespace KioSword
doindex = true; doindex = true;
break; break;
} }
lk = vk->ParseVerseList(ref, "Genesis 1:1", true); lk = vk->ParseVerseList(ref.utf8(), "Genesis 1:1", true);
if (lk.Count() == 0) { if (lk.Count() == 0) {
text += "<p class=\"error\">" + i18n("Couldn't find reference '%1'.").arg(ref) + "</p>"; text += "<p class=\"error\">" + i18n("Couldn't find reference '%1'.").arg(ref) + "</p>";
doindex = true; doindex = true;

@ -327,30 +327,30 @@ namespace KioSword
m_redirect.module = val; m_redirect.module = val;
} }
else if (!strcasecmp(key, "modtype")) { else if (!strcasecmp(key, "modtype")) {
if (!strcasecmp(val, "bible")) { if (!strcasecmp(val.latin1(), "bible")) {
m_moduletype = DEFBIBLE; m_moduletype = DEFBIBLE;
m_action = REDIRECT_QUERY; m_action = REDIRECT_QUERY;
} else if (!strcasecmp(val, "greekstrongs")) { } else if (!strcasecmp(val.latin1(), "greekstrongs")) {
m_moduletype = GREEKSTRONGS; m_moduletype = GREEKSTRONGS;
m_action = REDIRECT_QUERY; m_action = REDIRECT_QUERY;
} else if (!strcasecmp(val, "hebrewstrongs")) { } else if (!strcasecmp(val.latin1(), "hebrewstrongs")) {
m_moduletype = HEBREWSTRONGS; m_moduletype = HEBREWSTRONGS;
m_action = REDIRECT_QUERY; m_action = REDIRECT_QUERY;
} else if (!strcasecmp(val, "greekmorph")) { } else if (!strcasecmp(val.latin1(), "greekmorph")) {
m_moduletype = GREEKMORPH; m_moduletype = GREEKMORPH;
m_action = REDIRECT_QUERY; m_action = REDIRECT_QUERY;
} else if (!strcasecmp(val, "hebrewmorph")) { } else if (!strcasecmp(val.latin1(), "hebrewmorph")) {
m_moduletype = HEBREWMORPH; m_moduletype = HEBREWMORPH;
m_action = REDIRECT_QUERY; m_action = REDIRECT_QUERY;
} }
} }
// search // search
else if (!strcasecmp(key, "stype")) { else if (!strcasecmp(key, "stype")) {
if (!strcasecmp(val, "words")) { if (!strcasecmp(val.latin1(), "words")) {
m_stype = Renderer::SEARCH_WORDS; m_stype = Renderer::SEARCH_WORDS;
} else if (!strcasecmp(val, "phrase")) { } else if (!strcasecmp(val.latin1(), "phrase")) {
m_stype = Renderer::SEARCH_PHRASE; m_stype = Renderer::SEARCH_PHRASE;
} else if (!strcasecmp(val, "regex")) { } else if (!strcasecmp(val.latin1(), "regex")) {
m_stype = Renderer::SEARCH_REGEX; m_stype = Renderer::SEARCH_REGEX;
} else { } else {
m_stype = Renderer::SEARCH_WORDS; m_stype = Renderer::SEARCH_WORDS;

Loading…
Cancel
Save