-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp index 9fac51b..8a8647e 100644 --- a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp +++ b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp @@ -249,97 +249,97 @@ void KeyHelperWidget::doEvent(const QString& key, int isPress) } doEvent(unicode, keycode, modifiers, isPress, 0); } void KeyHelperWidget::sysMessage( const QCString& msg, const QByteArray& data) { QSafeDataStream stream(data, IO_ReadOnly); if(msg == "linkChanged(QString)"){ ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); QString oldgroup = cfg.getGroup(); if(cfg.readNumEntry("DetectLinkChange", 1) == 1){ AppLnkManager::init(true); reload(); } cfg.setGroup(oldgroup); } } void MsgHandler(QtMsgType type, const char* msg) { switch(type){ case QtDebugMsg: if(g_level >= 2){ syslog(LOG_LOCAL5|LOG_DEBUG, "<2>%s", msg); } break; case QtWarningMsg: if(g_level >= 1){ syslog(LOG_LOCAL5|LOG_DEBUG, "<1>%s", msg); } break; default: break; } } void KeyHelperWidget::initDebugLevel() { ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); cfg.setGroup("Global"); int level = cfg.readNumEntry("DebugLevel", 0); setDebugLevel(level); } -void KeyHelperWidget::setDebugLevel(int /*level*/) +void KeyHelperWidget::setDebugLevel(int level) { #ifdef QT_QWS_EBX static bool noDebug = true; g_level = level; if(g_level > 0){ if(noDebug){ m_defHandler = qInstallMsgHandler(MsgHandler); noDebug = false; } } else { qInstallMsgHandler(m_defHandler); noDebug = true; } #endif } void KeyHelperWidget::enable() { m_enable = true; m_pHelper->enable(); //set(); QTimer::singleShot(0, this, SLOT(set())); } void KeyHelperWidget::disable() { m_enable = false; m_pHelper->disable(); unset(); } void KeyHelperWidget::pause() { m_saved = m_enable; disable(); } void KeyHelperWidget::restart() { if(m_saved){ enable(); } } void KeyHelperWidget::reload() { disable(); ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); |