/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include #ifdef Q_WS_QWS //TESTED_CLASS= //TESTED_FILES= #include #include class tst_QWSEmbedWidget : public QObject { Q_OBJECT public: tst_QWSEmbedWidget() {} ~tst_QWSEmbedWidget() {} private slots: void embedWidget(); }; void tst_QWSEmbedWidget::embedWidget() { QLabel embedded("hello"); embedded.show(); QApplication::processEvents(); QVERIFY(embedded.isVisible()); { QWSEmbedWidget embedder(embedded.winId()); embedder.show(); QApplication::processEvents(); QVERIFY(embedded.isVisible()); } QApplication::processEvents(); QVERIFY(!embedded.isVisible()); { QWidget w; embedded.setWindowFlags(Qt::FramelessWindowHint); QWSEmbedWidget embedder(embedded.winId(), &w); const QRect geometry(100, 100, 100, 100); embedder.setGeometry(geometry); w.show(); QApplication::processEvents(); const QPoint offset = w.mapToGlobal(QPoint(0, 0)); QCOMPARE(embedded.geometry(), geometry.translated(offset)); QVERIFY(embedded.isVisible()); } QApplication::processEvents(); QVERIFY(!embedded.isVisible()); } QTEST_MAIN(tst_QWSEmbedWidget) #include "tst_qwsembedwidget.moc" #else // Q_WS_QWS QTEST_NOOP_MAIN #endif git/commit/Tests?h=v3.29.0-rc1&id=8e1e97cccab4da8907cf9403e2c13514a4c285d3'>Tests/Framework/fooPrivateExtensionlessHeader
diff options
context:
space:
mode:
authorBraulio Valdivielso Martinez <bvaldivielso@bloomberg.net>2022-02-07 14:05:59 (GMT)
committerBraulio Valdivielso Martinez <bvaldivielso@bloomberg.net>2022-02-09 18:30:11 (GMT)
commit8e1e97cccab4da8907cf9403e2c13514a4c285d3 (patch)
treeea6bd5bb49eaba4c01a91a007c8e80e4d7c08ab1 /Tests/Framework/fooPrivateExtensionlessHeader
parente40cea3fe99dc79b1ce8bc8330f662ec3a36dc8e (diff)
downloadCMake-8e1e97cccab4da8907cf9403e2c13514a4c285d3.zip
CMake-8e1e97cccab4da8907cf9403e2c13514a4c285d3.tar.gz
CMake-8e1e97cccab4da8907cf9403e2c13514a4c285d3.tar.bz2
Trace: include `line_end` field in json-v1 format
After !6954 got merged, it has become easier for tools to get full stack-traces for runtime traces of a CMake program. The trace information already included in the JSON objects (line number, source file path) allows tools that display these stack traces to print the CMake source code associated to them. However, CMake commands may spawn multiple lines, and the JSON information associated to a trace only contains the line in which the command started, but not the one in which it ended. If tools want to print stack traces along the relevant source code, and they want to print the whole command associated to the stack frame, they will have to implement their own CMake language parser to know where the command ends. In order to simplify the life of those who want to write tooling for CMake, this commit adds a `line_end` field to the json-v1 trace format. If a given command spans multiple lines, the `line_end` field will contain the line of the last line spanned by the command (that of the closing parenthesis associated to the command).