Debian Codegraph @

src/scripttools/debugging/qscriptstdmessagehandler.cpp

raw symbols SCIP
1 /****************************************************************************
2 **
3 ** Copyright (C) 2018 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtSCriptTools module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39
40 #include "qscriptstdmessagehandler_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptstdmessagehandler_p.h`/
41 #include <stdio.h>
42
43 QT_BEGIN_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:148:10`!
44
45 /*!
46 \since 4.5
47 \class QScriptStdMessageHandler
48 \internal
49
50 \brief The QScriptStdMessageHandler class implements a message handler that writes to standard output.
51 */
52
53 class QScriptStdMessageHandlerPrivatecxx . . $ QScriptStdMessageHandlerPrivate#
54 {
55 public:
56 QScriptStdMessageHandlerPrivatecxx . . $ QScriptStdMessageHandlerPrivate#QScriptStdMessageHandlerPrivate(49f6e7a06ebc5aa8).() {}
57 ~cxx . . $ QScriptStdMessageHandlerPrivate#`~QScriptStdMessageHandlerPrivate`(ced63f7c635d850d).QScriptStdMessageHandlerPrivatecxx . . $ QScriptStdMessageHandlerPrivate#() {}
58 };
59
60 QScriptStdMessageHandlercxx . . $ QScriptStdMessageHandler#::QScriptStdMessageHandlercxx . . $ QScriptStdMessageHandler#QScriptStdMessageHandler(49f6e7a06ebc5aa8).()
61 : d_ptr(new QScriptStdMessageHandlerPrivate)
62 {
63 }
64
65 QScriptStdMessageHandlercxx . . $ QScriptStdMessageHandler#::~cxx . . $ QScriptStdMessageHandler#`~QScriptStdMessageHandler`(ced63f7c635d850d).QScriptStdMessageHandlercxx . . $ QScriptStdMessageHandler#()
66 {
67 }
68
69 void QScriptStdMessageHandlercxx . . $ QScriptStdMessageHandler#::messagecxx . . $ QScriptStdMessageHandler#message(2525eba6d4edee60).(QtMsgTypecxx . . $ QtMsgType# type, const QStringcxx . . $ QString# &text,
70 const QStringcxx . . $ QString# &fileName,
71 int lineNumber, int columnNumber,
72 const QVariantcxx . . $ QVariant# &/*data*/)
73 {
74 QStringcxx . . $ QString# msgcxx . . $ QString#QString(ced63f7c635d850d).;
75 if (!fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() || (lineNumber != -1)) {
76 if (!fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).())
77 msg.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(fileName);
78 else
79 msg.appendcxx . . $ QString#append(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("<noname>"));
80 if (lineNumber != -1) {
81 msg.appendcxx . . $ QString#append(3a2ffbdf8ecc25e2).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(':'));
82 msg.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(lineNumber));
83 if (columnNumber != -1) {
84 msg.appendcxx . . $ QString#append(3a2ffbdf8ecc25e2).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(':'));
85 msg.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(columnNumber));
86 }
87 }
88 msg.appendcxx . . $ QString#append(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).(": "));
89 }
90 msg.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(text);
91
92 FILEcxx . . $ FILE# *fp = (type == QtDebugMsgcxx . . $ QtDebugMsg.) ? stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`! : stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!;
93 fprintf(fp, "%s\n", msg.toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).());
94 fflush(fp);
95 }
96
97 QT_END_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:149:10`!