Commit 93b6c70e authored by Halla Rempt's avatar Halla Rempt

Add convenience method to print a backtrace

parent e354c9d4
......@@ -100,3 +100,11 @@ QString __methodName(const char *_prettyFunction)
return QString(std::string(prettyFunction.substr(begin,end) + "()").c_str());
}
void printBacktrace()
{
QString bt = kisBacktrace();
Q_FOREACH(const QString &line, bt.split('\n')) {
qDebug() << line;
}
}
......@@ -141,6 +141,8 @@ extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41017();
*/
KRITAGLOBAL_EXPORT QString kisBacktrace();
KRITAGLOBAL_EXPORT void printBacktrace();
/**
* Please pretty print my variable
*
......
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