From 2034d9aa2d1a7bae5a47d89ddf0f5198be9cb01b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 7 Aug 2015 13:36:29 -0400 Subject: Turn off some debugging within the system tray plugin, cleanup the message logging routine, and fix a bug in the autostart loop procedures --- lumina-desktop/LSession.cpp | 18 ++++++------------ lumina-desktop/main.cpp | 3 +++ lumina-desktop/panel-plugins/systemtray/LSysTray.cpp | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) (limited to 'lumina-desktop') diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index af59b769..2880c9d8 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -18,13 +18,6 @@ #include //for usleep() usage -//X includes (these need to be last due to Qt compile issues) -/*#include -#include -#include -#include -#include */ - #ifndef DEBUG #define DEBUG 0 #endif @@ -256,14 +249,15 @@ void LSession::launchStartupApps(){ if(LUtils::isValidBinary("numlockx")){ //make sure numlockx is installed if(sessionsettings->value("EnableNumlock",false).toBool()){ QProcess::startDetached("numlockx on"); - } - else{ + }else{ QProcess::startDetached("numlockx off"); } } int tmp = LOS::ScreenBrightness(); - LOS::setScreenBrightness( tmp ); - qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; + if(tmp>0){ + LOS::setScreenBrightness( tmp ); + qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; + } //Now get any XDG startup applications and launch them QList xdgapps = LXDG::findAutoStartFiles(); @@ -276,7 +270,7 @@ void LSession::launchStartupApps(){ QProcess::startDetached("lumina-open \""+xdgapps[i].filePath+"\""); } //Put a tiny bit of space between app starts (don't overload the system) - for(int i=0; i<5; i++){ + for(int j=0; j<5; j++){ usleep(50000); //50ms = 50000 us --> 250ms total wait LSession::processEvents(); } diff --git a/lumina-desktop/main.cpp b/lumina-desktop/main.cpp index 4a2903e6..ba014c9e 100644 --- a/lumina-desktop/main.cpp +++ b/lumina-desktop/main.cpp @@ -35,12 +35,15 @@ void MessageOutput(QtMsgType type, const QMessageLogContext &context, const QStr break; case QtWarningMsg: txt = QString("Warning: %1").arg(msg); + txt += "Context: "+QString(context.file)+" Line: "+QString(context.line)+" Function: "+QString(context.function); break; case QtCriticalMsg: txt = QString("CRITICAL: %1").arg(msg); + txt += "Context: "+QString(context.file)+" Line: "+QString(context.line)+" Function: "+QString(context.function); break; case QtFatalMsg: txt = QString("FATAL: %1").arg(msg); + txt += "Context: "+QString(context.file)+" Line: "+QString(context.line)+" Function: "+QString(context.function); break; } diff --git a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp index 461a73e6..d1486371 100644 --- a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp +++ b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp @@ -149,7 +149,7 @@ void LSysTray::UpdateTrayWindow(WId win){ if(!isRunning || stopping || checking){ return; } for(int i=0; iappID()==win){ - qDebug() << "System Tray: Update Window " << win; + //qDebug() << "System Tray: Update Window " << win; trayIcons[i]->update(); QTimer::singleShot(1000, trayIcons[i], SLOT(update()) ); return; //finished now -- cgit