Revision 87c2f591

b/qerror.c
400 400
    return qstring;
401 401
}
402 402

  
403
QString *qerror_format(const char *fmt, QDict *error)
404
{
405
    const QErrorStringTable *entry = NULL;
406
    int i;
407

  
408
    for (i = 0; qerror_table[i].error_fmt; i++) {
409
        if (strcmp(qerror_table[i].error_fmt, fmt) == 0) {
410
            entry = &qerror_table[i];
411
            break;
412
        }
413
    }
414

  
415
    return qerror_format_desc(error, entry);
416
}
417

  
403 418
/**
404 419
 * qerror_human(): Format QError data into human-readable string.
405 420
 */
b/qerror.h
39 39
void qerror_print(QError *qerror);
40 40
void qerror_report_internal(const char *file, int linenr, const char *func,
41 41
                            const char *fmt, ...) GCC_FMT_ATTR(4, 5);
42
QString *qerror_format(const char *fmt, QDict *error);
42 43
#define qerror_report(fmt, ...) \
43 44
    qerror_report_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)
44 45
QError *qobject_to_qerror(const QObject *obj);

Also available in: Unified diff