Ejemplo n.º 1
0
bool KArchive::writeData(const char *data, uint size)
{
    WriteDataParams params;
    params.data = data;
    params.size = size;
    virtual_hook(VIRTUAL_WRITE_DATA, &params);
    return params.retval;
}
Ejemplo n.º 2
0
QVariant  QAccessibleWidgetEx_QtDShell::__override_virtual_hook(const QVariant&  data0, bool static_call)
{
    if (static_call) {
        return QAccessibleInterfaceEx::virtual_hook((const QVariant& )data0);
    } else {
        return virtual_hook((const QVariant& )data0);
    }
}
Ejemplo n.º 3
0
/*! \internal
*/
bool QSqlResult::nextResult()
{
    if (driver()->hasFeature(QSqlDriver::MultipleResultSets)) {
        bool result = false;
        virtual_hook(NextResult, &result);
        return result;
    }
    return false;
}
Ejemplo n.º 4
0
bool KArchive::writeDir(const QString &name, const QString &user, const QString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime)
{
    WriteDirParams params;
    params.name = &name;
    params.user = &user;
    params.group = &group;
    params.perm = perm;
    params.atime = atime;
    params.mtime = mtime;
    params.ctime = ctime;
    virtual_hook(VIRTUAL_WRITE_DIR, &params);
    return params.retval;
}
Ejemplo n.º 5
0
bool KArchive::writeSymLink(const QString &name, const QString &target, const QString &user, const QString &group, mode_t perm, time_t atime,
                            time_t mtime, time_t ctime)
{
    WriteSymlinkParams params;
    params.name = &name;
    params.target = ⌖
    params.user = &user;
    params.group = &group;
    params.perm = perm;
    params.atime = atime;
    params.mtime = mtime;
    params.ctime = ctime;
    virtual_hook(VIRTUAL_WRITE_SYMLINK, &params);
    return params.retval;
}
Ejemplo n.º 6
0
bool KArchive::prepareWriting(const QString &name, const QString &user, const QString &group, uint size, mode_t perm, time_t atime, time_t mtime,
                              time_t ctime)
{
    PrepareWritingParams params;
    params.name = &name;
    params.user = &user;
    params.group = &group;
    params.size = size;
    params.perm = perm;
    params.atime = atime;
    params.mtime = mtime;
    params.ctime = ctime;
    virtual_hook(VIRTUAL_PREPARE_WRITING, &params);
    return params.retval;
}
Ejemplo n.º 7
0
bool KArchive::writeFile(const QString &name, const QString &user, const QString &group, uint size, mode_t perm, time_t atime, time_t mtime,
                         time_t ctime, const char *data)
{
    WriteFileParams params;
    params.name = &name;
    params.user = &user;
    params.group = &group;
    params.size = size;
    params.perm = perm;
    params.atime = atime;
    params.mtime = mtime;
    params.ctime = ctime;
    params.data = data;
    virtual_hook(VIRTUAL_WRITE_FILE, &params);
    return params.retval;
}
Ejemplo n.º 8
0
/*! \internal
    \since 4.2

    Executes a prepared query in batch mode if the driver supports it,
    otherwise emulates a batch execution using bindValue() and exec().
    QSqlDriver::hasFeature() can be used to find out whether a driver
    supports batch execution.

    Batch execution can be faster for large amounts of data since it
    reduces network roundtrips.

    For batch executions, bound values have to be provided as lists
    of variants (QVariantList).

    Each list must contain values of the same type. All lists must
    contain equal amount of values (rows).

    NULL values are passed in as typed QVariants, for example
    \c {QVariant(QVariant::Int)} for an integer NULL value.

    Example:

    \snippet doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp 0

    Here, we insert two rows into a SQL table, with each row containing three values.

    \sa exec(), QSqlDriver::hasFeature()
*/
bool QSqlResult::execBatch(bool arrayBind)
{
    if (driver()->hasFeature(QSqlDriver::BatchOperations)) {
        virtual_hook(BatchOperation, &arrayBind);
        d->resetBindCount();
        return d->error.type() == QSqlError::NoError;
    } else {
        QVector<QVariant> values = d->values;
        if (values.count() == 0)
            return false;
        for (int i = 0; i < values.at(0).toList().count(); ++i) {
            for (int j = 0; j < values.count(); ++j)
                bindValue(j, values.at(j).toList().at(i), QSql::In);
            if (!exec())
                return false;
        }
        return true;
    }
    return false;
}
Ejemplo n.º 9
0
QStringList Account::updateParameters(const QVariantMap &parameters)
{
	UpdateParametersArgument argument = { parameters, QStringList() };
	virtual_hook(UpdateParametersHook, &argument);
	return argument.reconnectionRequired;
}
Ejemplo n.º 10
0
void KFileView::setDropOptions(int options)
{
    virtual_hook(VIRTUAL_SET_DROP_OPTIONS, &options); // Virtual call
}
Ejemplo n.º 11
0
/*! \internal
 */
void QSqlResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy)
{
    d->precisionPolicy = policy;
    virtual_hook(SetNumericalPrecision, &policy);
}
Ejemplo n.º 12
0
/*! \internal
 */
void QSqlResult::detachFromResultSet()
{
    if (driver()->hasFeature(QSqlDriver::FinishQuery) 
            || driver()->hasFeature(QSqlDriver::SimpleLocking))
        virtual_hook(DetachFromResultSet, 0);
}
Ejemplo n.º 13
0
/*! \internal
 */
void QSqlResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy)
{
    if (driver()->hasFeature(QSqlDriver::LowPrecisionNumbers))
        virtual_hook(SetNumericalPrecision, &policy);
}