diff --git a/apps/opencs/view/doc/view.cpp b/apps/opencs/view/doc/view.cpp index 7a2296fed2..c5792b27a6 100644 --- a/apps/opencs/view/doc/view.cpp +++ b/apps/opencs/view/doc/view.cpp @@ -27,6 +27,11 @@ void CSVDoc::View::setupEditMenu() QAction *redo = mDocument->getUndoStack().createRedoAction (this, tr("&Redo")); redo->setShortcuts (QKeySequence::Redo); edit->addAction (redo); + + // test + QAction *test = new QAction (tr ("&Test Command"), this); + connect (test, SIGNAL (triggered()), this, SLOT (test())); + edit->addAction (test); } void CSVDoc::View::setupViewMenu() @@ -87,4 +92,9 @@ void CSVDoc::View::setIndex (int viewIndex, int totalViews) void CSVDoc::View::newView() { mViewManager.addView (mDocument); +} + +void CSVDoc::View::test() +{ + mDocument->getUndoStack().push (new QUndoCommand()); } \ No newline at end of file diff --git a/apps/opencs/view/doc/view.hpp b/apps/opencs/view/doc/view.hpp index 457cc84fa6..2c312715a7 100644 --- a/apps/opencs/view/doc/view.hpp +++ b/apps/opencs/view/doc/view.hpp @@ -53,6 +53,8 @@ namespace CSVDoc private slots: void newView(); + + void test(); }; }