[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/unity/WebKit/WebCore/platform/qt
From:       Nikolas Zimmermann <wildfox () kde ! org>
Date:       2006-08-04 15:45:31
Message-ID: 1154706331.359785.11878.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 569716 by wildfox:

* Remove the setFrameGeometry() hacks - all of a sudden I don't get
  0x0 sized geometries anymore. No idea why - so removing the hack now.

* Implement Widget::setFocusPolicy() and let all call that...


 M  +1 -14     ComboBoxQt.cpp  
 M  +2 -16     LineEditQt.cpp  
 M  +1 -14     ListBoxQt.cpp  
 M  +20 -15    WidgetQt.cpp  


--- branches/work/unity/WebKit/WebCore/platform/qt/ComboBoxQt.cpp #569715:569716
@@ -110,20 +110,7 @@
 
 Widget::FocusPolicy PlatformComboBox::focusPolicy() const
 {
-    switch(m_comboBox->focusPolicy())
-    {
-        case Qt::TabFocus:
-            return TabFocus;
-        case Qt::ClickFocus:
-            return ClickFocus;
-        case Qt::StrongFocus:
-            return StrongFocus;
-        case Qt::WheelFocus:
-            return WheelFocus;
-        case Qt::NoFocus:
-        default:
-            return NoFocus;
-    }
+	return Widget::focusPolicy();
 }
 
 void PlatformComboBox::itemSelected()
--- branches/work/unity/WebKit/WebCore/platform/qt/LineEditQt.cpp #569715:569716
@@ -193,26 +193,12 @@
 
 Widget::FocusPolicy PlatformLineEdit::focusPolicy() const
 {
-    switch(m_lineEdit->focusPolicy())
-    {
-        case Qt::TabFocus:
-            return TabFocus;
-        case Qt::ClickFocus:
-            return ClickFocus;
-        case Qt::StrongFocus:
-            return StrongFocus;
-        case Qt::WheelFocus:
-            return WheelFocus;
-        case Qt::NoFocus:
-        default:
-            return NoFocus;    
-    }
+	return Widget::focusPolicy();
 }
 
 bool PlatformLineEdit::checksDescendantsForFocus() const
 {
-    notImplemented();
-    return false;
+    return true;
 }
 
 void PlatformLineEdit::setLiveSearch(bool liveSearch)
--- branches/work/unity/WebKit/WebCore/platform/qt/ListBoxQt.cpp #569715:569716
@@ -145,20 +145,7 @@
 
 Widget::FocusPolicy PlatformListBox::focusPolicy() const
 {
-    switch(m_listWidget->focusPolicy())
-    {
-        case Qt::TabFocus:
-            return TabFocus;
-        case Qt::ClickFocus:
-            return ClickFocus;
-        case Qt::StrongFocus:
-            return StrongFocus;
-        case Qt::WheelFocus:
-            return WheelFocus;
-        case Qt::NoFocus:
-        default:
-            return NoFocus;    
-    }
+	return Widget::focusPolicy();
 }
 
 bool PlatformListBox::checksDescendantsForFocus() const
--- branches/work/unity/WebKit/WebCore/platform/qt/WidgetQt.cpp #569715:569716
@@ -78,7 +78,6 @@
     if (!data->m_widget)
         return IntRect();
 
-    qDebug() << "Widget::frameGeometry(), this=" << this << " returning: " << \
data->m_widget->geometry();  return data->m_widget->geometry();
 }
 
@@ -109,7 +108,8 @@
 
 void Widget::setFont(const Font& font)
 {
-    notImplemented();
+    if (data->m_widget)
+        data->m_widget->setFont(toQFont(font));
 }
 
 void Widget::setCursor(const Cursor& cursor)
@@ -156,17 +156,7 @@
     if (!data->m_widget)
         return;
 
-    IntRect hack = r;
-    IntRect current = data->m_widget->frameGeometry();
- 
-    // TODO: Find out why there is 0x0 given as w/h.
-    if(hack.width() == 0)
-        hack.setWidth(current.width()); 
-    if(hack.height() == 0)
-        hack.setHeight(current.height());
-  
-     qDebug() << "Widget::setFrameGeometry(), this=" << this << " r=" << r << " \
                was=" << current << " CORRECTED TO: " << hack;
-     data->m_widget->setGeometry(hack);
+    data->m_widget->setGeometry(r);
 }
 
 IntPoint Widget::mapFromGlobal(const IntPoint& p) const
@@ -229,8 +219,23 @@
 
 Widget::FocusPolicy Widget::focusPolicy() const
 {
-    notImplemented();
-    return NoFocus;
+    if (!data->m_widget)
+        return NoFocus;
+
+    switch (data->m_widget->focusPolicy())
+    {
+        case Qt::TabFocus:
+            return TabFocus;
+        case Qt::ClickFocus:
+            return ClickFocus;
+        case Qt::StrongFocus:
+            return StrongFocus;
+        case Qt::WheelFocus:
+            return WheelFocus;
+        case Qt::NoFocus:
+        default:
+            return NoFocus;    
+    }
 }
 
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic