[tor-commits] [vidalia/alpha] Provide toForeground for plugins

chiiph at torproject.org chiiph at torproject.org
Sat Dec 24 20:54:40 UTC 2011


commit a9680d7b4055935d57791b01e1acf7cafc42610a
Author: Tomás Touceda <chiiph at torproject.org>
Date:   Fri Sep 16 11:19:04 2011 -0300

    Provide toForeground for plugins
---
 .../plugin/prototypes/HelperProcessPrototype.cpp   |    9 +++++++++
 .../plugin/prototypes/HelperProcessPrototype.h     |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp b/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp
index 6b91660..2de8cf6 100644
--- a/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp
+++ b/src/vidalia/plugin/prototypes/HelperProcessPrototype.cpp
@@ -89,3 +89,12 @@ HelperProcessPrototype::state()
 
   return HelperProcess::NotRunning;
 }
+
+void
+HelperProcessPrototype::toForeground()
+{
+  HelperProcess *obj = qscriptvalue_cast<HelperProcess *>(thisObject());
+
+  if(obj)
+    obj->toForeground();
+}
diff --git a/src/vidalia/plugin/prototypes/HelperProcessPrototype.h b/src/vidalia/plugin/prototypes/HelperProcessPrototype.h
index 1dae103..671a9f4 100644
--- a/src/vidalia/plugin/prototypes/HelperProcessPrototype.h
+++ b/src/vidalia/plugin/prototypes/HelperProcessPrototype.h
@@ -22,6 +22,7 @@ class HelperProcessPrototype : public QObject, public QScriptable
     Q_INVOKABLE QStringList systemEnvironment();
     Q_INVOKABLE void setEnvironment(const QStringList &env);
     Q_INVOKABLE QProcess::ProcessState state();
+    Q_INVOKABLE void toForeground();
 };
 
 Q_DECLARE_METATYPE(HelperProcess *);





More information about the tor-commits mailing list