Changeset 89139 in webkit


Ignore:
Timestamp:
Jun 17, 2011 8:34:13 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-17 Chang Shu <cshu@webkit.org>

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 <cshu@webkit.org>

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):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r89123 r89139  
     12011-06-17  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] [WK2] Support undo/redo in MiniBrowser
     6        https://bugs.webkit.org/show_bug.cgi?id=62809
     7
     8        * UIProcess/API/qt/qwkpage.cpp:
     9        (QWKPage::action):
     10        * UIProcess/API/qt/qwkpage.h:
     11
    1122011-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp

    r89050 r89139  
    829829        text = contextMenuItemTagSelectAll();
    830830        break;
     831#ifndef QT_NO_UNDOSTACK
     832    case Undo: {
     833        QAction* undoAction = d->undoStack->createUndoAction(d->q);
     834        d->actions[action] = undoAction;
     835        return undoAction;
     836    }
     837    case Redo: {
     838        QAction* redoAction = d->undoStack->createRedoAction(d->q);
     839        d->actions[action] = redoAction;
     840        return redoAction;
     841    }
     842#endif
    831843    default:
    832844        return 0;
  • trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.h

    r85867 r89139  
    4545        Paste,
    4646        SelectAll,
     47
     48        Undo,
     49        Redo,
    4750
    4851        WebActionCount
  • trunk/Tools/ChangeLog

    r89138 r89139  
     12011-06-17  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] [WK2] Support undo/redo in MiniBrowser
     6        https://bugs.webkit.org/show_bug.cgi?id=62809
     7
     8        * MiniBrowser/qt/BrowserWindow.cpp:
     9        (BrowserWindow::BrowserWindow):
     10
    1112011-06-17  Daniel Bates  <dbates@rim.com>
    212
  • trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp

    r87824 r89139  
    8585    fileMenu->addAction("Quit", this, SLOT(close()));
    8686
     87    QMenu* editMenu = menuBar()->addMenu("&Edit");
     88    QAction* undo = page()->action(QWKPage::Undo);
     89    undo->setShortcut(QKeySequence(QKeySequence::Undo));
     90    editMenu->addAction(undo);
     91    QAction* redo = page()->action(QWKPage::Redo);
     92    redo->setShortcut(QKeySequence(QKeySequence::Redo));
     93    editMenu->addAction(redo);
     94    editMenu->addSeparator();
     95
    8796    QMenu* viewMenu = menuBar()->addMenu("&View");
    8897    viewMenu->addAction(page()->action(QWKPage::Stop));
Note: See TracChangeset for help on using the changeset viewer.