Diffstat (limited to 'noncore/decorations/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/decorations/liquid/liquid.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/decorations/liquid/liquid.cpp b/noncore/decorations/liquid/liquid.cpp index 75b1fc9..ef2ac3c 100644 --- a/noncore/decorations/liquid/liquid.cpp +++ b/noncore/decorations/liquid/liquid.cpp @@ -1,33 +1,33 @@ #include "liquid.h" #include <qapplication.h> #include <qpainter.h> #include <qpalette.h> #include <qdrawutil.h> -LiquidDecoInterface::LiquidDecoInterface ( ) : ref ( 0 ) +LiquidDecoInterface::LiquidDecoInterface ( ) { } LiquidDecoInterface::~LiquidDecoInterface ( ) { } QString LiquidDecoInterface::name ( ) const { return qApp-> translate ( "Decoration", "Liquid" ); } QPixmap LiquidDecoInterface::icon ( ) const { return QPixmap ( ); } void LiquidDecoInterface::drawArea( Area a, QPainter *p, const WindowData *wd ) const { QRect r = wd-> rect; int th = metric ( TitleHeight, wd ); @@ -101,36 +101,38 @@ void LiquidDecoInterface::drawArea( Area a, QPainter *p, const WindowData *wd ) p-> fillRect ( br.left() - 1, tr. top ( ), br. width ( ) + 2, tr. height ( ), fillcol); p-> setPen ( shadecol ); p-> drawText ( br, align, wd-> caption ); p-> setPen ( textcol ); br. moveBy ( -1, -1 ); p-> drawText ( br, align, wd-> caption ); break; } default: { WindowDecorationInterface::drawArea ( a, p, wd ); break; } } } QRESULT LiquidDecoInterface::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( LiquidDecoInterface ) } |