Esempio n. 1
0
static bool firstUse()
{
    bool needFirstUse = false;
#if 0 //  defined(QPE_NEED_CALIBRATION)
    if ( !QFile::exists( "/etc/pointercal" ) )
        needFirstUse = true;
#endif

    {
        QSettings config("Trolltech","qpe");
        config.beginGroup( "Startup" );
        needFirstUse |= config.value( "FirstUse", true ).toBool();
    }

    if ( !needFirstUse )
        return false;

    ServerApplication::login(true);

    FirstUse *fu = new FirstUse();
    fu->exec();
    bool rs = fu->restartNeeded();
    delete fu;
    return rs;
}
Esempio n. 2
0
static bool firstUse()
{
    bool needFirstUse = FALSE;
    if ( QWSServer::mouseHandler() &&
         QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
        if ( !QFile::exists( "/etc/pointercal" ) )
            needFirstUse = TRUE;
    }

    {
    Config config( "qpe" );
    config.setGroup( "Startup" );
    needFirstUse |= config.readBoolEntry( "FirstUse", TRUE );
    }

    if ( !needFirstUse )
    return FALSE;

    FirstUse *fu = new FirstUse();
    fu->exec();
    bool rs = fu->restartNeeded();
    delete fu;
    return rs;
}