diff options
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 6 | ||||
-rw-r--r-- | src/widgets/styles/qgtk2painter.cpp | 4 | ||||
-rw-r--r-- | src/widgets/styles/qgtkstyle.cpp | 4 | ||||
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 1 | ||||
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 4 |
5 files changed, 10 insertions, 9 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 8589b6b544..1f7a87e23d 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -3707,12 +3707,12 @@ QPixmap QFusionStyle::standardPixmap(StandardPixmap standardPixmap, const QStyle #ifndef QT_NO_IMAGEFORMAT_XPM switch (standardPixmap) { case SP_TitleBarNormalButton: - return QPixmap((const char **)dock_widget_restore_xpm); + return QPixmap(dock_widget_restore_xpm); case SP_TitleBarMinButton: - return QPixmap((const char **)workspace_minimize); + return QPixmap(workspace_minimize); case SP_TitleBarCloseButton: case SP_DockWidgetCloseButton: - return QPixmap((const char **)dock_widget_close_xpm); + return QPixmap(dock_widget_close_xpm); default: break; diff --git a/src/widgets/styles/qgtk2painter.cpp b/src/widgets/styles/qgtk2painter.cpp index 45528cd52c..489d456617 100644 --- a/src/widgets/styles/qgtk2painter.cpp +++ b/src/widgets/styles/qgtk2painter.cpp @@ -234,7 +234,7 @@ void QGtk2Painter::paintBoxGap(GtkWidget *gtkWidget, const gchar* part, shadow, NULL, gtkWidget, - (gchar*)part, + (const gchar*)part, 0, 0, rect.width(), rect.height(), @@ -618,7 +618,7 @@ void QGtk2Painter::paintExtention(GtkWidget *gtkWidget, if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_extension (style, pixmap, state, shadow, NULL, gtkWidget, - (gchar*)part, 0, 0, + (const gchar*)part, 0, 0, rect.width(), rect.height(), gap_pos)); diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp index a585755ddd..348727b328 100644 --- a/src/widgets/styles/qgtkstyle.cpp +++ b/src/widgets/styles/qgtkstyle.cpp @@ -4056,7 +4056,7 @@ QPixmap QGtkStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option, switch (sp) { case SP_TitleBarNormalButton: { - QImage restoreButton((const char **)dock_widget_restore_xpm); + QImage restoreButton(dock_widget_restore_xpm); QColor alphaCorner = restoreButton.color(2); alphaCorner.setAlpha(80); restoreButton.setColor(2, alphaCorner.rgba()); @@ -4069,7 +4069,7 @@ QPixmap QGtkStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option, case SP_TitleBarCloseButton: // Fall through case SP_DockWidgetCloseButton: { - QImage closeButton((const char **)dock_widget_close_xpm); + QImage closeButton(dock_widget_close_xpm); QColor alphaCorner = closeButton.color(2); alphaCorner.setAlpha(80); closeButton.setColor(2, alphaCorner.rgba()); diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 4f9ed2c325..67970ba33d 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -1753,6 +1753,7 @@ QMacStylePrivate::QMacStylePrivate() QMacStylePrivate::~QMacStylePrivate() { + AutoReleasePool pool; Q_FOREACH (NSView *b, cocoaControls) [b release]; } diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 014333700a..4993457b32 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -1478,7 +1478,7 @@ public: do { const ushort *uc = (const ushort *)nodeName.constData(); const ushort *e = uc + nodeName.length(); - const uchar *c = (uchar *)metaObject->className(); + const uchar *c = (const uchar *)metaObject->className(); while (*c && uc != e && (*uc == *c || (*c == ':' && *uc == '-'))) { ++uc; ++c; @@ -1579,7 +1579,7 @@ QVector<QCss::StyleRule> QStyleSheetStyle::styleRules(const QObject *obj) const styleSelector.styleSheets += objectSs; StyleSelector::NodePtr n; - n.ptr = (void *)obj; + n.ptr = const_cast<QObject *>(obj); QVector<QCss::StyleRule> rules = styleSelector.styleRulesForNode(n); styleSheetCaches->styleRulesCache.insert(obj, rules); return rules; |