コード例 #1
0
/*!
    Update the state of initialized() to \a value and emit the initializedChanged() signal.

    \sa initialized(), initializedChanged()
*/
void QNetworkRegistrationServer::updateInitialized( bool value )
{
    if ( value != initialized() ) {
        setValue( "initialized", value );
        emit initializedChanged();
    }
}
コード例 #2
0
void ContentItemInterface::setSocialNetwork(SocialNetworkInterface *socialNetwork)
{
    Q_D(ContentItemInterface);
    if (d->isInitialized) {
        qWarning() << Q_FUNC_INFO
                   << "Can't change social network after content item has been initialized!";
        return;
    }

    if (d->socialNetworkInterface != socialNetwork) {
        if (d->socialNetworkInterface)
            disconnect(d->socialNetworkInterface);
        if (socialNetwork && !socialNetwork->isInitialized()) {
            connect(socialNetwork, SIGNAL(initializedChanged()),
                    this, SLOT(socialNetworkInitializedChangedHandler()));
        }
        d->socialNetworkInterface = socialNetwork;
        emit socialNetworkChanged();
    }
}