From 6d41a1320e69c09124050224d30821e286e5e2b8 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Mon, 17 Nov 2008 15:04:52 +0000 Subject: [PATCH] Moved all debug, warning and error messages into the KWin 1212 area. Replaced deprecated kdDebug() with kDebug(). Removed empty debug messages. svn path=/trunk/KDE/kdebase/workspace/; revision=885620 --- clients/kwmtheme/cli_installer/main.cpp | 8 ++-- clients/kwmtheme/kwmthemeclient.cpp | 4 +- data/update_default_rules.cpp | 2 +- effects.cpp | 2 +- effects/blur.cpp | 8 ++-- effects/cube.cpp | 18 +++---- effects/cylinder.cpp | 4 +- effects/diminactive_config.cpp | 6 --- effects/explosioneffect.cpp | 8 ++-- effects/fallapart.cpp | 18 +++---- effects/invert_config.cpp | 6 --- effects/lookingglass.cpp | 2 +- effects/lookingglass_config.cpp | 6 +-- effects/magnifier_config.cpp | 6 +-- effects/maketransparent_config.cpp | 4 -- effects/mousemark_config.cpp | 6 +-- effects/sharpen_config.cpp | 6 --- effects/showfps_config.cpp | 7 --- effects/snow.cpp | 8 ++-- effects/snow_config.cpp | 7 --- effects/sphere.cpp | 4 +- effects/test/demo_liquid.cpp | 4 +- effects/thumbnailaside_config.cpp | 7 +-- effects/trackmouse_config.cpp | 6 --- effects/videorecord_config.cpp | 6 --- effects/wobblywindows.cpp | 26 +++++----- effects/zoom_config.cpp | 6 --- events.cpp | 2 +- geometry.cpp | 44 ++++++++--------- group.cpp | 64 ++++++++++++------------- layers.cpp | 18 +++---- lib/kdecoration_plugins_p.cpp | 4 +- lib/kwinglutils.cpp | 2 +- lib/kwinshadereffect.cpp | 4 +- main.cpp | 8 ++-- scene_opengl.cpp | 10 ++-- scene_xrender.cpp | 10 ++-- sm.cpp | 2 +- tools/decobenchmark/main.cpp | 10 ++-- tools/decobenchmark/preview.cpp | 8 ++-- utils.cpp | 4 +- workspace.cpp | 14 +++--- 42 files changed, 162 insertions(+), 237 deletions(-) diff --git a/clients/kwmtheme/cli_installer/main.cpp b/clients/kwmtheme/cli_installer/main.cpp index e4d3dad66e..58f7f245be 100644 --- a/clients/kwmtheme/cli_installer/main.cpp +++ b/clients/kwmtheme/cli_installer/main.cpp @@ -31,11 +31,11 @@ void copy(const QString &src, const QString &dest) QFile copyInput(src); QFile copyOutput(dest); if(!copyInput.open(QIODevice::ReadOnly)){ - kWarning() << "Couldn't open " << src ; + kWarning(1212) << "Couldn't open " << src ; return; } if(!copyOutput.open(QIODevice::WriteOnly)){ - kWarning() << "Couldn't open " << dest ; + kWarning(1212) << "Couldn't open " << dest ; copyInput.close(); return; } @@ -56,7 +56,7 @@ int main(int argc, char **argv) KApplication app(argc, argv); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if(!args->count()){ - kWarning() << "You need to specify the path to a theme config file!" ; + kWarning(1212) << "You need to specify the path to a theme config file!" ; return(1); } @@ -65,7 +65,7 @@ int main(int argc, char **argv) QString tmpStr; if(!f.exists()){ - kWarning() << "Specified theme config file doesn't exist!" ; + kWarning(1212) << "Specified theme config file doesn't exist!" ; return(2); } diff --git a/clients/kwmtheme/kwmthemeclient.cpp b/clients/kwmtheme/kwmthemeclient.cpp index bf17fe81e9..7db77b2bfe 100644 --- a/clients/kwmtheme/kwmthemeclient.cpp +++ b/clients/kwmtheme/kwmthemeclient.cpp @@ -109,7 +109,7 @@ static void create_pixmaps() framePixmaps[i] = new QPixmap(locate("data", "kwin/pics/"+config.readEntry(keys[i], " "))); if(framePixmaps[i]->isNull()) - kWarning() << "Unable to load frame pixmap for " << keys[i] ; + kWarning(1212) << "Unable to load frame pixmap for " << keys[i] ; } /* *framePixmaps[FrameTop] = stretchPixmap(*framePixmaps[FrameTop], false); @@ -352,7 +352,7 @@ void KWMThemeClient::init() if((val != "Off") && ((val == "Iconify") && !isMinimizable()) && ((val == "Maximize") && !isMaximizable())) - kWarning() << "KWin: Unrecognized button value: " << val ; + kWarning(1212) << "KWin: Unrecognized button value: " << val ; } } diff --git a/data/update_default_rules.cpp b/data/update_default_rules.cpp index 5997816f10..d0b85c6cd4 100644 --- a/data/update_default_rules.cpp +++ b/data/update_default_rules.cpp @@ -41,7 +41,7 @@ int main( int argc, char* argv[] ) QString file = KStandardDirs::locate( "data", QString( "kwin/default_rules/" ) + argv[ 1 ] ); if( file.isEmpty()) { - kWarning() << "File " << argv[ 1 ] << " not found!" ; + kWarning(1212) << "File " << argv[ 1 ] << " not found!" ; return 1; } KConfig src_cfg( file ); diff --git a/effects.cpp b/effects.cpp index 488b0438c9..8de9cd6903 100644 --- a/effects.cpp +++ b/effects.cpp @@ -883,7 +883,7 @@ bool EffectsHandlerImpl::loadEffect( const QString& name ) { if( !loadEffect(depName)) { - kError() << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl; + kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl; library->unload(); return false; } diff --git a/effects/blur.cpp b/effects/blur.cpp index a540623834..95244cbfde 100644 --- a/effects/blur.cpp +++ b/effects/blur.cpp @@ -50,7 +50,7 @@ BlurEffect::BlurEffect() : Effect() mValid = loadData(); if( !mValid ) { - kWarning() << "Loading failed"; + kWarning(1212) << "Loading failed"; } effects->addRepaintFull(); } @@ -125,13 +125,13 @@ GLShader* BlurEffect::loadShader(const QString& name) QString vertexshader = KGlobal::dirs()->findResource("data", "kwin/" + name + ".vert"); if(fragmentshader.isEmpty() || vertexshader.isEmpty()) { - kError() << "Couldn't locate shader files for '" << name << "'" << endl; + kError(1212) << "Couldn't locate shader files for '" << name << "'" << endl; return false; } GLShader* shader = new GLShader(vertexshader, fragmentshader); if(!shader->isValid()) { - kError() << "Shader '" << name << "' failed to load!" << endl; + kError(1212) << "Shader '" << name << "' failed to load!" << endl; delete shader; return 0; } @@ -229,7 +229,7 @@ void BlurEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) // Restore the original matrix glPopMatrix(); } -// kDebug() << "Copied" << mScreenDirty.rects().count() << "rects, pixels:" << pixels; +// kDebug(1212) << "Copied" << mScreenDirty.rects().count() << "rects, pixels:" << pixels; } } diff --git a/effects/cube.cpp b/effects/cube.cpp index d547008316..21daa5cb31 100644 --- a/effects/cube.cpp +++ b/effects/cube.cpp @@ -184,7 +184,6 @@ void CubeEffect::prePaintScreen( ScreenPrePaintData& data, int time ) { if( activated ) { - //kDebug(); data.mask |= PAINT_SCREEN_TRANSFORMED | Effect::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS | PAINT_SCREEN_BACKGROUND_FIRST; if( rotating || start || stop ) @@ -203,7 +202,6 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) { if( activated ) { - //kDebug(); QRect rect = effects->clientArea( FullScreenArea, activeScreen, effects->currentDesktop()); if( effects->numScreens() > 1 && (slide || bigCube ) ) rect = effects->clientArea( FullArea, activeScreen, effects->currentDesktop() ); @@ -898,7 +896,6 @@ void CubeEffect::postPaintScreen() effects->postPaintScreen(); if( activated ) { - //kDebug(); if( start ) { if( timeLine.value() == 1.0 ) @@ -1060,7 +1057,6 @@ void CubeEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data, int { if( activated ) { - //kDebug(); if( cube_painting ) { if( ( w->isDesktop() || w->isDock() ) && w->screen() != activeScreen && w->isOnDesktop( effects->currentDesktop() ) ) @@ -1154,7 +1150,7 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP { if( activated && cube_painting ) { - //kDebug() << w->caption(); + //kDebug(1212) << w->caption(); float opacity = cubeOpacity; if( start ) { @@ -1303,7 +1299,7 @@ bool CubeEffect::borderActivated( ElectricBorder border ) return false; if( border == borderActivate && !activated ) { - kDebug() << "border activated"; + kDebug(1212) << "border activated"; toggle(); return true; } @@ -1352,7 +1348,7 @@ void CubeEffect::grabbedKeyboardEvent( QKeyEvent* e ) { // wrap only on autorepeat case Qt::Key_Left: // rotate to previous desktop - kDebug() << "left"; + kDebug(1212) << "left"; if( !rotating && !start ) { rotating = true; @@ -1366,7 +1362,7 @@ void CubeEffect::grabbedKeyboardEvent( QKeyEvent* e ) break; case Qt::Key_Right: // rotate to next desktop - kDebug() << "right"; + kDebug(1212) << "right"; if( !rotating && !start ) { rotating = true; @@ -1379,7 +1375,7 @@ void CubeEffect::grabbedKeyboardEvent( QKeyEvent* e ) } break; case Qt::Key_Up: - kDebug() << "up"; + kDebug(1212) << "up"; if( verticalPosition != Up ) { if( !verticalRotating ) @@ -1406,7 +1402,7 @@ void CubeEffect::grabbedKeyboardEvent( QKeyEvent* e ) } break; case Qt::Key_Down: - kDebug() << "down"; + kDebug(1212) << "down"; if( verticalPosition != Down ) { if( !verticalRotating ) @@ -1532,7 +1528,7 @@ void CubeEffect::setActive( bool active ) start = true; } effects->setActiveFullScreenEffect( this ); - kDebug() << "Cube is activated"; + kDebug(1212) << "Cube is activated"; verticalPosition = Normal; verticalRotating = false; manualAngle = 0.0; diff --git a/effects/cylinder.cpp b/effects/cylinder.cpp index 23ef9a9138..7393c21f9c 100644 --- a/effects/cylinder.cpp +++ b/effects/cylinder.cpp @@ -69,14 +69,14 @@ bool CylinderEffect::loadData() QString vertexshader = KGlobal::dirs()->findResource("data", "kwin/cylinder.vert"); if(fragmentshader.isEmpty() || vertexshader.isEmpty()) { - kError() << "Couldn't locate shader files" << endl; + kError(1212) << "Couldn't locate shader files" << endl; return false; } mShader = new GLShader(vertexshader, fragmentshader); if(!mShader->isValid()) { - kError() << "The shader failed to load!" << endl; + kError(1212) << "The shader failed to load!" << endl; return false; } else diff --git a/effects/diminactive_config.cpp b/effects/diminactive_config.cpp index d40643357e..c766d53aba 100644 --- a/effects/diminactive_config.cpp +++ b/effects/diminactive_config.cpp @@ -44,8 +44,6 @@ DimInactiveEffectConfigForm::DimInactiveEffectConfigForm(QWidget* parent) : QWid DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - m_ui = new DimInactiveEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); @@ -62,7 +60,6 @@ DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget* parent, const QVariant void DimInactiveEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("DimInactive"); @@ -81,8 +78,6 @@ void DimInactiveEffectConfig::load() void DimInactiveEffectConfig::save() { - kDebug(); - KConfigGroup conf = EffectsHandler::effectConfig("DimInactive"); conf.writeEntry("Strength", m_ui->spinStrength->value()); @@ -99,7 +94,6 @@ void DimInactiveEffectConfig::save() void DimInactiveEffectConfig::defaults() { - kDebug() ; m_ui->spinStrength->setValue(25); m_ui->checkPanel->setChecked(false); m_ui->checkDesktop->setChecked(false); diff --git a/effects/explosioneffect.cpp b/effects/explosioneffect.cpp index f51b6381c5..ca7a8dc8e8 100644 --- a/effects/explosioneffect.cpp +++ b/effects/explosioneffect.cpp @@ -69,19 +69,19 @@ bool ExplosionEffect::loadData() QString endtexture = KGlobal::dirs()->findResource("data", "kwin/explosion-end.png"); if(fragmentshader.isEmpty() || vertexshader.isEmpty()) { - kError() << "Couldn't locate shader files" << endl; + kError(1212) << "Couldn't locate shader files" << endl; return false; } if(starttexture.isEmpty() || endtexture.isEmpty()) { - kError() << "Couldn't locate texture files" << endl; + kError(1212) << "Couldn't locate texture files" << endl; return false; } mShader = new GLShader(vertexshader, fragmentshader); if(!mShader->isValid()) { - kError() << "The shader failed to load!" << endl; + kError(1212) << "The shader failed to load!" << endl; return false; } else @@ -97,7 +97,7 @@ bool ExplosionEffect::loadData() mEndOffsetTex = new GLTexture(endtexture); if(mStartOffsetTex->isNull() || mEndOffsetTex->isNull()) { - kError() << "The textures failed to load!" << endl; + kError(1212) << "The textures failed to load!" << endl; return false; } else diff --git a/effects/fallapart.cpp b/effects/fallapart.cpp index 07e8e94712..c8bbe1f23e 100644 --- a/effects/fallapart.cpp +++ b/effects/fallapart.cpp @@ -123,15 +123,15 @@ bool FallApartEffect::isRealWindow( EffectWindow* w ) { // TODO: isSpecialWindow is rather generic, maybe tell windowtypes separately? /* - kDebug() << "--" << w->caption() << "--------------------------------"; - kDebug() << "Tooltip:" << w->isTooltip(); - kDebug() << "Toolbar:" << w->isToolbar(); - kDebug() << "Desktop:" << w->isDesktop(); - kDebug() << "Special:" << w->isSpecialWindow(); - kDebug() << "TopMenu:" << w->isTopMenu(); - kDebug() << "Notific:" << w->isNotification(); - kDebug() << "Splash:" << w->isSplash(); - kDebug() << "Normal:" << w->isNormalWindow(); + kDebug(1212) << "--" << w->caption() << "--------------------------------"; + kDebug(1212) << "Tooltip:" << w->isTooltip(); + kDebug(1212) << "Toolbar:" << w->isToolbar(); + kDebug(1212) << "Desktop:" << w->isDesktop(); + kDebug(1212) << "Special:" << w->isSpecialWindow(); + kDebug(1212) << "TopMenu:" << w->isTopMenu(); + kDebug(1212) << "Notific:" << w->isNotification(); + kDebug(1212) << "Splash:" << w->isSplash(); + kDebug(1212) << "Normal:" << w->isNormalWindow(); */ if ( !w->isNormalWindow() ) return false; diff --git a/effects/invert_config.cpp b/effects/invert_config.cpp index 21c755dd58..ec614ed0b7 100644 --- a/effects/invert_config.cpp +++ b/effects/invert_config.cpp @@ -38,8 +38,6 @@ namespace KWin InvertEffectConfig::InvertEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug(); - QVBoxLayout* layout = new QVBoxLayout(this); KActionCollection* actionCollection = new KActionCollection( this, componentData() ); @@ -65,14 +63,12 @@ InvertEffectConfig::InvertEffectConfig(QWidget* parent, const QVariantList& args InvertEffectConfig::~InvertEffectConfig() { - kDebug(); // Undo (only) unsaved changes to global key shortcuts mShortcutEditor->undoChanges(); } void InvertEffectConfig::load() { - kDebug() ; KCModule::load(); emit changed(false); @@ -80,7 +76,6 @@ void InvertEffectConfig::load() void InvertEffectConfig::save() { - kDebug() ; KCModule::save(); mShortcutEditor->save(); // undo() will restore to this state from now on @@ -91,7 +86,6 @@ void InvertEffectConfig::save() void InvertEffectConfig::defaults() { - kDebug() ; mShortcutEditor->allDefault(); emit changed(true); } diff --git a/effects/lookingglass.cpp b/effects/lookingglass.cpp index 0e46dd47b7..a594dc3f52 100644 --- a/effects/lookingglass.cpp +++ b/effects/lookingglass.cpp @@ -106,7 +106,7 @@ void LookingGlassEffect::prePaintScreen( ScreenPrePaintData& data, int time ) zoom = qMin( zoom * qMax( 1.0 + diff, 1.2 ), target_zoom ); else zoom = qMax( zoom * qMin( 1.0 - diff, 0.8 ), target_zoom ); - kDebug() << "zoom is now " << zoom; + kDebug(1212) << "zoom is now " << zoom; radius = qBound((double)initialradius, initialradius * zoom, 3.5*initialradius); if( zoom > 1.0f ) diff --git a/effects/lookingglass_config.cpp b/effects/lookingglass_config.cpp index 77e9c61ab5..b9cfe07f79 100644 --- a/effects/lookingglass_config.cpp +++ b/effects/lookingglass_config.cpp @@ -45,8 +45,6 @@ LookingGlassEffectConfigForm::LookingGlassEffectConfigForm(QWidget* parent) : QW LookingGlassEffectConfig::LookingGlassEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - m_ui = new LookingGlassEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); @@ -85,7 +83,6 @@ LookingGlassEffectConfig::~LookingGlassEffectConfig() void LookingGlassEffectConfig::load() { - kDebug(); KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("LookingGlass"); @@ -97,7 +94,7 @@ void LookingGlassEffectConfig::load() void LookingGlassEffectConfig::save() { - kDebug() << "Saving config of LookingGlass" ; + kDebug(1212) << "Saving config of LookingGlass" ; //KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("LookingGlass"); @@ -114,7 +111,6 @@ void LookingGlassEffectConfig::save() void LookingGlassEffectConfig::defaults() { - kDebug() ; m_ui->radiusSpin->setValue(200); m_ui->editor->allDefault(); emit changed(true); diff --git a/effects/magnifier_config.cpp b/effects/magnifier_config.cpp index 6b9b255c6f..fe4eafe114 100644 --- a/effects/magnifier_config.cpp +++ b/effects/magnifier_config.cpp @@ -45,8 +45,6 @@ MagnifierEffectConfigForm::MagnifierEffectConfigForm(QWidget* parent) : QWidget( MagnifierEffectConfig::MagnifierEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - m_ui = new MagnifierEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); @@ -85,7 +83,6 @@ MagnifierEffectConfig::~MagnifierEffectConfig() void MagnifierEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("Magnifier"); @@ -101,7 +98,7 @@ void MagnifierEffectConfig::load() void MagnifierEffectConfig::save() { - kDebug() << "Saving config of Magnifier" ; + kDebug(1212) << "Saving config of Magnifier" ; //KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("Magnifier"); @@ -119,7 +116,6 @@ void MagnifierEffectConfig::save() void MagnifierEffectConfig::defaults() { - kDebug() ; m_ui->spinWidth->setValue(200); m_ui->spinHeight->setValue(200); m_ui->editor->allDefault(); diff --git a/effects/maketransparent_config.cpp b/effects/maketransparent_config.cpp index c38c95b018..82a4005309 100644 --- a/effects/maketransparent_config.cpp +++ b/effects/maketransparent_config.cpp @@ -43,7 +43,6 @@ MakeTransparentEffectConfigForm::MakeTransparentEffectConfigForm(QWidget* parent MakeTransparentEffectConfig::MakeTransparentEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; m_ui = new MakeTransparentEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); layout->addWidget(m_ui); @@ -65,7 +64,6 @@ MakeTransparentEffectConfig::MakeTransparentEffectConfig(QWidget* parent, const void MakeTransparentEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("MakeTransparent"); @@ -86,7 +84,6 @@ void MakeTransparentEffectConfig::load() void MakeTransparentEffectConfig::save() { - kDebug() ; KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("MakeTransparent"); @@ -109,7 +106,6 @@ void MakeTransparentEffectConfig::save() void MakeTransparentEffectConfig::defaults() { - kDebug() ; m_ui->decorations->setValue( 100 ); m_ui->moveresize->setValue( 80 ); m_ui->dialogs->setValue( 100 ); diff --git a/effects/mousemark_config.cpp b/effects/mousemark_config.cpp index 6f095811b4..9a8b143275 100644 --- a/effects/mousemark_config.cpp +++ b/effects/mousemark_config.cpp @@ -45,8 +45,6 @@ MouseMarkEffectConfigForm::MouseMarkEffectConfigForm(QWidget* parent) : QWidget( MouseMarkEffectConfig::MouseMarkEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - m_ui = new MouseMarkEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); @@ -83,7 +81,6 @@ MouseMarkEffectConfig::~MouseMarkEffectConfig() void MouseMarkEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("MouseMark"); @@ -98,7 +95,7 @@ void MouseMarkEffectConfig::load() void MouseMarkEffectConfig::save() { - kDebug() << "Saving config of MouseMark" ; + kDebug(1212) << "Saving config of MouseMark" ; //KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("MouseMark"); @@ -117,7 +114,6 @@ void MouseMarkEffectConfig::save() void MouseMarkEffectConfig::defaults() { - kDebug() ; m_ui->spinWidth->setValue(3); m_ui->comboColors->setColor(Qt::red); emit changed(true); diff --git a/effects/sharpen_config.cpp b/effects/sharpen_config.cpp index f76676f06e..eeac453609 100644 --- a/effects/sharpen_config.cpp +++ b/effects/sharpen_config.cpp @@ -38,8 +38,6 @@ namespace KWin SharpenEffectConfig::SharpenEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug(); - QVBoxLayout* layout = new QVBoxLayout(this); KActionCollection* actionCollection = new KActionCollection( this, componentData() ); KAction* a = static_cast(actionCollection->addAction( "Sharpen" )); @@ -59,14 +57,12 @@ SharpenEffectConfig::SharpenEffectConfig(QWidget* parent, const QVariantList& ar SharpenEffectConfig::~SharpenEffectConfig() { - kDebug(); // Undo (only) unsaved changes to global key shortcuts mShortcutEditor->undoChanges(); } void SharpenEffectConfig::load() { - kDebug(); KCModule::load(); emit changed(false); @@ -74,7 +70,6 @@ void SharpenEffectConfig::load() void SharpenEffectConfig::save() { - kDebug() ; KCModule::save(); mShortcutEditor->save(); // undo() will restore to this state from now on @@ -85,7 +80,6 @@ void SharpenEffectConfig::save() void SharpenEffectConfig::defaults() { - kDebug() ; mShortcutEditor->allDefault(); emit changed(true); } diff --git a/effects/showfps_config.cpp b/effects/showfps_config.cpp index 63a2fbaeee..26a7e857bd 100644 --- a/effects/showfps_config.cpp +++ b/effects/showfps_config.cpp @@ -35,8 +35,6 @@ namespace KWin ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug(); - m_ui = new Ui::ShowFpsEffectConfigForm; m_ui->setupUi(this); @@ -51,12 +49,10 @@ ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& ar ShowFpsEffectConfig::~ShowFpsEffectConfig() { delete m_ui; - kDebug(); } void ShowFpsEffectConfig::load() { - kDebug(); KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("ShowFps"); @@ -80,7 +76,6 @@ void ShowFpsEffectConfig::load() void ShowFpsEffectConfig::save() { - kDebug(); KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("ShowFps"); @@ -105,8 +100,6 @@ void ShowFpsEffectConfig::save() void ShowFpsEffectConfig::defaults() { - kDebug(); - m_ui->textPosition->setCurrentIndex(0); m_ui->textFont->setFont(QFont()); m_ui->textColor->setColor(QColor()); diff --git a/effects/snow.cpp b/effects/snow.cpp index e07a3fad6b..49fb696b0b 100644 --- a/effects/snow.cpp +++ b/effects/snow.cpp @@ -241,21 +241,21 @@ bool SnowEffect::loadShader() if( !(GLShader::fragmentShaderSupported() && (effects->compositingType() == OpenGLCompositing)) ) { - kDebug() << "Shaders not supported - waisting CPU cycles" << endl; + kDebug(1212) << "Shaders not supported - waisting CPU cycles" << endl; return false; } QString fragmentshader = KGlobal::dirs()->findResource("data", "kwin/snow.frag"); QString vertexshader = KGlobal::dirs()->findResource("data", "kwin/snow.vert"); if(fragmentshader.isEmpty() || vertexshader.isEmpty()) { - kDebug() << "Couldn't locate shader files" << endl; + kDebug(1212) << "Couldn't locate shader files" << endl; return false; } mShader = new GLShader(vertexshader, fragmentshader); if(!mShader->isValid()) { - kDebug() << "The shader failed to load!" << endl; + kDebug(1212) << "The shader failed to load!" << endl; return false; } else @@ -264,7 +264,7 @@ bool SnowEffect::loadShader() mShader->setUniform( "snowTexture", 0 ); mShader->unbind(); } - kDebug() << "using shader"; + kDebug(1212) << "using shader"; glNewList( list, GL_COMPILE ); glBegin( GL_QUADS ); diff --git a/effects/snow_config.cpp b/effects/snow_config.cpp index ae86940002..141192c8b4 100644 --- a/effects/snow_config.cpp +++ b/effects/snow_config.cpp @@ -42,8 +42,6 @@ SnowEffectConfigForm::SnowEffectConfigForm(QWidget* parent) : QWidget(parent) SnowEffectConfig::SnowEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - m_ui = new SnowEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); @@ -74,12 +72,10 @@ SnowEffectConfig::~SnowEffectConfig() { // Undo (only) unsaved changes to global key shortcuts m_ui->editor->undoChanges(); - kDebug() ; } void SnowEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("Snow"); @@ -102,8 +98,6 @@ void SnowEffectConfig::load() void SnowEffectConfig::save() { - kDebug() ; - KConfigGroup conf = EffectsHandler::effectConfig("Snow"); conf.writeEntry("Number", m_ui->numberFlakes->value()); conf.writeEntry("MinFlakes", m_ui->minSizeFlake->value()); @@ -122,7 +116,6 @@ void SnowEffectConfig::save() void SnowEffectConfig::defaults() { - kDebug() ; m_ui->numberFlakes->setValue( 200 ); m_ui->minSizeFlake->setValue( 10 ); m_ui->maxSizeFlake->setValue( 50 ); diff --git a/effects/sphere.cpp b/effects/sphere.cpp index d11fd62a1d..25c5af6e96 100644 --- a/effects/sphere.cpp +++ b/effects/sphere.cpp @@ -74,14 +74,14 @@ bool SphereEffect::loadData() QString vertexshader = KGlobal::dirs()->findResource("data", "kwin/sphere.vert"); if( fragmentshader.isEmpty() || vertexshader.isEmpty() ) { - kError() << "Couldn't locate shader files" << endl; + kError(1212) << "Couldn't locate shader files" << endl; return false; } mShader = new GLShader( vertexshader, fragmentshader ); if( !mShader->isValid() ) { - kError() << "The shader failed to load!" << endl; + kError(1212) << "The shader failed to load!" << endl; return false; } else diff --git a/effects/test/demo_liquid.cpp b/effects/test/demo_liquid.cpp index b95b1b8d88..3a75bae75a 100644 --- a/effects/test/demo_liquid.cpp +++ b/effects/test/demo_liquid.cpp @@ -77,13 +77,13 @@ bool LiquidEffect::loadData() QString vertexshader = KGlobal::dirs()->findResource("data", "kwin/liquid.vert"); if(fragmentshader.isEmpty() || vertexshader.isEmpty()) { - kError() << "Couldn't locate shader files" << endl; + kError(1212) << "Couldn't locate shader files" << endl; return false; } mShader = new GLShader(vertexshader, fragmentshader); if(!mShader->isValid()) { - kError() << "The shader failed to load!" << endl; + kError(1212) << "The shader failed to load!" << endl; return false; } mShader->bind(); diff --git a/effects/thumbnailaside_config.cpp b/effects/thumbnailaside_config.cpp index 1755c22298..0248ab59ea 100644 --- a/effects/thumbnailaside_config.cpp +++ b/effects/thumbnailaside_config.cpp @@ -45,8 +45,6 @@ ThumbnailAsideEffectConfigForm::ThumbnailAsideEffectConfigForm(QWidget* parent) ThumbnailAsideEffectConfig::ThumbnailAsideEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - m_ui = new ThumbnailAsideEffectConfigForm(this); QVBoxLayout* layout = new QVBoxLayout(this); @@ -76,12 +74,10 @@ ThumbnailAsideEffectConfig::~ThumbnailAsideEffectConfig() { // Undo (only) unsaved changes to global key shortcuts m_ui->editor->undoChanges(); - kDebug() ; } void ThumbnailAsideEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("ThumbnailAside"); @@ -98,7 +94,7 @@ void ThumbnailAsideEffectConfig::load() void ThumbnailAsideEffectConfig::save() { - kDebug() << "Saving config of ThumbnailAside" ; + kDebug(1212) << "Saving config of ThumbnailAside" ; //KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("ThumbnailAside"); @@ -118,7 +114,6 @@ void ThumbnailAsideEffectConfig::save() void ThumbnailAsideEffectConfig::defaults() { - kDebug() ; m_ui->spinWidth->setValue(200); m_ui->spinSpacing->setValue(10); m_ui->spinOpacity->setValue(50); diff --git a/effects/trackmouse_config.cpp b/effects/trackmouse_config.cpp index 6850323e87..a3c4af370c 100644 --- a/effects/trackmouse_config.cpp +++ b/effects/trackmouse_config.cpp @@ -38,8 +38,6 @@ namespace KWin TrackMouseEffectConfig::TrackMouseEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug() ; - QVBoxLayout* layout = new QVBoxLayout(this); QLabel* label = new QLabel(i18n("Hold Ctrl+Meta keys to see where the mouse cursor is."), this); label->setWordWrap(true); @@ -52,12 +50,10 @@ TrackMouseEffectConfig::TrackMouseEffectConfig(QWidget* parent, const QVariantLi TrackMouseEffectConfig::~TrackMouseEffectConfig() { - kDebug() ; } void TrackMouseEffectConfig::load() { - kDebug() ; KCModule::load(); emit changed(false); @@ -65,7 +61,6 @@ void TrackMouseEffectConfig::load() void TrackMouseEffectConfig::save() { - kDebug() ; KCModule::save(); emit changed(false); @@ -74,7 +69,6 @@ void TrackMouseEffectConfig::save() void TrackMouseEffectConfig::defaults() { - kDebug() ; emit changed(true); } diff --git a/effects/videorecord_config.cpp b/effects/videorecord_config.cpp index 0cf291a18c..c9b5364263 100644 --- a/effects/videorecord_config.cpp +++ b/effects/videorecord_config.cpp @@ -48,8 +48,6 @@ namespace KWin VideoRecordEffectConfig::VideoRecordEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug(); - QVBoxLayout* layout = new QVBoxLayout(this); QHBoxLayout* hlayout = new QHBoxLayout( this ); QLabel *label = new QLabel( i18n( "Path to save video:" ), this ); @@ -79,14 +77,12 @@ VideoRecordEffectConfig::VideoRecordEffectConfig(QWidget* parent, const QVariant VideoRecordEffectConfig::~VideoRecordEffectConfig() { - kDebug(); // Undo (only) unsaved changes to global key shortcuts mShortcutEditor->undoChanges(); } void VideoRecordEffectConfig::load() { - kDebug() ; KCModule::load(); KConfigGroup conf = EffectsHandler::effectConfig("VideoRecord"); @@ -96,7 +92,6 @@ void VideoRecordEffectConfig::load() void VideoRecordEffectConfig::save() { - kDebug() ; KCModule::save(); KConfigGroup conf = EffectsHandler::effectConfig("VideoRecord"); @@ -116,7 +111,6 @@ void VideoRecordEffectConfig::save() void VideoRecordEffectConfig::defaults() { - kDebug() ; saveVideo->setPath(KGlobalSettings::documentPath() ); mShortcutEditor->allDefault(); emit changed(true); diff --git a/effects/wobblywindows.cpp b/effects/wobblywindows.cpp index 8a77a9c871..52e95776c8 100644 --- a/effects/wobblywindows.cpp +++ b/effects/wobblywindows.cpp @@ -178,7 +178,7 @@ WobblyWindowsEffect::~WobblyWindowsEffect() { // we should be empty at this point... // emit a warning and clean the list. - kDebug() << "Windows list not empty. Left items : " << windows.count(); + kDebug(1212) << "Windows list not empty. Left items : " << windows.count(); QHash< const EffectWindow*, WindowWobblyInfos >::iterator i; for (i = windows.begin(); i != windows.end(); ++i) { @@ -198,7 +198,7 @@ void WobblyWindowsEffect::reconfigure( ReconfigureFlags ) unsigned int wobblynessLevel = conf.readEntry("WobblynessLevel", 0); if (wobblynessLevel > 4) { - kDebug() << "Wrong value for \"WobblynessLevel\" : " << wobblynessLevel; + kDebug(1212) << "Wrong value for \"WobblynessLevel\" : " << wobblynessLevel; wobblynessLevel = 4; } setParameterSet(pset[wobblynessLevel]); @@ -236,7 +236,7 @@ void WobblyWindowsEffect::reconfigure( ReconfigureFlags ) m_resizeWobble = conf.readEntry("ResizeWobble", true); #if defined VERBOSE_MODE - kDebug() << "Parameters :\n" << + kDebug(1212) << "Parameters :\n" << "move : " << m_moveEffectEnabled << ", open : " << m_openEffectEnabled << ", close : " << m_closeEffectEnabled << "\n" "grid(" << m_stiffness << ", " << m_drag << ", " << m_move_factor << ")\n" << "velocity(" << m_minVelocity << ", " << m_maxVelocity << ", " << m_stopVelocity << ")\n" << @@ -315,7 +315,7 @@ void WobblyWindowsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da while (!stop && (updateTime > maxTime)) { #if defined VERBOSE_MODE - kDebug() << "loop time " << updateTime << " / " << time; + kDebug(1212) << "loop time " << updateTime << " / " << time; #endif stop = !updateWindowWobblyDatas(w, maxTime); updateTime -= maxTime; @@ -388,16 +388,16 @@ void WobblyWindowsEffect::windowUserMovedResized(EffectWindow* w, bool first, bo int pickedPointIndex = indy*wwi.width + indx; if (pickedPointIndex < 0) { - kDebug() << "Picked index == " << pickedPointIndex << " with (" << cursorPos().x() << "," << cursorPos().y() << ")"; + kDebug(1212) << "Picked index == " << pickedPointIndex << " with (" << cursorPos().x() << "," << cursorPos().y() << ")"; pickedPointIndex = 0; } else if (static_cast(pickedPointIndex) > wwi.count - 1) { - kDebug() << "Picked index == " << pickedPointIndex << " with (" << cursorPos().x() << "," << cursorPos().y() << ")"; + kDebug(1212) << "Picked index == " << pickedPointIndex << " with (" << cursorPos().x() << "," << cursorPos().y() << ")"; pickedPointIndex = wwi.count - 1; } #if defined VERBOSE_MODE - kDebug() << "Original Picked point -- x : " << picked.x << " - y : " << picked.y; + kDebug(1212) << "Original Picked point -- x : " << picked.x << " - y : " << picked.y; #endif wwi.constraint[pickedPointIndex] = true; } @@ -692,8 +692,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time) qreal y_length = rect.height() / (wwi.height-1.0); #if defined VERBOSE_MODE - kDebug() << "time " << time; - kDebug() << "increment x " << x_length << " // y" << y_length; + kDebug(1212) << "time " << time; + kDebug(1212) << "increment x " << x_length << " // y" << y_length; #endif Pair origine = {rect.x(), rect.y()}; @@ -1053,17 +1053,17 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time) #if defined VERBOSE_MODE if (wwi.constraint[i]) { - kDebug() << "Constraint point ** vel : " << vel.x << "," << vel.y << " ** move : " << vel.x*time << "," << vel.y*time; + kDebug(1212) << "Constraint point ** vel : " << vel.x << "," << vel.y << " ** move : " << vel.x*time << "," << vel.y*time; } #endif } #if defined VERBOSE_MODE # if defined COMPUTE_STATS - kDebug() << "Acceleration bounds (" << accBound.x << ", " << accBound.y << ")"; - kDebug() << "Velocity bounds (" << velBound.x << ", " << velBound.y << ")"; + kDebug(1212) << "Acceleration bounds (" << accBound.x << ", " << accBound.y << ")"; + kDebug(1212) << "Velocity bounds (" << velBound.x << ", " << velBound.y << ")"; # endif - kDebug() << "sum_acc : " << acc_sum << " *** sum_vel :" << vel_sum; + kDebug(1212) << "sum_acc : " << acc_sum << " *** sum_vel :" << vel_sum; #endif if (wwi.status != Moving && acc_sum < m_stopAcceleration && vel_sum < m_stopVelocity) diff --git a/effects/zoom_config.cpp b/effects/zoom_config.cpp index 8d4214ada9..9b533c3942 100644 --- a/effects/zoom_config.cpp +++ b/effects/zoom_config.cpp @@ -38,8 +38,6 @@ namespace KWin ZoomEffectConfig::ZoomEffectConfig(QWidget* parent, const QVariantList& args) : KCModule(EffectFactory::componentData(), parent, args) { - kDebug(); - QVBoxLayout* layout = new QVBoxLayout(this); KActionCollection* actionCollection = new KActionCollection( this, componentData() ); KAction* a; @@ -67,14 +65,12 @@ ZoomEffectConfig::ZoomEffectConfig(QWidget* parent, const QVariantList& args) : ZoomEffectConfig::~ZoomEffectConfig() { - kDebug() ; // Undo (only) unsaved changes to global key shortcuts mShortcutEditor->undoChanges(); } void ZoomEffectConfig::load() { - kDebug() ; KCModule::load(); emit changed(false); @@ -82,7 +78,6 @@ void ZoomEffectConfig::load() void ZoomEffectConfig::save() { - kDebug() ; KCModule::save(); mShortcutEditor->save(); // undo() will restore to this state from now on @@ -93,7 +88,6 @@ void ZoomEffectConfig::save() void ZoomEffectConfig::defaults() { - kDebug() ; mShortcutEditor->allDefault(); emit changed(true); } diff --git a/events.cpp b/events.cpp index 35ed98447b..57f27d61a3 100644 --- a/events.cpp +++ b/events.cpp @@ -1306,7 +1306,7 @@ void Client::processMousePressEvent( QMouseEvent* e ) { if( e->type() != QEvent::MouseButtonPress ) { - kWarning() << "processMousePressEvent()" ; + kWarning(1212) << "processMousePressEvent()" ; return; } int button; diff --git a/geometry.cpp b/geometry.cpp index 741fd47abb..616d5d1a74 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -86,7 +86,7 @@ void Workspace::desktopResized() void Workspace::updateClientArea( bool force ) { int nscreens = Kephal::ScreenUtils::numScreens(); - kDebug() << "screens: " << nscreens << "desktops: " << numberOfDesktops(); + kDebug(1212) << "screens: " << nscreens << "desktops: " << numberOfDesktops(); QVector< QRect > new_wareas( numberOfDesktops() + 1 ); QVector< QVector< QRect > > new_sareas( numberOfDesktops() + 1 ); QVector< QRect > screens( nscreens ); @@ -136,7 +136,7 @@ void Workspace::updateClientArea( bool force ) iS < nscreens; iS ++ ) { -// kDebug () << "adjusting new_sarea: " << screens[ iS ]; +// kDebug (1212) << "adjusting new_sarea: " << screens[ iS ]; new_sareas[ (*it)->desktop() ][ iS ] = new_sareas[ (*it)->desktop() ][ iS ].intersected( (*it)->adjustedClientArea( desktopArea, screens[ iS ] )); @@ -151,7 +151,7 @@ void Workspace::updateClientArea( bool force ) for( int iS = 0; iS < nscreens; iS ++ ) - kDebug () << "new_sarea: " << new_sareas[ i ][ iS ]; + kDebug (1212) << "new_sarea: " << new_sareas[ i ][ iS ]; } #endif // TODO topmenu update for screenarea changes? @@ -887,19 +887,19 @@ QRect Client::adjustedClientArea( const QRect &desktopArea, const QRect& area ) stareaB.setBottom( qMin( stareaB.bottom(), screenarea.bottom())); if (stareaL . intersects (area)) { -// kDebug () << "Moving left of: " << r << " to " << stareaL.right() + 1; +// kDebug (1212) << "Moving left of: " << r << " to " << stareaL.right() + 1; r . setLeft( stareaL . right() + 1 ); } if (stareaR . intersects (area)) { -// kDebug () << "Moving right of: " << r << " to " << stareaR.left() - 1; +// kDebug (1212) << "Moving right of: " << r << " to " << stareaR.left() - 1; r . setRight( stareaR . left() - 1 ); } if (stareaT . intersects (area)) { -// kDebug () << "Moving top of: " << r << " to " << stareaT.bottom() + 1; +// kDebug (1212) << "Moving top of: " << r << " to " << stareaT.bottom() + 1; r . setTop( stareaT . bottom() + 1 ); } if (stareaB . intersects (area)) { -// kDebug () << "Moving bottom of: " << r << " to " << stareaB.top() - 1; +// kDebug (1212) << "Moving bottom of: " << r << " to " << stareaB.top() - 1; r . setBottom( stareaB . top() - 1 ); } return r; @@ -1009,7 +1009,7 @@ void Client::checkWorkspacePosition() else area = workspace()->clientArea( MaximizeFullArea, QPoint( 0, 0 ), desktop()); area.setHeight( workspace()->topMenuHeight()); -// kDebug() << "TOPMENU size adjust: " << area << ":" << this; +// kDebug(1212) << "TOPMENU size adjust: " << area << ":" << this; setGeometry( area ); } return; @@ -1152,8 +1152,8 @@ QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode, bool noframe int h = wsize.height(); if( w < 1 || h < 1 ) { - kWarning() << "sizeForClientSize() with empty size!" ; - kWarning() << kBacktrace() ; + kWarning(1212) << "sizeForClientSize() with empty size!" ; + kWarning(1212) << kBacktrace() ; } if (w<1) w = 1; if (h<1) h = 1; @@ -1601,8 +1601,8 @@ void Client::resizeWithChecks( int w, int h, ForceGeometry_t force ) { if( h == border_top + border_bottom ) { - kWarning() << "Shaded geometry passed for size:" ; - kWarning() << kBacktrace() ; + kWarning(1212) << "Shaded geometry passed for size:" ; + kWarning(1212) << kBacktrace() ; } } int newx = x(); @@ -1790,8 +1790,8 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force ) { if( h == border_top + border_bottom ) { - kDebug() << "Shaded geometry passed for size:"; - kDebug() << kBacktrace(); + kDebug(1212) << "Shaded geometry passed for size:"; + kDebug(1212) << kBacktrace(); } else { @@ -1806,8 +1806,8 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force ) QRect g( x, y, w, h ); if( block_geometry_updates == 0 && g != rules()->checkGeometry( g )) { - kDebug() << "forced geometry fail:" << g << ":" << rules()->checkGeometry( g ); - kDebug() << kBacktrace(); + kDebug(1212) << "forced geometry fail:" << g << ":" << rules()->checkGeometry( g ); + kDebug(1212) << kBacktrace(); } if( force == NormalGeometrySet && geom == g && pending_geometry_update == PendingGeometryNone ) return; @@ -1868,8 +1868,8 @@ void Client::plainResize( int w, int h, ForceGeometry_t force ) { if( h == border_top + border_bottom ) { - kDebug() << "Shaded geometry passed for size:"; - kDebug() << kBacktrace(); + kDebug(1212) << "Shaded geometry passed for size:"; + kDebug(1212) << kBacktrace(); } else { @@ -1884,8 +1884,8 @@ void Client::plainResize( int w, int h, ForceGeometry_t force ) QSize s( w, h ); if( block_geometry_updates == 0 && s != rules()->checkSize( s )) { - kDebug() << "forced size fail:" << s << ":" << rules()->checkSize( s ); - kDebug() << kBacktrace(); + kDebug(1212) << "forced size fail:" << s << ":" << rules()->checkSize( s ); + kDebug(1212) << kBacktrace(); } // resuming geometry updates is handled only in setGeometry() assert( pending_geometry_update == PendingGeometryNone || block_geometry_updates > 0 ); @@ -1940,8 +1940,8 @@ void Client::move( int x, int y, ForceGeometry_t force ) QPoint p( x, y ); if( block_geometry_updates == 0 && p != rules()->checkPosition( p )) { - kDebug() << "forced position fail:" << p << ":" << rules()->checkPosition( p ); - kDebug() << kBacktrace(); + kDebug(1212) << "forced position fail:" << p << ":" << rules()->checkPosition( p ); + kDebug(1212) << kBacktrace(); } if( force == NormalGeometrySet && geom.topLeft() == p ) return; diff --git a/group.cpp b/group.cpp index a6303eaa52..d95cc3f374 100644 --- a/group.cpp +++ b/group.cpp @@ -73,19 +73,19 @@ bool performTransiencyCheck() continue; if( (*it1)->in_group == NULL ) { - kdDebug() << "TC: " << *it1 << " in not in a group" << endl; + kDebug(1212) << "TC: " << *it1 << " in not in a group" << endl; ret = false; } else if( !(*it1)->in_group->members().contains( *it1 )) { - kdDebug() << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl; + kDebug(1212) << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl; ret = false; } if( !(*it1)->isTransient()) { if( !(*it1)->mainClients().isEmpty()) { - kdDebug() << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl; + kDebug(1212) << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl; ret = false; } } @@ -100,14 +100,14 @@ bool performTransiencyCheck() && !Workspace::self()->clients.contains( *it2 ) && !Workspace::self()->desktops.contains( *it2 )) { - kDebug() << "TC:" << *it1 << " has non-existent main client "; - kDebug() << "TC2:" << *it2; // this may crash + kDebug(1212) << "TC:" << *it1 << " has non-existent main client "; + kDebug(1212) << "TC2:" << *it2; // this may crash ret = false; continue; } if( !(*it2)->transients_list.contains( *it1 )) { - kdDebug() << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient" << endl; + kdDebug(1212) << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient" << endl; ret = false; } } @@ -121,14 +121,14 @@ bool performTransiencyCheck() && !Workspace::self()->clients.contains( *it2 ) && !Workspace::self()->desktops.contains( *it2 )) { - kDebug() << "TC:" << *it1 << " has non-existent transient "; - kDebug() << "TC2:" << *it2; // this may crash + kDebug(1212) << "TC:" << *it1 << " has non-existent transient "; + kDebug(1212) << "TC2:" << *it2; // this may crash ret = false; continue; } if( !(*it2)->mainClients().contains( *it1 )) { - kdDebug() << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl; + kdDebug(1212) << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl; ret = false; } } @@ -145,7 +145,7 @@ bool performTransiencyCheck() { if( (*it2)->in_group != *it1 ) { - kdDebug() << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl; + kDebug(1212) << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl; ret = false; } } @@ -173,8 +173,8 @@ static void checkTransiency() { if( !performTransiencyCheck()) { - kdDebug() << "BT:" << transiencyCheckStartBt << endl; - kdDebug() << "CLIENT:" << transiencyCheckClient << endl; + kDebug(1212) << "BT:" << transiencyCheckStartBt << endl; + kDebug(1212) << "CLIENT:" << transiencyCheckClient << endl; abort(); } transiencyCheckNonExistent = false; @@ -264,15 +264,15 @@ void Group::addMember( Client* member_P ) { TRANSIENCY_CHECK( member_P ); _members.append( member_P ); -// kDebug() << "GROUPADD:" << this << ":" << member_P; -// kDebug() << kBacktrace(); +// kDebug(1212) << "GROUPADD:" << this << ":" << member_P; +// kDebug(1212) << kBacktrace(); } void Group::removeMember( Client* member_P ) { TRANSIENCY_CHECK( member_P ); -// kDebug() << "GROUPREMOVE:" << this << ":" << member_P; -// kDebug() << kBacktrace(); +// kDebug(1212) << "GROUPREMOVE:" << this << ":" << member_P; +// kDebug(1212) << kBacktrace(); Q_ASSERT( _members.contains( member_P )); _members.removeAll( member_P ); // there are cases when automatic deleting of groups must be delayed, @@ -653,28 +653,28 @@ void Client::removeFromMainClients() void Client::cleanGrouping() { TRANSIENCY_CHECK( this ); -// kDebug() << "CLEANGROUPING:" << this; +// kDebug(1212) << "CLEANGROUPING:" << this; // for( ClientList::ConstIterator it = group()->members().begin(); // it != group()->members().end(); // ++it ) -// kDebug() << "CL:" << *it; +// kDebug(1212) << "CL:" << *it; // ClientList mains; // mains = mainClients(); // for( ClientList::ConstIterator it = mains.begin(); // it != mains.end(); // ++it ) -// kDebug() << "MN:" << *it; +// kDebug(1212) << "MN:" << *it; removeFromMainClients(); -// kDebug() << "CLEANGROUPING2:" << this; +// kDebug(1212) << "CLEANGROUPING2:" << this; // for( ClientList::ConstIterator it = group()->members().begin(); // it != group()->members().end(); // ++it ) -// kDebug() << "CL2:" << *it; +// kDebug(1212) << "CL2:" << *it; // mains = mainClients(); // for( ClientList::ConstIterator it = mains.begin(); // it != mains.end(); // ++it ) -// kDebug() << "MN2:" << *it; +// kDebug(1212) << "MN2:" << *it; for( ClientList::ConstIterator it = transients_list.constBegin(); it != transients_list.constEnd(); ) @@ -687,16 +687,16 @@ void Client::cleanGrouping() else ++it; } -// kDebug() << "CLEANGROUPING3:" << this; +// kDebug(1212) << "CLEANGROUPING3:" << this; // for( ClientList::ConstIterator it = group()->members().begin(); // it != group()->members().end(); // ++it ) -// kDebug() << "CL3:" << *it; +// kDebug(1212) << "CL3:" << *it; // mains = mainClients(); // for( ClientList::ConstIterator it = mains.begin(); // it != mains.end(); // ++it ) -// kDebug() << "MN3:" << *it; +// kDebug(1212) << "MN3:" << *it; // HACK // removeFromMainClients() did remove 'this' from transient // lists of all group members, but then made windows that @@ -709,11 +709,11 @@ void Client::cleanGrouping() it != group_members.constEnd(); ++it ) (*it)->removeTransient( this ); -// kDebug() << "CLEANGROUPING4:" << this; +// kDebug(1212) << "CLEANGROUPING4:" << this; // for( ClientList::ConstIterator it = group_members.begin(); // it != group_members.end(); // ++it ) -// kDebug() << "CL4:" << *it; +// kDebug(1212) << "CL4:" << *it; } // Make sure that no group transient is considered transient @@ -859,19 +859,19 @@ void Client::addTransient( Client* cl ) transients_list.append( cl ); if( workspace()->mostRecentlyActivatedClient() == this && cl->isModal()) check_active_modal = true; -// kDebug() << "ADDTRANS:" << this << ":" << cl; -// kDebug() << kBacktrace(); +// kDebug(1212) << "ADDTRANS:" << this << ":" << cl; +// kDebug(1212) << kBacktrace(); // for( ClientList::ConstIterator it = transients_list.begin(); // it != transients_list.end(); // ++it ) -// kDebug() << "AT:" << (*it); +// kDebug(1212) << "AT:" << (*it); } void Client::removeTransient( Client* cl ) { TRANSIENCY_CHECK( this ); -// kDebug() << "REMOVETRANS:" << this << ":" << cl; -// kDebug() << kBacktrace(); +// kDebug(1212) << "REMOVETRANS:" << this << ":" << cl; +// kDebug(1212) << kBacktrace(); transients_list.removeAll( cl ); // cl is transient for this, but this is going away // make cl group transient diff --git a/layers.cpp b/layers.cpp index 31aaa40e7c..7d85d73c8f 100644 --- a/layers.cpp +++ b/layers.cpp @@ -120,13 +120,13 @@ void Workspace::updateStackingOrder( bool propagate_new_clients ) force_restacking = false; stacking_order = new_stacking_order; #if 0 - kDebug() << "stacking:" << changed; + kDebug(1212) << "stacking:" << changed; if( changed || propagate_new_clients ) { for( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it ) - kDebug() << (void*)(*it) << *it << ":" << (*it)->layer(); + kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); } #endif if( changed || propagate_new_clients ) @@ -563,11 +563,11 @@ ClientList Workspace::constrainedStackingOrder() ClientList layer[ NumLayers ]; #if 0 - kDebug() << "stacking1:"; + kDebug(1212) << "stacking1:"; for( ClientList::ConstIterator it = unconstrained_stacking_order.begin(); it != unconstrained_stacking_order.end(); ++it ) - kdDebug() << (void*)(*it) << *it << ":" << (*it)->layer(); + kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); #endif // build the order from layers QHash< Group*, Layer > minimum_layer; @@ -594,11 +594,11 @@ ClientList Workspace::constrainedStackingOrder() ++lay ) stacking += layer[ lay ]; #if 0 - kDebug() << "stacking2:"; + kDebug(1212) << "stacking2:"; for( ClientList::ConstIterator it = stacking.begin(); it != stacking.end(); ++it ) - kdDebug() << (void*)(*it) << *it << ":" << (*it)->layer(); + kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); #endif // now keep transients above their mainwindows // TODO this could(?) use some optimization @@ -662,12 +662,12 @@ ClientList Workspace::constrainedStackingOrder() stacking.insert( i2, current ); } #if 0 - kDebug() << "stacking3:"; + kDebug(1212) << "stacking3:"; for( ClientList::ConstIterator it = stacking.begin(); it != stacking.end(); ++it ) - kdDebug() << (void*)(*it) << *it << ":" << (*it)->layer(); - kDebug() << "\n\n"; + kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); + kDebug(1212) << "\n\n"; #endif return stacking; } diff --git a/lib/kdecoration_plugins_p.cpp b/lib/kdecoration_plugins_p.cpp index 28554ead53..8c1333bc34 100644 --- a/lib/kdecoration_plugins_p.cpp +++ b/lib/kdecoration_plugins_p.cpp @@ -113,7 +113,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) KDecorationFactory* oldFactory = fact; QString path = KLibLoader::findLibrary(nameStr); - kDebug() << "kwin : path " << path << " for " << nameStr; + kDebug(1212) << "kwin : path " << path << " for " << nameStr; // If the plugin was not found, try to find the default if (path.isEmpty()) @@ -139,7 +139,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) // If that fails, fall back to the default plugin if (!library) { - kDebug() << " could not load library, try default plugin again"; + kDebug(1212) << " could not load library, try default plugin again"; nameStr = defaultPlugin; if ( pluginStr == nameStr ) return true; diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 9e6699ca58..cd3f5998fd 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -104,7 +104,7 @@ bool checkGLError( const char* txt ) GLenum err = glGetError(); if( err != GL_NO_ERROR ) { - kWarning() << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) ; + kWarning(1212) << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) ; return true; } return false; diff --git a/lib/kwinshadereffect.cpp b/lib/kwinshadereffect.cpp index f6f5583f05..9a079ab92b 100644 --- a/lib/kwinshadereffect.cpp +++ b/lib/kwinshadereffect.cpp @@ -80,13 +80,13 @@ bool ShaderEffect::loadData(const QString& shadername) QString vertexshader = KGlobal::dirs()->findResource("data", "kwin/" + shadername + ".vert"); if(fragmentshader.isEmpty() || vertexshader.isEmpty()) { - kError() << "Couldn't locate shader files" << endl; + kError(1212) << "Couldn't locate shader files" << endl; return false; } mShader = new GLShader(vertexshader, fragmentshader); if(!mShader->isValid()) { - kError() << "The shader failed to load!" << endl; + kError(1212) << "The shader failed to load!" << endl; return false; } mShader->bind(); diff --git a/main.cpp b/main.cpp index e0904f1543..65b827a521 100644 --- a/main.cpp +++ b/main.cpp @@ -243,7 +243,7 @@ Application::Application( ) { kwin_sync = true; XSynchronize( display(), True ); - kDebug() << "Running KWin in sync mode"; + kDebug(1212) << "Running KWin in sync mode"; } KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); KSharedConfig::Ptr config = KGlobal::config(); @@ -281,10 +281,10 @@ Application::Application( ) ::exit(1); if( cmd.length() > 500 ) { - kDebug() << "Command is too long, truncating"; + kDebug(1212) << "Command is too long, truncating"; cmd = cmd.left(500); } - kDebug() << "Starting" << cmd << "and exiting"; + kDebug(1212) << "Starting" << cmd << "and exiting"; char buf[1024]; sprintf(buf, "%s &", cmd.toAscii().data()); system(buf); @@ -293,7 +293,7 @@ Application::Application( ) // Disable compositing if we have had too many crashes if( crashes >= 2 ) { - kDebug() << "Too many crashes recently, disabling compositing"; + kDebug(1212) << "Too many crashes recently, disabling compositing"; KConfigGroup compgroup( config, "Compositing" ); compgroup.writeEntry( "Enabled", false ); } diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 65559b594b..d9d54c1b8c 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -675,11 +675,11 @@ bool SceneOpenGL::selfCheck() { QPixmap pix = QPixmap::grabWindow( rootWindow(), p.x(), p.y(), 5, 1 ); QImage img = pix.toImage(); -// kdDebug() << "P:" << QColor( img.pixel( 0, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 1, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 2, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 3, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 4, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 0, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 1, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 2, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 3, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 4, 0 )).name(); if( img.pixel( 0, 0 ) != QColor( Qt::red ).rgb() || img.pixel( 1, 0 ) != QColor( Qt::green ).rgb() || img.pixel( 2, 0 ) != QColor( Qt::blue ).rgb() diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 1fa8c4662b..1189fe418f 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -215,11 +215,11 @@ bool SceneXrender::selfCheck() { QPixmap pix = QPixmap::grabWindow( rootWindow(), p.x(), p.y(), 5, 1 ); QImage img = pix.toImage(); -// kdDebug() << "P:" << QColor( img.pixel( 0, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 1, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 2, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 3, 0 )).name(); -// kdDebug() << "P:" << QColor( img.pixel( 4, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 0, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 1, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 2, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 3, 0 )).name(); +// kDebug(1212) << "P:" << QColor( img.pixel( 4, 0 )).name(); if( img.pixel( 0, 0 ) != QColor( Qt::red ).rgb() || img.pixel( 1, 0 ) != QColor( Qt::green ).rgb() || img.pixel( 2, 0 ) != QColor( Qt::blue ).rgb() diff --git a/sm.cpp b/sm.cpp index 0addf0847b..2e90923526 100644 --- a/sm.cpp +++ b/sm.cpp @@ -289,7 +289,7 @@ const char* Workspace::windowTypeToTxt( NET::WindowType type ) return window_type_names[ type + 1 ]; // +1 (unknown==-1) if( type == -2 ) // undefined (not really part of NET::WindowType) return "Undefined"; - kFatal() << "Unknown Window Type" ; + kFatal(1212) << "Unknown Window Type" ; return NULL; } diff --git a/tools/decobenchmark/main.cpp b/tools/decobenchmark/main.cpp index fa90cad674..e45663f4da 100644 --- a/tools/decobenchmark/main.cpp +++ b/tools/decobenchmark/main.cpp @@ -49,14 +49,14 @@ DecoBenchApplication::DecoBenchApplication(const QString &library, Tests tests, preview = new KDecorationPreview( plugins, 0 ); if (plugins->loadPlugin(library) ) - kDebug() << "Decoration library " << library << " loaded..."; + kDebug(1212) << "Decoration library " << library << " loaded..."; else - kError() << "Error loading decoration library " << library << "!" << endl; + kError(1212) << "Error loading decoration library " << library << "!" << endl; if (preview->recreateDecoration() ) - kDebug() << "Decoration created..."; + kDebug(1212) << "Decoration created..."; else - kError() << "Error creating decoration!" << endl; + kError(1212) << "Error creating decoration!" << endl; preview->show(); } @@ -86,7 +86,7 @@ void DecoBenchApplication::executeTest() ftime(&aend); long long time_diff = (aend.time - astart.time)*1000+aend.millitm - astart.millitm; - kDebug() << "Total:" << (float(time_diff)/1000); + kDebug(1212) << "Total:" << (float(time_diff)/1000); quit(); } diff --git a/tools/decobenchmark/preview.cpp b/tools/decobenchmark/preview.cpp index 0a173efd4b..feb3eecef1 100644 --- a/tools/decobenchmark/preview.cpp +++ b/tools/decobenchmark/preview.cpp @@ -65,7 +65,7 @@ KDecorationPreview::~KDecorationPreview() void KDecorationPreview::performRepaintTest(int n) { - kDebug() << "start " << n << " repaints..."; + kDebug(1212) << "start " << n << " repaints..."; bridge->setCaption("Deco Benchmark"); deco->captionChange(); positionPreviews(0); @@ -77,7 +77,7 @@ void KDecorationPreview::performRepaintTest(int n) void KDecorationPreview::performCaptionTest(int n) { - kDebug() << "start " << n << " caption changes..."; + kDebug(1212) << "start " << n << " caption changes..."; QString caption = "Deco Benchmark %1"; positionPreviews(0); for (int i = 0; i < n; ++i) { @@ -90,7 +90,7 @@ void KDecorationPreview::performCaptionTest(int n) void KDecorationPreview::performResizeTest(int n) { - kDebug() << "start " << n << " resizes..."; + kDebug(1212) << "start " << n << " resizes..."; bridge->setCaption("Deco Benchmark"); deco->captionChange(); for (int i = 0; i < n; ++i) { @@ -101,7 +101,7 @@ void KDecorationPreview::performResizeTest(int n) void KDecorationPreview::performRecreationTest(int n) { - kDebug() << "start " << n << " resizes..."; + kDebug(1212) << "start " << n << " resizes..."; bridge->setCaption("Deco Benchmark"); deco->captionChange(); positionPreviews(0); diff --git a/utils.cpp b/utils.cpp index 0926216da8..e9dc085941 100644 --- a/utils.cpp +++ b/utils.cpp @@ -302,7 +302,7 @@ void ungrabXKeyboard() { if( !keyboard_grabbed ) { // grabXKeyboard() may fail sometimes, so don't fail, but at least warn anyway - kDebug() << "ungrabXKeyboard() called but keyboard not grabbed!"; + kDebug(1212) << "ungrabXKeyboard() called but keyboard not grabbed!"; } keyboard_grabbed = false; XUngrabKeyboard( display(), xTime()); @@ -466,7 +466,7 @@ void ShortcutDialog::keySequenceChanged(const QKeySequence &seq) // Check if the key sequence is used currently QList conflicting = KGlobalAccel::getGlobalShortcutsByKey(seq); if (!conflicting.isEmpty()) { - kDebug() << "TODO: Display conflicting shortcuts to user"; + kDebug(1212) << "TODO: Display conflicting shortcuts to user"; // TODO: Inform the user somehow instead of just ignoring his wish widget->setKeySequence(shortcut()); } diff --git a/workspace.cpp b/workspace.cpp index d151e009a9..03f02c8669 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -819,7 +819,7 @@ void Workspace::updateCurrentTopMenu() } } -// kDebug() << "CURRENT TOPMENU:" << menubar << ":" << active_client; +// kDebug(1212) << "CURRENT TOPMENU:" << menubar << ":" << active_client; if ( menubar ) { if( active_client && !menubar->isOnDesktop( active_client->desktop())) @@ -2348,13 +2348,13 @@ void Workspace::addTopMenu( Client* c ) updateTopMenuGeometry( c ); updateCurrentTopMenu(); } -// kDebug() << "NEW TOPMENU:" << c; +// kDebug(1212) << "NEW TOPMENU:" << c; } void Workspace::removeTopMenu( Client* c ) { // if( c->isTopMenu()) -// kDebug() << "REMOVE TOPMENU:" << c; +// kDebug(1212) << "REMOVE TOPMENU:" << c; assert( c->isTopMenu()); assert( topmenus.contains( c )); topmenus.removeAll( c ); @@ -2364,7 +2364,7 @@ void Workspace::removeTopMenu( Client* c ) void Workspace::lostTopMenuSelection() { -// kDebug() << "lost TopMenu selection"; +// kDebug(1212) << "lost TopMenu selection"; // make sure this signal is always set when not owning the selection disconnect( topmenu_watcher, SIGNAL( lostOwner()), this, SLOT( lostTopMenuOwner())); connect( topmenu_watcher, SIGNAL( lostOwner()), this, SLOT( lostTopMenuOwner())); @@ -2386,13 +2386,13 @@ void Workspace::lostTopMenuOwner() { if( !options->topMenuEnabled()) return; -// kDebug() << "TopMenu selection lost owner"; +// kDebug(1212) << "TopMenu selection lost owner"; if( !topmenu_selection->claim( false )) { -// kDebug() << "Failed to claim TopMenu selection"; +// kDebug(1212) << "Failed to claim TopMenu selection"; return; } -// kDebug() << "claimed TopMenu selection"; +// kDebug(1212) << "claimed TopMenu selection"; setupTopMenuHandling(); }