From 74fd14a305ce7402890de1919c3a27ac4d1cbf38 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 8 Sep 2009 09:28:41 +0200 Subject: Doc: keypad navigation is supported on Windows CE Reviewed-by: thartman --- src/gui/kernel/qapplication.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 327f5ce..bc8ed96 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -4687,7 +4687,11 @@ void QApplicationPrivate::emitLastWindowClosed() If \a enable is true, Qt::Key_Up and Qt::Key_Down are used to change focus. - This feature is available in Qt for Embedded Linux only. + This feature is available in Qt for Embedded Linux and Windows CE only. + + \note On Windows CE this feature is disabled by default for touch device + mkspecs. To enable keypad navigation, build Qt with + QT_KEYPAD_NAVIGATION defined. \sa keypadNavigationEnabled() */ @@ -4700,7 +4704,11 @@ void QApplication::setKeypadNavigationEnabled(bool enable) Returns true if Qt is set to use keypad navigation; otherwise returns false. The default is false. - This feature is available in Qt for Embedded Linux only. + This feature is available in Qt for Embedded Linux and Windows CE only. + + \note On Windows CE this feature is disabled by default for touch device + mkspecs. To enable keypad navigation, build Qt with + QT_KEYPAD_NAVIGATION defined. \sa setKeypadNavigationEnabled() */ -- cgit v0.12 From 790d6d4dda03314cccf4cad0bf32d9d8c3da4980 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 8 Sep 2009 10:12:22 +0200 Subject: make JavaScriptCore compile on platforms with case-insensitive file system There's a clash between "TypeInfo.h" and a standard header "typeinfo.h" that's included from a place we don't control. The fix is to rename "TypeInfo.h" to "JSTypeInfo.h". Reviewed-by: Simon Hausmann --- .../webkit/JavaScriptCore/JavaScriptCore.gypi | 2 +- .../webkit/JavaScriptCore/runtime/JSTypeInfo.h | 72 ++++++++++++++++++++++ .../webkit/JavaScriptCore/runtime/Structure.h | 2 +- .../webkit/JavaScriptCore/runtime/TypeInfo.h | 72 ---------------------- 4 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h delete mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi index 2d69c7d..5a75ab7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi @@ -323,7 +323,7 @@ 'runtime/TimeoutChecker.cpp', 'runtime/TimeoutChecker.h', 'runtime/Tracing.h', - 'runtime/TypeInfo.h', + 'runtime/JSTypeInfo.h', 'runtime/UString.cpp', 'runtime/UString.h', 'wrec/CharacterClass.cpp', diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h new file mode 100644 index 0000000..bea188b --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSTypeInfo.h @@ -0,0 +1,72 @@ +// -*- mode: c++; c-basic-offset: 4 -*- +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSTypeInfo_h +#define JSTypeInfo_h + +#include "JSType.h" + +namespace JSC { + + // WebCore uses MasqueradesAsUndefined to make document.all and style.filter undetectable. + static const unsigned MasqueradesAsUndefined = 1; + static const unsigned ImplementsHasInstance = 1 << 1; + static const unsigned OverridesHasInstance = 1 << 2; + static const unsigned ImplementsDefaultHasInstance = 1 << 3; + static const unsigned NeedsThisConversion = 1 << 4; + static const unsigned HasStandardGetOwnPropertySlot = 1 << 5; + + class TypeInfo { + friend class JIT; + public: + TypeInfo(JSType type, unsigned flags = 0) + : m_type(type) + { + // ImplementsDefaultHasInstance means (ImplementsHasInstance & !OverridesHasInstance) + if ((flags & (ImplementsHasInstance | OverridesHasInstance)) == ImplementsHasInstance) + m_flags = flags | ImplementsDefaultHasInstance; + else + m_flags = flags; + } + + JSType type() const { return m_type; } + + bool masqueradesAsUndefined() const { return m_flags & MasqueradesAsUndefined; } + bool implementsHasInstance() const { return m_flags & ImplementsHasInstance; } + bool overridesHasInstance() const { return m_flags & OverridesHasInstance; } + bool needsThisConversion() const { return m_flags & NeedsThisConversion; } + bool hasStandardGetOwnPropertySlot() const { return m_flags & HasStandardGetOwnPropertySlot; } + + unsigned flags() const { return m_flags; } + + private: + JSType m_type; + unsigned m_flags; + }; + +} + +#endif // JSTypeInfo_h diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h index dcd4e50..ca4552b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h @@ -31,7 +31,7 @@ #include "JSValue.h" #include "PropertyMapHashTable.h" #include "StructureTransitionTable.h" -#include "TypeInfo.h" +#include "JSTypeInfo.h" #include "UString.h" #include #include diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h b/src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h deleted file mode 100644 index 70aeed3..0000000 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*- mode: c++; c-basic-offset: 4 -*- -/* - * Copyright (C) 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef TypeInfo_h -#define TypeInfo_h - -#include "JSType.h" - -namespace JSC { - - // WebCore uses MasqueradesAsUndefined to make document.all and style.filter undetectable. - static const unsigned MasqueradesAsUndefined = 1; - static const unsigned ImplementsHasInstance = 1 << 1; - static const unsigned OverridesHasInstance = 1 << 2; - static const unsigned ImplementsDefaultHasInstance = 1 << 3; - static const unsigned NeedsThisConversion = 1 << 4; - static const unsigned HasStandardGetOwnPropertySlot = 1 << 5; - - class TypeInfo { - friend class JIT; - public: - TypeInfo(JSType type, unsigned flags = 0) - : m_type(type) - { - // ImplementsDefaultHasInstance means (ImplementsHasInstance & !OverridesHasInstance) - if ((flags & (ImplementsHasInstance | OverridesHasInstance)) == ImplementsHasInstance) - m_flags = flags | ImplementsDefaultHasInstance; - else - m_flags = flags; - } - - JSType type() const { return m_type; } - - bool masqueradesAsUndefined() const { return m_flags & MasqueradesAsUndefined; } - bool implementsHasInstance() const { return m_flags & ImplementsHasInstance; } - bool overridesHasInstance() const { return m_flags & OverridesHasInstance; } - bool needsThisConversion() const { return m_flags & NeedsThisConversion; } - bool hasStandardGetOwnPropertySlot() const { return m_flags & HasStandardGetOwnPropertySlot; } - - unsigned flags() const { return m_flags; } - - private: - JSType m_type; - unsigned m_flags; - }; - -} - -#endif // TypeInfo_h -- cgit v0.12 From 9bd7e50a5aa6258a58979a22250ce264b69d4ee2 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 7 Sep 2009 11:29:23 +0200 Subject: use a single qplatformdefs.h for all Windows CE mkspecs Additionally, mkspecs/wince.conf was moved to mkspecs/common/wince/qmake.conf The common qplatformdefs.h is also in that directory. Task-number: 259850 Reviewed-by: mauricek --- mkspecs/common/wince.conf | 90 -------------- mkspecs/common/wince/qmake.conf | 90 ++++++++++++++ mkspecs/common/wince/qplatformdefs.h | 131 +++++++++++++++++++++ mkspecs/wince50standard-armv4i-msvc2005/qmake.conf | 2 +- .../qplatformdefs.h | 90 +------------- .../qplatformdefs.h | 2 +- mkspecs/wince50standard-mipsii-msvc2005/qmake.conf | 2 +- .../qplatformdefs.h | 90 +------------- .../qplatformdefs.h | 2 +- mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf | 2 +- .../qplatformdefs.h | 90 +------------- .../qplatformdefs.h | 2 +- mkspecs/wince50standard-sh4-msvc2005/qmake.conf | 2 +- .../wince50standard-sh4-msvc2005/qplatformdefs.h | 90 +------------- .../wince50standard-sh4-msvc2008/qplatformdefs.h | 2 +- mkspecs/wince50standard-x86-msvc2005/qmake.conf | 2 +- .../wince50standard-x86-msvc2005/qplatformdefs.h | 90 +------------- .../wince50standard-x86-msvc2008/qplatformdefs.h | 2 +- .../qplatformdefs.h | 90 +------------- mkspecs/wincewm50pocket-msvc2005/qmake.conf | 2 +- mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h | 90 +------------- mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h | 2 +- mkspecs/wincewm50smart-msvc2005/qmake.conf | 2 +- mkspecs/wincewm50smart-msvc2005/qplatformdefs.h | 90 +------------- mkspecs/wincewm50smart-msvc2008/qplatformdefs.h | 2 +- .../wincewm60professional-msvc2005/qplatformdefs.h | 90 +------------- .../wincewm60professional-msvc2008/qplatformdefs.h | 2 +- mkspecs/wincewm60standard-msvc2005/qplatformdefs.h | 90 +------------- mkspecs/wincewm60standard-msvc2008/qplatformdefs.h | 2 +- .../wincewm65professional-msvc2005/qplatformdefs.h | 3 +- .../wincewm65professional-msvc2008/qplatformdefs.h | 2 +- 31 files changed, 250 insertions(+), 998 deletions(-) delete mode 100644 mkspecs/common/wince.conf create mode 100644 mkspecs/common/wince/qmake.conf create mode 100644 mkspecs/common/wince/qplatformdefs.h diff --git a/mkspecs/common/wince.conf b/mkspecs/common/wince.conf deleted file mode 100644 index d6e4ba7..0000000 --- a/mkspecs/common/wince.conf +++ /dev/null @@ -1,90 +0,0 @@ -# -# qmake configuration for common Windows CE -# - -MAKEFILE_GENERATOR = MSVC.NET -TEMPLATE = app -QT += core gui -CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe - -DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG - -QMAKE_COMPILER_DEFINES += _MSC_VER=1400 - -QMAKE_CC = cl -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = byacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- -QMAKE_CFLAGS_WARN_ON = -W3 -QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = -O2 -MD -QMAKE_CFLAGS_LTCG = -GL -QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd -QMAKE_CFLAGS_YACC = - -# Uncomment the following lines to reduce library sizes -# with potential cost of performance -# QMAKE_CFLAGS += -Os -# QMAKE_CFLAGS_RELEASE += -Os - -QMAKE_CXX = $$QMAKE_CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_STL_ON = -EHsc -QMAKE_CXXFLAGS_STL_OFF = -QMAKE_CXXFLAGS_RTTI_ON = -GR -QMAKE_CXXFLAGS_RTTI_OFF = -QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -EHs-c- - -QMAKE_INCDIR = -QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] -QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] - -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< - -QMAKE_LINK = link -QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB -QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_DEBUG = /DEBUG -QMAKE_LFLAGS_LTCG = /LTCG -QMAKE_LIBS_NETWORK = ws2.lib -QMAKE_LIBS_OPENGL = -QMAKE_LIBS_COMPAT = - -QMAKE_LIBS_QT_ENTRY = -lqtmain - -QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe -QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe -QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe - -QMAKE_IDL = midl -QMAKE_LIB = lib -QMAKE_RC = rc - -QMAKE_ZIP = zip -r -9 - -QMAKE_COPY = copy /y -QMAKE_COPY_DIR = xcopy /s /q /y /i -QMAKE_MOVE = move -QMAKE_DEL_FILE = del -QMAKE_DEL_DIR = rmdir -QMAKE_CHK_DIR_EXISTS = if not exist -QMAKE_MKDIR = mkdir - -VCPROJ_EXTENSION = .vcproj -VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 -load(qt_config) diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf new file mode 100644 index 0000000..d6e4ba7 --- /dev/null +++ b/mkspecs/common/wince/qmake.conf @@ -0,0 +1,90 @@ +# +# qmake configuration for common Windows CE +# + +MAKEFILE_GENERATOR = MSVC.NET +TEMPLATE = app +QT += core gui +CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe + +DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG + +QMAKE_COMPILER_DEFINES += _MSC_VER=1400 + +QMAKE_CC = cl +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- +QMAKE_CFLAGS_WARN_ON = -W3 +QMAKE_CFLAGS_WARN_OFF = -W0 +QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_LTCG = -GL +QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd +QMAKE_CFLAGS_YACC = + +# Uncomment the following lines to reduce library sizes +# with potential cost of performance +# QMAKE_CFLAGS += -Os +# QMAKE_CFLAGS_RELEASE += -Os + +QMAKE_CXX = $$QMAKE_CC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_STL_ON = -EHsc +QMAKE_CXXFLAGS_STL_OFF = +QMAKE_CXXFLAGS_RTTI_ON = -GR +QMAKE_CXXFLAGS_RTTI_OFF = +QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc +QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -EHs-c- + +QMAKE_INCDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] + +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< +QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< +QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< + +QMAKE_LINK = link +QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB +QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_DEBUG = /DEBUG +QMAKE_LFLAGS_LTCG = /LTCG +QMAKE_LIBS_NETWORK = ws2.lib +QMAKE_LIBS_OPENGL = +QMAKE_LIBS_COMPAT = + +QMAKE_LIBS_QT_ENTRY = -lqtmain + +QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe +QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe +QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe + +QMAKE_IDL = midl +QMAKE_LIB = lib +QMAKE_RC = rc + +QMAKE_ZIP = zip -r -9 + +QMAKE_COPY = copy /y +QMAKE_COPY_DIR = xcopy /s /q /y /i +QMAKE_MOVE = move +QMAKE_DEL_FILE = del +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_DIR_EXISTS = if not exist +QMAKE_MKDIR = mkdir + +VCPROJ_EXTENSION = .vcproj +VCSOLUTION_EXTENSION = .sln +VCPROJ_KEYWORD = Qt4VSv1.0 +load(qt_config) diff --git a/mkspecs/common/wince/qplatformdefs.h b/mkspecs/common/wince/qplatformdefs.h new file mode 100644 index 0000000..4e67948 --- /dev/null +++ b/mkspecs/common/wince/qplatformdefs.h @@ -0,0 +1,131 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec 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 QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +#ifdef UNICODE +#ifndef _UNICODE +#define _UNICODE +#endif +#endif + +// Get Qt defines/settings + +#include "qglobal.h" +#include "qfunctions_wince.h" + +#define _POSIX_ +#include +#undef _POSIX_ + +#include +#include +#include +#include + +#define Q_FS_FAT +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct _stati64 // non-ANSI defs +#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs +#define QT_STAT ::_stati64 +#define QT_FSTAT ::_fstati64 +#else +#define QT_STATBUF struct stat // non-ANSI defs +#define QT_STATBUF4TSTAT struct stat // non-ANSI defs +#define QT_STAT ::qt_wince_stat +#define QT_FSTAT ::qt_wince__fstat +#endif +#define QT_STAT_REG _S_IFREG +#define QT_STAT_DIR _S_IFDIR +#define QT_STAT_MASK _S_IFMT +#if defined(_S_IFLNK) +# define QT_STAT_LNK _S_IFLNK +#endif +#define QT_FILENO ::qt_wince___fileno +#define QT_OPEN ::qt_wince_open +#define QT_CLOSE ::qt_wince__close +#ifdef QT_LARGEFILE_SUPPORT +#define QT_LSEEK ::_lseeki64 +#define QT_TSTAT ::_tstati64 +#else +#define QT_LSEEK ::qt_wince__lseek +#define QT_TSTAT ::_tstat +#endif +#define QT_READ ::qt_wince__read +#define QT_WRITE ::qt_wince__write +#define QT_ACCESS ::qt_wince__access +#define QT_GETCWD ::_getcwd +#define QT_CHDIR ::_chdir +#define QT_MKDIR ::qt_wince__mkdir +#define QT_RMDIR ::qt_wince__rmdir +#define QT_OPEN_RDONLY _O_RDONLY +#define QT_OPEN_WRONLY _O_WRONLY +#define QT_OPEN_RDWR _O_RDWR +#define QT_OPEN_CREAT _O_CREAT +#define QT_OPEN_TRUNC _O_TRUNC +#define QT_OPEN_APPEND _O_APPEND +# define QT_OPEN_TEXT _O_TEXT +# define QT_OPEN_BINARY _O_BINARY + +#define QT_FOPEN ::fopen +#define QT_FSEEK ::fseek +#define QT_FTELL ::ftell +#define QT_FGETPOS ::fgetpos +#define QT_FSETPOS ::fsetpos +#define QT_FPOS_T fpos_t +#define QT_OFF_T long + +#define QT_SIGNAL_ARGS int + +#define QT_VSNPRINTF(buffer, count, format, arg) \ + _vsnprintf(buffer, count, format, arg) + +#define QT_SNPRINTF ::_snprintf + +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 + +typedef int mode_t; + +#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf b/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf index 45ebcf7..28ca6a6 100644 --- a/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Standard SDK for WindowsCE 5.0 (ARMV4I) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = STANDARDSDK_500 CE_ARCH = ARMV4I diff --git a/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h +++ b/mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h index f775941..cda4ff4 100644 --- a/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h +++ b/mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wince50standard-armv4i-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf b/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf index 7d765de..0cc1ab0 100644 --- a/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Standard SDK for WindowsCE 5.0 (MIPSII) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = STANDARDSDK_500 CE_ARCH = MIPSII diff --git a/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h +++ b/mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h index 319d49a..cda4ff4 100644 --- a/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h +++ b/mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wince50standard-mipsii-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf b/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf index 4750d88..a22505c 100644 --- a/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Standard SDK for WindowsCE 5.0 (MIPSIV) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = STANDARDSDK_500 CE_ARCH = MIPSIV diff --git a/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h +++ b/mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h index 9a6f3ed..cda4ff4 100644 --- a/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h +++ b/mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wince50standard-mipsiv-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wince50standard-sh4-msvc2005/qmake.conf b/mkspecs/wince50standard-sh4-msvc2005/qmake.conf index aa420f2..1ee8950 100644 --- a/mkspecs/wince50standard-sh4-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-sh4-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Standard SDK for WindowsCE 5.0 (SH4) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = STANDARDSDK_500 CE_ARCH = SH4 diff --git a/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h +++ b/mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h index 88ca7ab..cda4ff4 100644 --- a/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h +++ b/mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wince50standard-sh4-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wince50standard-x86-msvc2005/qmake.conf b/mkspecs/wince50standard-x86-msvc2005/qmake.conf index 13bcc9f..2fa7556 100644 --- a/mkspecs/wince50standard-x86-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-x86-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Standard SDK for WindowsCE 5.0 (x86) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = STANDARDSDK_500 CE_ARCH = x86 diff --git a/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h b/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h +++ b/mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h b/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h index 76dc923..cda4ff4 100644 --- a/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h +++ b/mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wince50standard-x86-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h b/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h +++ b/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wincewm50pocket-msvc2005/qmake.conf b/mkspecs/wincewm50pocket-msvc2005/qmake.conf index d75d86e..676be5a 100644 --- a/mkspecs/wincewm50pocket-msvc2005/qmake.conf +++ b/mkspecs/wincewm50pocket-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Windows Mobile 5.0 SDK for Pocket PC (ARMV4I) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = Windows Mobile 5.0 Pocket PC SDK CE_ARCH = ARMV4I diff --git a/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h b/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h +++ b/mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h b/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h index f444562..cda4ff4 100644 --- a/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h +++ b/mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wincewm50pocket-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wincewm50smart-msvc2005/qmake.conf b/mkspecs/wincewm50smart-msvc2005/qmake.conf index 372b266..c0f09cc 100644 --- a/mkspecs/wincewm50smart-msvc2005/qmake.conf +++ b/mkspecs/wincewm50smart-msvc2005/qmake.conf @@ -3,7 +3,7 @@ # # Written for Microsoft VC2005.NET with Windows Mobile 5.0 SDK for Smartphone (ARMV4I) # -include(../common/wince.conf) +include(../common/wince/qmake.conf) CE_SDK = Windows Mobile 5.0 Smartphone SDK CE_ARCH = ARMV4I diff --git a/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h b/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h +++ b/mkspecs/wincewm50smart-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h b/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h index 37c8f62..cda4ff4 100644 --- a/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h +++ b/mkspecs/wincewm50smart-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wincewm50smart-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h b/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h +++ b/mkspecs/wincewm60professional-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h b/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h index a0737ae..cda4ff4 100644 --- a/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h +++ b/mkspecs/wincewm60professional-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wincewm60professional-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h b/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h index 4e67948..cda4ff4 100644 --- a/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h +++ b/mkspecs/wincewm60standard-msvc2005/qplatformdefs.h @@ -39,93 +39,5 @@ ** ****************************************************************************/ -#ifndef QPLATFORMDEFS_H -#define QPLATFORMDEFS_H +#include "../common/wince/qplatformdefs.h" -#ifdef UNICODE -#ifndef _UNICODE -#define _UNICODE -#endif -#endif - -// Get Qt defines/settings - -#include "qglobal.h" -#include "qfunctions_wince.h" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include - -#define Q_FS_FAT -#ifdef QT_LARGEFILE_SUPPORT -#define QT_STATBUF struct _stati64 // non-ANSI defs -#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs -#define QT_STAT ::_stati64 -#define QT_FSTAT ::_fstati64 -#else -#define QT_STATBUF struct stat // non-ANSI defs -#define QT_STATBUF4TSTAT struct stat // non-ANSI defs -#define QT_STAT ::qt_wince_stat -#define QT_FSTAT ::qt_wince__fstat -#endif -#define QT_STAT_REG _S_IFREG -#define QT_STAT_DIR _S_IFDIR -#define QT_STAT_MASK _S_IFMT -#if defined(_S_IFLNK) -# define QT_STAT_LNK _S_IFLNK -#endif -#define QT_FILENO ::qt_wince___fileno -#define QT_OPEN ::qt_wince_open -#define QT_CLOSE ::qt_wince__close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::qt_wince__lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::qt_wince__read -#define QT_WRITE ::qt_wince__write -#define QT_ACCESS ::qt_wince__access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::qt_wince__mkdir -#define QT_RMDIR ::qt_wince__rmdir -#define QT_OPEN_RDONLY _O_RDONLY -#define QT_OPEN_WRONLY _O_WRONLY -#define QT_OPEN_RDWR _O_RDWR -#define QT_OPEN_CREAT _O_CREAT -#define QT_OPEN_TRUNC _O_TRUNC -#define QT_OPEN_APPEND _O_APPEND -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - _vsnprintf(buffer, count, format, arg) - -#define QT_SNPRINTF ::_snprintf - -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 - -typedef int mode_t; - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h b/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h index 819f150..cda4ff4 100644 --- a/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h +++ b/mkspecs/wincewm60standard-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wincewm60standard-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" diff --git a/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h b/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h index c3270e2..cda4ff4 100644 --- a/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h +++ b/mkspecs/wincewm65professional-msvc2005/qplatformdefs.h @@ -39,4 +39,5 @@ ** ****************************************************************************/ -#include "../wincewm60professional-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" + diff --git a/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h b/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h index 35219d0..cda4ff4 100644 --- a/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h +++ b/mkspecs/wincewm65professional-msvc2008/qplatformdefs.h @@ -39,5 +39,5 @@ ** ****************************************************************************/ -#include "../wincewm65professional-msvc2005/qplatformdefs.h" +#include "../common/wince/qplatformdefs.h" -- cgit v0.12 From 593172d298258c9dac13340ec712afc1473d5f34 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 8 Sep 2009 10:18:13 +0200 Subject: mkspec wince60standard-x86-msvc2005 added This is a mkspec template for creating x86 Windows CE 6 mkspecs. Task-number: 259850 Reviewed-by: mauricek --- mkspecs/wince60standard-armv4i-msvc2005/qmake.conf | 79 ++-------------------- mkspecs/wince60standard-x86-msvc2005/qmake.conf | 27 ++++++++ .../wince60standard-x86-msvc2005/qplatformdefs.h | 43 ++++++++++++ 3 files changed, 76 insertions(+), 73 deletions(-) create mode 100644 mkspecs/wince60standard-x86-msvc2005/qmake.conf create mode 100644 mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h diff --git a/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf b/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf index 6386141..3bb18af 100644 --- a/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf +++ b/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf @@ -1,65 +1,20 @@ # # qmake configuration for wince-msvc2005 # -# Written for Microsoft VC2005.NET with Standard SDK for WindowsCE 6.0 (ARMV4I) +# Written for Microsoft VS 2005 for WindowsCE 6.0 (ARMV4I) +# This is just a template for creating Windows CE 6 mkspecs. # -MAKEFILE_GENERATOR = MSVC.NET -TEMPLATE = app -CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe -QT += core gui -CE_SDK = STANDARDSDK_600 -CE_ARCH = ARMV4I - -DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG - -QMAKE_COMPILER_DEFINES += _MSC_VER=1400 - -QMAKE_CC = cl -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = byacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- -QRarch4T -QRinterwork-return -QMAKE_CFLAGS_WARN_ON = -W3 -QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = -O2 -GL -MD -QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd -QMAKE_CFLAGS_YACC = - -QMAKE_CXX = $$QMAKE_CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_STL_ON = -EHsc -QMAKE_CXXFLAGS_STL_OFF = -QMAKE_CXXFLAGS_RTTI_ON = -GR -QMAKE_CXXFLAGS_RTTI_OFF = -QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = +include(../common/wince/qmake.conf) -QMAKE_INCDIR = -QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] -QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +CE_SDK = STANDARDSDK_600 # replace with actual SDK name +CE_ARCH = ARMV4I -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ -QMAKE_LINK = link -QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB -QMAKE_LFLAGS_RELEASE = /LTCG /INCREMENTAL:NO -QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /DLL /SAFESEH:NO -QMAKE_LIBFLAGS = $$QMAKE_LFLAGS_WINDOWS QMAKE_LIBFLAGS_RELEASE = /LTCG QMAKE_LIBS = corelibc.lib coredll.lib QMAKE_LIBS_CORE = libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib @@ -68,27 +23,5 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = -QMAKE_LIBS_QT_ENTRY = -lqtmain - -QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe -QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe -QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe - -QMAKE_IDL = midl -QMAKE_LIB = lib QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600 -QMAKE_ZIP = zip -r -9 - -QMAKE_COPY = copy /y -QMAKE_COPY_DIR = xcopy /s /q /y /i -QMAKE_MOVE = move -QMAKE_DEL_FILE = del -QMAKE_DEL_DIR = rmdir -QMAKE_CHK_DIR_EXISTS = if not exist -QMAKE_MKDIR = mkdir - -VCPROJ_EXTENSION = .vcproj -VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 -load(qt_config) diff --git a/mkspecs/wince60standard-x86-msvc2005/qmake.conf b/mkspecs/wince60standard-x86-msvc2005/qmake.conf new file mode 100644 index 0000000..2896c69 --- /dev/null +++ b/mkspecs/wince60standard-x86-msvc2005/qmake.conf @@ -0,0 +1,27 @@ +# +# qmake configuration for wince-msvc2005 +# +# Written for Microsoft VS 2005 for WindowsCE 6.0 (x86) +# This is just a template for creating Windows CE 6 mkspecs. +# + +include(../common/wince/qmake.conf) + +CE_SDK = STANDARDSDK_600 # replace with actual SDK name +CE_ARCH = x86 + +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _X86_ _M_IX86 + +QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86 /ENTRY:mainACRTStartup +QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86 +QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86 /DLL /SAFESEH:NO +QMAKE_LIBFLAGS_RELEASE = /LTCG +QMAKE_LIBS = corelibc.lib coredll.lib +QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib +QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE +QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI +QMAKE_LIBS_OPENGL = +QMAKE_LIBS_COMPAT = + +QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600 + diff --git a/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h b/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h new file mode 100644 index 0000000..cda4ff4 --- /dev/null +++ b/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec 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 "../common/wince/qplatformdefs.h" + -- cgit v0.12 From 115d2c10b56228fbcdab5a8506c24d7b4745d95c Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 7 Sep 2009 16:46:47 +0200 Subject: Tests: Do not execute network tests at all if DNS setup is broken. Reviewed-by: Jesper --- tests/auto/network-settings.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 144f7b3..6ffb6f4 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -328,3 +328,18 @@ QByteArray QtNetworkSettings::imapExpectedReplySsl; #else #define Q_SET_DEFAULT_IAP #endif + + +class QtNetworkSettingsInitializerCode { +public: + QtNetworkSettingsInitializerCode() { + QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName()); + if (testServerResult.error() != QHostInfo::NoError) { + qWarning() << "Could not lookup" << QtNetworkSettings::serverName(); + qWarning() << "Please configure the test environment!"; + qWarning() << "See /etc/hosts or network-settings.h"; + qFatal("Exiting"); + } + } +}; +QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer; -- cgit v0.12 From deff8fcf0ed060b949c3ec0fa0ec4bd81c253825 Mon Sep 17 00:00:00 2001 From: mae Date: Tue, 8 Sep 2009 10:45:27 +0200 Subject: Fix autotest The piece table test relied on previous automatic edit command grouping. The grouping now has to be enforced explicitely with beginEditGroup()/endEditGroup() --- tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp b/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp index 6f8dd2b..61f4456 100644 --- a/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp +++ b/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp @@ -772,7 +772,9 @@ void tst_QTextPieceTable::blockRemoval1() QVERIFY(table->blocksFind(6).position() == 5); QVERIFY(table->blocksFind(11).position() == 10); + table->beginEditBlock(); table->remove(5, 5); + table->endEditBlock(); QVERIFY(table->blocksFind(4).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(5).blockFormat() == fmt2); QVERIFY(table->blocksFind(4).position() == 0); @@ -864,7 +866,10 @@ void tst_QTextPieceTable::blockRemoval3() QVERIFY(table->blocksFind(6).position() == 5); QVERIFY(table->blocksFind(11).position() == 10); + table->beginEditBlock(); table->remove(3, 4); + table->endEditBlock(); + QVERIFY(table->blocksFind(1).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(5).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(1).position() == 0); @@ -958,7 +963,10 @@ void tst_QTextPieceTable::blockRemoval5() QVERIFY(table->blocksFind(6).position() == 5); QVERIFY(table->blocksFind(11).position() == 10); + table->beginEditBlock(); table->remove(3, 8); + table->endEditBlock(); + QVERIFY(table->blocksFind(0).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(5).blockFormat() == QTextBlockFormat()); QVERIFY(table->blocksFind(1).position() == 0); -- cgit v0.12 From fa889cf4b80868249c70715275069eb150b597cc Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 8 Sep 2009 10:45:57 +0200 Subject: Try to make test more robust. By using QTRY_{COMPARE,VERIFY} instead of waiting an arbitrary amount of time waiting for the window manager to do his job. Also use QApplication::setActiveWindow which seems to be more robust then QWidget::activateWindow --- tests/auto/qabstractbutton/tst_qabstractbutton.cpp | 5 +-- tests/auto/qbuttongroup/tst_qbuttongroup.cpp | 8 ++--- tests/auto/qcompleter/tst_qcompleter.cpp | 10 ++++-- tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp | 7 ++-- tests/auto/qfocusevent/tst_qfocusevent.cpp | 25 +++++++------ tests/auto/qgridlayout/tst_qgridlayout.cpp | 11 +++--- tests/auto/qgroupbox/tst_qgroupbox.cpp | 6 ++-- tests/auto/qitemdelegate/tst_qitemdelegate.cpp | 9 ++--- tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp | 42 ++++++++++++---------- tests/auto/qmenu/tst_qmenu.cpp | 14 +++++--- tests/auto/qpushbutton/tst_qpushbutton.cpp | 8 +++-- tests/auto/qspinbox/tst_qspinbox.cpp | 20 ++++++----- tests/auto/qstackedlayout/tst_qstackedlayout.cpp | 13 ++++--- tests/auto/qtableview/tst_qtableview.cpp | 25 +++++++------ tests/auto/qtextbrowser/tst_qtextbrowser.cpp | 6 +++- tests/auto/qtreeview/tst_qtreeview.cpp | 5 +-- 16 files changed, 130 insertions(+), 84 deletions(-) diff --git a/tests/auto/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/qabstractbutton/tst_qabstractbutton.cpp index de2d9f4..7ee52ad 100644 --- a/tests/auto/qabstractbutton/tst_qabstractbutton.cpp +++ b/tests/auto/qabstractbutton/tst_qabstractbutton.cpp @@ -550,6 +550,7 @@ void tst_QAbstractButton::setShortcut() { QKeySequence seq( Qt::Key_A ); testWidget->setShortcut( seq ); + QApplication::setActiveWindow(testWidget); // must be active to get shortcuts for (int i = 0; !testWidget->isActiveWindow() && i < 100; ++i) { @@ -557,8 +558,8 @@ void tst_QAbstractButton::setShortcut() QApplication::instance()->processEvents(); QTest::qWait(100); } - QVERIFY(testWidget->isActiveWindow()); - + QVERIFY(testWidget->isActiveWindow()); + QTest::keyClick( testWidget, 'A' ); QTest::qWait(300); // Animate click takes time QCOMPARE(click_count, (uint)1); diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp index f49568d..82969b9 100644 --- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp +++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp @@ -100,7 +100,7 @@ private slots: #if QT_VERSION >= 0x040600 void autoIncrementId(); #endif - + void task209485_removeFromGroupInEventHandler_data(); void task209485_removeFromGroupInEventHandler(); }; @@ -333,12 +333,12 @@ void tst_QButtonGroup::testSignals() QCOMPARE(clickedSpy.count(), 1); QCOMPARE(clickedIdSpy.count(), 1); - - int expectedId = -1; + + int expectedId = -1; #if QT_VERSION >= 0x040600 expectedId = -2; #endif - + QVERIFY(clickedIdSpy.takeFirst().at(0).toInt() == expectedId); QCOMPARE(pressedSpy.count(), 1); QCOMPARE(pressedIdSpy.count(), 1); diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 928d826..7eefb26 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -1025,6 +1025,7 @@ void tst_QCompleter::multipleWidgets() #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&window); #endif + QApplication::setActiveWindow(&window); QTest::qWait(50); QTRY_VERIFY(qApp->focusWidget() == comboBox); comboBox->lineEdit()->setText("it"); @@ -1058,6 +1059,7 @@ void tst_QCompleter::focusIn() window.show(); QTest::qWait(100); window.activateWindow(); + QApplication::setActiveWindow(&window); QTest::qWait(100); QTRY_COMPARE(qApp->activeWindow(), &window); @@ -1322,8 +1324,10 @@ void tst_QCompleter::task253125_lineEditCompletion() #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&edit); #endif + QTest::qWait(10); + QApplication::setActiveWindow(&edit); + QTRY_COMPARE(QApplication::activeWindow(), &edit); - QTest::qWait(100); QTest::keyClick(&edit, 'i'); QCOMPARE(edit.completer()->currentCompletion(), QString("iota")); QTest::keyClick(edit.completer()->popup(), Qt::Key_Down); @@ -1358,7 +1362,9 @@ void tst_QCompleter::task247560_keyboardNavigation() qt_x11_wait_for_window_manager(&edit); #endif - QTest::qWait(100); + QTest::qWait(10); + QApplication::setActiveWindow(&edit); + QTRY_COMPARE(QApplication::activeWindow(), &edit); QTest::keyClick(&edit, 'r'); QTest::keyClick(edit.completer()->popup(), Qt::Key_Down); diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp index 6162be0..aa3ccb7 100644 --- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp @@ -52,6 +52,9 @@ #include #include + +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES=gui/widgets/qspinbox.h gui/widgets/qspinbox.cpp gui/widgets/qabstractspinbox.cpp gui/widgets/qabstractspinbox_p.h gui/widgets/qabstractspinbox.h @@ -772,8 +775,8 @@ void tst_QDoubleSpinBox::editingFinished() layout->addWidget(box2); testFocusWidget->show(); - QTest::qWait(100); - QVERIFY(box->isActiveWindow()); + QTest::qWait(10); + QTRY_VERIFY(box->isActiveWindow()); box->setFocus(); QSignalSpy editingFinishedSpy1(box, SIGNAL(editingFinished())); diff --git a/tests/auto/qfocusevent/tst_qfocusevent.cpp b/tests/auto/qfocusevent/tst_qfocusevent.cpp index 662f115..5ad78de 100644 --- a/tests/auto/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/qfocusevent/tst_qfocusevent.cpp @@ -56,6 +56,8 @@ #include #include +#include "../../shared/util.h" + QT_FORWARD_DECLARE_CLASS(QWidget) //TESTED_CLASS= @@ -168,6 +170,7 @@ void tst_QFocusEvent::initWidget() { // On X11 we have to ensure the event was processed before doing any checking, on Windows // this is processed straight away. + QApplication::setActiveWindow(childFocusWidgetOne); for (int i = 0; i < 1000; ++i) { if (childFocusWidgetOne->isActiveWindow() && childFocusWidgetOne->hasFocus()) @@ -243,9 +246,9 @@ void tst_QFocusEvent::checkReason_BackTab() // Now test the backtab key QTest::keyClick( childFocusWidgetOne, Qt::Key_Backtab ); - QTest::qWait(2000); + QTest::qWait(200); - QVERIFY(childFocusWidgetOne->focusOutEventRecieved); + QTRY_VERIFY(childFocusWidgetOne->focusOutEventRecieved); QVERIFY(childFocusWidgetTwo->focusInEventRecieved); QVERIFY(childFocusWidgetOne->focusOutEventLostFocus); QVERIFY(childFocusWidgetTwo->focusInEventGotFocus); @@ -265,9 +268,9 @@ void tst_QFocusEvent::checkReason_Popup() Q3PopupMenu* popupMenu = new Q3PopupMenu( testFocusWidget ); popupMenu->insertItem( "Test" ); popupMenu->popup( QPoint(0,0) ); - QTest::qWait(500); + QTest::qWait(50); - QVERIFY(childFocusWidgetOne->focusOutEventLostFocus); + QTRY_VERIFY(childFocusWidgetOne->focusOutEventLostFocus); QVERIFY( childFocusWidgetOne->hasFocus() ); QVERIFY( !childFocusWidgetOne->focusInEventRecieved ); @@ -290,11 +293,11 @@ void tst_QFocusEvent::checkReason_Popup() QMenu* popupMenu = new QMenu( testFocusWidget ); popupMenu->addMenu( "Test" ); popupMenu->popup( QPoint(0,0) ); - QTest::qWait(500); + QTest::qWait(50); - QVERIFY(childFocusWidgetOne->focusOutEventLostFocus); + QTRY_VERIFY(childFocusWidgetOne->focusOutEventLostFocus); - QVERIFY( childFocusWidgetOne->hasFocus() ); + QTRY_VERIFY( childFocusWidgetOne->hasFocus() ); QVERIFY( !childFocusWidgetOne->focusInEventRecieved ); QVERIFY( childFocusWidgetOne->focusOutEventRecieved ); QVERIFY( !childFocusWidgetTwo->focusInEventRecieved ); @@ -368,13 +371,13 @@ void tst_QFocusEvent::checkReason_focusWidget() QLineEdit edit1; QLineEdit edit2; - QVBoxLayout outerLayout; + QVBoxLayout outerLayout; outerLayout.addWidget(&frame1); outerLayout.addWidget(&frame2); window1.setLayout(&outerLayout); - - QVBoxLayout leftLayout; - QVBoxLayout rightLayout; + + QVBoxLayout leftLayout; + QVBoxLayout rightLayout; leftLayout.addWidget(&edit1); rightLayout.addWidget(&edit2); frame1.setLayout(&leftLayout); diff --git a/tests/auto/qgridlayout/tst_qgridlayout.cpp b/tests/auto/qgridlayout/tst_qgridlayout.cpp index 13d79b1..590bafa 100644 --- a/tests/auto/qgridlayout/tst_qgridlayout.cpp +++ b/tests/auto/qgridlayout/tst_qgridlayout.cpp @@ -51,6 +51,8 @@ #include #include +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES=gui/kernel/qlayout.cpp gui/kernel/qlayout.h @@ -788,8 +790,8 @@ void tst_QGridLayout::minMaxSize_data() QTest::addColumn("fixedSize"); //input and expected output QTest::addColumn("sizeinfos"); - - QTest::newRow("3x1 grid, extend to minimumSize") << QString() << 3 << 1 + + QTest::newRow("3x1 grid, extend to minimumSize") << QString() << 3 << 1 << int(QSizePolicy::Minimum) << QSize(152, 50) << (SizeInfoList() << SizeInfo(QRect(10, 10, 43, 30), QSize( 75, 75), QSize(0,0)) << SizeInfo(QRect(10 + 45, 10, 43, 30), QSize(75, 75), QSize( 0, 0)) @@ -917,13 +919,14 @@ void tst_QGridLayout::minMaxSize() #if defined(Q_WS_X11) qt_x11_wait_for_window_manager(m_toplevel); // wait for the show #endif + QTest::qWait(20); m_toplevel->adjustSize(); - QTest::qWait(200); // wait for the implicit adjustSize + QTest::qWait(20); // wait for the implicit adjustSize // If the following fails we might have to wait longer. // If that does not help there is likely a problem with the implicit adjustSize in show() if (!fixedSize.isValid()) { // Note that this can fail if the desktop has large fonts on windows. - QCOMPARE(m_toplevel->size(), m_toplevel->sizeHint()); + QTRY_COMPARE(m_toplevel->size(), m_toplevel->sizeHint()); } // We are relying on the order here... for (int pi = 0; pi < sizehinters.count(); ++pi) { diff --git a/tests/auto/qgroupbox/tst_qgroupbox.cpp b/tests/auto/qgroupbox/tst_qgroupbox.cpp index 94b70e6..7346700 100644 --- a/tests/auto/qgroupbox/tst_qgroupbox.cpp +++ b/tests/auto/qgroupbox/tst_qgroupbox.cpp @@ -49,6 +49,8 @@ #include "qgroupbox.h" +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -81,7 +83,7 @@ private slots: void toggledVsClicked(); void childrenAreDisabled(); void propagateFocus(); - + private: bool checked; qint64 timeStamp; @@ -467,7 +469,7 @@ void tst_QGroupBox::propagateFocus() box.show(); box.setFocus(); QTest::qWait(250); - QCOMPARE(qApp->focusWidget(), static_cast(&lineEdit)); + QTRY_COMPARE(qApp->focusWidget(), static_cast(&lineEdit)); } QTEST_MAIN(tst_QGroupBox) diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp index 1ef77c0..9871da3 100644 --- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp @@ -63,6 +63,8 @@ #include #include +#include "../../shared/util.h" + Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) //TESTED_CLASS= @@ -862,6 +864,8 @@ void tst_QItemDelegate::decoration() #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&table); #endif + QApplication::setActiveWindow(&table); + QTRY_COMPARE(QApplication::activeWindow(), &table); QVariant value; switch ((QVariant::Type)type) { @@ -1164,10 +1168,7 @@ void tst_QItemDelegate::task257859_finalizeEdit() QDialog dialog; QTimer::singleShot(100, &dialog, SLOT(close())); dialog.exec(); - - QTest::qWait(100); - - QVERIFY(!editor); + QTRY_VERIFY(!editor); } diff --git a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp index 78ba46b..4d5160b 100644 --- a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp @@ -63,6 +63,9 @@ #include #endif +#include "../../shared/util.h" + + QT_BEGIN_NAMESPACE #if defined(Q_WS_X11) extern void qt_x11_wait_for_window_manager(QWidget *w); @@ -1004,15 +1007,16 @@ void tst_QMdiSubWindow::setSystemMenu() qt_x11_wait_for_window_manager(&mainWindow); #endif - QVERIFY(subWindow->isVisible()); - QPoint globalPopupPos = subWindow->mapToGlobal(subWindow->contentsRect().topLeft()); + QTRY_VERIFY(subWindow->isVisible()); + QPoint globalPopupPos; // Show system menu QVERIFY(!qApp->activePopupWidget()); subWindow->showSystemMenu(); - QTest::qWait(250); - QCOMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); - QCOMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); + QTest::qWait(25); + QTRY_COMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); + QTRY_COMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), + (globalPopupPos = subWindow->mapToGlobal(subWindow->contentsRect().topLeft())) ); systemMenu->hide(); QVERIFY(!qApp->activePopupWidget()); @@ -1034,9 +1038,9 @@ void tst_QMdiSubWindow::setSystemMenu() // Show the new system menu QVERIFY(!qApp->activePopupWidget()); subWindow->showSystemMenu(); - QTest::qWait(250); - QCOMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); - QCOMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); + QTest::qWait(25); + QTRY_COMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); + QTRY_COMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); systemMenu->hide(); QVERIFY(!qApp->activePopupWidget()); @@ -1048,12 +1052,12 @@ void tst_QMdiSubWindow::setSystemMenu() QWidget *menuLabel = subWindow->maximizedSystemMenuIconWidget(); QVERIFY(menuLabel); subWindow->showSystemMenu(); - QTest::qWait(250); - QCOMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); - globalPopupPos = menuLabel->mapToGlobal(QPoint(0, menuLabel->y() + menuLabel->height())); - QCOMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); + QTest::qWait(25); + QTRY_COMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); + QCOMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), + (globalPopupPos = menuLabel->mapToGlobal(QPoint(0, menuLabel->y() + menuLabel->height())))); systemMenu->hide(); - QVERIFY(!qApp->activePopupWidget()); + QTRY_VERIFY(!qApp->activePopupWidget()); subWindow->showNormal(); #endif @@ -1064,11 +1068,11 @@ void tst_QMdiSubWindow::setSystemMenu() subWindow->showSystemMenu(); QTest::qWait(250); - QCOMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); + QTRY_COMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); // + QPoint(1, 0) because topRight() == QPoint(left() + width() -1, top()) globalPopupPos = subWindow->mapToGlobal(subWindow->contentsRect().topRight()) + QPoint(1, 0); globalPopupPos -= QPoint(systemMenu->sizeHint().width(), 0); - QCOMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); + QTRY_COMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); systemMenu->hide(); QVERIFY(!qApp->activePopupWidget()); @@ -1081,10 +1085,10 @@ void tst_QMdiSubWindow::setSystemMenu() QVERIFY(menuLabel); subWindow->showSystemMenu(); QTest::qWait(250); - QCOMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); + QTRY_COMPARE(qApp->activePopupWidget(), qobject_cast(systemMenu)); globalPopupPos = menuLabel->mapToGlobal(QPoint(menuLabel->width(), menuLabel->y() + menuLabel->height())); globalPopupPos -= QPoint(systemMenu->sizeHint().width(), 0); - QCOMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); + QTRY_COMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), globalPopupPos); #endif delete systemMenu; @@ -1902,7 +1906,7 @@ void tst_QMdiSubWindow::task_182852() mainWindow.show(); mainWindow.menuBar()->setVisible(true); qApp->setActiveWindow(&mainWindow); - + QString originalWindowTitle = QString::fromLatin1("MainWindow - [foo]"); mainWindow.setWindowTitle(originalWindowTitle); @@ -1917,7 +1921,7 @@ void tst_QMdiSubWindow::task_182852() window->showMaximized(); qApp->processEvents(); QVERIFY(window->isMaximized()); - + QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]") .arg(originalWindowTitle, window->widget()->windowTitle())); diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index ab8dd48..4a4231a 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -55,6 +55,9 @@ #include #include #include + +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -437,15 +440,16 @@ void tst_QMenu::overrideMenuAction() m->addAction(aQuit); w.show(); - QTest::qWait(200); + w.setFocus(); + QTRY_VERIFY(w.hasFocus()); //test of the action inside the menu QTest::keyClick(&w, Qt::Key_X, Qt::ControlModifier); - QCOMPARE(activated, aQuit); + QTRY_COMPARE(activated, aQuit); //test if the menu still pops out QTest::keyClick(&w, Qt::Key_F, Qt::AltModifier); - QVERIFY(m->isVisible()); + QTRY_VERIFY(m->isVisible()); delete aFileMenu; @@ -703,12 +707,12 @@ void tst_QMenu::task250673_activeMultiColumnSubMenuPosition() }; QMenu sub; - + if (sub.style()->styleHint(QStyle::SH_Menu_Scrollable, 0, &sub)) { //the style prevents the menus from getting columns QSKIP("the style doesn't support multiple columns, it makes the menu scrollable", SkipSingle); } - + sub.addAction("Sub-Item1"); QAction *subAction = sub.addAction("Sub-Item2"); diff --git a/tests/auto/qpushbutton/tst_qpushbutton.cpp b/tests/auto/qpushbutton/tst_qpushbutton.cpp index 5059578..2013258 100644 --- a/tests/auto/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/qpushbutton/tst_qpushbutton.cpp @@ -54,6 +54,8 @@ #include #include +#include "../../shared/util.h" + Q_DECLARE_METATYPE(QPushButton*) //TESTED_CLASS= @@ -413,6 +415,7 @@ void tst_QPushButton::setAccel() // The shortcut will not be activated unless the button is in a active // window and has focus + QApplication::setActiveWindow(testWidget); testWidget->setFocus(); for (int i = 0; !testWidget->isActiveWindow() && i < 1000; ++i) { testWidget->activateWindow(); @@ -421,8 +424,8 @@ void tst_QPushButton::setAccel() } QVERIFY(testWidget->isActiveWindow()); QTest::keyClick( testWidget, 'A', Qt::AltModifier ); - QTest::qWait( 500 ); - QVERIFY( click_count == 1 ); + QTest::qWait( 50 ); + QTRY_VERIFY( click_count == 1 ); QVERIFY( press_count == 1 ); QVERIFY( release_count == 1 ); QVERIFY( toggle_count == 0 ); @@ -430,6 +433,7 @@ void tst_QPushButton::setAccel() // wait 200 ms because setAccel uses animateClick. // if we don't wait this may screw up a next test. QTest::qWait(200); + QTRY_VERIFY( !testWidget->isDown() ); } void tst_QPushButton::animateClick() diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp index 73d25a2..f4d70d1 100644 --- a/tests/auto/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/qspinbox/tst_qspinbox.cpp @@ -140,7 +140,7 @@ private slots: void removeAll(); void startWithDash(); void undoRedo(); - + void specialValue(); void textFromValue(); @@ -750,11 +750,13 @@ void tst_QSpinBox::editingFinished() QSpinBox *box2 = new QSpinBox(testFocusWidget); layout->addWidget(box2); + testFocusWidget->show(); + QApplication::setActiveWindow(testFocusWidget); box->activateWindow(); - QTest::qWait(1000);//qApp->processEvents(); + QTest::qWait(100);//qApp->processEvents(); box->setFocus(); - QTRY_VERIFY(qApp->focusWidget() == box); + QTRY_COMPARE(qApp->focusWidget(), box); QSignalSpy editingFinishedSpy1(box, SIGNAL(editingFinished())); QSignalSpy editingFinishedSpy2(box2, SIGNAL(editingFinished())); @@ -910,7 +912,7 @@ void tst_QSpinBox::undoRedo() void tst_QSpinBox::specialValue() { QString specialText="foo"; - + QWidget topWidget; QVBoxLayout layout(&topWidget); SpinBox spin(&topWidget); @@ -937,7 +939,7 @@ void tst_QSpinBox::specialValue() QCOMPARE(spin.text(), QString("0")); QTest::keyClick(&spin, Qt::Key_Return); QCOMPARE(spin.text(), specialText); - + spin.setValue(50); QTest::keyClick(&spin, Qt::Key_Return); QTest::keyClick(&spin, '0'); @@ -987,17 +989,17 @@ void tst_QSpinBox::sizeHint() QVERIFY(spinBox->sizeHintRequests > 0); // Suffix - spinBox->sizeHintRequests = 0; + spinBox->sizeHintRequests = 0; spinBox->setSuffix(QLatin1String("abcdefghij")); qApp->processEvents(); - QVERIFY(spinBox->sizeHintRequests > 0); + QVERIFY(spinBox->sizeHintRequests > 0); // Range - spinBox->sizeHintRequests = 0; + spinBox->sizeHintRequests = 0; spinBox->setRange(0, 1234567890); spinBox->setValue(spinBox->maximum()); qApp->processEvents(); - QVERIFY(spinBox->sizeHintRequests > 0); + QVERIFY(spinBox->sizeHintRequests > 0); } QTEST_MAIN(tst_QSpinBox) diff --git a/tests/auto/qstackedlayout/tst_qstackedlayout.cpp b/tests/auto/qstackedlayout/tst_qstackedlayout.cpp index c6a30a5..481ee2c 100644 --- a/tests/auto/qstackedlayout/tst_qstackedlayout.cpp +++ b/tests/auto/qstackedlayout/tst_qstackedlayout.cpp @@ -47,6 +47,8 @@ #include #include +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES=gui/kernel/qlayout.cpp gui/kernel/qlayout.h @@ -149,7 +151,7 @@ void tst_QStackedLayout::testCase() QStackedLayout onStack(testWidget); QStackedLayout *testLayout = &onStack; testWidget->setLayout(testLayout); - + QSignalSpy spy(testLayout,SIGNAL(currentChanged(int))); // Nothing in layout @@ -350,12 +352,15 @@ void tst_QStackedLayout::keepFocusAfterSetCurrent() stackLayout->setCurrentIndex(0); + testWidget->show(); + QTest::qWait(25); + QApplication::setActiveWindow(testWidget); + edit1->setFocus(); - QTest::qWait(250); edit1->activateWindow(); - QTest::qWait(100); + QTest::qWait(25); - QVERIFY(edit1->hasFocus()); + QTRY_VERIFY(edit1->hasFocus()); stackLayout->setCurrentIndex(1); QVERIFY(!edit1->hasFocus()); diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 6fe2963..51d0e33 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -2334,8 +2334,10 @@ void tst_QTableView::scrollTo() QtTestTableView view; view.show(); - view.resize(columnWidth * 2, rowHeight * 2); + QSize forcedSize(columnWidth * 2, rowHeight * 2); + view.resize(forcedSize); QTest::qWait(0); + QTRY_COMPARE(view.size(), forcedSize); view.setModel(&model); view.setSpan(row, column, rowSpan, columnSpan); @@ -2910,6 +2912,7 @@ void tst_QTableView::tabFocus() window.setFocus(); QTest::qWait(100); window.activateWindow(); + QApplication::setActiveWindow(&window); QTest::qWait(100); qApp->processEvents(); @@ -2926,43 +2929,43 @@ void tst_QTableView::tabFocus() for (int i = 0; i < 2; ++i) { // tab to view QTest::keyPress(qApp->focusWidget(), Qt::Key_Tab); - QVERIFY(!window.hasFocus()); + QTRY_VERIFY(!window.hasFocus()); QVERIFY(view->hasFocus()); QVERIFY(!edit->hasFocus()); // tab to edit QTest::keyPress(qApp->focusWidget(), Qt::Key_Tab); + QTRY_VERIFY(edit->hasFocus()); QVERIFY(!window.hasFocus()); QVERIFY(!view->hasFocus()); - QVERIFY(edit->hasFocus()); } // backtab to view QTest::keyPress(qApp->focusWidget(), Qt::Key_Backtab); + QTRY_VERIFY(view->hasFocus()); QVERIFY(!window.hasFocus()); - QVERIFY(view->hasFocus()); QVERIFY(!edit->hasFocus()); // backtab to edit QTest::keyPress(qApp->focusWidget(), Qt::Key_Backtab); + QTRY_VERIFY(edit->hasFocus()); QVERIFY(!window.hasFocus()); QVERIFY(!view->hasFocus()); - QVERIFY(edit->hasFocus()); QStandardItemModel *model = new QStandardItemModel; view->setModel(model); // backtab to view QTest::keyPress(qApp->focusWidget(), Qt::Key_Backtab); + QTRY_VERIFY(view->hasFocus()); QVERIFY(!window.hasFocus()); - QVERIFY(view->hasFocus()); QVERIFY(!edit->hasFocus()); // backtab to edit QTest::keyPress(qApp->focusWidget(), Qt::Key_Backtab); + QTRY_VERIFY(edit->hasFocus()); QVERIFY(!window.hasFocus()); QVERIFY(!view->hasFocus()); - QVERIFY(edit->hasFocus()); model->insertRow(0, new QStandardItem("Hei")); model->insertRow(0, new QStandardItem("Hei")); @@ -2970,8 +2973,8 @@ void tst_QTableView::tabFocus() // backtab to view QTest::keyPress(qApp->focusWidget(), Qt::Key_Backtab); + QTRY_VERIFY(view->hasFocus()); QVERIFY(!window.hasFocus()); - QVERIFY(view->hasFocus()); QVERIFY(!edit->hasFocus()); // backtab to edit doesn't work @@ -2984,14 +2987,14 @@ void tst_QTableView::tabFocus() // backtab to edit QTest::keyPress(qApp->focusWidget(), Qt::Key_Backtab); + QTRY_VERIFY(edit->hasFocus()); QVERIFY(!window.hasFocus()); QVERIFY(!view->hasFocus()); - QVERIFY(edit->hasFocus()); QTest::keyPress(qApp->focusWidget(), Qt::Key_Tab); - QVERIFY(view->hasFocus()); + QTRY_VERIFY(view->hasFocus()); QTest::keyPress(qApp->focusWidget(), Qt::Key_Tab); - QVERIFY(edit->hasFocus()); + QTRY_VERIFY(edit->hasFocus()); delete model; } diff --git a/tests/auto/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/qtextbrowser/tst_qtextbrowser.cpp index 0311900..966e9c9 100644 --- a/tests/auto/qtextbrowser/tst_qtextbrowser.cpp +++ b/tests/auto/qtextbrowser/tst_qtextbrowser.cpp @@ -49,6 +49,8 @@ #include #include +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -64,9 +66,11 @@ public: #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(this); #endif + QApplication::setActiveWindow(this); activateWindow(); setFocus(); - QTest::qWait(100); + QTest::qWait(50); + QTRY_VERIFY(hasFocus()); } virtual QVariant loadResource(int type, const QUrl &name); diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index fae4b26..f42d5f6 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -3354,7 +3354,7 @@ void tst_QTreeView::task246536_scrollbarsNotWorking() o.count = 0; tree.verticalScrollBar()->setValue(50); QTest::qWait(100); - QVERIFY(o.count > 0); + QTRY_VERIFY(o.count > 0); } void tst_QTreeView::task250683_wrongSectionSize() @@ -3404,8 +3404,9 @@ void tst_QTreeView::task239271_addRowsWithFirstColumnHidden() QStandardItem sub1("sub1"), sub11("sub11"); root0.appendRow(QList() << &sub1 << &sub11); - QTest::qWait(200); + QTest::qWait(20); //items in the 2nd column should have been painted + QTRY_VERIFY(!delegate.paintedIndexes.isEmpty()); QVERIFY(delegate.paintedIndexes.contains(sub00.index())); QVERIFY(delegate.paintedIndexes.contains(sub11.index())); } -- cgit v0.12 From 2075cb4fc05dc077db1bb9437dd0fcf75605fe9c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 8 Sep 2009 12:31:10 +0200 Subject: doc: Fixed several qdoc errors. That's the last of them... for now. --- doc/src/frameworks-technologies/gestures.qdoc | 8 ++++---- src/gui/kernel/qstandardgestures.cpp | 6 ++++++ src/gui/painting/qpaintengine.cpp | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/src/frameworks-technologies/gestures.qdoc b/doc/src/frameworks-technologies/gestures.qdoc index 317bb31..7929331 100644 --- a/doc/src/frameworks-technologies/gestures.qdoc +++ b/doc/src/frameworks-technologies/gestures.qdoc @@ -81,7 +81,7 @@ \table \header \o New State \o Description \o QGesture Actions on Entering this State - \row \o Qt::NoGesture \o Initial value \o emit \l {QGesture::cancelled()}{cancelled()} + \row \o Qt::NoGesture \o Initial value \o emit \l {QGesture::canceled()}{canceled()} \row \o Qt::GestureStarted \o A continuous gesture has started \o emit \l{QGesture::started()}{started()} and emit \l{QGesture::triggered()}{triggered()} \row \o Qt::GestureUpdated \o A gesture continues \o emit \l{QGesture::triggered()}{triggered()} \row \o Qt::GestureFinished \o A gesture has finished. \o emit \l{QGesture::finished()}{finished()} @@ -130,13 +130,13 @@ then the gesture is considered to have finished whether or not the appropriate touch or mouse event has occurred. Also if a large jump in the position of the event occurs, as calculated by the \l {QPoint::manhattanLength()}{manhattanLength()} - call, then the gesture is cancelled by calling \l{QGesture::reset()}{reset()} + call, then the gesture is canceled by calling \l{QGesture::reset()}{reset()} which tidies up and uses \l{QGesture::updateState()}{updateState()} to - change state to NoGesture which will result in the \l{QGesture::cancelled()}{cancelled()} + change state to NoGesture which will result in the \l{QGesture::canceled()}{canceled()} signal being emitted by the recognizer. ImageWidget handles the signals by connecting the slots to the signals, - although \c cancelled() is not connected here. + although \c canceled() is not connected here. \snippet doc/src/snippets/gestures/imageviewer/imagewidget.cpp imagewidget-connect diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 8e76715..b3e137d 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -535,6 +535,12 @@ void QPinchGesture::reset() QGesture::reset(); } +/*! \enum QPinchGesture::WhatChange + \value ScaleFactorChanged + \value RotationAngleChanged + \value CenterPointChanged +*/ + /*! \property QPinchGesture::whatChanged diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp index f442788..42da637 100644 --- a/src/gui/painting/qpaintengine.cpp +++ b/src/gui/painting/qpaintengine.cpp @@ -386,6 +386,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw \value User First user type ID \value MaxUser Last user type ID \value OpenGL2 + \value PaintBuffer */ /*! -- cgit v0.12 From 9a90fcca3e9a9a49cee228054017ff7d15645082 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 3 Sep 2009 13:41:19 +0200 Subject: Animations of redocking widgets are broken The problem is that when starting an animation, we delay it by starting a 0-timer. That doesn't work on windows while dragging a native window. Task-number: 260772 Reviewed-by: prasanth --- src/corelib/animation/qabstractanimation.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index e1b8509..31f0841 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -157,6 +157,19 @@ #define DEFAULT_TIMER_INTERVAL 16 +#ifdef Q_WS_WIN + /// Fix for Qt 4.7 + //on windows if you're currently dragging a widget an inner eventloop was started by the system + //to make sure that this timer is getting fired, we need to make sure to use the system timers + //that will send a WM_TIMER event. We do that by settings the timer interval to 11 + //It is 11 because QEventDispatcherWin32Private::registerTimer specifically checks if the interval + //is greater than 10 to determine if it should use a system timer (or the multimedia timer). +#define STARTSTOP_TIMER_DELAY 11 +#else +#define STARTSTOP_TIMER_DELAY 0 +#endif + + QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QThreadStorage, unifiedTimer) @@ -217,7 +230,7 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation) if (animations.contains(animation) || animationsToStart.contains(animation)) return; animationsToStart << animation; - startStopAnimationTimer.start(0, this); // we delay the check if we should start/stop the global timer + startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); // we delay the check if we should start/stop the global timer } void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation) @@ -233,7 +246,7 @@ void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation) } else { animationsToStart.removeOne(animation); } - startStopAnimationTimer.start(0, this); // we delay the check if we should start/stop the global timer + startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); // we delay the check if we should start/stop the global timer } -- cgit v0.12 From 9d9b7f53750dce2da88d7d11d312b4b36250b5c5 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 8 Sep 2009 12:59:44 +0200 Subject: Fixes a regression in QListView in 4.6 regarding the selection In icon mode, if you click on the viewport (with extended selection), the selection should be cleared when you release the mouse button. Reviewed-by: ogoffart --- src/gui/itemviews/qabstractitemview.cpp | 4 ++++ tests/auto/qlistview/tst_qlistview.cpp | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 52529ff..99e9aeb 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1661,6 +1661,10 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event) EditTrigger trigger = (selectedClicked ? SelectedClicked : NoEditTriggers); bool edited = edit(index, trigger, event); + //in the case the user presses on no item we might decide to clear the selection + if (d->selectionModel && !index.isValid()) + d->selectionModel->select(QModelIndex(), selectionCommand(index, event)); + setState(NoState); if (click) { diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 2be1a03..2831747 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -113,6 +113,7 @@ private slots: void task254449_draggingItemToNegativeCoordinates(); void keyboardSearch(); void shiftSelectionWithNonUniformItemSizes(); + void clickOnViewportClearsSelection(); }; // Testing get/set functions @@ -1733,5 +1734,34 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes() } } +void tst_QListView::clickOnViewportClearsSelection() +{ + QStringList items; + items << "Text1"; + QStringListModel model(items); + QListView view; + view.setModel(&model); + view.setSelectionMode(QListView::ExtendedSelection); + + view.selectAll(); + QModelIndex index = model.index(0); + QCOMPARE(view.selectionModel()->selectedIndexes().count(), 1); + QVERIFY(view.selectionModel()->isSelected(index)); + + //we try to click outside of the index + const QPoint point = view.visualRect(index).bottomRight() + QPoint(10,10); + + QTest::mousePress(view.viewport(), Qt::LeftButton, 0, point); + //at this point, the selection shouldn't have changed + QCOMPARE(view.selectionModel()->selectedIndexes().count(), 1); + QVERIFY(view.selectionModel()->isSelected(index)); + + QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, point); + //now the selection should be cleared + QVERIFY(!view.selectionModel()->hasSelection()); + +} + + QTEST_MAIN(tst_QListView) #include "tst_qlistview.moc" -- cgit v0.12 From a9572a07f1512fe1266629632e5c4f1613abeb8d Mon Sep 17 00:00:00 2001 From: Adriano Rezende Date: Tue, 8 Sep 2009 13:15:49 +0200 Subject: Fixed QLineEdit to correctly adjust the horizontal scrolling The widget needs to use the naturalTextWidth to adjust the horizontal scrolling, otherwise it will not fit correctly the text in the visible area when resized. Merge-request: 1410 Reviewed-by: Alan Alpert --- src/gui/widgets/qlinecontrol_p.h | 6 ++++++ src/gui/widgets/qlineedit.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index a81f138..f46abf1 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -109,6 +109,7 @@ public: int width() const; int height() const; int ascent() const; + qreal naturalTextWidth() const; void setSelection(int start, int length); @@ -410,6 +411,11 @@ inline int QLineControl::width() const return qRound(m_textLayout.lineAt(0).width()) + 1; } +inline qreal QLineControl::naturalTextWidth() const +{ + return m_textLayout.lineAt(0).naturalTextWidth(); +} + inline int QLineControl::height() const { return qRound(m_textLayout.lineAt(0).height()) + 1; diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 3065c7f..9571860 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1808,7 +1808,7 @@ void QLineEdit::paintEvent(QPaintEvent *) // (cix). int minLB = qMax(0, -fm.minLeftBearing()); int minRB = qMax(0, -fm.minRightBearing()); - int widthUsed = d->control->width() + minRB; + int widthUsed = qRound(d->control->naturalTextWidth()) + 1 + minRB; if ((minLB + widthUsed) <= lineRect.width()) { // text fits in lineRect; use hscroll for alignment switch (va & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) { -- cgit v0.12 From 0399ace27c7441b4454911da3aaa4ea17b931b99 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 8 Sep 2009 21:36:42 +1000 Subject: Add license header. Reviewed-by: Trust Me --- .../src_corelib_statemachine_qstatemachine.cpp | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp index 128799f..8933ef3 100644 --- a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp +++ b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + //! [simple state machine] QPushButton button; -- cgit v0.12