diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-22 18:38:54 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-22 18:38:54 (GMT) |
commit | 7857d88a0163d12aca51c017d3fe1878fc3b89ae (patch) | |
tree | 8ce1955e31b37579aa6df2803a2f2ddd5581e735 /tests/manual/qtbug-8933 | |
parent | 58e9855afce71448c709469270950e5add87d601 (diff) | |
parent | 397a2680b4e7ce90a8e4f8a4617450adb5d5a37d (diff) | |
download | Qt-7857d88a0163d12aca51c017d3fe1878fc3b89ae.zip Qt-7857d88a0163d12aca51c017d3fe1878fc3b89ae.tar.gz Qt-7857d88a0163d12aca51c017d3fe1878fc3b89ae.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (92 commits)
Make QStackTextEngine cheaper to construct
Add a function to get the transitions available from a state
Add a new WA_X11DoNotAcceptFocus attribute for top-level widgets (part 2).
Code cleaning for the QStringList's joinEmptiness() test case
Fix behavior change QStringList::join() for null
Add a new WA_X11DoNotAcceptFocus attribute for top-level widgets.
Cocoa: fix eventdispatcher crash, found by macgui autotest
Make QWidget::activateWindow() NET window manager aware.
Upgraded QLocale data to Unicode CLDR 1.8.0
Improved CLDR parser.
Fixed reading draft data from CLDR.
Improved the cldr parser for QLocale.
Do not use FSEvents-based filesystemwatcher backend on Mac.
add file missing in commit 74f5e34979b8a08a91aa3c2fa6d252e68eca7817
Moc: Add support for rvalue references in signals and slots.
Add support for polyphonic greek
Fix build failure on WinCE.
Autotests: if you use X11 libs, you must link to X11 libs explicitly.
Disable C++0x mode for QtWebKit and QtScript since WebKit will not compile any time soon with C++0x
Compile Phonon in C++0x mode.
...
Diffstat (limited to 'tests/manual/qtbug-8933')
-rw-r--r-- | tests/manual/qtbug-8933/README | 7 | ||||
-rw-r--r-- | tests/manual/qtbug-8933/main.cpp | 51 | ||||
-rw-r--r-- | tests/manual/qtbug-8933/qtbug-8933.pro | 16 | ||||
-rw-r--r-- | tests/manual/qtbug-8933/widget.cpp | 99 | ||||
-rw-r--r-- | tests/manual/qtbug-8933/widget.h | 73 | ||||
-rw-r--r-- | tests/manual/qtbug-8933/widget.ui | 33 |
6 files changed, 279 insertions, 0 deletions
diff --git a/tests/manual/qtbug-8933/README b/tests/manual/qtbug-8933/README new file mode 100644 index 0000000..b3ce407 --- /dev/null +++ b/tests/manual/qtbug-8933/README @@ -0,0 +1,7 @@ +The purpose of this test is to check if the full screen mode in OSX is working properly or not. +This test creates a widget and 5 seconds later enters full screen mode. If you hover over the area +where the menubar should be you will get no menubar. After 5 more seconds (i.e. 10 seconds since +start) a menubar is created. At that point, if you hover over the menubar area you will get the +menubar. 5 seconds later the menubar is destroyed and if you hover over there will be no menubar. +After 5 more seconds the widget goes back to normal mode and the test is finished. + diff --git a/tests/manual/qtbug-8933/main.cpp b/tests/manual/qtbug-8933/main.cpp new file mode 100644 index 0000000..c5d8e4e --- /dev/null +++ b/tests/manual/qtbug-8933/main.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2010 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 <QtGui/QApplication> +#include "widget.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + Widget w; + w.show(); + return a.exec(); +} diff --git a/tests/manual/qtbug-8933/qtbug-8933.pro b/tests/manual/qtbug-8933/qtbug-8933.pro new file mode 100644 index 0000000..8b87c83 --- /dev/null +++ b/tests/manual/qtbug-8933/qtbug-8933.pro @@ -0,0 +1,16 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2010-03-16T14:40:16 +# +#------------------------------------------------- + +TARGET = qtbug-8933 +TEMPLATE = app + + +SOURCES += main.cpp\ + widget.cpp + +HEADERS += widget.h + +FORMS += widget.ui diff --git a/tests/manual/qtbug-8933/widget.cpp b/tests/manual/qtbug-8933/widget.cpp new file mode 100644 index 0000000..4120a8f --- /dev/null +++ b/tests/manual/qtbug-8933/widget.cpp @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2010 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 "widget.h" +#include "ui_widget.h" + +#include <QTimer> +#include <QDebug> + +Widget::Widget(QWidget *parent) : + QWidget(parent), + ui(new Ui::Widget) +{ + ui->setupUi(this); + QTimer::singleShot(5000, this, SLOT(switchToFullScreen())); + QTimer::singleShot(10000, this, SLOT(addMenuBar())); + QTimer::singleShot(15000, this, SLOT(removeMenuBar())); + QTimer::singleShot(20000, this, SLOT(switchToNormalScreen())); +} + +Widget::~Widget() +{ + delete ui; +} + +void Widget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void Widget::switchToFullScreen() +{ + ui->label->setText("entering full screen"); + showFullScreen(); +} + +void Widget::switchToNormalScreen() +{ + ui->label->setText("leaving full screen"); + showNormal(); +} + +void Widget::addMenuBar() +{ + ui->label->setText("adding menu bar"); + menuBar = new QMenuBar(this); + menuBar->setVisible(true); +} + +void Widget::removeMenuBar() +{ + ui->label->setText("removing menu bar"); + delete menuBar; +} diff --git a/tests/manual/qtbug-8933/widget.h b/tests/manual/qtbug-8933/widget.h new file mode 100644 index 0000000..01aa141 --- /dev/null +++ b/tests/manual/qtbug-8933/widget.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2010 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$ +** +****************************************************************************/ + +#ifndef WIDGET_H +#define WIDGET_H + +#include <QWidget> +#include <QMenuBar> +#include <QMenu> + +namespace Ui { + class Widget; +} + +class Widget : public QWidget { + Q_OBJECT +public: + Widget(QWidget *parent = 0); + ~Widget(); + +public slots: + void switchToFullScreen(); + void switchToNormalScreen(); + void addMenuBar(); + void removeMenuBar(); + +protected: + void changeEvent(QEvent *e); + +private: + Ui::Widget *ui; + QMenuBar *menuBar; +}; + +#endif // WIDGET_H diff --git a/tests/manual/qtbug-8933/widget.ui b/tests/manual/qtbug-8933/widget.ui new file mode 100644 index 0000000..e0ded3f --- /dev/null +++ b/tests/manual/qtbug-8933/widget.ui @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Widget</class> + <widget class="QWidget" name="Widget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>400</height> + </rect> + </property> + <property name="windowTitle"> + <string>Widget</string> + </property> + <widget class="QLabel" name="label"> + <property name="geometry"> + <rect> + <x>110</x> + <y>60</y> + <width>311</width> + <height>16</height> + </rect> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </widget> + <layoutdefault spacing="6" margin="11"/> + <resources/> + <connections/> +</ui> |