Less warnings please.

svn path=/trunk/KDE/kdebase/workspace/; revision=1031445
This commit is contained in:
Lucas Murray 2009-10-05 07:58:12 +00:00
parent 8cbce93613
commit 3fd898cbf7
11 changed files with 23 additions and 22 deletions

View file

@ -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);

View file

@ -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");

View file

@ -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
// ==============================================

View file

@ -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();

View file

@ -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");

View file

@ -33,7 +33,7 @@
#include <kcmodule.h>
#include "buttons.h"
#include <kconfig.h>
#include <klibloader.h>
#include <klibrary.h>
#include <kdecoration.h>
@ -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

View file

@ -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) );

View file

@ -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)

View file

@ -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();

View file

@ -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

View file

@ -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: