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

List:       kde-commits
Subject:    koffice/kexi/formeditor
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2010-06-11 20:57:37
Message-ID: 20100611210506.C33B6AC8CF () svn ! kde ! org
[Download RAW message or body]

SVN commit 1137172 by staniek:

Forms
*fix "open object by name" action assignment for buttons



 M  +4 -3      kexiformeventhandler.cpp  
 M  +2 -1      kexiformeventhandler.h  


--- trunk/koffice/kexi/formeditor/kexiformeventhandler.cpp #1137171:1137172
@@ -73,13 +73,14 @@
         : KAction(parent), m_actionName(actionName), m_objectName(objectName)
         , m_actionOption(actionOption)
 {
+    connect(this, SIGNAL(triggered()), this, SLOT(trigger()));
 }
 
 KexiFormEventAction::~KexiFormEventAction()
 {
 }
 
-void KexiFormEventAction::trigger()
+void KexiFormEventAction::slotTrigger()
 {
 kDebug() << m_actionName << m_objectName;
     KexiProject* project = KexiMainWindowIface::global()->project();
@@ -176,8 +177,8 @@
         } else if (partInfo) { //'open or execute' action
             KexiFormEventAction* action = new KexiFormEventAction(widget, actionType, actionArg,
                     data.option);
-            QObject::disconnect(widget, SIGNAL(clicked()), action, SLOT(trigger()));
-            QObject::connect(widget, SIGNAL(clicked()), action, SLOT(trigger()));
+            QObject::disconnect(widget, SIGNAL(clicked()), action, SLOT(slotTrigger()));
+            QObject::connect(widget, SIGNAL(clicked()), action, SLOT(slotTrigger()));
         }
     }
 }
--- trunk/koffice/kexi/formeditor/kexiformeventhandler.h #1137171:1137172
@@ -56,6 +56,7 @@
 //! @internal form-level action for handling "on click" actions
 class KFORMEDITOR_EXPORT KexiFormEventAction : public KAction
 {
+    Q_OBJECT
 public:
     //! A structure used in currentActionName()
     class KFORMEDITOR_EXPORT ActionData
@@ -91,7 +92,7 @@
 public slots:
     //! Activates the action. If the object supports executing (macro, script),
     //! it is executed; otherwise (table, query, form,...) it is opened in its data view.
-    virtual void trigger();
+    void slotTrigger();
 
 private:
     QString m_actionName, m_objectName, m_actionOption;
[prev in list] [next in list] [prev in thread] [next in thread] 

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