Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/lib64/qt5/qml/QtTest
File: testlogger.js
/****************************************************************************
[0] Fix | Delete
**
[1] Fix | Delete
** Copyright (C) 2016 The Qt Company Ltd.
[2] Fix | Delete
** Contact: https://www.qt.io/licensing/
[3] Fix | Delete
**
[4] Fix | Delete
** This file is part of the test suite of the Qt Toolkit.
[5] Fix | Delete
**
[6] Fix | Delete
** $QT_BEGIN_LICENSE:LGPL$
[7] Fix | Delete
** Commercial License Usage
[8] Fix | Delete
** Licensees holding valid commercial Qt licenses may use this file in
[9] Fix | Delete
** accordance with the commercial license agreement provided with the
[10] Fix | Delete
** Software or, alternatively, in accordance with the terms contained in
[11] Fix | Delete
** a written agreement between you and The Qt Company. For licensing terms
[12] Fix | Delete
** and conditions see https://www.qt.io/terms-conditions. For further
[13] Fix | Delete
** information use the contact form at https://www.qt.io/contact-us.
[14] Fix | Delete
**
[15] Fix | Delete
** GNU Lesser General Public License Usage
[16] Fix | Delete
** Alternatively, this file may be used under the terms of the GNU Lesser
[17] Fix | Delete
** General Public License version 3 as published by the Free Software
[18] Fix | Delete
** Foundation and appearing in the file LICENSE.LGPL3 included in the
[19] Fix | Delete
** packaging of this file. Please review the following information to
[20] Fix | Delete
** ensure the GNU Lesser General Public License version 3 requirements
[21] Fix | Delete
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
[22] Fix | Delete
**
[23] Fix | Delete
** GNU General Public License Usage
[24] Fix | Delete
** Alternatively, this file may be used under the terms of the GNU
[25] Fix | Delete
** General Public License version 2.0 or (at your option) the GNU General
[26] Fix | Delete
** Public license version 3 or any later version approved by the KDE Free
[27] Fix | Delete
** Qt Foundation. The licenses are as published by the Free Software
[28] Fix | Delete
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
[29] Fix | Delete
** included in the packaging of this file. Please review the following
[30] Fix | Delete
** information to ensure the GNU General Public License requirements will
[31] Fix | Delete
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
[32] Fix | Delete
** https://www.gnu.org/licenses/gpl-3.0.html.
[33] Fix | Delete
**
[34] Fix | Delete
** $QT_END_LICENSE$
[35] Fix | Delete
**
[36] Fix | Delete
****************************************************************************/
[37] Fix | Delete
[38] Fix | Delete
.pragma library
[39] Fix | Delete
[40] Fix | Delete
// We need a global place to store the results that can be
[41] Fix | Delete
// shared between multiple TestCase instances. Because QML
[42] Fix | Delete
// creates a separate scope for every inclusion of this file,
[43] Fix | Delete
// we hijack the global "Qt" object to store our data.
[44] Fix | Delete
function log_init_results()
[45] Fix | Delete
{
[46] Fix | Delete
if (!Qt.testResults) {
[47] Fix | Delete
Qt.testResults = {
[48] Fix | Delete
reportedStart: false,
[49] Fix | Delete
nextId: 0,
[50] Fix | Delete
testCases: []
[51] Fix | Delete
}
[52] Fix | Delete
}
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
function log_register_test(name)
[56] Fix | Delete
{
[57] Fix | Delete
log_init_results()
[58] Fix | Delete
var testId = Qt.testResults.nextId++
[59] Fix | Delete
Qt.testResults.testCases.push(testId)
[60] Fix | Delete
return testId
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
function log_optional_test(testId)
[64] Fix | Delete
{
[65] Fix | Delete
log_init_results()
[66] Fix | Delete
var index = Qt.testResults.testCases.indexOf(testId)
[67] Fix | Delete
if (index >= 0)
[68] Fix | Delete
Qt.testResults.testCases.splice(index, 1)
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
function log_mandatory_test(testId)
[72] Fix | Delete
{
[73] Fix | Delete
log_init_results()
[74] Fix | Delete
var index = Qt.testResults.testCases.indexOf(testId)
[75] Fix | Delete
if (index == -1)
[76] Fix | Delete
Qt.testResults.testCases.push(testId)
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
function log_start_test()
[80] Fix | Delete
{
[81] Fix | Delete
log_init_results()
[82] Fix | Delete
if (Qt.testResults.reportedStart)
[83] Fix | Delete
return false
[84] Fix | Delete
Qt.testResults.reportedStart = true
[85] Fix | Delete
return true
[86] Fix | Delete
}
[87] Fix | Delete
[88] Fix | Delete
function log_complete_test(testId)
[89] Fix | Delete
{
[90] Fix | Delete
var index = Qt.testResults.testCases.indexOf(testId)
[91] Fix | Delete
if (index >= 0)
[92] Fix | Delete
Qt.testResults.testCases.splice(index, 1)
[93] Fix | Delete
return Qt.testResults.testCases.length > 0
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function