From de5e0422ca14ad1bc042889fa68772bf6912a215 Mon Sep 17 00:00:00 2001 From: Dennis Oberst Date: Wed, 1 Mar 2023 13:58:51 +0100 Subject: Example: remove runfunction example This example shows how to use QtConcurrent::run by calling a global function and printing the thread ID. As the documentation already explains the functionality very well, I don't think this example is necessary. https://doc.qt.io/qt-6/qtconcurrentrun.html Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: I42a718cdaabdaeeab39b933d12c67d11978c95da Reviewed-by: Ivan Solovev --- examples/qtconcurrent/runfunction/main.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 examples/qtconcurrent/runfunction/main.cpp (limited to 'examples/qtconcurrent/runfunction/main.cpp') diff --git a/examples/qtconcurrent/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp deleted file mode 100644 index 4c00e11f1d2..00000000000 --- a/examples/qtconcurrent/runfunction/main.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include -#include -#include -#include -#include - -using namespace QtConcurrent; - -void hello(QString name) -{ - qDebug() << "Hello" << name << "from" << QThread::currentThread(); -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - QFuture f1 = run(hello, QString("Alice")); - QFuture f2 = run(hello, QString("Bob")); - f1.waitForFinished(); - f2.waitForFinished(); -} -- cgit v1.2.3