showDelayedResult(createResult(result.name,
result.street,
- result.city));
+ result.city), BANNER_DELAY);
}
else
{
timedMessage_ = message;
// Show banner after small delay
- showDelayedResult(message);
+ showDelayedResult(message, BANNER_DELAY);
}
}
}
-void CallListener::showDelayedResult(QString const& text)
+void CallListener::showDelayedResult(QString const& text, int delay)
{
timedMessage_ = text;
- QTimer::singleShot(BANNER_DELAY, this, SLOT(showTimedMessage()));
+ QTimer::singleShot(delay, this, SLOT(showTimedMessage()));
}
void CallListener::showTimedMessage()
void begin();
void end();
static const int REQUEST_TIMEOUT = 15000;
- static const int BANNER_DELAY = 400;
+ static const int BANNER_DELAY = 350;
private slots:
void requestFinished(QVector <Eniro::Result> const& results, Eniro::SearchDetails const& details, bool error);
void search(Eniro::SearchDetails const& details);
void showResult(QString const& text);
- void showDelayedResult(QString const& text);
+ void showDelayedResult(QString const& text, int delay);
QString createResult(QString const& name, QString const& street, QString const& city);
QString timedMessage_;
Eniro* eniro_;
start on started hildon-desktop
script
- /etc/init.d/jenirokd start
+ /etc/init.d/jenirokd start -boot
end script
int main(int argc, char *argv[])
{
- // If daemon was started on boot, the first parameter is not set
- if(!(argc >= 2 && QString(argv[1]) == "-manual"))
+ // If daemon was started on boot, the first parameter is set to "-boot"
+ if(argc >= 2 && QString(argv[1]) == "-boot")
{
if(Settings::instance()->get("autostart") == "0")
{
bool Daemon::start()
{
QProcess proc;
- proc.start(INIT_DIR + "/" + DAEMON_NAME, QStringList() << "start" << "-manual");
+ proc.start(INIT_DIR + "/" + DAEMON_NAME, QStringList() << "start");
proc.waitForStarted();
proc.waitForFinished();