~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/qmldesigner/designercore/exceptions/exception.cpp

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
    return s_shouldAssert;
85
85
}
86
86
 
 
87
bool Exception::warnAboutException()
 
88
{
 
89
    static bool warnException = !qgetenv("QTCREATOR_QTQUICKDESIGNER_WARN_EXCEPTION").isEmpty();
 
90
    return warnException;
 
91
}
 
92
 
87
93
/*!
88
94
    Constructs an exception. \a line uses the __LINE__ macro, \a function uses
89
95
    the __FUNCTION__ or the Q_FUNC_INFO macro, and \a file uses
118
124
}
119
125
 
120
126
/*!
121
 
\brief Returns the unmangled backtrace of this exception
122
 
 
123
 
\returns the backtrace as a string
 
127
    Returns the unmangled backtrace of this exception as a string.
124
128
*/
125
129
QString Exception::backTrace() const
126
130
{
127
131
    return m_backTrace;
128
132
}
129
133
 
 
134
void Exception::createWarning() const
 
135
{
 
136
    if (warnAboutException())
 
137
        qDebug() << *this;
 
138
}
 
139
 
130
140
/*!
131
 
\brief Returns the optional description of this exception
132
 
 
133
 
\returns the description as string
 
141
    Returns the optional description of this exception as a string.
134
142
*/
135
143
QString Exception::description() const
136
144
{
138
146
}
139
147
 
140
148
/*!
141
 
\brief Returns the line number where this exception was thrown
142
 
 
143
 
\returns the line number as integer
 
149
    Returns the line number where this exception was thrown as an integer.
144
150
*/
145
151
int Exception::line() const
146
152
{
148
154
}
149
155
 
150
156
/*!
151
 
\brief Returns the function name where this exception was thrown
152
 
 
153
 
\returns the function name as string
 
157
    Returns the function name where this exception was thrown as a string.
154
158
*/
155
159
QString Exception::function() const
156
160
{
158
162
}
159
163
 
160
164
/*!
161
 
\brief Returns the file name where this exception was thrown
162
 
 
163
 
\returns the file name as string
 
165
    Returns the file name where this exception was thrown as a string.
164
166
*/
165
167
QString Exception::file() const
166
168
{
184
186
 
185
187
/*!
186
188
\fn QString Exception::type() const
187
 
\brief Returns the type of this exception
188
 
 
189
 
\returns the type as a string
 
189
Returns the type of this exception as a string.
190
190
*/
191
191
}