Exemplo n.º 1
0
void QGeoRouteReplyNokia::networkFinished()
{
    if (!m_reply)
        return;

    if (m_reply->error() != QNetworkReply::NoError) {
        // Removed because this is already done in networkError, which previously caused _two_ errors to be raised for every error.
        //setError(QGeoRouteReply::CommunicationError, m_reply->errorString());
        //m_reply->deleteLater();
        //m_reply = 0;
        return;
    }

    QGeoRouteXmlParser parser(request());

    if (parser.parse(m_reply)) {
        setRoutes(parser.results());
        setFinished(true);
    } else {
        // add a qWarning with the actual parser.errorString()
        setError(QGeoRouteReply::ParseError, "The response from the service was not in a recognisable format.");
    }

    m_reply->deleteLater();
    m_reply = 0;
}
Exemplo n.º 2
0
NetworkManager::Ipv6Setting::Ipv6Setting(const Ptr &other):
    Setting(other),
    d_ptr(new Ipv6SettingPrivate())
{
    setMethod(other->method());
    setDns(other->dns());
    setDnsSearch(other->dnsSearch());
    setAddresses(other->addresses());
    setRoutes(other->routes());
    setIgnoreAutoRoutes(other->ignoreAutoRoutes());
    setIgnoreAutoDns(other->ignoreAutoDns());
    setNeverDefault(other->neverDefault());
    setMayFail(other->mayFail());
}
Exemplo n.º 3
0
 MTD_FLASHMEM DefaultHTTPHandler::DefaultHTTPHandler()
 {
     static const Route routes[] =
     {
         {FSTR("/"),	          (PageHandler)&DefaultHTTPHandler::get_home},
         {FSTR("/confwizard"), (PageHandler)&DefaultHTTPHandler::get_confwizard},
         {FSTR("/confwifi"),   (PageHandler)&DefaultHTTPHandler::get_confwifi},
         {FSTR("/wifiscan"),   (PageHandler)&DefaultHTTPHandler::get_wifiscan},
         {FSTR("/confnet"),    (PageHandler)&DefaultHTTPHandler::get_confnet},
         {FSTR("/confserv"),   (PageHandler)&DefaultHTTPHandler::get_confserv},
         {FSTR("/confgpio"),   (PageHandler)&DefaultHTTPHandler::get_confgpio},
         {FSTR("/gpio"),       (PageHandler)&DefaultHTTPHandler::get_gpio},
         {FSTR("/conftime"),   (PageHandler)&DefaultHTTPHandler::get_conftime},
         {FSTR("/reboot"),     (PageHandler)&DefaultHTTPHandler::get_reboot},
         {FSTR("/restore"),    (PageHandler)&DefaultHTTPHandler::get_restore},
         {FSTR("*"),           (PageHandler)&DefaultHTTPHandler::get_all},
     };
     setRoutes(routes, sizeof(routes) / sizeof(Route));
 }