Qt 4.8
Public Functions | Public Variables | List of all members
QScriptCompletionTaskPrivate Class Reference
Inheritance diagram for QScriptCompletionTaskPrivate:
QScriptCompletionTaskInterfacePrivate QObjectPrivate QObjectData

Public Functions

void completeScriptExpression ()
 
void emitFinished ()
 
 QScriptCompletionTaskPrivate ()
 
 ~QScriptCompletionTaskPrivate ()
 
- Public Functions inherited from QScriptCompletionTaskInterfacePrivate
 QScriptCompletionTaskInterfacePrivate ()
 
virtual ~QScriptCompletionTaskInterfacePrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

QScriptDebuggerCommandSchedulerInterfacecommandScheduler
 
QScriptDebuggerConsoleconsole
 
QString contents
 
int cursorPosition
 
int frameIndex
 
QScriptDebuggerJobSchedulerInterfacejobScheduler
 
- Public Variables inherited from QScriptCompletionTaskInterfacePrivate
QString appendix
 
int length
 
int position
 
QStringList results
 
int type
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 59 of file qscriptcompletiontask.cpp.

Constructors and Destructors

◆ QScriptCompletionTaskPrivate()

QScriptCompletionTaskPrivate::QScriptCompletionTaskPrivate ( )

Definition at line 78 of file qscriptcompletiontask.cpp.

80  jobScheduler(0), console(0)
81 {
82 }
QScriptDebuggerJobSchedulerInterface * jobScheduler
QScriptDebuggerConsole * console
QScriptDebuggerCommandSchedulerInterface * commandScheduler

◆ ~QScriptCompletionTaskPrivate()

QScriptCompletionTaskPrivate::~QScriptCompletionTaskPrivate ( )

Definition at line 84 of file qscriptcompletiontask.cpp.

85 {
86 }

Functions

◆ completeScriptExpression()

void QScriptCompletionTaskPrivate::completeScriptExpression ( )

Definition at line 163 of file qscriptcompletiontask.cpp.

164 {
165  int pos = cursorPosition;
166  if ((pos > 0) && contents.at(pos-1).isNumber()) {
167  // completion of numbers is pointless
168  emitFinished();
169  return;
170  }
171 
172  while ((pos > 0) && isIdentChar(contents.at(pos-1)))
173  --pos;
174  int pos2 = cursorPosition - 1;
175  while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1)))
176  ++pos2;
177  QString ident = contents.mid(pos, pos2 - pos + 1);
178  position = pos;
179 
180  QStringList path;
181  path.append(ident);
182  while ((pos > 0) && (contents.at(pos-1) == QLatin1Char('.'))) {
183  --pos;
184  pos2 = pos;
185  while ((pos > 0) && isIdentChar(contents.at(pos-1)))
186  --pos;
187  path.prepend(contents.mid(pos, pos2 - pos));
188  }
189 
190  length = path.last().length();
192 
195 }
const QChar at(int i) const
Returns the character at the given index position in the string.
Definition: qstring.h:698
QScriptDebuggerJobSchedulerInterface * jobScheduler
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
The QString class provides a Unicode character string.
Definition: qstring.h:83
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
int size() const
Returns the number of characters in this string.
Definition: qstring.h:102
void prepend(const T &t)
Inserts value at the beginning of the list.
Definition: qlist.h:541
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Definition: qstring.cpp:3706
T & last()
Returns a reference to the last item in the list.
Definition: qlist.h:284
QScriptDebuggerCommandSchedulerInterface * commandScheduler
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
bool isNumber() const
Returns true if the character is a number (Number_* categories, not just 0-9); otherwise returns fals...
Definition: qchar.cpp:669
virtual int scheduleJob(QScriptDebuggerJob *job)=0

◆ emitFinished()

void QScriptCompletionTaskPrivate::emitFinished ( )

Definition at line 197 of file qscriptcompletiontask.cpp.

Referenced by completeScriptExpression().

198 {
199  emit q_func()->finished();
200 }
#define emit
Definition: qobjectdefs.h:76

Properties

◆ commandScheduler

QScriptDebuggerCommandSchedulerInterface* QScriptCompletionTaskPrivate::commandScheduler

◆ console

QScriptDebuggerConsole* QScriptCompletionTaskPrivate::console

Definition at line 75 of file qscriptcompletiontask.cpp.

◆ contents

QString QScriptCompletionTaskPrivate::contents

Definition at line 70 of file qscriptcompletiontask.cpp.

Referenced by completeScriptExpression().

◆ cursorPosition

int QScriptCompletionTaskPrivate::cursorPosition

Definition at line 71 of file qscriptcompletiontask.cpp.

Referenced by completeScriptExpression().

◆ frameIndex

int QScriptCompletionTaskPrivate::frameIndex

Definition at line 72 of file qscriptcompletiontask.cpp.

Referenced by completeScriptExpression().

◆ jobScheduler

QScriptDebuggerJobSchedulerInterface* QScriptCompletionTaskPrivate::jobScheduler

Definition at line 74 of file qscriptcompletiontask.cpp.

Referenced by completeScriptExpression().


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