aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-25 14:03:33 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-30 08:15:03 +0000
commit125c1c264c687f004d9732fcc4769eaa75ac0bd5 (patch)
tree5a1fcb2db4c5b32c40ad9f44acb4bd0ce9f67e66
parent1f89669f680a0742f445ac0361856ac5d657441f (diff)
Don't use deprecated QLibrary::location, use path instead
Silence compiler warnings. Change-Id: I9b98a118193a9eceaf49a33552236b15cb9401e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit fdae20500dbeaed5b5ad2134f2dc1ae8a8d52baa) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp2
-rw-r--r--src/plugins/myscript/plugin/myscriptinputmethod.cpp12
-rw-r--r--src/virtualkeyboard/doc/src/deployment-guide.qdoc10
3 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp b/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp
index 5835fa3e..4a54a332 100644
--- a/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp
+++ b/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p.cpp
@@ -83,7 +83,7 @@ bool HunspellInputMethodPrivate::createHunspell(const QString &locale)
);
QStringList searchPaths(hunspellDataPath.split(pathListSep, Qt::SkipEmptyParts));
const QStringList defaultPaths = QStringList()
- << QDir(QLibraryInfo::location(QLibraryInfo::DataPath) + QStringLiteral("/qtvirtualkeyboard/hunspell")).absolutePath()
+ << QDir(QLibraryInfo::path(QLibraryInfo::DataPath) + QStringLiteral("/qtvirtualkeyboard/hunspell")).absolutePath()
#if !defined(Q_OS_WIN32)
<< QStringLiteral("/usr/share/hunspell")
<< QStringLiteral("/usr/share/myspell/dicts")
diff --git a/src/plugins/myscript/plugin/myscriptinputmethod.cpp b/src/plugins/myscript/plugin/myscriptinputmethod.cpp
index 736de6d1..648b209b 100644
--- a/src/plugins/myscript/plugin/myscriptinputmethod.cpp
+++ b/src/plugins/myscript/plugin/myscriptinputmethod.cpp
@@ -354,14 +354,14 @@ public:
const voCertificate *certificate = &myCertificate;
voimProperty *properties = nullptr;
- QString imLibrary = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/" + MYSCRIPT_VOIM_NAME;
+ QString imLibrary = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/" + MYSCRIPT_VOIM_NAME;
properties = Properties_put(properties, "com.myscript.im.library", imLibrary.toStdString().c_str());
if (!properties) {
qCCritical(qlcVKMyScript) << "failed to define property " << "com.myscript.im.library" << " with value " << imLibrary;
return false;
}
- QString engineLibrary = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/" + MYSCRIPT_ENGINE_NAME;
+ QString engineLibrary = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/" + MYSCRIPT_ENGINE_NAME;
properties = Properties_put(properties, "com.myscript.engine.library", engineLibrary.toStdString().c_str());
if (!properties) {
qCCritical(qlcVKMyScript) << "failed to define property " << "com.myscript.engine.library" << " with value " << engineLibrary;
@@ -369,7 +369,7 @@ public:
}
QString propertyFile = QLatin1String("/Engine.properties");
- propertyFile = QLibraryInfo::location(QLibraryInfo::DataPath) + "/" + MYSCRIPT_VOIM_PROPERTY_PATH + propertyFile;
+ propertyFile = QLibraryInfo::path(QLibraryInfo::DataPath) + "/" + MYSCRIPT_VOIM_PROPERTY_PATH + propertyFile;
if (!checkFile(propertyFile)) {
qCCritical(qlcVKMyScript) << "failed to open Engine Property file " << propertyFile;
@@ -391,7 +391,7 @@ public:
voimProperty *properties = nullptr;
- QString languageConf = QLibraryInfo::location(QLibraryInfo::DataPath) + "/" + MYSCRIPT_LANGUAGE_CONF_PATH;
+ QString languageConf = QLibraryInfo::path(QLibraryInfo::DataPath) + "/" + MYSCRIPT_LANGUAGE_CONF_PATH;
properties = Properties_put(properties, "com.myscript.im.languageSearchPath", languageConf.toStdString().c_str());
if (!properties) {
qCCritical(qlcVKMyScript) << "failed to define property " << "com.myscript.im.languageSearchPath" << " with value " << languageConf;
@@ -405,7 +405,7 @@ public:
}
QString propertyFile = QLatin1String("/LanguageManager.properties");
- propertyFile = QLibraryInfo::location(QLibraryInfo::DataPath) + "/" + MYSCRIPT_VOIM_PROPERTY_PATH + propertyFile;
+ propertyFile = QLibraryInfo::path(QLibraryInfo::DataPath) + "/" + MYSCRIPT_VOIM_PROPERTY_PATH + propertyFile;
if (!checkFile(propertyFile)) {
qCCritical(qlcVKMyScript) << "failed to open LanguageManager Property file " << propertyFile;
@@ -432,7 +432,7 @@ public:
qCDebug(qlcVKMyScript) << Q_FUNC_INFO;
QString propertyFile = QLatin1String("/Recognizer.properties");
- propertyFile = QLibraryInfo::location(QLibraryInfo::DataPath) + "/" + MYSCRIPT_VOIM_PROPERTY_PATH + propertyFile;
+ propertyFile = QLibraryInfo::path(QLibraryInfo::DataPath) + "/" + MYSCRIPT_VOIM_PROPERTY_PATH + propertyFile;
if (!checkFile(propertyFile)) {
qCCritical(qlcVKMyScript) << "failed to open Recognizer Property file " << propertyFile;
diff --git a/src/virtualkeyboard/doc/src/deployment-guide.qdoc b/src/virtualkeyboard/doc/src/deployment-guide.qdoc
index 80df474a..ffce377c 100644
--- a/src/virtualkeyboard/doc/src/deployment-guide.qdoc
+++ b/src/virtualkeyboard/doc/src/deployment-guide.qdoc
@@ -195,7 +195,7 @@ There are several environment variables defined by the module that are listed be
\li Overrides the location of the Hunspell data files.
The default location depends on the value of
- \c {QLibraryInfo::location(QLibraryInfo::DataPath)}.
+ \c {QLibraryInfo::path(QLibraryInfo::DataPath)}.
For example, for Qt libraries built from source,
it could be \c {qtbase/qtvirtualkeyboard/hunspell}.
@@ -208,7 +208,7 @@ There are several environment variables defined by the module that are listed be
To disable resource bundling, add \c CONFIG+=no-bundle-pinyin in the
plugin's qmake command line. In this scenario, the default location
- depends on the value of \c {QLibraryInfo::location(QLibraryInfo::DataPath)}.
+ depends on the value of \c {QLibraryInfo::path(QLibraryInfo::DataPath)}.
For example, for Qt libraries built from source,
it could be \c {qtbase/qtvirtualkeyboard/pinyin/dict_pinyin.dat}.
\row
@@ -219,7 +219,7 @@ There are several environment variables defined by the module that are listed be
To disable resource bundling, add \c CONFIG+=no-bundle-tcime in the
plugin's qmake command line. In this scenario, the default location
- depends on the value of \c {QLibraryInfo::location(QLibraryInfo::DataPath)}.
+ depends on the value of \c {QLibraryInfo::path(QLibraryInfo::DataPath)}.
For example, for Qt libraries built from source,
it could be \c {qtbase/qtvirtualkeyboard/tcime/dict_cangjie.dat}.
\row
@@ -230,7 +230,7 @@ There are several environment variables defined by the module that are listed be
To disable resource bundling, add \c CONFIG+=no-bundle-tcime in the
plugin's qmake command line. In this scenario, the default location
- depends on the value of \c {QLibraryInfo::location(QLibraryInfo::DataPath)}.
+ depends on the value of \c {QLibraryInfo::path(QLibraryInfo::DataPath)}.
For example, for Qt libraries built from source,
it could be \c {qtbase/qtvirtualkeyboard/tcime/dict_zhuyin.dat}.
\row
@@ -241,7 +241,7 @@ There are several environment variables defined by the module that are listed be
To disable resource bundling, add \c CONFIG+=no-bundle-tcime in the
plugin's qmake command line. In this scenario, the default location
- depends on the value of \c {QLibraryInfo::location(QLibraryInfo::DataPath)}.
+ depends on the value of \c {QLibraryInfo::path(QLibraryInfo::DataPath)}.
For example, for Qt libraries built from source,
it could be \c {qtbase/qtvirtualkeyboard/tcime/dict_phrases.dat}.
\row