Bug 35877

Summary: [Qt] [ rubberstamp!] Fix if statement in Qt Launcher
Product: WebKit Reporter: Robert Hogan <robert>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: kenneth
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Updated Patch abarth: review+, abarth: commit-queue+

Description Robert Hogan 2010-03-08 14:02:40 PST
Whew, had no luck in getting this rubberstamped, people are busy!

From fbee4aa7f643ba7ddb9729b82ea33ba1c47f1195 Mon Sep 17 00:00:00 2001                       
From: Robert Hogan <robert@webkit.org>                                                       
Date: Sun, 7 Mar 2010 12:44:44 +0000                                                         
Subject: [PATCH] 2010-03-07  Robert Hogan  <robert@webkit.org>                               

        Reviewed by NOBODY (OOPS!).

        QtLauncher: Fix typo in conditional statement in
                    WebViewGraphicsBased::setFrameRateMeasurementEnabled.

        Reviewed by:

        '=' should be '=='!

        * QtLauncher/webview.cpp:
        (WebViewGraphicsBased::setFrameRateMeasurementEnabled):
---
 WebKitTools/ChangeLog              |   14 ++++++++++++++
 WebKitTools/QtLauncher/webview.cpp |    2 +-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 6efbd72..befeab7 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-07  Robert Hogan  <robert@webkit.org>
+
+        Reviewed by NOBODY (OOPS!).
+
+        QtLauncher: Fix typo in conditional statement in
+                    WebViewGraphicsBased::setFrameRateMeasurementEnabled.
+
+        Reviewed by:
+
+        '=' should be '=='!
+
+        * QtLauncher/webview.cpp:
+        (WebViewGraphicsBased::setFrameRateMeasurementEnabled):
+
 2010-03-08  Brady Eidson  <beidson@apple.com>

         Reviewed by NOBODY (but suggested by Steve Falkenburg and fixing a boneheaded mistake on my part last week)
diff --git a/WebKitTools/QtLauncher/webview.cpp b/WebKitTools/QtLauncher/webview.cpp
index 9252c89..ba1c9b8 100644
--- a/WebKitTools/QtLauncher/webview.cpp
+++ b/WebKitTools/QtLauncher/webview.cpp
@@ -87,7 +87,7 @@ void WebViewGraphicsBased::resizeEvent(QResizeEvent* event)

 void WebViewGraphicsBased::setFrameRateMeasurementEnabled(bool enabled)
 {
-    if (m_measureFps = enabled) {
+    if (m_measureFps == enabled) {
         m_lastConsultTime = m_startTime = QTime::currentTime();
         m_updateTimer->start();
     } else
--
1.6.3.3
Comment 1 Robert Hogan 2010-03-08 14:04:36 PST
Created attachment 50245 [details]
Patch
Comment 2 Tor Arne Vestbø 2010-03-10 06:33:46 PST
Please follow the QtWebKit bug reporting guidelines when reporting bugs.

See http://trac.webkit.org/wiki/QtWebKitBugs

Specifically:

  - The 'QtWebKit' component should only be used for bugs/features in the
    public QtWebKit API layer, not to signify that the bug is specific to
    the Qt port of WebKit

      http://trac.webkit.org/wiki/QtWebKitBugs#Component

  - Add the keyword 'Qt' to signal that it's a Qt-related bug

      http://trac.webkit.org/wiki/QtWebKitBugs#Keywords
Comment 3 Robert Hogan 2010-03-10 11:29:31 PST
Landed as http://trac.webkit.org/changeset/55791.
Comment 4 Kenneth Rohde Christiansen 2010-03-12 10:28:23 PST
 void WebViewGraphicsBased::setFrameRateMeasurementEnabled(bool enabled)
 {
-    if (m_measureFps = enabled) {
+    if (m_measureFps == enabled) {
         m_lastConsultTime = m_startTime = QTime::currentTime();
         m_updateTimer->start();
     } else

This patch is wrong and broke the feature of the launcher.

It attributes enabled to m_messureFpt and then does the if check.

This is the same as 

m_measureFps = enabled;

if (m_measureFps)...

Please revert this patch.
Comment 5 Robert Hogan 2010-03-12 13:03:16 PST
Created attachment 50624 [details]
Updated Patch

Patch was incorrect as Kenneth pointed out. Make it more obvious that it's already right!
Comment 6 Adam Barth 2010-03-13 01:49:14 PST
Comment on attachment 50245 [details]
Patch

Looks like this patch is obsolete.
Comment 7 Robert Hogan 2010-03-13 03:00:29 PST
Manually committed as: http://trac.webkit.org/changeset/55961