[kstyle] Fix build on Qt 4

QMarginsF is new in Qt 5.3, let's use QMargins.
wilder-pre-rebase
Martin Gräßlin 10 years ago
parent 9caf0c8ab1
commit 3eedad8222
  1. 7
      kstyle/breezeshadowhelper.cpp
  2. 3
      kstyle/breezeshadowhelper.h

@ -27,7 +27,6 @@
#include <QDockWidget>
#include <QEvent>
#include <QApplication>
#include <QMarginsF>
#include <QMenu>
#include <QPainter>
#include <QPixmap>
@ -413,7 +412,7 @@ namespace Breeze
{ data.append( value ); }
const QMarginsF margins = shadowMargins( widget );
const QMargins margins = shadowMargins( widget );
const int topSize = margins.top();
const int bottomSize = margins.bottom();
const int leftSize( margins.left() );
@ -470,7 +469,7 @@ namespace Breeze
}
//_______________________________________________________
QMarginsF ShadowHelper::shadowMargins( QWidget* widget ) const
QMargins ShadowHelper::shadowMargins( QWidget* widget ) const
{
// get devicePixelRatio
// for testing purposes only
@ -504,7 +503,7 @@ namespace Breeze
}
return QMarginsF( leftSize, topSize, rightSize, bottomSize );
return QMargins( leftSize, topSize, rightSize, bottomSize );
}
//_______________________________________________________

@ -25,6 +25,7 @@
#include <QObject>
#include <QMap>
#include <QMargins>
#if BREEZE_HAVE_X11
#include <xcb/xcb.h>
@ -143,7 +144,7 @@ namespace Breeze
void initializeWayland();
//* gets the shadow margins for the given widget
QMarginsF shadowMargins( QWidget* ) const;
QMargins shadowMargins( QWidget* ) const;
private:

Loading…
Cancel
Save