put debug Context operator where it belongs

Change-Id: I2f38d670a10bbc37c7a62432a1780ede53835160
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2017-01-26 16:56:31 +01:00
parent eaf60c13e8
commit acbd85388c
3 changed files with 21 additions and 8 deletions

View File

@@ -24,3 +24,23 @@
****************************************************************************/
#include "icontext.h"
#include <QDebug>
QDebug operator<<(QDebug debug, const Core::Context &context)
{
debug.nospace() << "Context(";
Core::Context::const_iterator it = context.begin();
Core::Context::const_iterator end = context.end();
if (it != end) {
debug << *it;
++it;
}
while (it != end) {
debug << ", " << *it;
++it;
}
debug << ')';
return debug;
}