diff options
-rw-r--r-- | examples/location/mapviewer/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/location/mapviewer/main.cpp b/examples/location/mapviewer/main.cpp index 39c117ed..b332de8c 100644 --- a/examples/location/mapviewer/main.cpp +++ b/examples/location/mapviewer/main.cpp @@ -52,7 +52,9 @@ #include <QtGui/QGuiApplication> #include <QtQml/QQmlApplicationEngine> #include <QtQuick/QQuickItem> +#if QT_CONFIG(ssl) #include <QSslSocket> +#endif #include <QQmlContext> static bool parseArgs(QStringList& args, QVariantMap& parameters) @@ -133,7 +135,11 @@ int main(int argc, char *argv[]) parameters[QStringLiteral("osm.useragent")] = QStringLiteral("QtLocation Mapviewer example"); QQmlApplicationEngine engine; +#if QT_CONFIG(ssl) engine.rootContext()->setContextProperty("supportsSsl", QSslSocket::supportsSsl()); +#else + engine.rootContext()->setContextProperty("supportsSsl", false); +#endif engine.addImportPath(QStringLiteral(":/imports")); engine.load(QUrl(QStringLiteral("qrc:///mapviewer.qml"))); QObject::connect(&engine, SIGNAL(quit()), qApp, SLOT(quit())); |