Title: [103188] trunk
Revision
103188
Author
hausm...@webkit.org
Date
2011-12-18 13:49:45 -0800 (Sun, 18 Dec 2011)

Log Message

Rename EditCommandQt to UndoStepQt
https://bugs.webkit.org/show_bug.cgi?id=74754

Reviewed by Ryosuke Niwa.

.:

* Source/api.pri:

Source/WebKit/qt:

* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::registerUndoStep):
* WebCoreSupport/UndoStepQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/EditCommandQt.cpp.
(UndoStepQt::UndoStepQt):
(UndoStepQt::~UndoStepQt):
(UndoStepQt::redo):
(UndoStepQt::undo):
* WebCoreSupport/UndoStepQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/EditCommandQt.h.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/ChangeLog (103187 => 103188)


--- trunk/ChangeLog	2011-12-18 21:41:44 UTC (rev 103187)
+++ trunk/ChangeLog	2011-12-18 21:49:45 UTC (rev 103188)
@@ -1,3 +1,12 @@
+2011-12-18  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        Rename EditCommandQt to UndoStepQt
+        https://bugs.webkit.org/show_bug.cgi?id=74754
+
+        Reviewed by Ryosuke Niwa.
+
+        * Source/api.pri:
+
 2011-12-16  Mark Hahnenberg  <mhahnenb...@apple.com>
 
         De-virtualize destructors

Modified: trunk/Source/WebKit/qt/ChangeLog (103187 => 103188)


--- trunk/Source/WebKit/qt/ChangeLog	2011-12-18 21:41:44 UTC (rev 103187)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-12-18 21:49:45 UTC (rev 103188)
@@ -1,3 +1,19 @@
+2011-12-18  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        Rename EditCommandQt to UndoStepQt
+        https://bugs.webkit.org/show_bug.cgi?id=74754
+
+        Reviewed by Ryosuke Niwa.
+
+        * WebCoreSupport/EditorClientQt.cpp:
+        (WebCore::EditorClientQt::registerUndoStep):
+        * WebCoreSupport/UndoStepQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/EditCommandQt.cpp.
+        (UndoStepQt::UndoStepQt):
+        (UndoStepQt::~UndoStepQt):
+        (UndoStepQt::redo):
+        (UndoStepQt::undo):
+        * WebCoreSupport/UndoStepQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/EditCommandQt.h.
+
 2011-12-16  Ryosuke Niwa  <rn...@webkit.org>
 
         Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step

Deleted: trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.cpp (103187 => 103188)


--- trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.cpp	2011-12-18 21:41:44 UTC (rev 103187)
+++ trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.cpp	2011-12-18 21:49:45 UTC (rev 103188)
@@ -1,63 +0,0 @@
-/*
-    Copyright (C) 2007 Staikos Computing Services Inc.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "EditCommandQt.h"
-
-using namespace WebCore;
-
-#ifndef QT_NO_UNDOCOMMAND
-EditCommandQt::EditCommandQt(WTF::RefPtr<UndoStep> cmd, QUndoCommand *parent)
-    : QUndoCommand(parent)
-    , m_cmd(cmd)
-    , m_first(true)
-{
-}
-#else
-EditCommandQt::EditCommandQt(WTF::RefPtr<UndoStep> cmd)
-    : m_cmd(cmd)
-    , m_first(true)
-{
-}
-#endif
-
-EditCommandQt::~EditCommandQt()
-{
-}
-
-
-void EditCommandQt::redo()
-{
-    if (m_first) {
-        m_first = false;
-        return;
-    }
-    if (m_cmd)
-        m_cmd->reapply();
-}
-
-
-void EditCommandQt::undo()
-{
-    if (m_cmd)
-        m_cmd->unapply();
-}
-
-
-// vim: ts=4 sw=4 et

Deleted: trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.h (103187 => 103188)


--- trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.h	2011-12-18 21:41:44 UTC (rev 103187)
+++ trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.h	2011-12-18 21:49:45 UTC (rev 103188)
@@ -1,51 +0,0 @@
-/*
-    Copyright (C) 2007 Staikos Computing Services Inc.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef EditCommandQt_h
-#define EditCommandQt_h
-
-#include <UndoStep.h>
-#include <QUndoCommand>
-#include <qglobal.h>
-#include <wtf/RefPtr.h>
-
-class EditCommandQt
-#ifndef QT_NO_UNDOCOMMAND
-    : public QUndoCommand
-#endif
-{
-    public:
-#ifndef QT_NO_UNDOCOMMAND
-        EditCommandQt(WTF::RefPtr<WebCore::UndoStep> cmd, QUndoCommand *parent = 0);
-#else
-        EditCommandQt(WTF::RefPtr<WebCore::UndoStep> cmd);
-#endif
-        ~EditCommandQt();
-
-        void redo();
-        void undo();
-
-    private:
-        WTF::RefPtr<WebCore::UndoStep> m_cmd;
-        bool m_first;
-};
-
-#endif
-
-// vim: ts=4 sw=4 et

Modified: trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp (103187 => 103188)


--- trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp	2011-12-18 21:41:44 UTC (rev 103187)
+++ trunk/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp	2011-12-18 21:49:45 UTC (rev 103188)
@@ -33,7 +33,7 @@
 
 #include "CSSStyleDeclaration.h"
 #include "Document.h"
-#include "EditCommandQt.h"
+#include "UndoStepQt.h"
 #include "Editor.h"
 #include "FocusController.h"
 #include "Frame.h"
@@ -243,7 +243,7 @@
     Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
     if (m_inUndoRedo || (frame && !frame->editor()->lastEditCommand() /* HACK!! Don't recreate undos */))
         return;
-    m_page->undoStack()->push(new EditCommandQt(step));
+    m_page->undoStack()->push(new UndoStepQt(step));
 #endif // QT_NO_UNDOSTACK
 }
 

Copied: trunk/Source/WebKit/qt/WebCoreSupport/UndoStepQt.cpp (from rev 103187, trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.cpp) (0 => 103188)


--- trunk/Source/WebKit/qt/WebCoreSupport/UndoStepQt.cpp	                        (rev 0)
+++ trunk/Source/WebKit/qt/WebCoreSupport/UndoStepQt.cpp	2011-12-18 21:49:45 UTC (rev 103188)
@@ -0,0 +1,63 @@
+/*
+    Copyright (C) 2007 Staikos Computing Services Inc.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "UndoStepQt.h"
+
+using namespace WebCore;
+
+#ifndef QT_NO_UNDOCOMMAND
+UndoStepQt::UndoStepQt(WTF::RefPtr<UndoStep> step, QUndoCommand *parent)
+    : QUndoCommand(parent)
+    , m_step(step)
+    , m_first(true)
+{
+}
+#else
+UndoStepQt::UndoStepQt(WTF::RefPtr<UndoStep> step)
+    : m_step(step)
+    , m_first(true)
+{
+}
+#endif
+
+UndoStepQt::~UndoStepQt()
+{
+}
+
+
+void UndoStepQt::redo()
+{
+    if (m_first) {
+        m_first = false;
+        return;
+    }
+    if (m_step)
+        m_step->reapply();
+}
+
+
+void UndoStepQt::undo()
+{
+    if (m_step)
+        m_step->unapply();
+}
+
+
+// vim: ts=4 sw=4 et

Copied: trunk/Source/WebKit/qt/WebCoreSupport/UndoStepQt.h (from rev 103187, trunk/Source/WebKit/qt/WebCoreSupport/EditCommandQt.h) (0 => 103188)


--- trunk/Source/WebKit/qt/WebCoreSupport/UndoStepQt.h	                        (rev 0)
+++ trunk/Source/WebKit/qt/WebCoreSupport/UndoStepQt.h	2011-12-18 21:49:45 UTC (rev 103188)
@@ -0,0 +1,50 @@
+/*
+    Copyright (C) 2007 Staikos Computing Services Inc.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef UndoStepQt_h
+#define UndoStepQt_h
+
+#include <QUndoCommand>
+#include <UndoStep.h>
+#include <wtf/RefPtr.h>
+
+class UndoStepQt
+#ifndef QT_NO_UNDOCOMMAND
+    : public QUndoCommand
+#endif
+{
+    public:
+#ifndef QT_NO_UNDOCOMMAND
+        UndoStepQt(WTF::RefPtr<WebCore::UndoStep> step, QUndoCommand *parent = 0);
+#else
+        UndoStepQt(WTF::RefPtr<WebCore::UndoStep> step);
+#endif
+        ~UndoStepQt();
+
+        void redo();
+        void undo();
+
+    private:
+        WTF::RefPtr<WebCore::UndoStep> m_step;
+        bool m_first;
+};
+
+#endif
+
+// vim: ts=4 sw=4 et

Modified: trunk/Source/api.pri (103187 => 103188)


--- trunk/Source/api.pri	2011-12-18 21:41:44 UTC (rev 103187)
+++ trunk/Source/api.pri	2011-12-18 21:49:45 UTC (rev 103188)
@@ -48,7 +48,7 @@
     $$PWD/WebKit/qt/WebCoreSupport/DragClientQt.cpp \
     $$PWD/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
     $$PWD/WebKit/qt/WebCoreSupport/EditorClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/EditCommandQt.cpp \
+    $$PWD/WebKit/qt/WebCoreSupport/UndoStepQt.cpp \
     $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
     $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
     $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to