summaryrefslogtreecommitdiff
path: root/noncore/decorations/polished/polished.cpp
Side-by-side diff
Diffstat (limited to 'noncore/decorations/polished/polished.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/decorations/polished/polished.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/decorations/polished/polished.cpp b/noncore/decorations/polished/polished.cpp
index 30f1a84..43179be 100644
--- a/noncore/decorations/polished/polished.cpp
+++ b/noncore/decorations/polished/polished.cpp
@@ -13,25 +13,25 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "polished.h"
#include <qpainter.h>
#include <qapplication.h>
-PolishedDecoration::PolishedDecoration() : ref(0)
+PolishedDecoration::PolishedDecoration()
{
}
PolishedDecoration::~PolishedDecoration()
{
}
int PolishedDecoration::metric( Metric m, const WindowData *wd ) const
{
switch ( m ) {
case TopBorder:
return 1;
@@ -149,23 +149,25 @@ void PolishedDecoration::drawBlend( QPainter *p, const QRect &r, const QColor &c
v1 + ((v2-v1)*j)/(r.height()-split-1), QColor::Hsv ) );
p->drawLine( r.x(), r.bottom()-j, r.right(), r.bottom()-j );
}
}
QRESULT PolishedDecoration::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
{
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_WindowDecoration )
*iface = this;
+ else
+ return QS_FALSE;
if ( *iface )
(*iface)->addRef();
return QS_OK;
}
Q_EXPORT_INTERFACE()
{
Q_CREATE_INSTANCE( PolishedDecoration )
}