summaryrefslogtreecommitdiffstats
path: root/util/gradientgen/tobinaryjson.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-01-04 15:32:34 +0100
committerLiang Qi <liang.qi@qt.io>2020-01-04 15:32:34 +0100
commita503bf54705d89204007e8f887b668fe5ef519fc (patch)
treeb2d1a452da39450eac78a1aeb1df116a73f64b23 /util/gradientgen/tobinaryjson.cpp
parente65c43fd0ffa57248e7d750570b7deae171a82f5 (diff)
parent1f87fb359fdff14e42662384a9c8a0bcb3837671 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
Diffstat (limited to 'util/gradientgen/tobinaryjson.cpp')
-rw-r--r--util/gradientgen/tobinaryjson.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/util/gradientgen/tobinaryjson.cpp b/util/gradientgen/tobinaryjson.cpp
deleted file mode 100644
index 65fe07f4b8..0000000000
--- a/util/gradientgen/tobinaryjson.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <iostream>
-
-#include <qdebug.h>
-#include <qjsondocument.h>
-
-using namespace std;
-
-int main()
-{
- QByteArray json;
- while (!cin.eof()) {
- char arr[1024];
- cin.read(arr, sizeof(arr));
- json.append(arr, cin.gcount());
- }
-
- QJsonParseError error;
- QJsonDocument document = QJsonDocument::fromJson(json, &error);
- if (document.isNull()) {
- qDebug() << "error:" << qPrintable(error.errorString()) << "at offset" << error.offset;
- return 1;
- }
-
- QByteArray binaryJson = document.toBinaryData();
- cout.write(binaryJson.constData(), binaryJson.size());
-}