46 #include <QtCore/qhash.h> 47 #include <QtCore/qdatastream.h> 48 #include <QtCore/qstringlist.h> 153 return d->attributes.value(attribute, defaultValue);
164 d->attributes.remove(attribute);
172 return d->attributes;
184 return d->attributes.value(
FileName).toString();
202 return d->attributes.value(
LineNumber, -1).toInt();
220 return d->attributes.value(
ScriptID, -1).toLongLong();
232 return d->attributes.value(
Program).toString();
292 return d->attributes.value(
IteratorID, -1).toInt();
304 return d->attributes.value(
Name).toString();
328 return d->attributes.value(
SnapshotID, -1).toInt();
349 return ((
d->type == od->
type)
359 return !(*
this == other);
706 for (
qint32 i = 0; i < attribCount; ++i) {
The QVariant class acts like a union for the most common Qt data types.
QScriptDebuggerValue scriptValue() const
static QScriptDebuggerCommand newScriptValueIteratorCommand(const QScriptDebuggerValue &object)
static QScriptDebuggerCommand setBreakpointDataCommand(int id, const QScriptBreakpointData &data)
void setAttribute(Attribute attribute, const QVariant &value)
Sets the value of the given attribute.
static QScriptDebuggerCommand runToLocationCommand(const QString &fileName, int lineNumber)
static QScriptDebuggerCommand getBreakpointsCommand()
void setFileName(const QString &fileName)
static QScriptDebuggerCommand newScriptObjectSnapshotCommand()
#define QT_END_NAMESPACE
This macro expands to.
static QScriptDebuggerCommand interruptCommand()
T * data() const
Returns the value of the pointer referenced by this object.
#define it(className, varName)
static QScriptDebuggerCommand evaluateCommand(int contextIndex, const QString &program, const QString &fileName=QString(), int lineNumber=1)
static QScriptDebuggerCommand getContextStateCommand(int contextIndex)
static QScriptDebuggerCommand getPropertyExpressionValue(int contextIndex, int lineNumber, const QStringList &path)
void setScriptValue(const QScriptDebuggerValue &value)
static QScriptDebuggerCommand deleteScriptValueIteratorCommand(int id)
static QScriptDebuggerCommand getActivationObjectCommand(int contextIndex)
int lineNumber() const
Returns the LineNumber attribute of this command converted to an int.
static QScriptDebuggerCommand getScriptDataCommand(qint64 id)
static QScriptDebuggerCommand forceReturnCommand(int contextIndex, const QScriptDebuggerValue &value)
static QScriptDebuggerCommand deleteAllBreakpointsCommand()
static QScriptDebuggerCommand getContextIdCommand(int contextIndex)
static QScriptDebuggerCommand setBreakpointCommand(const QString &fileName, int lineNumber)
bool operator==(const QScriptDebuggerCommand &other) const
Returns true if this QScriptDebuggerCommand is equal to the other command, otherwise returns false...
static QScriptDebuggerCommand stepOverCommand(int count=1)
static QScriptDebuggerCommand getBacktraceCommand()
static QScriptDebuggerCommand scriptsCheckpointCommand()
The QString class provides a Unicode character string.
static QScriptDebuggerCommand getContextInfoCommand(int contextIndex)
static QScriptDebuggerCommand scriptValueToStringCommand(const QScriptDebuggerValue &value)
const T value(const Key &key) const
Returns the value associated with the key.
static QScriptDebuggerCommand getContextCountCommand()
Type type() const
Returns the type of this command.
static QScriptDebuggerCommand deleteBreakpointCommand(int id)
static QScriptDebuggerCommand resumeCommand()
QScriptDebuggerCommandPrivate()
static QScriptDebuggerCommand getScriptsDeltaCommand()
void setScriptId(qint64 id)
QString fileName() const
Returns the FileName attribute of this command converted to a string.
static QScriptDebuggerCommand getPropertiesByIteratorCommand(int id, int count)
static QScriptDebuggerCommand getScriptsCommand()
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QScriptDebuggerCommand continueCommand()
QHash< QScriptDebuggerCommand::Attribute, QVariant > attributes
~QScriptDebuggerCommandPrivate()
static QScriptDebuggerCommand stepOutCommand()
static QScriptDebuggerCommand deleteScriptObjectSnapshotCommand(int id)
The QStringList class provides a list of strings.
static QScriptDebuggerCommand getBreakpointDataCommand(int id)
static const char * data(const QByteArray &arr)
The QScriptBreakpointData class contains data associated with a breakpoint.
friend Q_AUTOTEST_EXPORT QDataStream & operator<<(QDataStream &, const QScriptDebuggerCommand &)
Writes the given command to the specified stream.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
void setContextIndex(int index)
static QScriptDebuggerCommand clearExceptionsCommand()
void setProgram(const QString &program)
void setSubordinateScriptValue(const QScriptDebuggerValue &value)
void setLineNumber(int lineNumber)
static QScriptDebuggerCommand contextsCheckpoint()
static QScriptDebuggerCommand getScopeChainCommand(int contextIndex)
QScriptDebuggerCommand & operator=(const QScriptDebuggerCommand &other)
Assigns the other value to this QScriptDebuggerCommand.
void setBreakpointId(int id)
The QScriptDebuggerCommand class represents a command issued to a QScriptDebuggerFrontend.
static QScriptDebuggerCommand setScriptValuePropertyCommand(const QScriptDebuggerValue &object, const QString &name, const QScriptDebuggerValue &value)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
The QScriptDebuggerValue class represents a script value.
void setSnapshotId(int id)
int size() const
Returns the number of items in the hash.
QHash< Attribute, QVariant > attributes() const
QScriptDebuggerValue subordinateScriptValue() const
void setIteratorId(int id)
const Key key(const T &value) const
Returns the first key mapped to value.
static QScriptDebuggerCommand getThisObjectCommand(int contextIndex)
friend Q_AUTOTEST_EXPORT QDataStream & operator>>(QDataStream &, QScriptDebuggerCommand &)
Reads a QScriptDebuggerCommand from the specified stream into the given command.
static QScriptDebuggerCommand resolveScriptCommand(const QString &fileName)
QScopedPointer< QScriptDebuggerCommandPrivate > d_ptr
QVariant attribute(Attribute attribute, const QVariant &defaultValue=QVariant()) const
Returns the value of the given attribute, or defaultValue if the attribute is not defined...
QScriptDebuggerCommand()
Constructs a QScriptDebuggerCommand of type None.
T qvariant_cast(const QVariant &)
bool operator!=(const QScriptDebuggerCommand &other) const
Returns true if this QScriptDebuggerCommand is not equal to the other command, otherwise returns fals...
QScriptDebuggerCommand::Type type
void setName(const QString &name)
static QScriptDebuggerCommand getCompletions(int contextIndex, const QStringList &path)
The QDataStream class provides serialization of binary data to a QIODevice.
~QScriptDebuggerCommand()
Destroys this QScriptDebuggerCommand.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
qint64 scriptId() const
Returns the ScriptID attribute of this command converted to a qint64.
static QScriptDebuggerCommand stepIntoCommand(int count=1)
QScriptBreakpointData breakpointData() const
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
static QScriptDebuggerCommand scriptObjectSnapshotCaptureCommand(int id, const QScriptDebuggerValue &object)
void setBreakpointData(const QScriptBreakpointData &data)