Commit fa1647d8 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

C++: add utility method to dump usages.



Change-Id: Icff6e9310a45e66b573fb2a6623a10e025c43539
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 3563b416
......@@ -75,6 +75,9 @@ class tst_FindUsages: public QObject
{
Q_OBJECT
private:
void dump(const QList<Usage> &usages) const;
private Q_SLOTS:
void inlineMethod();
void lambdaCaptureByValue();
......@@ -107,6 +110,20 @@ private Q_SLOTS:
void templatedFunction_QTCREATORBUG9749();
};
void tst_FindUsages::dump(const QList<Usage> &usages) const
{
QTextStream err(stderr, QIODevice::WriteOnly);
err << "DEBUG : " << usages.size() << " usages:" << endl;
foreach (const Usage &usage, usages) {
err << "DEBUG : "
<< usage.path << ":"
<< usage.line << ":"
<< usage.col << ":"
<< usage.len << ":"
<< usage.lineText << endl;
}
}
void tst_FindUsages::inlineMethod()
{
const QByteArray src = "\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment