Quarks-help: use Quark-openHelpFile
[supercollider.git] / QtCollider / Common.cpp
blob498e781cf5c7cbe729344fb670e4a5782dfeaa1d
1 #include "Common.h"
2 #include "Slot.h"
4 #include <PyrKernel.h>
5 #include <VMGlobals.h>
6 #include <PyrLexer.h>
8 // WARNING: QtCollider::lockLang() must be called before
9 void QtCollider::runLang (
10 PyrObjectHdr *receiver,
11 PyrSymbol *method,
12 const QList<QVariant> & args,
13 PyrSlot *result )
15 VMGlobals *g = gMainVMGlobals;
16 g->canCallOS = true;
17 ++g->sp; SetObject(g->sp, receiver);
18 Q_FOREACH( QVariant var, args ) {
19 ++g->sp;
20 if( !Slot::setVariant( g->sp, var ) )
21 SetNil( g->sp );
23 runInterpreter(g, method, args.size() + 1);
24 g->canCallOS = false;
25 if (result) slotCopy(result, &g->result);
28 int QtCollider::wrongThreadError ()
30 qcErrorMsg( "You can not use this Qt functionality in the current thread. "
31 "Try scheduling on AppClock instead." );
32 return errFailed;