Example #1
0
int KDEsuClient::exitCode()
{
    QCString result;
    if(command("EXIT\n", &result) != 0)
        return -1;

    return result.toLong();
}
Example #2
0
long KConfigBase::readLongNumEntry(const char *pKey, long nDefault) const
{
    QCString aValue = readEntryUtf8(pKey);
    if(aValue.isNull())
        return nDefault;
    else
    {
        bool ok;
        long rc = aValue.toLong(&ok);
        return (ok ? rc : nDefault);
    }
}