summaryrefslogtreecommitdiff
path: root/platform/glfw
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-06-14 15:03:13 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-06-18 16:26:51 +0300
commit59e7b9a8780e282cf90ede7ae8e3b1affe1e684e (patch)
treee5f7fd8a74f4a9495d872acdcdf4eb2b44f123f2 /platform/glfw
parent9beb740fb747e721b6a678bbe63399c70e132881 (diff)
downloadqtlocation-mapboxgl-59e7b9a8780e282cf90ede7ae8e3b1affe1e684e.tar.gz
[core] Rename resetCache to resetDatabase
Avoid confusion about what is being reset. In this case, the whole database and not only the ambient cache.
Diffstat (limited to 'platform/glfw')
-rw-r--r--platform/glfw/glfw_view.cpp2
-rw-r--r--platform/glfw/glfw_view.hpp4
-rw-r--r--platform/glfw/main.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index cba3419672..41c3e93b35 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -222,7 +222,7 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action,
view->clearAnnotations();
break;
case GLFW_KEY_I:
- view->resetCacheCallback();
+ view->resetDatabaseCallback();
break;
case GLFW_KEY_K:
view->addRandomCustomPointAnnotations(1);
diff --git a/platform/glfw/glfw_view.hpp b/platform/glfw/glfw_view.hpp
index 3322932dde..9c9661546c 100644
--- a/platform/glfw/glfw_view.hpp
+++ b/platform/glfw/glfw_view.hpp
@@ -41,7 +41,7 @@ public:
}
void setResetCacheCallback(std::function<void()> callback) {
- resetCacheCallback = callback;
+ resetDatabaseCallback = callback;
};
void setShouldClose();
@@ -125,7 +125,7 @@ private:
std::function<void()> changeStyleCallback;
std::function<void()> pauseResumeCallback;
std::function<void()> onlineStatusCallback;
- std::function<void()> resetCacheCallback;
+ std::function<void()> resetDatabaseCallback;
std::function<void(mbgl::Map*)> animateRouteCallback;
mbgl::util::RunLoop runLoop;
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp
index a5001d1204..3c1e50e196 100644
--- a/platform/glfw/main.cpp
+++ b/platform/glfw/main.cpp
@@ -161,7 +161,7 @@ int main(int argc, char *argv[]) {
});
view->setResetCacheCallback([fileSource] () {
- fileSource->resetCache([](std::exception_ptr ex) {
+ fileSource->resetDatabase([](std::exception_ptr ex) {
if (ex) {
mbgl::Log::Error(mbgl::Event::Database, "Failed to reset cache:: %s", mbgl::util::toString(ex).c_str());
}