]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Fix the filterbar
[dolphin.git] / src / dolphincontextmenu.cpp
index 3be03dbecec596a178d5c9e132d8083c95d6ee15..7cf7f6b096bfa15b65e64fb9ed1a80ab26677822 100644 (file)
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
 #include "dolphincontextmenu.h"
@@ -38,7 +38,7 @@
 #include <assert.h>
 #include <kio/netaccess.h>
 #include <kmenu.h>
-#include <kstdaction.h>
+#include <kstandardaction.h>
 
 #include "dolphinmainwindow.h"
 #include "dolphinview.h"
@@ -91,12 +91,9 @@ void DolphinContextMenu::openViewportContextMenu()
 
     createNewMenu->insertSeparator();
 
-    QAction* action = 0;
-
-    Q3PtrListIterator<KAction> fileGrouptIt(dolphin->fileGroupActions());
-    while ((action = fileGrouptIt.current()) != 0) {
-        createNewMenu->addAction(action);
-        ++fileGrouptIt;
+    QLinkedListIterator<QAction*> fileGrouptIt(dolphin->fileGroupActions());
+    while (fileGrouptIt.hasNext()) {
+        createNewMenu->addAction(fileGrouptIt.next());
     }
 
     // TODO: not used yet. See documentation of Dolphin::linkGroupActions()
@@ -122,7 +119,7 @@ void DolphinContextMenu::openViewportContextMenu()
     popup->insertItem(SmallIcon("filenew"), i18n("Create New"), createNewMenu);
     popup->insertSeparator();
 
-    QAction* pasteAction = dolphin->actionCollection()->action(KStdAction::stdName(KStdAction::Paste));
+    QAction* pasteAction = dolphin->actionCollection()->action(KStandardAction::stdName(KStandardAction::Paste));
     popup->addAction(pasteAction);
 
     // setup 'View Mode' menu
@@ -180,10 +177,10 @@ void DolphinContextMenu::openItemContextMenu()
     const KUrl::List urls = m_dolphinView->selectedUrls();
 
     // insert 'Cut', 'Copy' and 'Paste'
-    const KStdAction::StdAction actionNames[] = { KStdAction::Cut, KStdAction::Copy, KStdAction::Paste };
-    const int count = sizeof(actionNames) / sizeof(KStdAction::StdAction);
+    const KStandardAction::StandardAction actionNames[] = { KStandardAction::Cut, KStandardAction::Copy, KStandardAction::Paste };
+    const int count = sizeof(actionNames) / sizeof(KStandardAction::StandardAction);
     for (int i = 0; i < count; ++i) {
-        QAction* action = dolphin->actionCollection()->action(KStdAction::stdName(actionNames[i]));
+        QAction* action = dolphin->actionCollection()->action(KStandardAction::stdName(actionNames[i]));
         if (action)
             popup->addAction(action);
     }