diff --git a/src/libsnore/log.h b/src/libsnore/log.h index d0a9819..dfe7993 100644 --- a/src/libsnore/log.h +++ b/src/libsnore/log.h @@ -33,17 +33,17 @@ enum SnoreDebugLevels { /** * The most important messages, will be diplayed if the debug level >= 1 */ - SNORE_WARNING = 1, + SNORE_WARNING = 0, /** * Information messages, will be diplayed if the debug level >= 2 */ - SNORE_INFO = 2, + SNORE_INFO = 1, /** * Debug messages will be diplayed if the debug level >= 3 */ - SNORE_DEBUG = 3 + SNORE_DEBUG = 2 }; @@ -53,7 +53,7 @@ enum SnoreDebugLevels { */ #if !defined(QT_NO_DEBUG_OUTPUT) -#define snoreDebug(X) Snore::SnoreLog( X ) << Q_FUNC_INFO +#define snoreDebug(X) Snore::SnoreLog( X ) << #X << Q_FUNC_INFO #else #define snoreDebug(X) QNoDebug() #endif diff --git a/src/libsnore/plugins/plugins.cpp b/src/libsnore/plugins/plugins.cpp index 67c814e..34f4c09 100644 --- a/src/libsnore/plugins/plugins.cpp +++ b/src/libsnore/plugins/plugins.cpp @@ -32,8 +32,9 @@ using namespace Snore; SnorePlugin::SnorePlugin(const QString &name) : m_name(name) { + Q_ASSERT_X(thread() != qApp->thread(),Q_FUNC_INFO,"Plugin initialized in wrong thread"); if (thread() != qApp->thread()) { - moveToThread(qApp->thread()); + snoreDebug(SNORE_WARNING) << "Plugin initialized in wrong thread."; } setDefaultValue("Enabled", false, LOCAL_SETTING); }