QT6 QChar and int build error remove code for QT 6 or later!

this will have to be restored later.
This commit is contained in:
Simon De Backer
2020-12-10 16:01:10 +01:00
parent d0c129478e
commit 3fe0adc66e
3 changed files with 122 additions and 20 deletions

View File

@@ -46,19 +46,44 @@ XmlElementCollection::XmlElementCollection(QETProject *project) :
collection.appendChild(import);
NamesList names;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
const QChar russian_data[24] = { 0x0418, 0x043C, 0x043F, 0x043E, 0x0440,
0x0442, 0x0438, 0x0440, 0x043E, 0x0432,
0x0430, 0x043D, 0x043D, 0x044B, 0x0435,
0x0020, 0x044D, 0x043B, 0x0435, 0x043C,
0x0435, 0x043D, 0x0442, 0x044B };
const QChar greek_data[18] = { 0x0395, 0x03b9, 0x03c3, 0x03b7, 0x03b3,
0x03bc, 0x03ad, 0x03bd, 0x03b1, 0x0020,
0x03c3, 0x03c4, 0x03bf, 0x03b9, 0x03c7,
0x03b5, 0x03af, 0x03b1 };
const QChar turkish_data[12] ={ 0x0130, 0x0074, 0x0068, 0x0061, 0x006C,
0x0020, 0x00F6, 0x011F, 0x0065, 0x006C,
0x0065, 0x0072 };
const QChar russian_data[24] = {
0x0418, 0x043C, 0x043F, 0x043E, 0x0440, 0x0442, 0x0438, 0x0440,
0x043E, 0x0432, 0x0430, 0x043D, 0x043D, 0x044B, 0x0435, 0x0020,
0x044D, 0x043B, 0x0435, 0x043C, 0x0435, 0x043D, 0x0442, 0x044B};
const QChar greek_data[18] = {
0x0395,
0x03b9,
0x03c3,
0x03b7,
0x03b3,
0x03bc,
0x03ad,
0x03bd,
0x03b1,
0x0020,
0x03c3,
0x03c4,
0x03bf,
0x03b9,
0x03c7,
0x03b5,
0x03af,
0x03b1};
const QChar turkish_data[12] = {
0x0130,
0x0074,
0x0068,
0x0061,
0x006C,
0x0020,
0x00F6,
0x011F,
0x0065,
0x006C,
0x0065,
0x0072};
names.addName("fr", "Éléments importés");
names.addName("en", "Imported elements");
names.addName("de", "Importierte elemente");
@@ -77,7 +102,27 @@ XmlElementCollection::XmlElementCollection(QETProject *project) :
names.addName("da", "Importerede elementer");
names.addName("hr", "Uvezeni elementi");
names.addName("sl", "Uvoženi elementi");
#else
# if TODO_LIST
# pragma message("@TODO remove code for QT 6 or later")
# endif
qDebug() << "Help code for QT 6 or later";
names.addName("fr", "Éléments importés");
names.addName("en", "Imported elements");
names.addName("de", "Importierte elemente");
names.addName("es", "Elementos importados");
names.addName("cs", "Zavedené prvky");
names.addName("pl", "Elementy importowane");
names.addName("pt", "elementos importados");
names.addName("it", "Elementi importati");
names.addName("nl", "Elementen geïmporteerd");
names.addName("hr", "Uvezeni elementi");
names.addName("ca", "Elements importats");
names.addName("ro", "Elemente importate");
names.addName("da", "Importerede elementer");
names.addName("hr", "Uvezeni elementi");
names.addName("sl", "Uvoženi elementi");
#endif
import.appendChild(names.toXml(m_dom_document));
}

View File

@@ -979,7 +979,14 @@ QString BorderTitleBlock::incrementLetters(const QString &string) {
if (last_digit != 'Z') {
// increments the last digit
// incremente le dernier digit
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
last_digit = last_digit.toLatin1() + 1;
#else
# if TODO_LIST
# pragma message("@TODO remove code for QT 6 or later")
# endif
qDebug() << "Help code for QT 6 or later";
#endif
return(first_digits + QString(last_digit));
} else {
return(incrementLetters(first_digits) + "A");

View File

@@ -1661,11 +1661,42 @@ void QETProject::addDiagram(Diagram *diagram, int pos)
*/
NamesList QETProject::namesListForIntegrationCategory()
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
NamesList names;
const QChar russian_data[24] = { 0x0418, 0x043C, 0x043F, 0x043E, 0x0440, 0x0442, 0x0438, 0x0440, 0x043E, 0x0432, 0x0430, 0x043D, 0x043D, 0x044B, 0x0435, 0x0020, 0x044D, 0x043B, 0x0435, 0x043C, 0x0435, 0x043D, 0x0442, 0x044B };
const QChar greek_data[18] = { 0x0395, 0x03b9, 0x03c3, 0x03b7, 0x03b3, 0x03bc, 0x03ad, 0x03bd, 0x03b1, 0x0020, 0x03c3, 0x03c4, 0x03bf, 0x03b9, 0x03c7, 0x03b5, 0x03af, 0x03b1 };
const QChar japanese_data[10] = { 0x30A4, 0x30F3, 0x30D0, 0x30FC, 0x30C8, 0x3055, 0x308C, 0x305F, 0x8981, 0x7D20 };
const QChar russian_data[24] = {
0x0418, 0x043C, 0x043F, 0x043E, 0x0440, 0x0442, 0x0438, 0x0440,
0x043E, 0x0432, 0x0430, 0x043D, 0x043D, 0x044B, 0x0435, 0x0020,
0x044D, 0x043B, 0x0435, 0x043C, 0x0435, 0x043D, 0x0442, 0x044B};
const QChar greek_data[18] = {
0x0395,
0x03b9,
0x03c3,
0x03b7,
0x03b3,
0x03bc,
0x03ad,
0x03bd,
0x03b1,
0x0020,
0x03c3,
0x03c4,
0x03bf,
0x03b9,
0x03c7,
0x03b5,
0x03af,
0x03b1};
const QChar japanese_data[10] = {
0x30A4,
0x30F3,
0x30D0,
0x30FC,
0x30C8,
0x3055,
0x308C,
0x305F,
0x8981,
0x7D20};
names.addName("fr", "Éléments importés");
names.addName("en", "Imported elements");
@@ -1682,8 +1713,27 @@ NamesList QETProject::namesListForIntegrationCategory()
names.addName("ca", "Elements importats");
names.addName("ro", "Elemente importate");
names.addName("ja", QString(japanese_data, 10));
return (names);
#else
# if TODO_LIST
# pragma message("@TODO remove code for QT 6 or later")
# endif
qDebug() << "Help code for QT 6 or later";
NamesList names;
names.addName("fr", "Éléments importés");
names.addName("en", "Imported elements");
names.addName("de", "Importierte elemente");
names.addName("es", "Elementos importados");
names.addName("cs", "Zavedené prvky");
names.addName("pl", "Elementy importowane");
names.addName("pt", "elementos importados");
names.addName("it", "Elementi importati");
names.addName("nl", "Elementen geïmporteerd");
names.addName("hr", "Uvezeni elementi");
names.addName("ca", "Elements importats");
names.addName("ro", "Elemente importate");
return (names);
#endif
}
/**