[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice
From:       Hamish Rodda <rodda () kde ! org>
Date:       2007-12-03 15:28:08
Message-ID: 1196695688.366146.30498.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 744424 by rodda:

KActionCollection::associateWidget -> addAssociatedWidget


 M  +8 -1      kspread/ui/View.cpp  
 M  +8 -1      libs/main/KoView.cpp  


--- trunk/koffice/kspread/ui/View.cpp #744423:744424
@@ -62,6 +62,7 @@
 #include <kconfig.h>
 #include <kcomponentdata.h>
 #include <kdebug.h>
+#include <kdeversion.h>
 #include <kfind.h>
 #include <kfinddialog.h>
 #include <kfontaction.h>
@@ -1375,7 +1376,13 @@
     actions->inspector->setShortcut( QKeySequence( Qt::CTRL+ Qt::SHIFT + Qt::Key_I));
     connect(actions->inspector, SIGNAL(triggered(bool)), view, SLOT( runInspector() ));
 
-    ac->associateWidget(view->canvasWidget());
+    ac->addAssociatedWidget(view->canvasWidget());
+    foreach (QAction* action, ac->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+        action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+        action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
     m_propertyEditor = 0;
 }
 
--- trunk/koffice/libs/main/KoView.cpp #744423:744424
@@ -43,6 +43,7 @@
 #include <QApplication>
 #include <Q3ValueList>
 #include <QPrintDialog>
+#include <kdeversion.h>
 
 //static
 QString KoView::newObjectName()
@@ -194,7 +195,13 @@
         createDockWidget(factory);
     }
 
-  actionCollection()->associateWidget(this);
+  actionCollection()->addAssociatedWidget(this);
+  foreach (QAction* action, actionCollection()->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+    action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+    action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
 }
 
 KoView::~KoView()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic