summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/qnetworkreply/echo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/access/qnetworkreply/echo')
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/main.cpp8
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt
index 664b2f2fab..137b29110d 100644
--- a/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt
+++ b/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt
@@ -1,11 +1,12 @@
-# Generated from echo.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## echo Binary:
#####################################################################
qt_internal_add_executable(echo
- OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
SOURCES
main.cpp
)
diff --git a/tests/auto/network/access/qnetworkreply/echo/main.cpp b/tests/auto/network/access/qnetworkreply/echo/main.cpp
index 770b7bc47b..b10eaa745c 100644
--- a/tests/auto/network/access/qnetworkreply/echo/main.cpp
+++ b/tests/auto/network/access/qnetworkreply/echo/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtCore/QFile>
@@ -12,11 +12,13 @@ int main(int argc, char **)
}
QFile file;
- file.open(stdin, QFile::ReadWrite);
+ if (!file.open(stdin, QFile::ReadWrite))
+ return 1;
QByteArray data = file.readAll();
file.close();
- file.open(stdout, QFile::WriteOnly);
+ if (!file.open(stdout, QFile::WriteOnly))
+ return 1;
file.write(data);
file.close();
return 0;