kde-workspace git broken ?
Hugo Pereira Da Costa
hugo.pereira at free.fr
Mon Nov 11 12:29:32 GMT 2013
Hello,
I think commits
9f70241d57f3ba1013b9f28650478c8bbb1233e0
137dd285bdf821fd2c8a5c17e30dc9c1a6eca87b
09ea308ab55505efe7aeaebcd4aef6292cd884e6
seriously broke kde-workspace
At least several changes in oxygen where reverted in the process.
(below is a diff of oxygenstyle.h between
008ac5efabfb99f04813e5dad29c2d0a92d13fc5 and current master), which
should definitly not be there ...
can someone more git-knowledgable check/confirm/fix ?
Hugo
diff --git a/kstyles/oxygen/oxygenstyle.h b/kstyles/oxygen/oxygenstyle.h
index afe632b..59f2ae4 100644
--- a/kstyles/oxygen/oxygenstyle.h
+++ b/kstyles/oxygen/oxygenstyle.h
@@ -24,7 +24,7 @@
// (c) 2002,2003 Maksim Orlovich <mo002j at mail.rochester.edu>
// based on the KDE3 HighColor Style
// Copyright (C) 2001-2002 Karol Szwed <gallium at kde.org>
-// (C) 2001-2002 Fredrik Höglund <fredrik at kde.org>
+// (C) 2001-2002 Fredrik Höglund <fredrik at kde.org>
// Drawing routines adapted from the KDE2 HCStyle,
// Copyright (C) 2000 Daniel M. Duley <mosfet at kde.org>
// (C) 2000 Dirk Mueller <mueller at kde.org>
@@ -51,24 +51,18 @@
#include "oxygenmetrics.h"
#include "oxygentileset.h"
-#include <QMap>
-#include <QAbstractScrollArea>
-#include <QCommonStyle>
-#include <QDockWidget>
-#include <QMdiSubWindow>
-#include <QStyleOption>
-#include <QStyleOptionSlider>
-#include <QStylePlugin>
-#include <QToolBar>
-#include <QToolBox>
-#include <QWidget>
-
-#include <QIcon>
-
-namespace OxygenPrivate
-{
- class TabBarData;
-}
+#include <QtCore/QMap>
+#include <QtGui/QAbstractScrollArea>
+#include <QtGui/QCommonStyle>
+#include <QtGui/QDockWidget>
+#include <QtGui/QMdiSubWindow>
+#include <QtGui/QStyleOption>
+#include <QtGui/QStyleOptionSlider>
+#include <QtGui/QToolBar>
+#include <QtGui/QToolBox>
+#include <QtGui/QWidget>
+
+#include <KIcon>
namespace Oxygen
{
@@ -85,23 +79,6 @@ namespace Oxygen
class WidgetExplorer;
class BlurHelper;
- class StylePlugin : public QStylePlugin
- {
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE
"oxygen.json" )
-
- public:
-
- //! constructor
- StylePlugin(QObject *parent = 0):
- QStylePlugin(parent)
- {}
-
- //! create style
- QStyle* create( const QString& );
-
- };
-
//! toplevel manager
class TopLevelManager: public QObject
{
@@ -197,6 +174,7 @@ namespace Oxygen
bool eventFilterComboBoxContainer( QWidget*, QEvent* );
bool eventFilterDockWidget( QDockWidget*, QEvent* );
bool eventFilterMdiSubWindow( QMdiSubWindow*, QEvent* );
+ bool eventFilterQ3ListView( QWidget*, QEvent* );
bool eventFilterScrollBar( QWidget*, QEvent* );
bool eventFilterTabBar( QWidget*, QEvent* );
bool eventFilterToolBar( QToolBar*, QEvent* );
@@ -211,7 +189,7 @@ namespace Oxygen
//@}
- protected Q_SLOTS:
+ protected slots:
//! update oxygen configuration
void oxygenConfigurationChanged( void );
@@ -226,7 +204,10 @@ namespace Oxygen
{ return pixelMetric(PM_DefaultLayoutSpacing, option, widget); }
//! standard icons
- virtual QIcon standardIcon( StandardPixmap, const QStyleOption* = 0,
const QWidget* = 0) const;
+ virtual QIcon standardIconImplementation(
+ StandardPixmap standardIcon,
+ const QStyleOption *option,
+ const QWidget *widget) const;
protected:
@@ -300,6 +281,59 @@ namespace Oxygen
//! list of slabs
typedef QList<SlabRect> SlabRectList;
+ /*!
+ tabBar data class needed for
+ the rendering of tabbars when
+ one tab is being drawn
+ */
+ class TabBarData: public QObject
+ {
+
+ public:
+
+ //! constructor
+ explicit TabBarData( Style* parent ):
+ QObject( parent ),
+ _style( parent ),
+ _dirty( false )
+ {}
+
+ //! destructor
+ virtual ~TabBarData( void )
+ {}
+
+ //! assign target tabBar
+ void lock( const QWidget* widget )
+ { _tabBar = widget; }
+
+ //! true if tabbar is locked
+ bool locks( const QWidget* widget ) const
+ { return _tabBar && _tabBar.data() == widget; }
+
+ //! set dirty
+ void setDirty( const bool& value = true )
+ { _dirty = value; }
+
+ //! release
+ void release( void )
+ { _tabBar.clear(); }
+
+ //! draw tabBarBase
+ virtual void drawTabBarBaseControl( const QStyleOptionTab*, QPainter*,
const QWidget* );
+
+ private:
+
+ //! pointer to parent style object
+ QWeakPointer<const Style> _style;
+
+ //! pointer to target tabBar
+ QWeakPointer<const QWidget> _tabBar;
+
+ //! if true, will paint on next TabBarTabShapeControlCall
+ bool _dirty;
+
+ };
+
//@}
//! animations
@@ -341,6 +375,10 @@ namespace Oxygen
SplitterFactory& splitterFactory( void ) const
{ return *_splitterFactory; }
+ //! tabBar data
+ TabBarData& tabBarData( void ) const
+ { return *_tabBarData; }
+
//!@name subelementRect specialized functions
//@{
@@ -477,6 +515,8 @@ namespace Oxygen
bool drawPanelItemViewItemPrimitive( const QStyleOption*, QPainter*,
const QWidget* ) const;
bool drawPanelLineEditPrimitive( const QStyleOption*, QPainter*, const
QWidget* ) const;
bool drawIndicatorMenuCheckMarkPrimitive( const QStyleOption*,
QPainter*, const QWidget* ) const;
+ bool drawQ3CheckListIndicatorPrimitive( const QStyleOption*,
QPainter*, const QWidget* ) const;
+ bool drawQ3CheckListExclusiveIndicatorPrimitive( const QStyleOption*,
QPainter*, const QWidget* ) const;
bool drawIndicatorBranchPrimitive( const QStyleOption*, QPainter*, const
QWidget* ) const;
bool drawIndicatorButtonDropDownPrimitive( const QStyleOption*,
QPainter*, const QWidget* ) const;
bool drawIndicatorCheckBoxPrimitive( const QStyleOption*, QPainter*,
const QWidget* ) const;
@@ -551,12 +591,17 @@ namespace Oxygen
bool drawComboBoxComplexControl( const QStyleOptionComplex*, QPainter*,
const QWidget* ) const;
bool drawDialComplexControl( const QStyleOptionComplex*, QPainter*,
const QWidget* ) const;
bool drawGroupBoxComplexControl( const QStyleOptionComplex*, QPainter*,
const QWidget* ) const;
+ bool drawQ3ListViewComplexControl( const QStyleOptionComplex*,
QPainter*, const QWidget* ) const;
bool drawSliderComplexControl( const QStyleOptionComplex*, QPainter*,
const QWidget* ) const;
bool drawSpinBoxComplexControl( const QStyleOptionComplex*, QPainter*,
const QWidget* ) const;
bool drawTitleBarComplexControl( const QStyleOptionComplex*, QPainter*,
const QWidget* ) const;
bool drawToolButtonComplexControl( const QStyleOptionComplex*,
QPainter*, const QWidget* ) const;
//@}
+ //! true if widget is child of KTextEdit
+ bool isKTextEditFrame( const QWidget* widget ) const
+ { return ( widget && widget->parentWidget() && qobject_cast<const
QFrame*>( widget ) && widget->parentWidget()->inherits(
"KTextEditor::View" ) ); }
+
//! adjust rect based on provided margins
QRect insideMargin( const QRect& r, int main, int left = 0, int top = 0,
int right = 0, int bottom = 0 ) const
{ return r.adjusted( main+left, main+top, -main-right, -main-bottom ); }
@@ -764,7 +809,7 @@ namespace Oxygen
int newStyleElement( const QString &element, const char *check, int
&counter )
{
- if( !element.contains( QLatin1String( check ) ) ) return 0;
+ if( !element.contains(check) ) return 0;
int id = _styleElements.value(element, 0);
if( !id )
{
@@ -841,7 +886,7 @@ namespace Oxygen
WidgetExplorer* _widgetExplorer;
//! tabBar data
- OxygenPrivate::TabBarData* _tabBarData;
+ TabBarData* _tabBarData;
//! splitter Factory, to extend splitters hit area
SplitterFactory* _splitterFactory;
@@ -874,9 +919,7 @@ namespace Oxygen
//@}
//! tab close button icon (cached)
- mutable QIcon _tabCloseIcon;
-
- friend class OxygenPrivate::TabBarData;
+ mutable KIcon _tabCloseIcon;
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131111/b4ac49bc/attachment.htm>
More information about the kde-core-devel
mailing list