Commit 9bcc7220 authored by Laurent Montel's avatar Laurent Montel 😁

Simplify update version

parent 242c9db0
......@@ -18,7 +18,8 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMAddTests)
set(KF5_VERSION "5.19.0")
set(KPIMTEXTEDIT_LIB_VERSION "5.2.40")
set(PIM_VERSION "5.2.40")
set(KPIMTEXTEDIT_LIB_VERSION ${PIM_VERSION})
ecm_setup_version(${KPIMTEXTEDIT_LIB_VERSION} VARIABLE_PREFIX KPIMTEXTEDIT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kpimtextedit_version.h"
......
......@@ -67,20 +67,12 @@ void TextToSpeech::reloadSettings()
KConfigGroup grp = config.group("Settings");
const QString engineName = grp.readEntry("engine");
if (!mTextToSpeech) {
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
mTextToSpeech = new QTextToSpeech(this, engineName);
#else
mTextToSpeech = new QTextToSpeech(engineName, QVariantMap(), this);
#endif
connect(mTextToSpeech, &QTextToSpeech::stateChanged, this, &TextToSpeech::slotStateChanged);
} else if (mDefaultEngine != engineName) {
disconnect(mTextToSpeech, &QTextToSpeech::stateChanged, this, &TextToSpeech::slotStateChanged);
delete mTextToSpeech;
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
mTextToSpeech = new QTextToSpeech(this, engineName);
#else
mTextToSpeech = new QTextToSpeech(engineName, QVariantMap(), this);
#endif
connect(mTextToSpeech, &QTextToSpeech::stateChanged, this, &TextToSpeech::slotStateChanged);
}
mDefaultEngine = engineName;
......
Markdown is supported
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