OSDN Git Service

generic: misc cleanups
authorIvailo Monev <xakepa10@gmail.com>
Thu, 14 Jan 2016 03:21:48 +0000 (05:21 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 14 Jan 2016 03:21:53 +0000 (05:21 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
ksplash/ksplashx/qcolor_x11.cpp
plasma/applets/pager/pager.cpp
plasma/scriptengines/javascript/simplebindings/graphicsitem.cpp
plasma/toolboxes/desktoptoolbox.cpp
plasma/toolboxes/internaltoolbox.cpp

index b743bde..d2505a0 100644 (file)
@@ -267,9 +267,7 @@ void QColor::initialize()
            }
        }
 
-       int dictsize;
        if ( screendata[scr]->g_truecolor ) {                   // truecolor
-           dictsize    = 1;                    // will not need color dict
            screendata[scr]->red_mask    = (uint)screendata[scr]->g_vis->red_mask;
            screendata[scr]->green_mask  = (uint)screendata[scr]->g_vis->green_mask;
            screendata[scr]->blue_mask   = (uint)screendata[scr]->g_vis->blue_mask;
@@ -279,13 +277,7 @@ void QColor::initialize()
                highest_bit( screendata[scr]->green_mask ) - 7;
            screendata[scr]->blue_shift =
                highest_bit( screendata[scr]->blue_mask ) - 7;
-       } else {
-           dictsize = col_std_dict;
        }
-#if 0
-       screendata[scr]->colorDict = new QColorDict(dictsize);  // create dictionary
-       Q_CHECK_PTR( screendata[scr]->colorDict );
-#endif
 
        if ( spec == (int)QApplication::ManyColor ) {
            screendata[scr]->color_reduce = true;
index f1e896a..00ce41d 100644 (file)
@@ -74,7 +74,7 @@ Pager::Pager(QObject *parent, const QVariantList &args)
       m_configureDesktopsWidget(0),
       m_desktopWidget(qApp->desktop())
 {
-    setAcceptsHoverEvents(true);
+    setAcceptHoverEvents(true);
     setAcceptDrops(true);
     setHasConfigurationInterface(true);
     setAspectRatioMode(Plasma::IgnoreAspectRatio);
index 3f17b63..9c4bb80 100644 (file)
@@ -44,9 +44,9 @@ Q_DECLARE_METATYPE(QGraphicsTextItem*)
 Q_DECLARE_METATYPE(QGraphicsSimpleTextItem*)
 
 DECLARE_BOOLEAN_GET_SET_METHODS(QGraphicsItem, acceptDrops, setAcceptDrops)
-DECLARE_BOOLEAN_GET_SET_METHODS(QGraphicsItem, acceptsHoverEvents, setAcceptsHoverEvents)
+DECLARE_BOOLEAN_GET_SET_METHODS(QGraphicsItem, acceptHoverEvents, setAcceptHoverEvents)
 DECLARE_GET_METHOD(QGraphicsItem, boundingRect)
-DECLARE_GET_METHOD(QGraphicsItem, children)
+DECLARE_GET_METHOD(QGraphicsItem, childItems)
 DECLARE_GET_METHOD(QGraphicsItem, childrenBoundingRect)
 #ifndef QT_NO_CURSOR
 DECLARE_GET_SET_METHODS(QGraphicsItem, QCursor, cursor, setCursor)
@@ -323,9 +323,9 @@ QScriptValue constructGraphicsItemClass(QScriptEngine *eng)
 {
     QScriptValue proto = QScript::wrapGVPointer<QGraphicsItem>(eng, new PrototypeGraphicsItem());
     ADD_GET_SET_METHODS(proto, acceptDrops, setAcceptDrops);
-    ADD_GET_SET_METHODS(proto, acceptsHoverEvents, setAcceptsHoverEvents);
+    ADD_GET_SET_METHODS(proto, acceptHoverEvents, setAcceptHoverEvents);
     ADD_GET_METHOD(proto, boundingRect);
-    ADD_GET_METHOD(proto, children);
+    ADD_GET_METHOD(proto, childItems);
     ADD_GET_METHOD(proto, childrenBoundingRect);
 #ifndef QT_NO_CURSOR
     ADD_GET_SET_METHODS(proto, cursor, setCursor);
index 98fc62b..08e47a4 100644 (file)
@@ -53,7 +53,7 @@ class EmptyGraphicsItem : public QGraphicsWidget
         EmptyGraphicsItem(QGraphicsItem *parent)
             : QGraphicsWidget(parent)
         {
-            setAcceptsHoverEvents(true);
+            setAcceptHoverEvents(true);
             m_layout = new QGraphicsLinearLayout(this);
             m_layout->setContentsMargins(0, 0, 0, 0);
             m_layout->setSpacing(0);
index a60e96b..5131eba 100644 (file)
@@ -80,7 +80,7 @@ void InternalToolBox::init()
                 this, SLOT(immutabilityChanged(Plasma::ImmutabilityType)));
     }
 
-    setAcceptsHoverEvents(true);
+    setAcceptHoverEvents(true);
 }
 
 Plasma::Containment *InternalToolBox::containment()