Bug 801428 - MozQWidget does not build due to wrong return value type. r=romaxa. DONTBUILD because NPOTB
authorOleg Romashin <romaxa@gmail.com>
Sun, 14 Oct 2012 10:28:26 -0700
changeset 110363 d3204a38a712ee30bf5cd0766b4e850df50ff74f
parent 110362 baaff43d6a16184ff1a2183bbc6248133b2cf20e
child 110364 45cf07ab3a5ef5d6142c6e44f39a30e9cd3f0487
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersromaxa
bugs801428
milestone19.0a1
Bug 801428 - MozQWidget does not build due to wrong return value type. r=romaxa. DONTBUILD because NPOTB
widget/qt/mozqwidget.cpp
widget/qt/mozqwidget.h
--- a/widget/qt/mozqwidget.cpp
+++ b/widget/qt/mozqwidget.cpp
@@ -410,17 +410,17 @@ void MozQWidget::hideEvent(QHideEvent* a
 }
 
 void MozQWidget::showEvent(QShowEvent* aEvent)
 {
     mReceiver->showEvent(aEvent);
     QGraphicsWidget::showEvent(aEvent);
 }
 
-bool MozQWidget::SetCursor(nsCursor aCursor)
+void MozQWidget::SetCursor(nsCursor aCursor)
 {
     Qt::CursorShape cursor = Qt::ArrowCursor;
     switch(aCursor) {
     case eCursor_standard:
         cursor = Qt::ArrowCursor;
         break;
     case eCursor_wait:
         cursor = Qt::WaitCursor;
@@ -463,26 +463,22 @@ bool MozQWidget::SetCursor(nsCursor aCur
     case eCursor_zoom_in:
     case eCursor_zoom_out:
 
     default:
         break;
     }
 
     setCursor(cursor);
-
-    return NS_OK;
 }
 
-bool MozQWidget::SetCursor(const QPixmap& aCursor, int aHotX, int aHotY)
+void MozQWidget::SetCursor(const QPixmap& aCursor, int aHotX, int aHotY)
 {
     QCursor bitmapCursor(aCursor, aHotX, aHotY);
     setCursor(bitmapCursor);
-
-    return NS_OK;
 }
 
 void MozQWidget::setModal(bool modal)
 {
 #if QT_VERSION >= 0x040600
     setPanelModality(modal ? QGraphicsItem::SceneModal : QGraphicsItem::NonModal);
 #else
     LOG(("Modal QGraphicsWidgets not supported in Qt < 4.6\n"));
--- a/widget/qt/mozqwidget.h
+++ b/widget/qt/mozqwidget.h
@@ -17,17 +17,17 @@ public:
     MozQWidget(nsWindow* aReceiver, QGraphicsItem *aParent);
 
     ~MozQWidget();
 
     /**
      * Mozilla helper.
      */
     virtual void setModal(bool);
-    virtual bool SetCursor(nsCursor aCursor);
+    virtual void SetCursor(nsCursor aCursor);
     virtual void dropReceiver() { mReceiver = 0x0; };
     virtual nsWindow* getReceiver() { return mReceiver; };
 
     virtual void activate();
     virtual void deactivate();
 
     /**
      * VirtualKeyboardIntegration
@@ -70,16 +70,16 @@ protected:
     virtual void paint(QPainter* aPainter, const QStyleOptionGraphicsItem* aOption, QWidget* aWidget = 0);
     virtual void resizeEvent(QGraphicsSceneResizeEvent* aEvent);
     virtual void closeEvent(QCloseEvent* aEvent);
     virtual void hideEvent(QHideEvent* aEvent);
     virtual void showEvent(QShowEvent* aEvent);
     virtual bool event(QEvent* aEvent);
     virtual QVariant inputMethodQuery(Qt::InputMethodQuery aQuery) const;
 
-    bool SetCursor(const QPixmap& aPixmap, int, int);
+    void SetCursor(const QPixmap& aPixmap, int, int);
 
 private:
     void sendPressReleaseKeyEvent(int key, const QChar* letter = 0, bool autorep = false, ushort count = 1);
     nsWindow *mReceiver;
 };
 
 #endif