コード例 #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;
}
コード例 #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);
    }
}
コード例 #3
0
ファイル: qsqlresult.cpp プロジェクト: RS102839/qt
/*! \internal
*/
bool QSqlResult::nextResult()
{
    if (driver()->hasFeature(QSqlDriver::MultipleResultSets)) {
        bool result = false;
        virtual_hook(NextResult, &result);
        return result;
    }
    return false;
}
コード例 #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;
}
コード例 #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;
}
コード例 #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;
}
コード例 #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;
}
コード例 #8
0
ファイル: qsqlresult.cpp プロジェクト: RS102839/qt
/*! \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;
}
コード例 #9
0
ファイル: account.cpp プロジェクト: Anderty/qutim
QStringList Account::updateParameters(const QVariantMap &parameters)
{
	UpdateParametersArgument argument = { parameters, QStringList() };
	virtual_hook(UpdateParametersHook, &argument);
	return argument.reconnectionRequired;
}
コード例 #10
0
void KFileView::setDropOptions(int options)
{
    virtual_hook(VIRTUAL_SET_DROP_OPTIONS, &options); // Virtual call
}
コード例 #11
0
ファイル: qsqlresult.cpp プロジェクト: RS102839/qt
/*! \internal
 */
void QSqlResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy)
{
    d->precisionPolicy = policy;
    virtual_hook(SetNumericalPrecision, &policy);
}
コード例 #12
0
ファイル: qsqlresult.cpp プロジェクト: RS102839/qt
/*! \internal
 */
void QSqlResult::detachFromResultSet()
{
    if (driver()->hasFeature(QSqlDriver::FinishQuery) 
            || driver()->hasFeature(QSqlDriver::SimpleLocking))
        virtual_hook(DetachFromResultSet, 0);
}
コード例 #13
0
/*! \internal
 */
void QSqlResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy)
{
    if (driver()->hasFeature(QSqlDriver::LowPrecisionNumbers))
        virtual_hook(SetNumericalPrecision, &policy);
}