Commit d376c103 authored by Laurent Montel's avatar Laurent Montel
Browse files

Adapt build against qt6

parent b2abbec2
Pipeline #244537 failed with stage
in 11 minutes and 45 seconds
......@@ -46,6 +46,9 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KPIMTEXTEDIT
)
set(QT_REQUIRED_VERSION "5.15.2")
if (QT_MAJOR_VERSION STREQUAL "6")
set(QT_REQUIRED_VERSION "6.4.0")
endif()
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Widgets)
########### Find packages ###########
......
......@@ -62,8 +62,13 @@ void TextToSpeech::slotStateChanged()
case QTextToSpeech::Paused:
state = TextToSpeech::Paused;
break;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
case QTextToSpeech::BackendError:
state = TextToSpeech::BackendError;
#else
case QTextToSpeech::Error:
state = TextToSpeech::BackendError;
#endif
break;
}
Q_EMIT stateChanged(state);
......@@ -71,7 +76,11 @@ void TextToSpeech::slotStateChanged()
bool TextToSpeech::isReady() const
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
return mTextToSpeech->state() != QTextToSpeech::BackendError;
#else
return mTextToSpeech->state() != QTextToSpeech::Error;
#endif
}
void TextToSpeech::say(const QString &text)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment