[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/lib/kross/main
From: Cyrille Berger <cyb () lepi ! org>
Date: 2006-03-01 0:16:58
Message-ID: 1141172218.137927.31876.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 514677 by berger:
emit a signal when a script is started
M +2 -1 scriptaction.cpp
M +6 -1 scriptaction.h
M +3 -0 scriptguiclient.cpp
M +2 -0 scriptguiclient.h
--- trunk/koffice/lib/kross/main/scriptaction.cpp #514676:514677
@@ -202,7 +202,7 @@
Kross::Api::ScriptContainer::setInterpreterName(name);
}
-const QString ScriptAction::getPackagePath()
+const QString ScriptAction::getPackagePath() const
{
return d->packagepath;
}
@@ -230,6 +230,7 @@
void ScriptAction::activate()
{
+ emit activated(this);
Kross::Api::ScriptContainer::execute();
if( Kross::Api::ScriptContainer::hadException() ) {
QString errormessage = Kross::Api::ScriptContainer::getException()->getError();
--- trunk/koffice/lib/kross/main/scriptaction.h #514676:514677
@@ -117,7 +117,7 @@
* belongs to or QString::null if it doesn't belong to
* any package.
*/
- const QString getPackagePath();
+ const QString getPackagePath() const;
/**
* \return a list of all kind of logs this \a ScriptAction
@@ -161,6 +161,11 @@
signals:
/**
+ * This signal got emitted when this action is emitted before execution.
+ */
+ void activated(const Kross::Api::ScriptAction*);
+
+ /**
* This signal got emitted after this \a ScriptAction got
* executed successfully.
*/
--- trunk/koffice/lib/kross/main/scriptguiclient.cpp #514676:514677
@@ -251,6 +251,7 @@
this, SLOT( executionFailed(const QString&, const QString&) ));
connect(action.data(), SIGNAL( success() ),
this, SLOT( successfullyExecuted() ));
+ connect(action.data(), SIGNAL( activated(const Kross::Api::ScriptAction*) ), SIGNAL( \
executionStarted(const Kross::Api::ScriptAction*))); }
emit collectionChanged(installedcollection);
return true;
@@ -329,6 +330,7 @@
this, SLOT( executionFailed(const QString&, const QString&) ));
connect(action.data(), SIGNAL( success() ),
this, SLOT( successfullyExecuted() ));
+ connect(action.data(), SIGNAL( activated(const Kross::Api::ScriptAction*) ), SIGNAL( \
executionStarted(const Kross::Api::ScriptAction*)));
loadedcollection->detach(action);
loadedcollection->attach(action);
@@ -360,6 +362,7 @@
this, SLOT( executionFailed(const QString&, const QString&) ));
connect(action.data(), SIGNAL( success() ),
this, SLOT( successfullyExecuted() ));
+ connect(action.data(), SIGNAL( activated(const Kross::Api::ScriptAction*) ), SIGNAL( \
executionStarted(const Kross::Api::ScriptAction*))); action->activate();
bool ok = action->hadException();
action->finalize(); // execution is done.
--- trunk/koffice/lib/kross/main/scriptguiclient.h #514676:514677
@@ -202,6 +202,8 @@
signals:
/// Emitted if a \a ScriptActionCollection instances changed.
void collectionChanged(ScriptActionCollection*);
+ /// This signal is emited when the execution of a script is started
+ void executionStarted(const Kross::Api::ScriptAction* );
/// This signal is emited when the execution of a script is finished
void executionFinished(const Kross::Api::ScriptAction* );
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic