diff --git a/clients/b2/config/config.cpp b/clients/b2/config/config.cpp index add63d6375..0c15d68d1f 100644 --- a/clients/b2/config/config.cpp +++ b/clients/b2/config/config.cpp @@ -49,6 +49,7 @@ extern "C" KDE_EXPORT QObject *allocate_config(KConfig *conf, QWidget *parent) B2Config::B2Config(KConfig *conf, QWidget *parent) : QObject(parent) { + Q_UNUSED( conf ); KGlobal::locale()->insertCatalog("kwin_b2_config"); b2Config = new KConfig("kwinb2rc"); gb = new KVBox(parent); diff --git a/clients/quartz/config/config.cpp b/clients/quartz/config/config.cpp index ebc0f88f34..e8d7db8948 100644 --- a/clients/quartz/config/config.cpp +++ b/clients/quartz/config/config.cpp @@ -47,6 +47,7 @@ extern "C" QuartzConfig::QuartzConfig( KConfig* conf, QWidget* parent ) : QObject( parent ) { + Q_UNUSED( conf ); quartzConfig = new KConfig("kwinquartzrc"); KConfigGroup cg(quartzConfig, "General"); KGlobal::locale()->insertCatalog("kwin_clients"); diff --git a/clients/redmond/redmond.cpp b/clients/redmond/redmond.cpp index 84ea249952..5a049c8804 100644 --- a/clients/redmond/redmond.cpp +++ b/clients/redmond/redmond.cpp @@ -174,8 +174,8 @@ static void create_pixmaps () defaultMenuPix = new QPixmap(kdelogo); // buttons (active/inactive, sunken/unsunken) - QColorGroup g = options()->palette(KDecoration::ColorButtonBg, true).active(); - QColor c = g.background(); + QPalette g = options()->palette(KDecoration::ColorButtonBg, true); + QColor c = g.button().color(); *btnPix1 = QPixmap(normalTitleHeight, normalTitleHeight-2); *btnDownPix1 = QPixmap(normalTitleHeight, normalTitleHeight-2); *iBtnPix1 = QPixmap(normalTitleHeight, normalTitleHeight-2); @@ -193,8 +193,7 @@ static void create_pixmaps () gradientFill(miniBtnDownPix1, c.dark(130), c.light(130)); g = options()->palette(KDecoration::ColorButtonBg, false); - g.setCurrentColorGroup( QPalette::Active ); - c = g.background(); + c = g.button().color(); gradientFill(iBtnPix1, c.light(130), c.dark(130)); gradientFill(iBtnDownPix1, c.dark(130), c.light(130)); gradientFill(iMiniBtnPix1, c.light(130), c.dark(130)); @@ -206,8 +205,7 @@ static void create_pixmaps () miniBtnDownPix1->fill(c.rgb()); g = options()->palette(KDecoration::ColorButtonBg, false); - g.setCurrentColorGroup( QPalette::Active ); - c = g.background(); + c = g.button().color(); iBtnPix1->fill(c.rgb()); iBtnDownPix1->fill(c.rgb()); iMiniBtnPix1->fill(c.rgb()); @@ -215,14 +213,12 @@ static void create_pixmaps () } g = options()->palette(KDecoration::ColorButtonBg, true); - g.setCurrentColorGroup( QPalette::Active ); drawButtonFrame(btnPix1, g, false); drawButtonFrame(btnDownPix1, g, true); drawButtonFrame(miniBtnPix1, g, false); drawButtonFrame(miniBtnDownPix1, g, true); g = options()->palette(KDecoration::ColorButtonBg, false); - g.setCurrentColorGroup( QPalette::Active ); drawButtonFrame(iBtnPix1, g, false); drawButtonFrame(iBtnDownPix1, g, true); drawButtonFrame(iMiniBtnPix1, g, false); @@ -277,7 +273,7 @@ void RedmondButton::reset(unsigned long changed) break; case MenuButton: { - QPixmap miniIcon = decoration()->icon().pixmap(QIcon::Small, QIcon::Normal); + QPixmap miniIcon = decoration()->icon().pixmap(QSize(16, 16), QIcon::Normal, QIcon::On); if (!miniIcon.isNull()) { setPixmap(miniIcon); } else { @@ -507,7 +503,7 @@ void RedmondDeco::paintEvent( QPaintEvent* ) int x2 = r.width()-1; int y2 = r.height()-1; int w = r.width(); - int h = r.height(); + //int h = r.height(); // Draw part of the frame that is the frame color // ============================================== diff --git a/desktopchangeosd.h b/desktopchangeosd.h index a13fd02bd9..db6dee2c61 100644 --- a/desktopchangeosd.h +++ b/desktopchangeosd.h @@ -86,6 +86,7 @@ class DesktopChangeOSD : public QGraphicsView class DesktopChangeItem : public QObject, public QGraphicsItem { Q_OBJECT + Q_INTERFACES(QGraphicsItem) public: DesktopChangeItem( Workspace* ws, DesktopChangeOSD* parent, int desktop ); ~DesktopChangeItem(); diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 1fe81c629a..f8b4147771 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -75,7 +75,8 @@ K_EXPORT_PLUGIN(KWinDecoFactory("kcmkwindecoration")) KWinDecorationModule::KWinDecorationModule(QWidget* parent, const QVariantList &) : KCModule(KWinDecoFactory::componentData(), parent), kwinConfig(KSharedConfig::openConfig("kwinrc")), - pluginObject(0) + pluginObject(0), + library(NULL) { KConfigGroup style( kwinConfig, "Style"); plugins = new KDecorationPreviewPlugins(kwinConfig); @@ -397,14 +398,11 @@ void KWinDecorationModule::resetPlugin( KConfigGroup& conf, const QString& curre delete pluginObject; pluginObject = 0; - // Use klibloader for library manipulation - KLibLoader* loader = KLibLoader::self(); - // Free the old library if possible - if (!oldLibraryName.isNull()) - loader->unloadLibrary( oldName ); + if (library != NULL) + library->unload(); - KLibrary* library = loader->library( currentName ); + library = new KLibrary( currentName ); if (library != NULL) { KLibrary::void_function_ptr alloc_ptr = library->resolveFunction("allocate_config"); diff --git a/kcmkwin/kwindecoration/kwindecoration.h b/kcmkwin/kwindecoration/kwindecoration.h index dae72fc08c..2a22c83228 100644 --- a/kcmkwin/kwindecoration/kwindecoration.h +++ b/kcmkwin/kwindecoration/kwindecoration.h @@ -33,7 +33,7 @@ #include #include "buttons.h" #include -#include +#include #include @@ -119,6 +119,7 @@ class KWinDecorationModule : public KCModule, public KDecorationDefines QWidget* pluginConfigWidget; QString currentLibraryName; QString oldLibraryName; + KLibrary* library; QObject* (*allocatePlugin)( KConfigGroup& conf, QWidget* parent ); // Page 2 diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp index b08b2bbfc7..8acef9f87b 100644 --- a/kcmkwin/kwindecoration/preview.cpp +++ b/kcmkwin/kwindecoration/preview.cpp @@ -109,6 +109,7 @@ void KDecorationPreview::disablePreview() void KDecorationPreview::paintEvent( QPaintEvent* e ) { + Q_UNUSED( e ); QPainter painter( this ); QPoint delta = mapTo( window(), QPoint(0, 0) ); diff --git a/lib/kdecoration_plugins_p.cpp b/lib/kdecoration_plugins_p.cpp index 8c1333bc34..bd4a9db0de 100644 --- a/lib/kdecoration_plugins_p.cpp +++ b/lib/kdecoration_plugins_p.cpp @@ -134,7 +134,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) return true; // Try loading the requested plugin - library = KLibLoader::self()->library(path); + library = new KLibrary(path); // If that fails, fall back to the default plugin if (!library) @@ -145,7 +145,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) return true; path = KLibLoader::findLibrary(nameStr); if (!path.isEmpty()) - library = KLibLoader::self()->library(path); + library = new KLibrary(path); } if (!library) diff --git a/lib/kwineffects.cpp b/lib/kwineffects.cpp index 33fdf34bfa..1b4ce750d0 100644 --- a/lib/kwineffects.cpp +++ b/lib/kwineffects.cpp @@ -1312,6 +1312,7 @@ QRectF WindowMotionManager::targetGeometry( EffectWindow *w ) const EffectWindow* WindowMotionManager::windowAtPoint( QPoint point, bool useStackingOrder ) const { + Q_UNUSED( useStackingOrder ); // TODO: Stacking order uses EffectsHandler::stackingOrder() then filters by m_managedWindows EffectWindowList windows = m_managedWindows.keys(); diff --git a/lib/kwinshadereffect.cpp b/lib/kwinshadereffect.cpp index 6d44357342..a36ae9e053 100644 --- a/lib/kwinshadereffect.cpp +++ b/lib/kwinshadereffect.cpp @@ -153,6 +153,7 @@ void ShaderEffect::postPaintScreen() // Disable render texture GLRenderTarget* target = effects->popRenderTarget(); assert( target == mRenderTarget ); + Q_UNUSED( target ); mTexture->bind(); // Use the shader diff --git a/tabbox/desktopmodel.cpp b/tabbox/desktopmodel.cpp index 3ab58031d1..07388c33a4 100644 --- a/tabbox/desktopmodel.cpp +++ b/tabbox/desktopmodel.cpp @@ -65,7 +65,7 @@ QVariant DesktopModel::data( const QModelIndex& index, int role ) const int DesktopModel::columnCount( const QModelIndex& parent ) const { Q_UNUSED( parent ) - int count; + int count = 1; switch( tabBox->config().layout() ) { case TabBoxConfig::HorizontalLayout: @@ -87,7 +87,7 @@ int DesktopModel::columnCount( const QModelIndex& parent ) const int DesktopModel::rowCount( const QModelIndex& parent ) const { Q_UNUSED( parent ) - int count; + int count = 1; switch( tabBox->config().layout() ) { case TabBoxConfig::HorizontalLayout: