mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 08:45:25 +08:00
qt 6.5.1 original
This commit is contained in:
7
tests/auto/widgets/kernel/qapplication/BLACKLIST
Normal file
7
tests/auto/widgets/kernel/qapplication/BLACKLIST
Normal file
@ -0,0 +1,7 @@
|
||||
[sendEventsOnProcessEvents]
|
||||
ubuntu-20.04
|
||||
ubuntu-22.04
|
||||
rhel-9.0
|
||||
[touchEventPropagation]
|
||||
# QTBUG-66745
|
||||
opensuse-leap
|
11
tests/auto/widgets/kernel/qapplication/CMakeLists.txt
Normal file
11
tests/auto/widgets/kernel/qapplication/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
add_subdirectory(desktopsettingsaware)
|
||||
add_subdirectory(modal)
|
||||
add_subdirectory(test)
|
||||
|
||||
add_dependencies(tst_qapplication
|
||||
desktopsettingsaware_helper
|
||||
modal_helper
|
||||
)
|
3
tests/auto/widgets/kernel/qapplication/customstyle.json
Normal file
3
tests/auto/widgets/kernel/qapplication/customstyle.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"Keys": [ "customstyle" ]
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## desktopsettingsaware Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(desktopsettingsaware_helper
|
||||
SOURCES
|
||||
main.cpp
|
||||
OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
@ -0,0 +1,16 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
QApplication::setDesktopSettingsAware(false);
|
||||
QApplication app(argc, argv);
|
||||
QComboBox box;
|
||||
box.insertItem(0, "foo");
|
||||
box.setEditable(true);
|
||||
box.show();
|
||||
return 0;
|
||||
}
|
55
tests/auto/widgets/kernel/qapplication/heart.svg
Normal file
55
tests/auto/widgets/kernel/qapplication/heart.svg
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) --><svg viewBox="100 200 550 500" height="841.88976pt" id="svg1" inkscape:version="0.40+cvs" sodipodi:docbase="C:\Documents and Settings\Jon Phillips\My Documents\projects\clipart-project\submissions" sodipodi:docname="heart-left-highlight.svg" sodipodi:version="0.32" width="595.27559pt" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<cc:Work rdf:about="">
|
||||
<dc:title>Heart Left-Highlight</dc:title>
|
||||
<dc:description>This is a normal valentines day heart.</dc:description>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>holiday</rdf:li>
|
||||
<rdf:li>valentines</rdf:li>
|
||||
<rdf:li></rdf:li>
|
||||
<rdf:li>valentine</rdf:li>
|
||||
<rdf:li>hash(0x8a091c0)</rdf:li>
|
||||
<rdf:li>hash(0x8a0916c)</rdf:li>
|
||||
<rdf:li>signs_and_symbols</rdf:li>
|
||||
<rdf:li>hash(0x8a091f0)</rdf:li>
|
||||
<rdf:li>day</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<dc:publisher>
|
||||
<cc:Agent rdf:about="http://www.openclipart.org">
|
||||
<dc:title>Jon Phillips</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jon Phillips</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>Jon Phillips</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:date></dc:date>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
|
||||
<dc:language>en</dc:language>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
|
||||
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
|
||||
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
|
||||
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs id="defs3"/>
|
||||
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="549.40674" inkscape:cy="596.00159" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="615" inkscape:window-width="866" inkscape:window-x="88" inkscape:window-y="116" inkscape:zoom="0.35000000" pagecolor="#ffffff" showguides="true"/>
|
||||
<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
|
||||
<path d="M 263.41570,235.14588 C 197.17570,235.14588 143.41575,288.90587 143.41575,355.14588 C 143.41575,489.90139 279.34890,525.23318 371.97820,658.45392 C 459.55244,526.05056 600.54070,485.59932 600.54070,355.14588 C 600.54070,288.90588 546.78080,235.14587 480.54070,235.14588 C 432.49280,235.14588 391.13910,263.51631 371.97820,304.33338 C 352.81740,263.51630 311.46370,235.14587 263.41570,235.14588 z " id="path7" sodipodi:nodetypes="ccccccc" style="fill:#e60000;fill-opacity:1.0000000;stroke:#000000;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
|
||||
<path d="M 265.00000,253.59375 C 207.04033,253.59375 160.00000,300.63407 160.00000,358.59375 C 160.00000,476.50415 278.91857,507.43251 359.96875,624.00000 C 366.52868,614.08205 220.00000,478.47309 220.00000,378.59375 C 220.00000,320.63407 267.04033,273.59375 325.00000,273.59375 C 325.50453,273.59375 325.99718,273.64912 326.50000,273.65625 C 309.22436,261.07286 288.00557,253.59374 265.00000,253.59375 z " id="path220" sodipodi:nodetypes="ccccccc" style="fill:#e6e6e6;fill-opacity:0.64556962;stroke:none;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
20
tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt
Normal file
20
tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## modal Binary:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_executable(modal_helper
|
||||
SOURCES
|
||||
base.cpp base.h
|
||||
main.cpp
|
||||
OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
24
tests/auto/widgets/kernel/qapplication/modal/base.cpp
Normal file
24
tests/auto/widgets/kernel/qapplication/modal/base.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "base.h"
|
||||
|
||||
base::base(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
m_timer = new QTimer(this);
|
||||
m_timer->setSingleShot(false);
|
||||
connect(m_timer, &QTimer::timeout, this, &base::periodicTimer);
|
||||
m_timer->start(5000);
|
||||
}
|
||||
|
||||
void base::periodicTimer()
|
||||
{
|
||||
if(m_modalStarted)
|
||||
exit(0);
|
||||
m_modalDialog = new QDialog(this);
|
||||
m_modalDialog->setWindowTitle(QLatin1String("modal"));
|
||||
m_modalDialog->setModal(true);
|
||||
m_modalDialog->show();
|
||||
m_modalStarted = true;
|
||||
}
|
24
tests/auto/widgets/kernel/qapplication/modal/base.h
Normal file
24
tests/auto/widgets/kernel/qapplication/modal/base.h
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#ifndef BASE_H
|
||||
#define BASE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
#include <QDialog>
|
||||
|
||||
class base : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
QTimer *m_timer;
|
||||
bool m_modalStarted = false;
|
||||
QDialog *m_modalDialog = nullptr;
|
||||
public:
|
||||
explicit base(QWidget *parent = nullptr);
|
||||
|
||||
public slots:
|
||||
void periodicTimer();
|
||||
};
|
||||
|
||||
#endif // BASE_H
|
13
tests/auto/widgets/kernel/qapplication/modal/main.cpp
Normal file
13
tests/auto/widgets/kernel/qapplication/modal/main.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QApplication>
|
||||
#include "base.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QApplication::setAttribute(Qt::AA_NativeWindows); //QTBUG-15774
|
||||
base b;
|
||||
return app.exec();
|
||||
}
|
21
tests/auto/widgets/kernel/qapplication/test/BLACKLIST
Normal file
21
tests/auto/widgets/kernel/qapplication/test/BLACKLIST
Normal file
@ -0,0 +1,21 @@
|
||||
# This file is mainly used for Android tests since Android
|
||||
# packages "test" instead of "qapplication" folder
|
||||
# QTBUG-87025
|
||||
[libraryPaths]
|
||||
android
|
||||
[setFont]
|
||||
android
|
||||
[closeAllWindows]
|
||||
android
|
||||
[libraryPaths_qt_plugin_path_2]
|
||||
android
|
||||
[desktopSettingsAware]
|
||||
android
|
||||
[applicationPalettePolish]
|
||||
android
|
||||
[touchEventPropagation]
|
||||
android
|
||||
[wheelEventPropagation]
|
||||
android
|
||||
[qtbug_12673]
|
||||
android
|
31
tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
Normal file
31
tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
Normal file
@ -0,0 +1,31 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#####################################################################
|
||||
## test Test:
|
||||
#####################################################################
|
||||
|
||||
# Collect test data
|
||||
list(APPEND test_data "../tmp/README")
|
||||
list(APPEND test_data "../modal")
|
||||
|
||||
qt_internal_add_test(tst_qapplication
|
||||
SOURCES
|
||||
../tst_qapplication.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
Qt::Widgets
|
||||
Qt::WidgetsPrivate
|
||||
TESTDATA ${test_data}
|
||||
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.."
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_extend_target(tst_qapplication CONDITION builtin_testdata
|
||||
DEFINES
|
||||
BUILTIN_TESTDATA
|
||||
)
|
3
tests/auto/widgets/kernel/qapplication/tmp/README
Normal file
3
tests/auto/widgets/kernel/qapplication/tmp/README
Normal file
@ -0,0 +1,3 @@
|
||||
this dummy directory is needed for the QApplication::libraryPaths() autotest
|
||||
that calls QDir(applicationDirPath + "/tmp/..").canonicalPath(). canonicalPath()
|
||||
stat()'s the given directory, so if the tmp directory doesn't exist it fails...
|
2696
tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
Normal file
2696
tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user