qt 6.5.1 original

This commit is contained in:
kleuter
2023-10-29 23:33:08 +01:00
parent 71d22ab6b0
commit 85d238dfda
21202 changed files with 5499099 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## qprocess-noapplication Test:
#####################################################################
qt_internal_add_test(qprocess-noapplication
SOURCES
tst_qprocessnoapplication.cpp
)

View File

@ -0,0 +1,45 @@
// Copyright (C) 2016 Intel Corporation.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QCoreApplication>
#include <QtCore/QProcess>
#include <QtCore/QThread>
#include <QTest>
class tst_QProcessNoApplication : public QObject
{
Q_OBJECT
private Q_SLOTS:
void initializationDeadlock();
};
void tst_QProcessNoApplication::initializationDeadlock()
{
// see QTBUG-27260
// QProcess on Unix uses (or used to, at the time of the writing of this test)
// a global class called QProcessManager.
// This class is instantiated (or was) only in the main thread, which meant that
// blocking the main thread while waiting for QProcess could mean a deadlock.
struct MyThread : public QThread
{
void run() override
{
// what we execute does not matter, as long as we try to
// and that the process exits
QProcess::execute("true");
}
};
char *argv[] = { const_cast<char*>(QTest::currentAppName()), 0 };
int argc = 1;
QCoreApplication app(argc, argv);
MyThread thread;
thread.start();
QVERIFY(thread.wait(10000));
}
QTEST_APPLESS_MAIN(tst_QProcessNoApplication)
#include "tst_qprocessnoapplication.moc"