summaryrefslogtreecommitdiff
path: root/noncore/styles/fresh
Side-by-side diff
Diffstat (limited to 'noncore/styles/fresh') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/fresh/fresh.cpp4
-rw-r--r--noncore/styles/fresh/fresh.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/noncore/styles/fresh/fresh.cpp b/noncore/styles/fresh/fresh.cpp
index 0730329..831b620 100644
--- a/noncore/styles/fresh/fresh.cpp
+++ b/noncore/styles/fresh/fresh.cpp
@@ -783,64 +783,66 @@ void FreshStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
int dim = (h-2*motifItemFrame) / 2;
if ( act ) {
if ( !dis )
discol = white;
QColorGroup g2( discol, g.highlight(),
white, white,
dis ? discol : white,
discol, white );
drawArrow( p, RightArrow, FALSE,
x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
dim, dim, g2, TRUE );
} else {
drawArrow( p, RightArrow,
FALSE,
x+w - motifArrowHMargin - motifItemFrame - dim, y+h/2-dim/2,
dim, dim, g, mi->isEnabled() );
}
}
#endif
}
//===========================================================================
FreshStyleImpl::FreshStyleImpl()
- : fresh(0), ref(0)
+ : fresh(0)
{
}
FreshStyleImpl::~FreshStyleImpl()
{
// We do not delete the style because Qt does that when a new style
// is set.
}
QStyle *FreshStyleImpl::style()
{
if ( !fresh )
fresh = new FreshStyle();
return fresh;
}
QString FreshStyleImpl::name() const
{
return QString("Fresh");
}
QRESULT FreshStyleImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
{
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_Style )
*iface = this;
+ else
+ return QS_FALSE;
if ( *iface )
(*iface)->addRef();
return QS_OK;
}
Q_EXPORT_INTERFACE()
{
Q_CREATE_INSTANCE( FreshStyleImpl )
}
diff --git a/noncore/styles/fresh/fresh.h b/noncore/styles/fresh/fresh.h
index b4be7f3..a72a83f 100644
--- a/noncore/styles/fresh/fresh.h
+++ b/noncore/styles/fresh/fresh.h
@@ -73,28 +73,27 @@ public:
QSize scrollBarExtent() const;
private: // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
FreshStyle( const FreshStyle & );
FreshStyle& operator=( const FreshStyle & );
#endif
};
class FreshStyleImpl : public StyleInterface
{
public:
FreshStyleImpl();
virtual ~FreshStyleImpl();
QRESULT queryInterface( const QUuid&, QUnknownInterface** );
Q_REFCOUNT
virtual QStyle *style();
virtual QString name() const;
private:
FreshStyle *fresh;
- ulong ref;
};
#endif // FRESHSTYLE_H