forked from qt-creator/qt-creator
C++: add utility method to dump usages.
Change-Id: Icff6e9310a45e66b573fb2a6623a10e025c43539 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user