Qt 4.8
Public Functions | Properties | List of all members
QScriptCompleteScriptsJob Class Reference
Inheritance diagram for QScriptCompleteScriptsJob:
QScriptDebuggerCommandSchedulerJob QScriptDebuggerJob QScriptDebuggerResponseHandlerInterface

Public Functions

void handleResponse (const QScriptDebuggerResponse &response, int)
 
 QScriptCompleteScriptsJob (const QString &prefix, QScriptCompletionTaskPrivate *task, QScriptDebuggerCommandSchedulerInterface *scheduler)
 
void start ()
 
- Public Functions inherited from QScriptDebuggerCommandSchedulerJob
QScriptDebuggerCommandSchedulerInterfacecommandScheduler () const
 
 QScriptDebuggerCommandSchedulerJob (QScriptDebuggerCommandSchedulerInterface *commandScheduler)
 
 ~QScriptDebuggerCommandSchedulerJob ()
 
- Public Functions inherited from QScriptDebuggerJob
virtual void evaluateFinished (const QScriptDebuggerValue &result)
 
void finish ()
 
void hibernateUntilEvaluateFinished ()
 
 QScriptDebuggerJob ()
 
virtual ~QScriptDebuggerJob ()
 
- Public Functions inherited from QScriptDebuggerResponseHandlerInterface
virtual ~QScriptDebuggerResponseHandlerInterface ()
 

Properties

QString m_prefix
 
QScriptCompletionTaskPrivatem_task
 

Additional Inherited Members

- Protected Functions inherited from QScriptDebuggerCommandSchedulerJob
 QScriptDebuggerCommandSchedulerJob (QScriptDebuggerCommandSchedulerJobPrivate &dd, QScriptDebuggerCommandSchedulerInterface *commandScheduler)
 
- Protected Functions inherited from QScriptDebuggerJob
 QScriptDebuggerJob (QScriptDebuggerJobPrivate &dd)
 
- Protected Variables inherited from QScriptDebuggerJob
QScopedPointer< QScriptDebuggerJobPrivated_ptr
 

Detailed Description

Definition at line 132 of file qscriptcompletiontask.cpp.

Constructors and Destructors

◆ QScriptCompleteScriptsJob()

QScriptCompleteScriptsJob::QScriptCompleteScriptsJob ( const QString prefix,
QScriptCompletionTaskPrivate task,
QScriptDebuggerCommandSchedulerInterface scheduler 
)
inline

Definition at line 135 of file qscriptcompletiontask.cpp.

138  m_prefix(prefix), m_task(task)
139  {}
QScriptDebuggerCommandSchedulerJob(QScriptDebuggerCommandSchedulerInterface *commandScheduler)
QScriptCompletionTaskPrivate * m_task

Functions

◆ handleResponse()

void QScriptCompleteScriptsJob::handleResponse ( const QScriptDebuggerResponse response,
int   
)
inlinevirtual

Implements QScriptDebuggerResponseHandlerInterface.

Definition at line 146 of file qscriptcompletiontask.cpp.

147  {
148  QScriptScriptMap scripts = response.resultAsScripts();
150  for (it = scripts.constBegin(); it != scripts.constEnd(); ++it) {
151  QString fileName = it.value().fileName();
152  if (isPrefixOf(m_prefix, fileName))
153  m_task->results.append(fileName);
154  }
155  m_task->emitFinished();
156  finish();
157  }
#define it(className, varName)
The QString class provides a Unicode character string.
Definition: qstring.h:83
QScriptCompletionTaskPrivate * m_task
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QScriptScriptMap resultAsScripts() const
static bool isPrefixOf(const QString &prefix, const QString &what)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the map.
Definition: qmap.h:374
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the map...
Definition: qmap.h:380
static QString fileName(const QString &fileUrl)

◆ start()

void QScriptCompleteScriptsJob::start ( )
inlinevirtual

Implements QScriptDebuggerJob.

Definition at line 141 of file qscriptcompletiontask.cpp.

142  {
144  frontend.scheduleGetScripts();
145  }
QScriptDebuggerCommandSchedulerInterface * commandScheduler() const

Properties

◆ m_prefix

QString QScriptCompleteScriptsJob::m_prefix
private

Definition at line 159 of file qscriptcompletiontask.cpp.

◆ m_task

QScriptCompletionTaskPrivate* QScriptCompleteScriptsJob::m_task
private

Definition at line 160 of file qscriptcompletiontask.cpp.


The documentation for this class was generated from the following file: