summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/ttsfestival.cpp4
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp6
-rw-r--r--rbutil/rbutilqt/base/utils.cpp16
3 files changed, 25 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/ttsfestival.cpp b/rbutil/rbutilqt/base/ttsfestival.cpp
index 41358ba488..6ed08ddacc 100644
--- a/rbutil/rbutilqt/base/ttsfestival.cpp
+++ b/rbutil/rbutilqt/base/ttsfestival.cpp
@@ -295,7 +295,11 @@ QString TTSFestival::getVoiceInfo(QString voice)
Qt::CaseInsensitive, QRegExp::Wildcard));
LOG_INFO() << "voiceInfo w/o descr:" << response;
response = response.remove(')');
+#if QT_VERSION >= 0x050e00
+ QStringList responseLines = response.split('(', Qt::SkipEmptyParts);
+#else
QStringList responseLines = response.split('(', QString::SkipEmptyParts);
+#endif
responseLines.removeAt(0); // the voice name itself
QString description;
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index d2d8cf801a..3d07c09a98 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -204,7 +204,11 @@ QStringList TTSSapi::getVoiceList(QString language)
if(dataRaw.startsWith("Error")) {
LOG_INFO() << "Error:" << dataRaw;
}
- result = dataRaw.split(";",QString::SkipEmptyParts);
+#if QT_VERSION >= 0x050e00
+ result = dataRaw.split(";", Qt::SkipEmptyParts);
+#else
+ result = dataRaw.split(";", QString::SkipEmptyParts);
+#endif
if(result.size() > 0)
{
result.sort();
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp
index e185effe2b..277dcb512c 100644
--- a/rbutil/rbutilqt/base/utils.cpp
+++ b/rbutil/rbutilqt/base/utils.cpp
@@ -93,7 +93,11 @@ QString Utils::resolvePathCase(QString path)
{
int start;
QString realpath;
+#if QT_VERSION >= 0x050e00
+ QStringList elems = path.split("/", Qt::SkipEmptyParts);
+#else
QStringList elems = path.split("/", QString::SkipEmptyParts);
+#endif
if(path.isEmpty())
return QString();
@@ -280,17 +284,29 @@ QString Utils::findExecutable(QString name)
QString exepath;
//try autodetect tts
#if defined(Q_OS_LINUX) || defined(Q_OS_MACX) || defined(Q_OS_OPENBSD)
+#if QT_VERSION >= 0x050e00
+ QStringList path = QString(getenv("PATH")).split(":", Qt::SkipEmptyParts);
+#else
QStringList path = QString(getenv("PATH")).split(":", QString::SkipEmptyParts);
+#endif
#elif defined(Q_OS_WIN)
+#if QT_VERSION >= 0x050e00
+ QStringList path = QString(getenv("PATH")).split(";", Qt::SkipEmptyParts);
+#else
QStringList path = QString(getenv("PATH")).split(";", QString::SkipEmptyParts);
#endif
+#endif
LOG_INFO() << "system path:" << path;
for(int i = 0; i < path.size(); i++)
{
QString executable = QDir::fromNativeSeparators(path.at(i)) + "/" + name;
#if defined(Q_OS_WIN)
executable += ".exe";
+#if QT_VERSION >= 0x050e00
+ QStringList ex = executable.split("\"", Qt::SkipEmptyParts);
+#else
QStringList ex = executable.split("\"", QString::SkipEmptyParts);
+#endif
executable = ex.join("");
#endif
if(QFileInfo(executable).isExecutable())