[Ktutorial-commits] SF.net SVN: ktutorial:[249] trunk/ktutorial/ktutorial-library
Status: Alpha
Brought to you by:
danxuliu
From: <dan...@us...> - 2010-09-19 16:40:41
|
Revision: 249 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=249&view=rev Author: danxuliu Date: 2010-09-19 16:40:33 +0000 (Sun, 19 Sep 2010) Log Message: ----------- Fix StepWidget being blocked when a modal dialog is shown: now when a modal dialog is shown, the StepWidget is reparented to the modal dialog so it is no longer blocked, and when the modal dialog is closed, the StepWidget is reparented back to its previous parent. Modified Paths: -------------- trunk/ktutorial/ktutorial-library/src/CMakeLists.txt trunk/ktutorial/ktutorial-library/src/KTutorial.cpp trunk/ktutorial/ktutorial-library/src/view/CMakeLists.txt trunk/ktutorial/ktutorial-library/src/view/StepWidget.cpp trunk/ktutorial/ktutorial-library/src/view/StepWidget.h trunk/ktutorial/ktutorial-library/tests/CMakeLists.txt trunk/ktutorial/ktutorial-library/tests/view/CMakeLists.txt trunk/ktutorial/ktutorial-library/tests/view/StepWidgetTest.cpp Added Paths: ----------- trunk/ktutorial/ktutorial-library/src/common/ trunk/ktutorial/ktutorial-library/src/common/CMakeLists.txt trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.cpp trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.h trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.cpp trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.h trunk/ktutorial/ktutorial-library/tests/common/ trunk/ktutorial/ktutorial-library/tests/common/CMakeLists.txt trunk/ktutorial/ktutorial-library/tests/common/WindowVisibilitySpyTest.cpp trunk/ktutorial/ktutorial-library/tests/view/WindowOnTopEnforcerTest.cpp Modified: trunk/ktutorial/ktutorial-library/src/CMakeLists.txt =================================================================== --- trunk/ktutorial/ktutorial-library/src/CMakeLists.txt 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/src/CMakeLists.txt 2010-09-19 16:40:33 UTC (rev 249) @@ -2,6 +2,7 @@ # In order to work, they must be compiled using -fPIC add_definitions("-fPIC") +add_subdirectory(common) add_subdirectory(extendedinformation) add_subdirectory(scripting) add_subdirectory(tutorials) Modified: trunk/ktutorial/ktutorial-library/src/KTutorial.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/KTutorial.cpp 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/src/KTutorial.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -105,6 +105,7 @@ QString tutorialName = tutorial->tutorialInformation()->name(); StepWidget* stepWidget = new StepWidget(tutorialName, mParent); + stepWidget->setMainApplicationWindow(mParent); stepWidget->setObjectName("ktutorial_StepWidget"); connect(tutorial, SIGNAL(stepActivated(Step*)), stepWidget, SLOT(setStep(Step*))); Added: trunk/ktutorial/ktutorial-library/src/common/CMakeLists.txt =================================================================== --- trunk/ktutorial/ktutorial-library/src/common/CMakeLists.txt (rev 0) +++ trunk/ktutorial/ktutorial-library/src/common/CMakeLists.txt 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,9 @@ +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES}) + +set(ktutorial_common_SRCS + WindowVisibilitySpy.cpp +) + +kde4_add_library(ktutorial_common ${ktutorial_common_SRCS}) + +target_link_libraries(ktutorial_common ${KDE4_KDEUI_LIBS}) Property changes on: trunk/ktutorial/ktutorial-library/src/common/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.cpp (rev 0) +++ trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2010 by Daniel Calviño Sánchez * + * dan...@gm... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#include <QEvent> +#include <QWidget> + +#include "WindowVisibilitySpy.h" + +namespace common { + +//public: + +WindowVisibilitySpy::WindowVisibilitySpy(QObject* parent /*= 0*/): + QObject(parent) { +} + +void WindowVisibilitySpy::addWidgetToSpy(QWidget* widget) { + Q_ASSERT(widget); + + widget->installEventFilter(this); + + foreach (QObject* childObject, widget->children()) { + if (childObject->isWidgetType()) { + addWidgetToSpy(static_cast<QWidget*>(childObject)); + } + } +} + +//protected: + +bool WindowVisibilitySpy::eventFilter(QObject* object, QEvent* event) { + if (event->type() == QEvent::ChildAdded) { + QChildEvent* childEvent = static_cast<QChildEvent*>(event); + if (childEvent->child()->isWidgetType()) { + addWidgetToSpy(static_cast<QWidget*>(childEvent->child())); + } + return false; + } + + QWidget* widget = static_cast<QWidget*>(object); + + if (!(widget->windowFlags() & (Qt::Window | Qt::Dialog))) { + return false; + } + + if (event->type() == QEvent::Show) { + emit windowShown(widget); + } else if (event->type() == QEvent::Hide) { + emit windowHidden(widget); + } + + return false; +} + +} + +#include "WindowVisibilitySpy.moc" Property changes on: trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.cpp ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.h =================================================================== --- trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.h (rev 0) +++ trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.h 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,89 @@ +/*************************************************************************** + * Copyright (C) 2010 by Daniel Calviño Sánchez * + * dan...@gm... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#ifndef COMMON_WINDOWVISIBILITYSPY_H +#define COMMON_WINDOWVISIBILITYSPY_H + +#include <QObject> + +namespace common { + +/** + * Spy to know when windows from a widget hierarchy are shown or hidden. + * WindowVisibilitySpy emitts windowShown(QWidget*) whenever any of the spied + * widgets or its child widgets (recursively) are shown as a window. The signal + * windowHidden(QWidget*) is emitted when any of them is hidden. The signals are + * emitted for windows but also for dialogs. + * + * Children added to a spied widget after it was added to the + * WindowVisibilitySpy are also automatically spied. + */ +class WindowVisibilitySpy: public QObject { +Q_OBJECT +public: + + /** + * Creates a new WindowVisibilitySpy with the given parent. + * + * @param parent The parent QObject. + */ + explicit WindowVisibilitySpy(QObject* parent = 0); + + /** + * Add widget and all its child widgets to spy. + * + * @param widget The widget to spy. + */ + void addWidgetToSpy(QWidget* widget); + +Q_SIGNALS: + + /** + * Emitted when any of the spied widgets or its children is shown as a + * window. + * + * @param window The widget shown. + */ + void windowShown(QWidget* window); + + /** + * Emitted when any of the spied widgets or its children is hidden (and it + * was a window). + * + * @param window The widget hidden. + */ + void windowHidden(QWidget* window); + +protected: + + /** + * Filters the events received in the spied widget hierarchies. + * A windowShown(QWidget*) is emitted when a window is shown, and a + * windowHidden(QWidget*) is emitted when a window is hidden. + * + * @param object The widget that received the event. + * @param event The event received. + * @return False, to let the events be handled as necessary. + */ + virtual bool eventFilter(QObject* object, QEvent* event); + +}; + +} + +#endif Property changes on: trunk/ktutorial/ktutorial-library/src/common/WindowVisibilitySpy.h ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/ktutorial/ktutorial-library/src/view/CMakeLists.txt =================================================================== --- trunk/ktutorial/ktutorial-library/src/view/CMakeLists.txt 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/src/view/CMakeLists.txt 2010-09-19 16:40:33 UTC (rev 249) @@ -5,6 +5,7 @@ StepWidget.cpp TutorialListModel.cpp TutorialManagerDialog.cpp + WindowOnTopEnforcer.cpp ) kde4_add_ui_files(ktutorial_view_SRCS @@ -14,4 +15,8 @@ kde4_add_library(ktutorial_view ${ktutorial_view_SRCS}) -target_link_libraries(ktutorial_view ktutorial_extendedinformation ${KDE4_KDEUI_LIBS}) +target_link_libraries(ktutorial_view + ktutorial_common + ktutorial_extendedinformation + ${KDE4_KDEUI_LIBS} +) Modified: trunk/ktutorial/ktutorial-library/src/view/StepWidget.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/view/StepWidget.cpp 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/src/view/StepWidget.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -25,6 +25,7 @@ #include "StepWidget.h" #include "ui_StepWidget.h" +#include "WindowOnTopEnforcer.h" #include "../Option.h" #include "../Step.h" @@ -62,6 +63,11 @@ delete ui; } +void StepWidget::setMainApplicationWindow(QWidget* mainApplicationWindow) { + WindowOnTopEnforcer* windowOnTopEnforcer = new WindowOnTopEnforcer(this); + windowOnTopEnforcer->setBaseWindow(mainApplicationWindow); +} + //public slots: void StepWidget::setStep(Step* step) { Modified: trunk/ktutorial/ktutorial-library/src/view/StepWidget.h =================================================================== --- trunk/ktutorial/ktutorial-library/src/view/StepWidget.h 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/src/view/StepWidget.h 2010-09-19 16:40:33 UTC (rev 249) @@ -69,6 +69,16 @@ */ virtual ~StepWidget(); + /** + * Sets the main application window to spy for child dialogs. + * When a modal dialog is shown, this StepWidget will be reparented to the + * dialog to avoid being blocked by it. The previous parent will be restored + * when the modal dialog is hidden. + * + * @param mainApplicationWindow The main application window. + */ + void setMainApplicationWindow(QWidget* mainApplicationWindow); + public slots: /** Added: trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.cpp (rev 0) +++ trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,85 @@ +/*************************************************************************** + * Copyright (C) 2010 by Daniel Calviño Sánchez * + * dan...@gm... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#include <QWidget> + +#include "WindowOnTopEnforcer.h" +#include "../common/WindowVisibilitySpy.h" + +using common::WindowVisibilitySpy; + +namespace view { + +//public: + +WindowOnTopEnforcer::WindowOnTopEnforcer(QWidget* widget): QObject(widget), + mWidgetToKeepOnTop(widget) { + + Q_ASSERT(widget); + + mParentStack.push(mWidgetToKeepOnTop->parentWidget()); +} + +void WindowOnTopEnforcer::setBaseWindow(QWidget* baseWindow) { + Q_ASSERT(baseWindow); + + WindowVisibilitySpy* spy = new WindowVisibilitySpy(this); + spy->addWidgetToSpy(baseWindow); + connect(spy, SIGNAL(windowShown(QWidget*)), + this, SLOT(handleWindowShown(QWidget*))); + connect(spy, SIGNAL(windowHidden(QWidget*)), + this, SLOT(handleWindowHidden(QWidget*))); +} + +//private slots: + +void WindowOnTopEnforcer::handleWindowShown(QWidget* window) { + Q_ASSERT(window); + + if (!window->isModal()) { + return; + } + + mParentStack.push(window); + + //When a widget is reparented it is hidden and its window flags are cleared, + //so they must be restored and the widget shown again + Qt::WindowFlags flags = mWidgetToKeepOnTop->windowFlags(); + mWidgetToKeepOnTop->setParent(window); + mWidgetToKeepOnTop->setWindowFlags(flags); + mWidgetToKeepOnTop->show(); +} + +void WindowOnTopEnforcer::handleWindowHidden(QWidget* window) { + Q_ASSERT(window); + + if (!window->isModal()) { + return; + } + + mParentStack.pop(); + + //When a widget is reparented it is hidden and its window flags are cleared + //so they must be restored and the widget shown again + Qt::WindowFlags flags = mWidgetToKeepOnTop->windowFlags(); + mWidgetToKeepOnTop->setParent(mParentStack.top()); + mWidgetToKeepOnTop->setWindowFlags(flags); + mWidgetToKeepOnTop->show(); +} + +} Property changes on: trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.cpp ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.h =================================================================== --- trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.h (rev 0) +++ trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.h 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,92 @@ +/*************************************************************************** + * Copyright (C) 2010 by Daniel Calviño Sánchez * + * dan...@gm... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#ifndef VIEW_WINDOWONTOPENFORCER_H +#define VIEW_WINDOWONTOPENFORCER_H + +#include <QObject> +#include <QStack> + +namespace common { +class WindowVisibilitySpy; +} + +namespace view { + +/** + * Utility class to avoid windows being blocked by modal dialogs. + * When a modal dialog is shown, the widget to keep on top is reparented to the + * shown dialog. When the modal dialog is hidden, the widget is reparented to + * its previous parent. + */ +class WindowOnTopEnforcer: public QObject { +Q_OBJECT +public: + + /** + * Creates a new WindowOnTopEnforcer with the widget to keep on top. + * The widget to keep on top is set as the parent of the + * WindowOnTopEnforcer. + * + * @param widget The widget to keep on top. + */ + explicit WindowOnTopEnforcer(QWidget* widget); + + /** + * Sets the base window to spy for its children dialogs. + * + * @param baseWindow The window to spy. + */ + void setBaseWindow(QWidget* baseWindow); + +private: + + /** + * The widget to keep on top. + */ + QWidget* mWidgetToKeepOnTop; + + /** + * A stack with the parents of the widget to keep on top. + * It is used to restore the previous parent when the latest one is hidden. + */ + QStack<QWidget*> mParentStack; + +private Q_SLOTS: + + /** + * Reparents the widget to keep on top to the window if it is a modal + * dialog. + * + * @param window The window that has been shown. + */ + void handleWindowShown(QWidget* window); + + /** + * Reparents the widget to keep on top to its previous parent if the hidden + * window is a modal dialog. + * + * @param window The window that has been hidden. + */ + void handleWindowHidden(QWidget* window); + +}; + +}; + +#endif Property changes on: trunk/ktutorial/ktutorial-library/src/view/WindowOnTopEnforcer.h ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/ktutorial/ktutorial-library/tests/CMakeLists.txt =================================================================== --- trunk/ktutorial/ktutorial-library/tests/CMakeLists.txt 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/tests/CMakeLists.txt 2010-09-19 16:40:33 UTC (rev 249) @@ -1,3 +1,4 @@ +add_subdirectory(common) add_subdirectory(extendedinformation) add_subdirectory(scripting) add_subdirectory(view) Added: trunk/ktutorial/ktutorial-library/tests/common/CMakeLists.txt =================================================================== --- trunk/ktutorial/ktutorial-library/tests/common/CMakeLists.txt (rev 0) +++ trunk/ktutorial/ktutorial-library/tests/common/CMakeLists.txt 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,31 @@ +# Used by kde4_add_unit_test to set the full path to test executables +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) + +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${ktutorial-library_SOURCE_DIR}/src/common ${KDE4_INCLUDES}) + +# Since Qt 4.6.0, this definition is needed for GUI testing. +# It is backwards compatible with previous Qt versions, unlike the alternative +# which is to add #include <QTestGui> in the test files. +add_definitions(-DQT_GUI_LIB) + +MACRO(UNIT_TESTS) + FOREACH(_className ${ARGN}) + set(_testName ${_className}Test) + kde4_add_unit_test(${_testName} TESTNAME ktutorial-${_testName} ${_testName}.cpp) + target_link_libraries(${_testName} ktutorial_common ${QT_QTTEST_LIBRARY}) + ENDFOREACH(_className) +ENDMACRO(UNIT_TESTS) + +unit_tests( + WindowVisibilitySpy +) + +MACRO(MEM_TESTS) + FOREACH(_testname ${ARGN}) + add_test(ktutorial-mem-${_testname} ${CMAKE_CURRENT_SOURCE_DIR}/../runMemcheck.py ${CMAKE_CURRENT_BINARY_DIR}/${_testname}Test ${CMAKE_CURRENT_BINARY_DIR}) + ENDFOREACH(_testname) +ENDMACRO(MEM_TESTS) + +mem_tests( + WindowVisibilitySpy +) Property changes on: trunk/ktutorial/ktutorial-library/tests/common/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/ktutorial/ktutorial-library/tests/common/WindowVisibilitySpyTest.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/tests/common/WindowVisibilitySpyTest.cpp (rev 0) +++ trunk/ktutorial/ktutorial-library/tests/common/WindowVisibilitySpyTest.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,200 @@ +/*************************************************************************** + * Copyright (C) 2010 by Daniel Calviño Sánchez * + * dan...@gm... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#include <QtTest> + +#include <QWidget> + +#include "WindowVisibilitySpy.h" + +namespace common { + +class WindowVisibilitySpyTest: public QObject { +Q_OBJECT +private slots: + + void testConstructor(); + + void testShowWidgetAsWindow(); + void testHideWidgetAsWindow(); + void testDeleteWidgetShownAsWindow(); + void testShowWidgetAsWidget(); + void testHideWidgetAsWidget(); + void testDeleteWidgetShownAsWidget(); + + void testShowChildWidgetAddedBeforeSpy(); + void testShowChildWidgetAddedAfterSpy(); + +}; + +void WindowVisibilitySpyTest::testConstructor() { + QObject parent; + WindowVisibilitySpy* spy = new WindowVisibilitySpy(&parent); + + QCOMPARE(spy->parent(), &parent); +} + +void WindowVisibilitySpyTest::testShowWidgetAsWindow() { + QWidget widget; + widget.setWindowFlags(Qt::Window); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(&widget); + + QSignalSpy shownSpy(&spy, SIGNAL(windowShown(QWidget*))); + + widget.show(); + + QCOMPARE(shownSpy.count(), 1); + QVariant argument = shownSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QWidgetStar); + QCOMPARE(qvariant_cast<QWidget*>(argument), &widget); +} + +void WindowVisibilitySpyTest::testHideWidgetAsWindow() { + QWidget widget; + widget.setWindowFlags(Qt::Window); + widget.show(); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(&widget); + + QSignalSpy hiddenSpy(&spy, SIGNAL(windowHidden(QWidget*))); + + widget.hide(); + + QCOMPARE(hiddenSpy.count(), 1); + QVariant argument = hiddenSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QWidgetStar); + QCOMPARE(qvariant_cast<QWidget*>(argument), &widget); +} + +void WindowVisibilitySpyTest::testDeleteWidgetShownAsWindow() { + QWidget* widget = new QWidget(); + widget->setWindowFlags(Qt::Window); + widget->show(); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(widget); + + QSignalSpy hiddenSpy(&spy, SIGNAL(windowHidden(QWidget*))); + + delete widget; + + QCOMPARE(hiddenSpy.count(), 1); + QVariant argument = hiddenSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QWidgetStar); + QCOMPARE(qvariant_cast<QWidget*>(argument), widget); +} + +void WindowVisibilitySpyTest::testShowWidgetAsWidget() { + QWidget window; + window.show(); + + QWidget* widget = new QWidget(&window); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(widget); + + QSignalSpy shownSpy(&spy, SIGNAL(windowShown(QWidget*))); + + widget->show(); + + QCOMPARE(shownSpy.count(), 0); +} + +void WindowVisibilitySpyTest::testHideWidgetAsWidget() { + QWidget window; + window.show(); + + QWidget* widget = new QWidget(&window); + widget->show(); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(widget); + + QSignalSpy hiddenSpy(&spy, SIGNAL(windowHidden(QWidget*))); + + widget->hide(); + + QCOMPARE(hiddenSpy.count(), 0); +} + +void WindowVisibilitySpyTest::testDeleteWidgetShownAsWidget() { + QWidget window; + window.show(); + + QWidget* widget = new QWidget(&window); + widget->show(); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(widget); + + QSignalSpy shownSpy(&spy, SIGNAL(windowShown(QWidget*))); + + delete widget; + + QCOMPARE(shownSpy.count(), 0); +} + +void WindowVisibilitySpyTest::testShowChildWidgetAddedBeforeSpy() { + QWidget window; + QWidget* childWidget = new QWidget(&window); + window.show(); + + QWidget* grandChildWindow = new QWidget(childWidget); + grandChildWindow->setWindowFlags(Qt::Window); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(&window); + + QSignalSpy shownSpy(&spy, SIGNAL(windowShown(QWidget*))); + + grandChildWindow->show(); + + QCOMPARE(shownSpy.count(), 1); + QVariant argument = shownSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QWidgetStar); + QCOMPARE(qvariant_cast<QWidget*>(argument), grandChildWindow); +} + +void WindowVisibilitySpyTest::testShowChildWidgetAddedAfterSpy() { + QWidget window; + QWidget* childWidget = new QWidget(&window); + window.show(); + + WindowVisibilitySpy spy; + spy.addWidgetToSpy(&window); + + QSignalSpy shownSpy(&spy, SIGNAL(windowShown(QWidget*))); + + QWidget* grandChildWindow = new QWidget(childWidget); + grandChildWindow->setWindowFlags(Qt::Window); + grandChildWindow->show(); + + QCOMPARE(shownSpy.count(), 1); + QVariant argument = shownSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QWidgetStar); + QCOMPARE(qvariant_cast<QWidget*>(argument), grandChildWindow); +} + +} + +QTEST_MAIN(common::WindowVisibilitySpyTest) + +#include "WindowVisibilitySpyTest.moc" Property changes on: trunk/ktutorial/ktutorial-library/tests/common/WindowVisibilitySpyTest.cpp ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/ktutorial/ktutorial-library/tests/view/CMakeLists.txt =================================================================== --- trunk/ktutorial/ktutorial-library/tests/view/CMakeLists.txt 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/tests/view/CMakeLists.txt 2010-09-19 16:40:33 UTC (rev 249) @@ -21,6 +21,7 @@ StepWidget TutorialListModel TutorialManagerDialog + WindowOnTopEnforcer ) MACRO(MEM_TESTS) @@ -34,4 +35,5 @@ StepWidget TutorialListModel TutorialManagerDialog + WindowOnTopEnforcer ) Modified: trunk/ktutorial/ktutorial-library/tests/view/StepWidgetTest.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/tests/view/StepWidgetTest.cpp 2010-08-14 17:30:49 UTC (rev 248) +++ trunk/ktutorial/ktutorial-library/tests/view/StepWidgetTest.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -72,6 +72,8 @@ //Closing with ALT+F4 can't be tested, as it depends on the window manager //rather than the widget + void moveAfterShowingModalDialogAndThenClose(); + private: int mDummySlotCallCount; @@ -80,6 +82,8 @@ StepTextWidget* textWidget(StepWidget* stepWidget); KPushButton* closeButton(StepWidget* stepWidget); + void queueAssertWidgetDragged(StepWidget* stepWidget, int timeToWait); + }; void StepWidgetTest::testConstructor() { @@ -311,6 +315,36 @@ QCOMPARE(destroyedSpy.count(), 1); } +void StepWidgetTest::moveAfterShowingModalDialogAndThenClose() { + QWidget* window = new QWidget(); + window->show(); + + StepWidget* stepWidget = new StepWidget("Test tutorial"); + stepWidget->setMainApplicationWindow(window); + stepWidget->show(); + + QDialog* modalDialog = new QDialog(window); + + QTimer timerAccept; + timerAccept.setSingleShot(true); + timerAccept.setInterval(2000); + connect(&timerAccept, SIGNAL(timeout()), modalDialog, SLOT(accept())); + + queueAssertWidgetDragged(stepWidget, 500); + + timerAccept.start(); + modalDialog->exec(); + + QSignalSpy destroyedSpy(stepWidget, SIGNAL(destroyed(QObject*))); + + QTest::mouseClick(closeButton(stepWidget), Qt::LeftButton, + Qt::NoModifier, QPoint(), 500); + //Give it time to die + QTest::qWait(500); + + QCOMPARE(destroyedSpy.count(), 1); +} + /////////////////////////////////// Helpers //////////////////////////////////// StepTextWidget* StepWidgetTest::textWidget(StepWidget* stepWidget) { @@ -321,8 +355,66 @@ return stepWidget->ui->closeButton; } +//Modal dialogs don't return to the test code until they are closed. Thus, the +//actions or asserts to be performed while a modal dialog is being shown (like +//checking the position of the widget) must be "queued". +class QueuedActionsHelper: public QObject { +Q_OBJECT +public: + + QueuedActionsHelper(QObject* object = 0): QObject(object) { + } + + void setStepWidget(StepWidget* stepWidget) { + mStepWidget = stepWidget; + } + +public slots: + + void assertWidgetDragged() { + QVERIFY(mStepWidget->isVisible()); + + QPoint previousPosition = mStepWidget->pos(); + + QPoint widgetCenter(mStepWidget->size().width()/2, + mStepWidget->size().height()/2); + + QTest::mouseMove(mStepWidget); + + //Use setMouseTracking and QCursor::setPos as a workaround. + //QTest::mouseMove, due to unknown reasons for me, doesn't make + //StepWidget to receive QMouseEvent for move. Neither QCursor::setPos + //does if tracking isn't enabled + mStepWidget->setMouseTracking(true); + QTest::mousePress(mStepWidget, Qt::LeftButton, + Qt::NoModifier, QPoint(), 500); + QCursor::setPos(previousPosition + widgetCenter + QPoint(42, 23)); + QTest::mouseRelease(mStepWidget, Qt::LeftButton, + Qt::NoModifier, QPoint(), 500); + mStepWidget->setMouseTracking(false); + + QVERIFY(previousPosition.x() + 41 <= mStepWidget->pos().x() && + previousPosition.x() + 43 >= mStepWidget->pos().x()); + QVERIFY(previousPosition.y() + 22 <= mStepWidget->pos().y() && + previousPosition.y() + 24 >= mStepWidget->pos().y()); + } + +private: + + StepWidget* mStepWidget; + +}; + +void StepWidgetTest::queueAssertWidgetDragged(StepWidget* stepWidget, + int timeToWait) { + QueuedActionsHelper* helper = new QueuedActionsHelper(); + helper->setStepWidget(stepWidget); + QTimer::singleShot(timeToWait, helper, SLOT(assertWidgetDragged())); + QTimer::singleShot(timeToWait + 1000, helper, SLOT(deleteLater())); } +} + QTEST_KDEMAIN(view::StepWidgetTest, GUI) #include "StepWidgetTest.moc" Added: trunk/ktutorial/ktutorial-library/tests/view/WindowOnTopEnforcerTest.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/tests/view/WindowOnTopEnforcerTest.cpp (rev 0) +++ trunk/ktutorial/ktutorial-library/tests/view/WindowOnTopEnforcerTest.cpp 2010-09-19 16:40:33 UTC (rev 249) @@ -0,0 +1,419 @@ +/*************************************************************************** + * Copyright (C) 2010 by Daniel Calviño Sánchez * + * dan...@gm... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#include <QtTest> + +#include <QDialog> + +#include "WindowOnTopEnforcer.h" + +namespace view { + +class WindowOnTopEnforcerTest: public QObject { +Q_OBJECT + +private slots: + + void testConstructor(); + + void testBaseWindow(); + + void testChildWindow(); + + void testModalDialog(); + + void testNestedModalDialog(); + + void testSeveralModalDialogs(); + + void testNestedModalDialogOnChildWindow(); + +private: + + void queueAssertParent(QWidget* widget, QWidget* parent, int timeToWait); + void queueAssertIsVisibleWindow(QWidget* widget, int timeToWait); + +}; + +void WindowOnTopEnforcerTest::testConstructor() { + QWidget widget; + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(&widget); + + QCOMPARE(enforcer->parent(), &widget); +} + +void WindowOnTopEnforcerTest::testBaseWindow() { + QWidget* window = new QWidget(); + window->show(); + + QWidget* windowToKeepOnTop = new QWidget(window); + windowToKeepOnTop->setWindowFlags(Qt::Window); + windowToKeepOnTop->show(); + + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(windowToKeepOnTop); + enforcer->setBaseWindow(window); + + QSignalSpy destroyedSpy(windowToKeepOnTop, SIGNAL(destroyed(QObject*))); + + delete window; + + QCOMPARE(destroyedSpy.count(), 1); + QVariant argument = destroyedSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject*>(argument), windowToKeepOnTop); +} + +void WindowOnTopEnforcerTest::testChildWindow() { + QWidget* window = new QWidget(); + window->show(); + + QWidget* windowToKeepOnTop = new QWidget(window); + windowToKeepOnTop->setWindowFlags(Qt::Window); + windowToKeepOnTop->show(); + + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(windowToKeepOnTop); + enforcer->setBaseWindow(window); + + QWidget* childWindow = new QWidget(window); + childWindow->setWindowFlags(Qt::Window); + childWindow->show(); + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + delete childWindow; + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + QSignalSpy destroyedSpy(windowToKeepOnTop, SIGNAL(destroyed(QObject*))); + + delete window; + + QCOMPARE(destroyedSpy.count(), 1); + QVariant argument = destroyedSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject*>(argument), windowToKeepOnTop); +} + +void WindowOnTopEnforcerTest::testModalDialog() { + QWidget* window = new QWidget(); + window->show(); + + QWidget* windowToKeepOnTop = new QWidget(window); + windowToKeepOnTop->setWindowFlags(Qt::Window); + windowToKeepOnTop->show(); + + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(windowToKeepOnTop); + enforcer->setBaseWindow(window); + + QDialog* modalDialog = new QDialog(window); + + QTimer timerAccept; + timerAccept.setSingleShot(true); + timerAccept.setInterval(1000); + connect(&timerAccept, SIGNAL(timeout()), modalDialog, SLOT(accept())); + + queueAssertParent(windowToKeepOnTop, modalDialog, 500); + queueAssertIsVisibleWindow(windowToKeepOnTop, 500); + + timerAccept.start(); + modalDialog->exec(); + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + QSignalSpy destroyedSpy(windowToKeepOnTop, SIGNAL(destroyed(QObject*))); + + delete window; + + QCOMPARE(destroyedSpy.count(), 1); + QVariant argument = destroyedSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject*>(argument), windowToKeepOnTop); +} + +void WindowOnTopEnforcerTest::testNestedModalDialog() { + QWidget* window = new QWidget(); + window->show(); + + QWidget* windowToKeepOnTop = new QWidget(window); + windowToKeepOnTop->setWindowFlags(Qt::Window); + windowToKeepOnTop->show(); + + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(windowToKeepOnTop); + enforcer->setBaseWindow(window); + + QDialog* modalDialog = new QDialog(window); + QDialog* nestedModalDialog = new QDialog(modalDialog); + + QTimer timerAccept; + timerAccept.setSingleShot(true); + timerAccept.setInterval(2500); + connect(&timerAccept, SIGNAL(timeout()), modalDialog, SLOT(accept())); + + QTimer timerExecNested; + timerExecNested.setSingleShot(true); + timerExecNested.setInterval(500); + connect(&timerExecNested, SIGNAL(timeout()), + nestedModalDialog, SLOT(exec())); + + QTimer timerAcceptNested; + timerAcceptNested.setSingleShot(true); + timerAcceptNested.setInterval(1500); + connect(&timerAcceptNested, SIGNAL(timeout()), + nestedModalDialog, SLOT(accept())); + + queueAssertParent(windowToKeepOnTop, nestedModalDialog, 1000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 1000); + queueAssertParent(windowToKeepOnTop, modalDialog, 2000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 2000); + + timerAccept.start(); + timerExecNested.start(); + timerAcceptNested.start(); + modalDialog->exec(); + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + QSignalSpy destroyedSpy(windowToKeepOnTop, SIGNAL(destroyed(QObject*))); + + delete window; + + QCOMPARE(destroyedSpy.count(), 1); + QVariant argument = destroyedSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject*>(argument), windowToKeepOnTop); +} + +void WindowOnTopEnforcerTest::testSeveralModalDialogs() { + QWidget* window = new QWidget(); + window->show(); + + QWidget* windowToKeepOnTop = new QWidget(window); + windowToKeepOnTop->setWindowFlags(Qt::Window); + windowToKeepOnTop->show(); + + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(windowToKeepOnTop); + enforcer->setBaseWindow(window); + + QDialog* modalDialog = new QDialog(window); + QDialog* nestedModalDialog = new QDialog(modalDialog); + QDialog* nestedModalDialog2 = new QDialog(modalDialog); + + QTimer timerAccept; + timerAccept.setSingleShot(true); + timerAccept.setInterval(4500); + connect(&timerAccept, SIGNAL(timeout()), modalDialog, SLOT(accept())); + + QTimer timerExecNested; + timerExecNested.setSingleShot(true); + timerExecNested.setInterval(500); + connect(&timerExecNested, SIGNAL(timeout()), + nestedModalDialog, SLOT(exec())); + + QTimer timerAcceptNested; + timerAcceptNested.setSingleShot(true); + timerAcceptNested.setInterval(1500); + connect(&timerAcceptNested, SIGNAL(timeout()), + nestedModalDialog, SLOT(accept())); + + QTimer timerExecNested2; + timerExecNested2.setSingleShot(true); + timerExecNested2.setInterval(2500); + connect(&timerExecNested2, SIGNAL(timeout()), + nestedModalDialog2, SLOT(exec())); + + QTimer timerAcceptNested2; + timerAcceptNested2.setSingleShot(true); + timerAcceptNested2.setInterval(3500); + connect(&timerAcceptNested2, SIGNAL(timeout()), + nestedModalDialog2, SLOT(accept())); + + queueAssertParent(windowToKeepOnTop, nestedModalDialog, 1000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 1000); + queueAssertParent(windowToKeepOnTop, modalDialog, 2000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 2000); + queueAssertParent(windowToKeepOnTop, nestedModalDialog2, 3000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 3000); + queueAssertParent(windowToKeepOnTop, modalDialog, 4000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 4000); + + timerAccept.start(); + timerExecNested.start(); + timerAcceptNested.start(); + timerExecNested2.start(); + timerAcceptNested2.start(); + modalDialog->exec(); + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + QDialog* modalDialog2 = new QDialog(window); + QDialog* nestedModalDialog3 = new QDialog(modalDialog); + + QTimer timerAccept2; + timerAccept2.setSingleShot(true); + timerAccept2.setInterval(2500); + connect(&timerAccept2, SIGNAL(timeout()), modalDialog2, SLOT(accept())); + + QTimer timerExecNested3; + timerExecNested3.setSingleShot(true); + timerExecNested3.setInterval(500); + connect(&timerExecNested3, SIGNAL(timeout()), + nestedModalDialog3, SLOT(exec())); + + QTimer timerAcceptNested3; + timerAcceptNested3.setSingleShot(true); + timerAcceptNested3.setInterval(1500); + connect(&timerAcceptNested3, SIGNAL(timeout()), + nestedModalDialog3, SLOT(accept())); + + queueAssertParent(windowToKeepOnTop, nestedModalDialog3, 1000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 1000); + queueAssertParent(windowToKeepOnTop, modalDialog2, 2000); + queueAssertIsVisibleWindow(windowToKeepOnTop, 2000); + + timerAccept2.start(); + timerExecNested3.start(); + timerAcceptNested3.start(); + modalDialog2->exec(); + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + QSignalSpy destroyedSpy(windowToKeepOnTop, SIGNAL(destroyed(QObject*))); + + delete window; + + QCOMPARE(destroyedSpy.count(), 1); + QVariant argument = destroyedSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject*>(argument), windowToKeepOnTop); +} + +void WindowOnTopEnforcerTest::testNestedModalDialogOnChildWindow() { + QWidget* window = new QWidget(); + window->show(); + + QWidget* windowToKeepOnTop = new QWidget(window); + windowToKeepOnTop->setWindowFlags(Qt::Window); + windowToKeepOnTop->show(); + + WindowOnTopEnforcer* enforcer = new WindowOnTopEnforcer(windowToKeepOnTop); + enforcer->setBaseWindow(window); + + QWidget* childWindow = new QWidget(window); + childWindow->setWindowFlags(Qt::Window); + childWindow->show(); + + QDialog* nestedModalDialog = new QDialog(childWindow); + + QTimer timerAccept; + timerAccept.setSingleShot(true); + timerAccept.setInterval(1000); + connect(&timerAccept, SIGNAL(timeout()), nestedModalDialog, SLOT(accept())); + + queueAssertParent(windowToKeepOnTop, nestedModalDialog, 500); + queueAssertIsVisibleWindow(windowToKeepOnTop, 500); + + timerAccept.start(); + nestedModalDialog->exec(); + + QCOMPARE(windowToKeepOnTop->parentWidget(), window); + QVERIFY(windowToKeepOnTop->isVisible()); + QVERIFY(windowToKeepOnTop->windowFlags() & Qt::Window); + + QSignalSpy destroyedSpy(windowToKeepOnTop, SIGNAL(destroyed(QObject*))); + + delete window; + + QCOMPARE(destroyedSpy.count(), 1); + QVariant argument = destroyedSpy.at(0).at(0); + QCOMPARE(argument.userType(), (int)QMetaType::QObjectStar); + QCOMPARE(qvariant_cast<QObject*>(argument), windowToKeepOnTop); +} + +/////////////////////////////////// Helpers //////////////////////////////////// + +//The dialogs are modal, so they won't return to the test code until they are +//closed. Thus, the asserts to be performed while the dialogs are being shown +//(like checking the parent of a widget) must be "queued". +class QueuedActionsHelper: public QObject { +Q_OBJECT +public: + + QueuedActionsHelper(QObject* object = 0): QObject(object) { + } + + void setAssertWidget(QWidget* widget) { + mAssertWidget = widget; + } + + void setAssertParent(QWidget* parent) { + mAssertParent = parent; + } + +public slots: + + void assertParent() { + QCOMPARE(mAssertWidget->parentWidget(), mAssertParent); + } + + void assertIsVisibleWindow() { + QVERIFY(mAssertWidget->isVisible()); + QVERIFY(mAssertWidget->windowFlags() & Qt::Window); + } + +private: + + QWidget* mAssertWidget; + QWidget* mAssertParent; + +}; + +void WindowOnTopEnforcerTest::queueAssertParent(QWidget* widget, + QWidget* parent, + int timeToWait) { + QueuedActionsHelper* helper = new QueuedActionsHelper(); + helper->setAssertWidget(widget); + helper->setAssertParent(parent); + QTimer::singleShot(timeToWait, helper, SLOT(assertParent())); + QTimer::singleShot(timeToWait, helper, SLOT(deleteLater())); +} + +void WindowOnTopEnforcerTest::queueAssertIsVisibleWindow(QWidget* widget, + int timeToWait) { + QueuedActionsHelper* helper = new QueuedActionsHelper(); + helper->setAssertWidget(widget); + QTimer::singleShot(timeToWait, helper, SLOT(assertIsVisibleWindow())); + QTimer::singleShot(timeToWait, helper, SLOT(deleteLater())); +} + +} + +QTEST_MAIN(view::WindowOnTopEnforcerTest) + +#include "WidgetOnTopEnforcerTest.moc" Property changes on: trunk/ktutorial/ktutorial-library/tests/view/WindowOnTopEnforcerTest.cpp ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |