summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlibraryinfo.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-09-04 09:45:26 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-12 23:35:56 +0200
commit557623cc4f22295e5e89462dfdff20d78b3b9cdc (patch)
treea10e2bf2b43ddae1cf90cf8005eb0e2957f716f7 /src/corelib/global/qlibraryinfo.h
parentd24174918f1f224cd32f41b1a640a9db27965e64 (diff)
Rename QLibraryInfo::location() to path()
As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlibraryinfo.h')
-rw-r--r--src/corelib/global/qlibraryinfo.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 4a14a9728a..3ceb20336b 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -59,7 +59,7 @@ public:
static QVersionNumber version() noexcept Q_DECL_CONST_FUNCTION;
#endif
- enum LibraryLocation
+ enum LibraryPath
{
PrefixPath = 0,
DocumentationPath,
@@ -90,10 +90,16 @@ public:
#endif
SettingsPath = 100
};
- static QString location(LibraryLocation); // ### Qt 6: consider renaming it to path()
+ static QString path(LibraryPath p);
+#if QT_DEPRECATED_SINCE(6, 0)
+ using LibraryLocation = LibraryPath;
+ QT_DEPRECATED_VERSION_X_6_0("Use path()")
+ static QString location(LibraryLocation location)
+ { return path(location); }
+#endif
#ifdef QT_BUILD_QMAKE
enum PathGroup { FinalPaths, EffectivePaths, EffectiveSourcePaths, DevicePaths };
- static QString rawLocation(LibraryLocation, PathGroup);
+ static QString rawLocation(LibraryPath, PathGroup);
static void reload();
static void sysrootify(QString *path);
#endif