bool accepted = false;
if (m_automaticUpdateFirstStart && enabled) {
- m_automaticUpdateFirstStart = false;
accepted = m_ui->showEnableAutomaticUpdateLocationDialog();
+ m_automaticUpdateFirstStart = false;
m_ui->automaticLocationUpdateEnabled(accepted);
}
else {
if (m_automaticUpdateIntervalTimer) {
if (enabled && m_gps->isRunning()) {
- if (updateIntervalMsecs < MIN_UPDATE_INTERVAL_MSECS)
- m_automaticUpdateIntervalTimer->setInterval(MIN_UPDATE_INTERVAL_MSECS);
- else
- m_automaticUpdateIntervalTimer->setInterval(updateIntervalMsecs);
+// if (updateIntervalMsecs < MIN_UPDATE_INTERVAL_MSECS)
+// m_automaticUpdateIntervalTimer->setInterval(MIN_UPDATE_INTERVAL_MSECS);
+// else
+ m_automaticUpdateIntervalTimer->setInterval(updateIntervalMsecs / 60);
m_automaticUpdateIntervalTimer->start();
}
else
QT += network \
webkit
-#DEFINES += QT_NO_DEBUG_OUTPUT
+DEFINES += QT_NO_DEBUG_OUTPUT
simulator {
SOURCES += network/networkhandlerprivatestub.cpp \
bool MainWindow::showEnableAutomaticUpdateLocationDialog()
{
- QMessageBox msgBox(QMessageBox::Warning, tr("Automatic location update"),
+ QMessageBox msgBox(QMessageBox::Question, tr("Automatic location update"),
tr("Are you sure you want to enable automatic location update?"),
QMessageBox::Ok | QMessageBox::Cancel, 0);
msgBox.button(QMessageBox::Ok)->setText(tr("Ok"));
+ qWarning() << __PRETTY_FUNCTION__;
int ret = msgBox.exec();
-
+ qWarning() << __PRETTY_FUNCTION__;
if (ret == QMessageBox::Ok)
return true;
else
scrollArea->show();
+ setTime(QTime(0, LIST_MINUTES_STEP));
readSettings();
}
void SettingsDialog::setAutomaticLocationUpdateSettings(bool checked)
{
- qDebug() << __PRETTY_FUNCTION__;
+ qWarning() << __PRETTY_FUNCTION__;
m_automaticLocationUpdate->setChecked(checked);
m_automaticLocationUpdateOldValue = checked;
void SettingsDialog::readSettings()
{
- qDebug() << __PRETTY_FUNCTION__;
+ qWarning() << __PRETTY_FUNCTION__;
QSettings settings(DIRECTORY_NAME, FILE_NAME);
bool automaticUpdateEnabled = settings.value(SETTINGS_AUTOMATIC_UPDATE_ENABLED, false).toBool();
void SettingsDialog::emitAutomaticLocationUpdateSettings()
{
- qDebug() << __PRETTY_FUNCTION__;
+ qWarning() << __PRETTY_FUNCTION__;
if (m_automaticLocationUpdate->isChecked()) {
QTime emptyTime = QTime();
+ qDebug() << emptyTime.msecsTo(time());
emit enableAutomaticLocationUpdate(true, emptyTime.msecsTo(time()));
}
else {