summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-06-17 15:26:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-19 15:56:11 +0200
commita2bab88a3c5fa89580031d2cee62c67c943dca9d (patch)
treeac0c0271325ceb8ba9f45ab9776bfa41704ca8e8
parent89aa80147be9aa6d997dcb1cbd94bdb6281c58bb (diff)
Remove jsondb related docs and example code
Task-number: QTBUG-31741 Change-Id: I0ee10f459d79607f06d37ae7317c2d54a8d7d56a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--doc/src/examples/declarative-places.qdoc8
-rw-r--r--doc/src/plugins/jsondb.qdoc295
-rw-r--r--doc/src/qtlocation.qdoc2
-rw-r--r--examples/declarative/places/content/places/OptionsDialog.qml5
-rw-r--r--examples/declarative/places/content/places/PlaceDelegate.qml3
-rw-r--r--examples/declarative/places/content/places/SearchBox.qml2
-rw-r--r--examples/declarative/places/places.qml5
-rw-r--r--tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp1
8 files changed, 9 insertions, 312 deletions
diff --git a/doc/src/examples/declarative-places.qdoc b/doc/src/examples/declarative-places.qdoc
index f6efd274..30848740 100644
--- a/doc/src/examples/declarative-places.qdoc
+++ b/doc/src/examples/declarative-places.qdoc
@@ -217,12 +217,4 @@
\section1 Running the Example
The example detects which plugins are available and has an option to show them in the via
the Provider button.
-
- The \l {Qt Location JsonDb plugin (technical preview only)}{JsonDb plugin} in particular acts
- as a data store for user defined favorites which can be saved and removed. In order to use the
- JsonDb plugin however the JsonDb daemon must be running in the background.
-
- \code
- jsondb & //run jsondb daemon in the background
- \endcode
*/
diff --git a/doc/src/plugins/jsondb.qdoc b/doc/src/plugins/jsondb.qdoc
deleted file mode 100644
index 4dc330c8..00000000
--- a/doc/src/plugins/jsondb.qdoc
+++ /dev/null
@@ -1,295 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page location-plugin-jsondb.html
-\title Qt Location JsonDb plugin (technical preview only)
-\previouspage {Qt Location Module}
-
-\ingroup QtLocation-plugins
-
-\brief Local store for user defined favorite places.
-
-\section1 Overview
-
-Included with Qt Location is a plugin which stores places in a Qt Json Database
-(also known as JsonDb). This plugin is intended to be used as a local store for
-user defined favorite places.
-
-The JsonDb GeoServices plugin can be loaded by using the plugin key "places_jsondb".
-
-Note that in order to use this plugin, the JsonDb daemon must be running in the
-background.
-
-This plugin is provided as a technical preview only, there is no guarantee that
-data integrity is maintined when upgrading to the official plugin release. This plugin
-has a build dependency on Qt JsonDb.
-
-\section1 Parameters
-
-The following table lists optional parameters that can be passed to the Nokia plugin.
-\table
- \header
- \li Parameter
- \li Description
- \row
- \li places.partition
- \li Specifies which JsonDb partition to store Places and Categories. If no partition is specified, the default
- partition is used.
-\endtable
-
-\section1 Places
-The Nokia JsonDb provider accesses places stored locally on device.
-It provides read/write access to the place repository. The specific
-capabilities are outlined below:
-
-\section2 Capabilities
-\table
- \row
- \li Storage
- \li local
- \row
- \li Read/Write
- \li read/write
- \row
- \li Icons
- \li yes
- \row
- \li Search term suggestions
- \li no
- \row
- \li Recommendations
- \li no
- \row
- \li Category structure
- \li Hierarchical
- \row
- \li (Rich) Content images
- \li no
- \row
- \li (Rich) Content reviews
- \li no
- \row
- \li (Rich) Content editorials
- \li no
- \row
- \li All details fetched during search
- \li yes
- \row
- \li Paging offset index
- \li yes
- \row
- \li Paging limit
- \li yes
- \row
- \li Distance relevance hint
- \li yes
- \row
- \li Lexical name relevance hint
- \li yes
- \row
- \li Extended Attributes
- \li no
- \row
- \li Notifications for added/removed places/categories
- \li yes
- \row
- \li visibility scopes
- \li device
- \row
- \li favorites matching/(usable as favoritesPlugin)
- \li yes
-\endtable
-
-\section2 Plugin Specific Behaviors
-\section3 Search
-The following list shows what core place data is returned during a place search:
-\list
-\li name
-\li location
-\li contact information
-\li icon
-\li categories
-\endlist
-
-The JsonDb plugin does not support any other details so all
-available details are fetched during a search. The JsonDb plugin
-does not support saving of any other details.
-
-\section3 Icons
-\section4 Parameter Reference
-The JsonDbPlugin supports the following icon parameter values
-\table
- \header
- \li Key
- \li Value
- \row
- \li smallUrl
- \li Holds the URL for the small icon
- \row
- \li smallSize
- \li Holds the dimensions of the small icon
- \row
- \li smallSourceUrl
- \li Holds the source URL from which the small icon is to be copied/downloaded from.
- \row
- \li mediumUrl
- \li Holds the URL for the medium sized icon.
- \row
- \li mediumSize
- \li Holds the dimensions of the medium sized icon.
- \row
- \li mediumSourceUrl
- \li Holds the source URL from which the medium icon is to be copied/downloaded from.
- \row
- \li largeUrl
- \li Holds the URL for the large icon.
- \row
- \li largeSize
- \li Holds the dimensions of the large icon.
- \row
- \li largeSourceUrl
- \li Holds the source URL from which the large icon is to be copied/downloaded from.
- \row
- \li fullscreenUrl
- \li Holds the URL for the fullscreen icon.
- \row
- \li fullscreenSize
- \li Holds the dimensions of the fullscreen icon.
- \row
- \li fullscreenSourceUrl
- \li Holds the source URL from which the fullscreen icon is to be copied/downloaded from.
-\endtable
-
-In C++ the value of the URLs must always be a QUrl.
-In QML the values of the URLs may be url or string types.
-
-\section4 Typical Usage
-During a typical place search, the icon parameters might be populated like so
-\code
-smallUrl: file:///foo/bar/icon_s.png
-smallSize: QSize(20,20)
-largeUrl: file:///foo/bar/icon_l.png
-largeSize: QSize(50,50)
-\endcode
-
-Only small and large icons were available in this case. Note that for a given size URL, its dimensions will also be populated.
-These URLs and dimensions are used by the JsonDb plugin to determine the correct URL to return when QPlaceIcon::url() or \l {QtLocation5::Icon::url()} {Icon::url()}
-is called.
-
-If we wish to change the icons we, can simply specify a different set of parameter values and then save the place or category containing the icon.
-\code
-smallUrl: file:///opt/icons/new_icon_small.png
-(smallSize: QSize(20,20)) //optional
-largeUrl: file:///opt/icons/new_icon_large.png
-(largeSize: QSize(50,50)) // optional
-\endcode
-
-All we need to do is set the URLs to where the new icon image is. The size typically does not need to be specified
-since it is generally automatically calculated. In some cases where the size cannot be calculated, for example if the
-specified URL cannot currently be accessed, it is necessary to specify a recommended size.
-If the size of the image can be calculated and a size is also specified, then the specified size is ignored.
-
-\section4 Copying/Downloading Icons to a Specified Destination
-When saving icons, we use the source parameters to hold the URL of the source image we are copying from
-\code
-smallSourceUrl: http://www.example.com/icon_s.png
-smallUrl: file:///bar/icon_small.png
-(smallSize: QSize(20,20) //optional
-\endcode
-
-Using the parameters above will copy the icon from \c smallSourceUrl to the \c smallUrl. The smallSourceUrl can be a remote or local URL,
-but the smallUrl must be local. If the smallUrl already exists, it is overwritten, otherwise it is created.
-\c smallSize typically does not need to be set since an attempt will be made to calculate the icon's size. In some cases where the size cannot be calculated, for example if the
-specified URL cannot currently be accessed, it is necessary to specify a recommended size.
-If the size of the image can be calculated and a size is also specified, then the specified size is ignored.
-
-\section4 Copying/Downloading Icons Without a Specified Destination
-It is possible to copy icons, when a place or category is saved and not have to
-specify a destination. In this case, a data URL will be created for the icon
-in the underlying database. A data URL contains the icon image embedded
-into the URL itself. A destination size is chosen for the icon depending
-on it's calculated size.
-
-\code
-//input parameters
-smallSourceUrl: http://www.example.com/icon_small.png
-
-//(1) Result if the source icon's actual size corresponded to small
-smallUrl: data:image/png;base64,iVBORw0K….
-smallSize: QSize(20,20)
-
-//(2) Result if the source icon's actual size corresponded to medium
-mediumUrl: data:image/png;base64,iVBORw0K….
-mediumSize: QSize(30,30)
-\endcode
-
-The above shows that for a given input source URL, an appropriate destination is chosen for the data URL.
-The icon will not necessarily be placed into smallUrl, since the size is calculated and a destination
-chosen. The image at the sourceUrl must always been accessible so that the data URL can be generated,
-consequently this prerequisite also means that a size need not be specified since can always be calculated.
-
-This behavior of automatically choosing a destination is necessary because when an icon from a different plugin is saved,
-it isn't known whether there is only one URL by the JsonDb plugin. When creating a compatible place from another
-plugin, the JsonDbPlugin tries to get the URLs for the standard small, medium and large sizes. It is possible
-however that all these may end up being the same URL. The JsonDb plugn filters out these duplicates and chooses
-an appropriate destination based on size.
-\code
-//The resultant place's icon after calling QPlaceManager::compatiblePlace()
-smallSourceUrl: http://www.example.com/foo.png
-mediumSourceUrl: http://www.example.com/foo.png
-largeSourceUrl: http://www.example.com/foo.png
-
-//on save, the plugin filters out the duplicates and determines an appropriate size
-//in this case the data URL for the large size has been created.
-largeUrl: data:image/png;base64,qVyOZw0p...
-largeSize: QSize(50,50)
-\endcode
-
-The fullscreen icon is never retrieved and converted into a data URL because data URLs are only meant
-for small icon images.
-
-\section3 Visibility Scope
-The JsonDb plugin only supports places of the QLocation::PrivateVisibility scope.
-Specifying the QLocation::UnspecifiedVisibility when saving a place will default
-to the QLocation::PrivateVisibility scope.
-
-\section3 Favorites Matching Parameters
-The JsonDb plugin can be used as a favorites store and thus supports the following
-parameters.
-\table
- \header
- \li key
- \li value
- \row
- \li "alternativeId" (aka QPlaceMatchRequest::AlternativeId)
- \li alternative identifier attribute type, of the form "x_id_<provider name>" for example "x_id_nokia"
- \row
- \li "proximity"
- \li The distance (m) allowed between places in order to be considered a match.
-\endtable
-*/
diff --git a/doc/src/qtlocation.qdoc b/doc/src/qtlocation.qdoc
index 7e0b7991..f30e308d 100644
--- a/doc/src/qtlocation.qdoc
+++ b/doc/src/qtlocation.qdoc
@@ -261,7 +261,7 @@ New features of Qt Location includes
\li Full QML API now available for routing and geocoding -- compatible with standard QML model-view design
\li Service provider feature detection without having to open all the available plugins
\li Unified "Plugin" QML type used by routing/geocoding/maps etc with easy-to-set PluginParameters
- \li Two plugins are supplied with Qt. The Nokia plugin for GeoServices and the JsonDb plugin for storing locally created places. The JsonDb plugin can also be used to save Favorite places linked to another plugin.
+ \li Two plugins are supplied with Qt (a Nokia and an OSM plugin for GeoServices).
\li Landmarks API is replaced by the Places API
\li \l Places supports viewing of richer content such as reviews, images, and editorials
\li \l Places supports locale handling, sponsored search results, and supplier attribution
diff --git a/examples/declarative/places/content/places/OptionsDialog.qml b/examples/declarative/places/content/places/OptionsDialog.qml
index 9390cb9a..7b7c9266 100644
--- a/examples/declarative/places/content/places/OptionsDialog.qml
+++ b/examples/declarative/places/content/places/OptionsDialog.qml
@@ -72,7 +72,8 @@ Dialog {
id: enableFavoritesButton
function resetVisibility() {
- if (placesPlugin.name !== "places_jsondb") {
+ //jsondb plug-in is no more but saving of places may come back
+ /*if (placesPlugin.name !== "places_jsondb") {
var pluginNames = placesPlugin.availableServiceProviders;
for (var i = 0; i < pluginNames.length; ++i) {
if (pluginNames[i] === "places_jsondb") {
@@ -80,7 +81,7 @@ Dialog {
return;
}
}
- }
+ }*/
enableFavoritesButton.visible = false;
}
diff --git a/examples/declarative/places/content/places/PlaceDelegate.qml b/examples/declarative/places/content/places/PlaceDelegate.qml
index 320b42fc..90a2cceb 100644
--- a/examples/declarative/places/content/places/PlaceDelegate.qml
+++ b/examples/declarative/places/content/places/PlaceDelegate.qml
@@ -247,8 +247,7 @@ Item {
function reset()
{
- saveButton.visible = (placesPlugin.name !== "places_jsondb")
- && (placeSearchModel.favoritesPlugin !== null);
+ saveButton.visible = (placeSearchModel.favoritesPlugin !== null);
saveStatus.visible = false;
}
diff --git a/examples/declarative/places/content/places/SearchBox.qml b/examples/declarative/places/content/places/SearchBox.qml
index a1744ee8..335af339 100644
--- a/examples/declarative/places/content/places/SearchBox.qml
+++ b/examples/declarative/places/content/places/SearchBox.qml
@@ -206,7 +206,7 @@ Rectangle {
PlaceSearchSuggestionModel {
id: suggestionModel
plugin: placesPlugin
- searchArea: plugin.name === "places_jsondb" ? null : placeSearchModel.searchArea
+ searchArea: placeSearchModel.searchArea
onStatusChanged: {
if (status == PlaceSearchSuggestionModel.Ready)
diff --git a/examples/declarative/places/places.qml b/examples/declarative/places/places.qml
index dba6ab89..1fce1654 100644
--- a/examples/declarative/places/places.qml
+++ b/examples/declarative/places/places.qml
@@ -333,14 +333,15 @@ Item {
onCancelButtonClicked: page.state = ""
onGoButtonClicked: {
- if (isFavoritesEnabled) {
+ /*if (isFavoritesEnabled) {
if (favoritesPlugin == null)
favoritesPlugin = Qt.createQmlObject('import QtLocation 5.0; Plugin { name: "places_jsondb" }', page);
favoritesPlugin.parameters = pluginParametersFromMap(pluginParameters);
placeSearchModel.favoritesPlugin = favoritesPlugin;
} else {
placeSearchModel.favoritesPlugin = null;
- }
+ }*/
+ placeSearchModel.favoritesPlugin = null;
placeSearchModel.relevanceHint = orderByDistance ? PlaceSearchModel.DistanceHint :
orderByName ? PlaceSearchModel.LexicalPlaceNameHint :
diff --git a/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp b/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp
index 015c705e..74c33d86 100644
--- a/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp
+++ b/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp
@@ -90,7 +90,6 @@ void tst_QPlaceManagerNokia::initTestCase()
qRegisterMetaType<QPlaceIdReply *>();
QStringList providers = QGeoServiceProvider::availableServiceProviders();
- providers.contains("places_jsondb");
QMap<QString, QVariant> params;
params.insert("app_id", "stub");