예제 #1
0
void WeatherDataSource::onSqlConnectorReply(const bb::data::DataAccessReply& reply)
{
    if (reply.hasError()) {
        qWarning() << "WeatherModel: Database error, " << reply.errorType() << " "
                << reply.errorMessage() << " id: " << reply.id();
    } else {
        if (reply.id() == 0) {
            emit weatherChanged(mRevision);
        }
    }
}
예제 #2
0
void AnimDataSource::onSqlConnectorReply(
		const bb::data::DataAccessReply& reply) {
	if (reply.hasError()) {
		qWarning() << "Database error, " << reply.errorType() << " "
				<< reply.errorMessage() << " id: " << reply.id();
	} else {
		if (reply.id() == 0) {
		    // We fake a network request here by adding a small delay before emitting
		    // the signal that will trigger the update in the list.
			QTimer::singleShot(800, this, SLOT(fakeNetworkDelay()));
		}
	}
}