Commit 5f827875 authored by Michael Abrahams's avatar Michael Abrahams

Add separate tablet log debugging category.

It is useful to have krita.input separated from krita.tabletlog.
parent 0a34067f
......@@ -99,6 +99,7 @@ Q_LOGGING_CATEGORY(_41010, "krita.render")
Q_LOGGING_CATEGORY(_41011, "krita.scripting")
Q_LOGGING_CATEGORY(_41012, "krita.input")
Q_LOGGING_CATEGORY(_41013, "krita.action")
Q_LOGGING_CATEGORY(_41014, "krita.tabletlog")
......
......@@ -38,6 +38,7 @@ extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41010();
extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41011();
extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41012();
extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41013();
extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41014();
#define dbgResources qCDebug(_30009)
#define dbgKrita qCDebug(_41000)
......@@ -54,6 +55,7 @@ extern const KRITAGLOBAL_EXPORT QLoggingCategory &_41013();
#define dbgScript qCDebug(_41011)
#define dbgInput qCDebug(_41012)
#define dbgAction qCDebug(_41013)
#define dbgTablet qCDebug(_41014)
// Defined in Qt 5.6
/*
......
......@@ -79,7 +79,7 @@ extern "C" int main(int argc, char **argv)
*/
QLoggingCategory::setFilterRules("calligra*=false\n"
"krita*=false\n"
"krita.input=true");
"krita.tabletlog=true");
// A per-user unique string, without /, because QLocalServer cannot use names with a / in it
......
......@@ -77,7 +77,7 @@ bool KisInputManager::Private::EventEater::eventFilter(QObject* target, QEvent*
if (KisTabletDebugger::instance()->debugEnabled()) {
QString pre = QString("[BLOCKED]");
QMouseEvent *ev = static_cast<QMouseEvent*>(event);
dbgInput << KisTabletDebugger::instance()->eventToString(*ev,pre);
dbgTablet << KisTabletDebugger::instance()->eventToString(*ev,pre);
}
peckish = false;
return true;
......@@ -107,14 +107,14 @@ bool KisInputManager::Private::EventEater::eventFilter(QObject* target, QEvent*
void KisInputManager::Private::EventEater::activate()
{
if (!hungry && (KisTabletDebugger::instance()->debugEnabled()))
dbgInput << "Ignoring mouse events.";
dbgTablet << "Ignoring mouse events.";
hungry = true;
}
void KisInputManager::Private::EventEater::deactivate()
{
if (!hungry && (KisTabletDebugger::instance()->debugEnabled()))
dbgInput << "Accepting mouse events.";
dbgTablet << "Accepting mouse events.";
hungry = false;
}
......
......@@ -83,7 +83,7 @@ public:
if (!KisTabletDebugger::instance()->debugEnabled()) return;
QString msg1 = useBlocking && ignoreQtCursorEvents() ? "[BLOCKED] " : "[ ]";
Event *specificEvent = static_cast<Event*>(event);
dbgInput << KisTabletDebugger::instance()->eventToString(*specificEvent, msg1);
dbgTablet << KisTabletDebugger::instance()->eventToString(*specificEvent, msg1);
}
class ProximityNotifier : public QObject
......
......@@ -101,10 +101,10 @@ void KisTabletDebugger::toggleDebugging()
i18n("Tablet Event Logging Enabled") :
i18n("Tablet Event Logging Disabled"));
if (m_debugEnabled) {
dbgInput << "vvvvvvvvvvvvvvvvvvvvvvv START TABLET EVENT LOG vvvvvvvvvvvvvvvvvvvvvvv";
dbgTablet << "vvvvvvvvvvvvvvvvvvvvvvv START TABLET EVENT LOG vvvvvvvvvvvvvvvvvvvvvvv";
}
else {
dbgInput << "^^^^^^^^^^^^^^^^^^^^^^^ START TABLET EVENT LOG ^^^^^^^^^^^^^^^^^^^^^^^";
dbgTablet << "^^^^^^^^^^^^^^^^^^^^^^^ START TABLET EVENT LOG ^^^^^^^^^^^^^^^^^^^^^^^";
}
}
......
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