Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 9ff9ba6..3fc5830 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp @@ -105,10 +105,9 @@ void TodayConfig::setAutoStart() { Config cfg( "today" ); cfg.setGroup( "Autostart" ); - int autostart = cfg.readNumEntry( "autostart", 1 ); - if ( autostart ) { + if ( m_autoStart ) { QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); e << QString( "add" ); e << QString( "today" ); - e << m_autoStartTimer; + e << QString("%1").arg( m_autoStartTimer ); } else { QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); @@ -126,6 +125,6 @@ void TodayConfig::readConfig() { m_autoStart = cfg.readNumEntry( "autostart", 1 ); CheckBoxAuto->setChecked( m_autoStart ); - m_autoStartTimer = cfg.readEntry( "autostartdelay", "0" ); - SpinBoxTime->setValue( m_autoStartTimer.toInt() ); + m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); + SpinBoxTime->setValue( m_autoStartTimer ); cfg.setGroup( "Plugins" ); @@ -169,5 +168,8 @@ void TodayConfig::writeConfig() { cfg.writeEntry( "autostart", m_autoStart ); m_autoStartTimer = SpinBoxTime->value(); - cfg.readEntry( "autostartdelay", m_autoStartTimer ); + cfg.writeEntry( "autostartdelay", m_autoStartTimer ); + + // set autostart settings + setAutoStart(); } |