From 16ad61f4c8ebd22bdc282496122db49a5243f02f Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Fri, 17 May 2024 11:15:08 -0300 Subject: [PATCH] [desktop] Disable traffic switch and TrafficManager initialization. Signed-off-by: Viktor Govako --- map/framework.cpp | 14 ++++---------- qt/mainwindow.cpp | 5 +++-- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index e73ffaa2b3..76bcf6c700 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -6,9 +6,7 @@ #include "ge0/url_generator.hpp" -#include "routing/index_router.hpp" #include "routing/route.hpp" -#include "routing/routing_helpers.hpp" #include "routing/speed_camera_prohibition.hpp" #include "routing_common/num_mwm_id.hpp" @@ -18,15 +16,12 @@ #include "search/locality_finder.hpp" #include "storage/country_info_getter.hpp" -#include "storage/routing_helpers.hpp" #include "storage/storage_helpers.hpp" #include "drape_frontend/color_constants.hpp" #include "drape_frontend/gps_track_point.hpp" #include "drape_frontend/visual_params.hpp" -#include "editor/editable_data_source.hpp" - #include "descriptions/loader.hpp" #include "indexer/categories_holder.hpp" @@ -42,7 +37,6 @@ #include "indexer/scales.hpp" #include "indexer/transliteration_loader.hpp" -#include "platform/local_country_file_utils.hpp" #include "platform/localization.hpp" #include "platform/measurement_utils.hpp" #include "platform/mwm_version.hpp" @@ -65,7 +59,6 @@ #include "base/logging.hpp" #include "base/math.hpp" -#include "base/stl_helpers.hpp" #include "base/string_utils.hpp" #include "std/target_os.hpp" @@ -361,9 +354,10 @@ Framework::Framework(FrameworkParams const & params, bool loadMaps) editor.SetDelegate(make_unique(m_featuresFetcher.GetDataSource())); editor.SetInvalidateFn([this](){ InvalidateRect(GetCurrentViewport()); }); - m_trafficManager.SetCurrentDataVersion(m_storage.GetCurrentDataVersion()); - m_trafficManager.SetSimplifiedColorScheme(LoadTrafficSimplifiedColors()); - m_trafficManager.SetEnabled(LoadTrafficEnabled()); + /// @todo Uncomment when we will integrate a traffic provider. + // m_trafficManager.SetCurrentDataVersion(m_storage.GetCurrentDataVersion()); + // m_trafficManager.SetSimplifiedColorScheme(LoadTrafficSimplifiedColors()); + // m_trafficManager.SetEnabled(LoadTrafficEnabled()); m_isolinesManager.SetEnabled(LoadIsolinesEnabled()); diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index 5ef4194f75..85444c6fab 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -876,8 +876,9 @@ void MainWindow::SetLayerEnabled(LayerType type, bool enable) switch (type) { case LayerType::TRAFFIC: - frm.GetTrafficManager().SetEnabled(enable); - frm.SaveTrafficEnabled(enable); + /// @todo Uncomment when we will integrate a traffic provider. + // frm.GetTrafficManager().SetEnabled(enable); + // frm.SaveTrafficEnabled(enable); break; case LayerType::TRANSIT: frm.GetTransitManager().EnableTransitSchemeMode(enable);