From ad620973ea45b79fd17c6b0d31a613b35ba6566b Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Sat, 3 Dec 2016 13:15:33 +0100 Subject: Add support for additional library paths to the MapViewer example This patch makes the MapViewer example fetch and add additional library paths from the environment variable "QTLOCATION_EXTRA_LIBRARY_PATH". This path is colon separated, and can be used to add and test additional plugins easily, without the need to modify the example. Change-Id: I61563e1062d2ea860f4288ff17b54067b6bf9c8d Reviewed-by: Alex Blasche --- examples/location/mapviewer/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples') diff --git a/examples/location/mapviewer/main.cpp b/examples/location/mapviewer/main.cpp index a58dcd44..1d44a31b 100644 --- a/examples/location/mapviewer/main.cpp +++ b/examples/location/mapviewer/main.cpp @@ -84,6 +84,10 @@ static bool parseArgs(QStringList& args, QVariantMap& parameters) int main(int argc, char *argv[]) { + const QByteArray additionalLibraryPaths = qgetenv("QTLOCATION_EXTRA_LIBRARY_PATH"); + for (const QByteArray &p : additionalLibraryPaths.split(':')) + QCoreApplication::addLibraryPath(QString(p)); + QGuiApplication application(argc, argv); QVariantMap parameters; -- cgit v1.2.3