Title: [89139] trunk
- Revision
- 89139
- Author
- [email protected]
- Date
- 2011-06-17 08:34:13 -0700 (Fri, 17 Jun 2011)
Log Message
2011-06-17 Chang Shu <[email protected]>
Reviewed by Andreas Kling.
[Qt] [WK2] Support undo/redo in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=62809
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::action):
* UIProcess/API/qt/qwkpage.h:
2011-06-17 Chang Shu <[email protected]>
Reviewed by Andreas Kling.
[Qt] [WK2] Support undo/redo in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=62809
* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::BrowserWindow):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (89138 => 89139)
--- trunk/Source/WebKit2/ChangeLog 2011-06-17 15:31:24 UTC (rev 89138)
+++ trunk/Source/WebKit2/ChangeLog 2011-06-17 15:34:13 UTC (rev 89139)
@@ -1,3 +1,14 @@
+2011-06-17 Chang Shu <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] [WK2] Support undo/redo in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=62809
+
+ * UIProcess/API/qt/qwkpage.cpp:
+ (QWKPage::action):
+ * UIProcess/API/qt/qwkpage.h:
+
2011-06-17 Carlos Garcia Campos <[email protected]>
Unreviewed. Fix WebKit2 GTK build after r89060.
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp (89138 => 89139)
--- trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp 2011-06-17 15:31:24 UTC (rev 89138)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp 2011-06-17 15:34:13 UTC (rev 89139)
@@ -828,6 +828,18 @@
case SelectAll:
text = contextMenuItemTagSelectAll();
break;
+#ifndef QT_NO_UNDOSTACK
+ case Undo: {
+ QAction* undoAction = d->undoStack->createUndoAction(d->q);
+ d->actions[action] = undoAction;
+ return undoAction;
+ }
+ case Redo: {
+ QAction* redoAction = d->undoStack->createRedoAction(d->q);
+ d->actions[action] = redoAction;
+ return redoAction;
+ }
+#endif
default:
return 0;
break;
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.h (89138 => 89139)
--- trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.h 2011-06-17 15:31:24 UTC (rev 89138)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.h 2011-06-17 15:34:13 UTC (rev 89139)
@@ -45,6 +45,9 @@
Paste,
SelectAll,
+ Undo,
+ Redo,
+
WebActionCount
};
Modified: trunk/Tools/ChangeLog (89138 => 89139)
--- trunk/Tools/ChangeLog 2011-06-17 15:31:24 UTC (rev 89138)
+++ trunk/Tools/ChangeLog 2011-06-17 15:34:13 UTC (rev 89139)
@@ -1,3 +1,13 @@
+2011-06-17 Chang Shu <[email protected]>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] [WK2] Support undo/redo in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=62809
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::BrowserWindow):
+
2011-06-17 Daniel Bates <[email protected]>
Rubber-stamped by Eric Seidel.
Modified: trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp (89138 => 89139)
--- trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp 2011-06-17 15:31:24 UTC (rev 89138)
+++ trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp 2011-06-17 15:34:13 UTC (rev 89139)
@@ -84,6 +84,15 @@
fileMenu->addSeparator();
fileMenu->addAction("Quit", this, SLOT(close()));
+ QMenu* editMenu = menuBar()->addMenu("&Edit");
+ QAction* undo = page()->action(QWKPage::Undo);
+ undo->setShortcut(QKeySequence(QKeySequence::Undo));
+ editMenu->addAction(undo);
+ QAction* redo = page()->action(QWKPage::Redo);
+ redo->setShortcut(QKeySequence(QKeySequence::Redo));
+ editMenu->addAction(redo);
+ editMenu->addSeparator();
+
QMenu* viewMenu = menuBar()->addMenu("&View");
viewMenu->addAction(page()->action(QWKPage::Stop));
viewMenu->addAction(page()->action(QWKPage::Reload));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes