[desktop] Fixed Downloader issues.

This commit is contained in:
vng 2015-03-12 17:38:55 +03:00 committed by Alex Zolotarev
parent 04fec9baad
commit c45db7850b
2 changed files with 9 additions and 5 deletions

View file

@ -10,13 +10,17 @@ namespace storage
ActiveMapsLayout::ActiveMapsLayout(Framework & framework)
: m_framework(framework)
{
#ifndef OMIM_OS_DESKTOP
m_subscribeSlotID = GetStorage().Subscribe(bind(&ActiveMapsLayout::StatusChangedCallback, this, _1),
bind(&ActiveMapsLayout::ProgressChangedCallback, this, _1, _2));
#endif
}
ActiveMapsLayout::~ActiveMapsLayout()
{
#ifndef OMIM_OS_DESKTOP
GetStorage().Unsubscribe(m_subscribeSlotID);
#endif
}
void ActiveMapsLayout::Init(vector<string> const & maps)

View file

@ -150,10 +150,10 @@ namespace qt
QAbstractButton * res = ask.clickedButton();
if (res == btns[0])
m_framework.DownloadCountry(countryIndex, storage::TMapOptions::EMapOnly);
m_framework.DownloadCountry(countryIndex, storage::TMapOptions::EMapWithCarRouting);
if (res == btns[1])
m_framework.DeleteCountry(countryIndex, storage::TMapOptions::EMapOnly);
m_framework.DeleteCountry(countryIndex, storage::TMapOptions::EMapWithCarRouting);
}
break;
@ -167,18 +167,18 @@ namespace qt
ask.setDefaultButton(QMessageBox::No);
if (ask.exec() == QMessageBox::Yes)
m_framework.DeleteCountry(countryIndex, storage::TMapOptions::EMapOnly);
m_framework.DeleteCountry(countryIndex, storage::TMapOptions::EMapWithCarRouting);
}
break;
case TStatus::ENotDownloaded:
case TStatus::EDownloadFailed:
m_framework.DownloadCountry(countryIndex, storage::TMapOptions::EMapOnly);
m_framework.DownloadCountry(countryIndex, storage::TMapOptions::EMapWithCarRouting);
break;
case TStatus::EInQueue:
case TStatus::EDownloading:
m_framework.DeleteCountry(countryIndex, storage::TMapOptions::EMapOnly);
m_framework.DeleteCountry(countryIndex, storage::TMapOptions::EMapWithCarRouting);
break;
default: