44 #include <QtCore/qdebug.h> 45 #include <QtCore/qfile.h> 46 #include <QtCore/qstringlist.h> 149 if (
d)
return d->
url;
224 }
else if (
line() != -1) {
254 QString file = url.toLocalFile();
259 #ifndef QT_NO_TEXTCODEC 275 for (
int i = 0; i <
column; ++i) {
283 debug <<
"\n " << ind.constData();
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QDebug class provides an output stream for debugging information.
QUrl url() const
Returns the url for the file that caused this error.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
void setDescription(const QString &)
Sets the error description.
const QChar at(int i) const
Returns the character at the given index position in the string.
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QDeclarativeError()
Creates an empty error object.
bool open(OpenMode flags)
Opens the file using OpenMode mode, returning true if successful; otherwise false.
The QByteArray class provides an array of bytes.
int length() const
Returns the number of characters in this string.
bool isValid() const
Returns true if this error is valid, otherwise false.
void setCodec(QTextCodec *codec)
Sets the codec for this stream to codec.
QDeclarativeErrorPrivate()
void setColumn(int)
Sets the error column number.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
The QChar class provides a 16-bit Unicode character.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
bool isSpace() const
Returns true if the character is a separator character (Separator_* categories); otherwise returns fa...
QString toString() const
Returns the error as a human readable string.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool isEmpty(const char *str)
const T & at(int i) const
Returns the item at index position i in the list.
QString description() const
Returns the error description.
The QStringList class provides a list of strings.
static const char * data(const QByteArray &arr)
The QDeclarativeError class encapsulates a QML error.
int line() const
Returns the error line number.
void setLine(int)
Sets the error line number.
QDeclarativeError & operator=(const QDeclarativeError &)
Assigns other to this error object.
The QFile class provides an interface for reading from and writing to files.
void setUrl(const QUrl &)
Sets the url for the file that caused this error.
The QTextStream class provides a convenient interface for reading and writing text.
int column() const
Returns the error column number.
QByteArray readAll()
Reads all available data from the device, and returns it as a QByteArray.
QDeclarativeErrorPrivate * d
QString readAll()
Reads the entire content of the stream, and returns it as a QString.
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
void reserve(int size)
Attempts to allocate memory for at least size bytes.
#define qPrintable(string)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QDebug operator<<(QDebug debug, const QDeclarativeError &error)
Outputs a human readable version of error to debug.