Merge remote branch 'gerrit/master' into refactor

Conflicts:
	examples/opengl/cube/main.cpp
	examples/widgets/applicationicon/main.cpp
	examples/widgets/orientation/main.cpp
	src/gui/image/qicon.cpp
	src/gui/image/qimage.h
	src/gui/image/qpixmap.h
	src/gui/image/qpixmap_mac.cpp
	src/gui/kernel/qapplication.cpp
	src/gui/kernel/qpalette.cpp
	src/gui/kernel/qwidget.cpp
	src/gui/styles/qmacstyle_mac.mm
	src/gui/widgets/qmenubar.cpp
	src/gui/widgets/qslider.cpp
	src/opengl/qwindowsurface_gl.cpp
	tests/auto/qvariant/qvariant.pro
	tests/benchmarks/corelib/kernel/qobject/qobject.pro
	tests/benchmarks/gui/animation/qanimation/qanimation.pro
	tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro
	tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro
	tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro
	tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro
	tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro
	tests/benchmarks/gui/image/qimagereader/qimagereader.pro
	tests/benchmarks/gui/itemviews/qtableview/qtableview.pro
	tests/benchmarks/gui/kernel/qapplication/qapplication.pro
	tests/benchmarks/gui/kernel/qwidget/qwidget.pro
	tests/benchmarks/gui/painting/qpainter/qpainter.pro
	tests/benchmarks/gui/painting/qtbench/qtbench.pro
	tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
	tests/benchmarks/gui/text/qtext/qtext.pro

Change-Id: I4b911c795ecb29d73b6a7fd18819711b49478a30
This commit is contained in:
Samuel Rødal 2011-07-21 14:42:46 +02:00
commit 7b3b6b5afa
261 changed files with 44317 additions and 24439 deletions

View File

@ -832,7 +832,7 @@ foreach my $lib (@modules_to_sync) {
my @subdirs = ("$out_basedir/include/$lib");
foreach my $subdir (@subdirs) {
if (opendir DIR, $subdir) {
while(my $t = readdir(DIR)) {
foreach my $t (sort readdir(DIR)) {
my $file = "$subdir/$t";
if(-d $file) {
push @subdirs, $file unless($t eq "." || $t eq "..");
@ -895,7 +895,7 @@ foreach my $lib (@modules_to_sync) {
my @subdirs = ($headers_dir);
foreach my $subdir (@subdirs) {
opendir DIR, $subdir or next;
while(my $t = readdir(DIR)) {
foreach my $t (sort readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
!($t eq "..") && !($t eq ".obj") &&
!($t eq ".moc") && !($t eq ".rcc") &&
@ -1145,7 +1145,7 @@ if($check_includes) {
my @subdirs = ($modules{$lib});
foreach my $subdir (@subdirs) {
opendir DIR, $subdir or die "Huh, directory ".$subdir." cannot be opened.";
while(my $t = readdir(DIR)) {
foreach my $t (sort readdir(DIR)) {
push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
!($t eq "..") && !($t eq ".obj") &&
!($t eq ".moc") && !($t eq ".rcc") &&

3
dist/changes-4.8.0 vendored
View File

@ -100,7 +100,10 @@ QtScript
--------
- Deprecated qScriptValueFromQMetaObject, qScriptValueToValue, qScriptValueFromValue
QtSql
-----
- Update sqlite to 3.7.7.1
****************************************************************************
* Database Drivers *
****************************************************************************

2
dist/changes-5.0.0 vendored
View File

@ -38,6 +38,8 @@ Third party components
QtCore
------
* drop a bogus QChar::NoCategory enum value; the proper QChar::Other_NotAssigned
value is returned for an unassigned codepoints now.
QtGui
-----

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "rectbutton.h"
#include <QPainter>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef RECTBUTTON_H
#define RECTBUTTON_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "geometryengine.h"
#include <QVector2D>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef GEOMETRYENGINE_H
#define GEOMETRYENGINE_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QApplication>
#include <QLabel>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "mainwidget.h"
#include "geometryengine.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MAINWIDGET_H
#define MAINWIDGET_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>

View File

@ -120,7 +120,7 @@ void CharacterWidget::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
lastKey = (event->y()/squareSize)*columns + event->x()/squareSize;
if (QChar(lastKey).category() != QChar::NoCategory)
if (QChar(lastKey).category() != QChar::Other_NotAssigned)
emit characterSelected(QString(QChar(lastKey)));
update();
}

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "elidedlabel.h"
#include <QPainter>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef ELIDEDLABEL_H
#define ELIDEDLABEL_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "testwidget.h"
#include <QtWidgets/QApplication>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "testwidget.h"
#include "elidedlabel.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef TESTWIDGET_H
#define TESTWIDGET_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "buttonwidget.h"
#include <QSignalMapper>
#include <QGridLayout>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef BUTTONWIDGET_H
#define BUTTONWIDGET_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "buttonwidget.h"
#include "mcevibrator.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "mcevibrator.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MCEVIBRATOR_H
#define MCEVIBRATOR_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtWidgets/QApplication>
#include "mainwindow.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "mainwindow.h"
#include "ui_landscape.h"
#include "ui_portrait.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtGui/QApplication>
#include "mainwindow.h"

View File

@ -1,7 +1,47 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtGui/QMenuBar>
#include "mainwindow.h"
#include "vibrationsurface.h"
#include "XQVibra.h"
#include "xqvibra.h"
//! [0]
MainWindow::MainWindow(QWidget *parent)

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "vibrationsurface.h"
#include <QtGui/QPainter>
#include <QtCore/QLine>

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef TOUCHAREA_H
#define TOUCHAREA_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "xqvibra.h"
#include "xqvibra_p.h"

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef XQVIBRA_H
#define XQVIBRA_H

View File

@ -1,3 +1,43 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "xqvibra_p.h"
const int KDefaultIntensity = 0xFF;

View File

@ -1,9 +1,49 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * 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.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "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 THE COPYRIGHT
** OWNER 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."
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef XQVIBRA_P_H
#define XQVIBRA_P_H
// INCLUDES
#include "xqvibra.h"
#include <HWRMVibra.h>
#include <hwrmvibra.h>
#include <QTimer>
// CLASS DECLARATION

View File

@ -2289,7 +2289,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
ret.prepend(item);
foreach (const QString &dep, dependees[item]) {
QSet<QString> &dset = dependencies[dep];
dset.remove(item);
dset.remove(rootSet.at(i)); // *Don't* use 'item' - rootSet may have changed!
if (dset.isEmpty())
rootSet << dep;
}

View File

@ -52,8 +52,6 @@ typedef enum {
typedef enum
{
HB_NoCategory,
HB_Mark_NonSpacing, /* Mn */
HB_Mark_SpacingCombining, /* Mc */
HB_Mark_Enclosing, /* Me */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1788,33 +1788,6 @@ bool QTextDecoder::hasFailure() const
return state.invalidChars != 0;
}
/*!
\fn QTextCodec *QTextCodec::codecForContent(const char *str, int size)
This functionality is no longer provided by Qt. This
compatibility function always returns a null pointer.
*/
/*!
\fn QTextCodec *QTextCodec::codecForName(const char *hint, int accuracy)
Use the codecForName(const QByteArray &) overload instead.
*/
/*!
\fn QTextCodec *QTextCodec::codecForIndex(int i)
Use availableCodecs() or availableMibs() instead and iterate
through the resulting list.
*/
/*!
\fn QByteArray QTextCodec::mimeName() const
Use name() instead.
*/
QT_END_NAMESPACE
#endif // QT_NO_TEXTCODEC

View File

@ -832,126 +832,6 @@ QT_BEGIN_NAMESPACE
\sa qMin(), qMax()
*/
/*!
\typedef Q_INT8
\relates <QtGlobal>
\compat
Use \l qint8 instead.
*/
/*!
\typedef Q_UINT8
\relates <QtGlobal>
\compat
Use \l quint8 instead.
*/
/*!
\typedef Q_INT16
\relates <QtGlobal>
\compat
Use \l qint16 instead.
*/
/*!
\typedef Q_UINT16
\relates <QtGlobal>
\compat
Use \l quint16 instead.
*/
/*!
\typedef Q_INT32
\relates <QtGlobal>
\compat
Use \l qint32 instead.
*/
/*!
\typedef Q_UINT32
\relates <QtGlobal>
\compat
Use \l quint32 instead.
*/
/*!
\typedef Q_INT64
\relates <QtGlobal>
\compat
Use \l qint64 instead.
*/
/*!
\typedef Q_UINT64
\relates <QtGlobal>
\compat
Use \l quint64 instead.
*/
/*!
\typedef Q_LLONG
\relates <QtGlobal>
\compat
Use \l qint64 instead.
*/
/*!
\typedef Q_ULLONG
\relates <QtGlobal>
\compat
Use \l quint64 instead.
*/
/*!
\typedef Q_LONG
\relates <QtGlobal>
\compat
Use \c{void *} instead.
*/
/*!
\typedef Q_ULONG
\relates <QtGlobal>
\compat
Use \c{void *} instead.
*/
/*! \fn bool qSysInfo(int *wordSize, bool *bigEndian)
\relates <QtGlobal>
Use QSysInfo::WordSize and QSysInfo::ByteOrder instead.
*/
/*!
\fn bool qt_winUnicode()
\relates <QtGlobal>
This function always returns true.
\sa QSysInfo
*/
/*!
\fn int qWinVersion()
\relates <QtGlobal>
Use QSysInfo::WindowsVersion instead.
\sa QSysInfo
*/
/*!
\fn int qMacVersion()
\relates <QtGlobal>

View File

@ -1158,16 +1158,15 @@ typedef double qreal;
template <typename T>
Q_DECL_CONSTEXPR inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
Q_DECL_CONSTEXPR inline int qRound(qreal d)
{ return d >= qreal(0.0) ? int(d + qreal(0.5)) : int(d - int(d-1) + qreal(0.5)) + int(d-1); }
Q_DECL_CONSTEXPR inline int qRound(double d)
{ return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); }
Q_DECL_CONSTEXPR inline int qRound(float d)
{ return d >= 0.0f ? int(d + 0.5f) : int(d - int(d-1) + 0.5f) + int(d-1); }
#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
Q_DECL_CONSTEXPR inline qint64 qRound64(double d)
{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qreal(qint64(d-1)) + 0.5) + qint64(d-1); }
#else
Q_DECL_CONSTEXPR inline qint64 qRound64(qreal d)
{ return d >= qreal(0.0) ? qint64(d + qreal(0.5)) : qint64(d - qreal(qint64(d-1)) + qreal(0.5)) + qint64(d-1); }
#endif
{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - double(qint64(d-1)) + 0.5) + qint64(d-1); }
Q_DECL_CONSTEXPR inline qint64 qRound64(float d)
{ return d >= 0.0f ? qint64(d + 0.5f) : qint64(d - float(qint64(d-1)) + 0.5f) + qint64(d-1); }
template <typename T>
Q_DECL_CONSTEXPR inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }

View File

@ -611,33 +611,6 @@
\omitvalue DockWidgetArea_Mask
*/
/*!
\enum Qt::BackgroundMode
\compat
\value FixedColor
\value FixedPixmap
\value NoBackground
\value PaletteForeground
\value PaletteButton
\value PaletteLight
\value PaletteMidlight
\value PaletteDark
\value PaletteMid
\value PaletteText
\value PaletteBrightText
\value PaletteBase
\value PaletteBackground
\value PaletteShadow
\value PaletteHighlight
\value PaletteHighlightedText
\value PaletteButtonText
\value PaletteLink
\value PaletteLinkVisited
\value X11ParentRelative
*/
/*!
\enum Qt::ImageConversionFlag
@ -693,17 +666,6 @@
rendering operation for example.
*/
/*! \enum Qt::GUIStyle
\compat
\value WindowsStyle
\value MotifStyle
\value MacStyle
\value Win3Style
\value PMStyle
*/
/*!
\enum Qt::UIEffect
@ -755,21 +717,6 @@
\sa QSize::scale(), QImage::scaled()
*/
/*! \typedef Qt::ScaleMode
\compat
Use Qt::AspectRatioMode instead.
The enum values have been renamed as follows:
\table
\row \i Old enum value \i New enum value
\row \i Qt::ScaleFree \i Qt::IgnoreAspectRatio
\row \i Qt::ScaleMin \i Qt::KeepAspectRatio
\row \i Qt::ScaleMax \i Qt::KeepAspectRatioByExpanding
\endtable
*/
/*! \enum Qt::TransformationMode
This enum type defines whether image transformations (e.g.,
@ -1763,26 +1710,6 @@
This enum is defined in the \c <QTextDocument> header file.
*/
/*!
\enum Qt::ButtonState_enum
\compat
\value ShiftButton
\value ControlButton
\value AltButton
\value MetaButton
\value Keypad
\value KeyButtonMask
Use Qt::KeyboardModifier instead.
*/
/*!
\typedef Qt::ButtonState
\compat
Use Qt::KeyboardModifier instead.
*/
/*!
\enum Qt::CheckState
@ -2201,44 +2128,6 @@
TargetMoveAction is not used on the Mac.
*/
/*! \typedef Qt::ToolBarDock
\compat
Use Qt::Dock instead.
*/
/*!
\enum Qt::Dock
\compat
Each dock window can be in one of the following positions:
\value DockUnmanaged not managed by a Q3MainWindow.
\value DockTornOff the dock window floats as its own top level
window which always stays on top of the main window.
\value DockTop above the central widget, below the menu bar.
\value DockBottom below the central widget, above the status bar.
\value DockRight to the right of the central widget.
\value DockLeft to the left of the central widget.
\value DockMinimized the dock window is not shown (this is
effectively a 'hidden' dock area); the handles of all minimized
dock windows are drawn in one row below the menu bar.
\omitvalue Bottom
\omitvalue Left
\omitvalue Minimized
\omitvalue Right
\omitvalue Top
\omitvalue TornOff
\omitvalue Unmanaged
*/
/*!
\enum Qt::AnchorAttribute
@ -2338,19 +2227,6 @@
as the intersection of closed shapes.
*/
/*!
\enum Qt::PaintUnit
\compat
\value PixelUnit
\value LoMetricUnit Obsolete
\value HiMetricUnit Obsolete
\value LoEnglishUnit Obsolete
\value HiEnglishUnit Obsolete
\value TwipsUnit Obsolete
*/
/*!
\enum Qt::TextFormat
@ -2478,13 +2354,6 @@
\omitvalue whatsThisCursor
*/
/*!
\typedef Qt::TextFlags
\compat
Use Qt::TextFlag instead.
*/
/*!
\enum Qt::LayoutDirection

View File

@ -487,11 +487,6 @@ void QDataStream::setStatus(Status status)
q_status = status;
}
/*!\fn bool QDataStream::eof() const
Use atEnd() instead.
*/
/*!
\fn int QDataStream::byteOrder() const
@ -523,24 +518,6 @@ void QDataStream::setByteOrder(ByteOrder bo)
}
/*!
\fn bool QDataStream::isPrintableData() const
In Qt 4, this function always returns false.
\sa setPrintableData()
*/
/*!
\fn void QDataStream::setPrintableData(bool enable)
In Qt 3, this function enabled output in a human-readable
format if \a enable was false.
In Qt 4, QDataStream no longer provides a human-readable output.
This function does nothing.
*/
/*!
\enum QDataStream::Version

View File

@ -1036,11 +1036,6 @@ bool QFile::open(OpenMode mode)
return false;
}
/*! \fn QFile::open(OpenMode, FILE*)
Use open(FILE *, OpenMode) instead.
*/
/*!
\overload
@ -1158,11 +1153,6 @@ bool QFile::open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
return false;
}
/*! \fn QFile::open(OpenMode, int)
Use open(int, OpenMode) instead.
*/
/*!
\overload
@ -1399,18 +1389,6 @@ bool QFile::unmap(uchar *address)
return false;
}
/*!
\fn QString QFile::name() const
Use fileName() instead.
*/
/*!
\fn void QFile::setName(const QString &name)
Use setFileName() instead.
*/
/*!
Sets the file size (in bytes) \a sz. Returns true if the file if the
resize succeeds; false otherwise. If \a sz is larger than the file

View File

@ -1318,64 +1318,6 @@ void QFileInfo::setCaching(bool enable)
d->cache_enabled = enable;
}
/*!
\fn QString QFileInfo::baseName(bool complete)
Use completeBaseName() or the baseName() overload that takes no
parameters instead.
*/
/*!
\fn QString QFileInfo::extension(bool complete = true) const
Use completeSuffix() or suffix() instead.
*/
/*!
\fn QString QFileInfo::absFilePath() const
Use absoluteFilePath() instead.
*/
/*!
\fn QString QFileInfo::dirPath(bool absPath) const
Use absolutePath() if the absolute path is wanted (\a absPath
is true) or path() if it's not necessary (\a absPath is false).
*/
/*!
\fn bool QFileInfo::convertToAbs()
Use makeAbsolute() instead.
*/
/*!
\enum QFileInfo::Permission
\compat
\value ReadOwner
\value WriteOwner
\value ExeOwner
\value ReadUser
\value WriteUser
\value ExeUser
\value ReadGroup
\value WriteGroup
\value ExeGroup
\value ReadOther
\value WriteOther
\value ExeOther
*/
/*!
\fn bool QFileInfo::permission(PermissionSpec permissions) const
\compat
Use permission() instead.
*/
/*!
\typedef QFileInfoList
\relates QFileInfo

View File

@ -369,8 +369,7 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo
entryFlags &= ~LinkType;
#if !defined(Q_OS_WINCE)
if ((fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT)
&& (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK
|| findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) {
&& (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) {
entryFlags |= LinkType;
}
#endif

View File

@ -242,21 +242,6 @@ QIODevicePrivate::~QIODevicePrivate()
\sa QBuffer QFile QTcpSocket
*/
/*!
\typedef QIODevice::Offset
\compat
Use \c qint64 instead.
*/
/*!
\typedef QIODevice::Status
\compat
Use QIODevice::OpenMode instead, or see the documentation for
specific devices.
*/
/*!
\enum QIODevice::OpenModeFlag
@ -1664,131 +1649,6 @@ QString QIODevice::errorString() const
\sa read() write()
*/
/*!
\fn QIODevice::Offset QIODevice::status() const
For device specific error handling, please refer to the
individual device documentation.
\sa qobject_cast()
*/
/*!
\fn QIODevice::Offset QIODevice::at() const
Use pos() instead.
*/
/*!
\fn bool QIODevice::at(Offset offset)
Use seek(\a offset) instead.
*/
/*! \fn int QIODevice::flags() const
Use openMode() instead.
*/
/*! \fn int QIODevice::getch()
Use getChar() instead.
*/
/*!
\fn bool QIODevice::isAsynchronous() const
This functionality is no longer available. This function always
returns true.
*/
/*!
\fn bool QIODevice::isBuffered() const
Use !(openMode() & QIODevice::Unbuffered) instead.
*/
/*!
\fn bool QIODevice::isCombinedAccess() const
Use openMode() instead.
*/
/*!
\fn bool QIODevice::isDirectAccess() const
Use !isSequential() instead.
*/
/*!
\fn bool QIODevice::isInactive() const
Use isOpen(), isReadable(), or isWritable() instead.
*/
/*!
\fn bool QIODevice::isRaw() const
Use openMode() instead.
*/
/*!
\fn bool QIODevice::isSequentialAccess() const
Use isSequential() instead.
*/
/*!
\fn bool QIODevice::isSynchronous() const
This functionality is no longer available. This function always
returns false.
*/
/*!
\fn bool QIODevice::isTranslated() const
Use openMode() instead.
*/
/*!
\fn bool QIODevice::mode() const
Use openMode() instead.
*/
/*! \fn int QIODevice::putch(int ch)
Use putChar(\a ch) instead.
*/
/*! \fn int QIODevice::ungetch(int ch)
Use ungetChar(\a ch) instead.
*/
/*!
\fn quint64 QIODevice::readBlock(char *data, quint64 size)
Use read(\a data, \a size) instead.
*/
/*! \fn int QIODevice::state() const
Use isOpen() instead.
*/
/*!
\fn qint64 QIODevice::writeBlock(const char *data, quint64 size)
Use write(\a data, \a size) instead.
*/
/*!
\fn qint64 QIODevice::writeBlock(const QByteArray &data)
Use write(\a data) instead.
*/
#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, QIODevice::OpenMode modes)

View File

@ -6208,158 +6208,6 @@ bool QUrl::isParentOf(const QUrl &childUrl) const
&& childPath.length() > ourPath.length() && childPath.at(ourPath.length()) == QLatin1Char('/'))));
}
/*!
\fn void QUrl::setProtocol(const QString &s)
Use setScheme() instead.
*/
/*!
\fn void QUrl::setUser(const QString &s)
Use setUserName() instead.
*/
/*!
\fn bool QUrl::hasUser() const
Use !userName().isEmpty() instead.
*/
/*!
\fn bool QUrl::hasPassword() const
Use !password().isEmpty() instead.
*/
/*!
\fn bool QUrl::hasHost() const
Use !host().isEmpty() instead.
*/
/*!
\fn bool QUrl::hasPort() const
Use port() != -1 instead.
*/
/*!
\fn bool QUrl::hasPath() const
Use !path().isEmpty() instead.
*/
/*!
\fn void QUrl::setQuery(const QString &txt)
Use setEncodedQuery() instead.
*/
/*!
\fn void QUrl::setRef(const QString &txt)
Use setFragment() instead.
*/
/*!
\fn bool QUrl::hasRef() const
Use !fragment().isEmpty() instead.
*/
/*!
\fn void QUrl::addPath(const QString &p)
Use setPath() instead.
*/
/*!
\fn void QUrl::setFileName(const QString &txt)
Use setPath() instead.
*/
/*!
\fn void QUrl::decode(QString &url)
Use fromPercentEncoding() instead.
*/
/*!
\fn void QUrl::encode(QString &url)
Use toPercentEncoding() instead.
*/
/*!
\fn bool QUrl::cdUp()
Use resolved("..") instead.
\oldcode
QUrl url("http://example.com/Developer/");
url.cdUp();
\newcode
QUrl url("http://example.com/Developer/");
url = url.resolved("..");
\endcode
*/
/*!
\fn bool QUrl::isRelativeUrl(const QString &url)
Use isRelative() instead.
*/
/*!
\fn void QUrl::reset()
Use clear() instead.
*/
/*!
\fn QUrl::operator QString() const
Use toString() instead.
*/
/*!
\fn QString QUrl::protocol() const
Use scheme() instead.
*/
/*!
\fn QString QUrl::user() const
Use userName() instead.
*/
/*!
\fn QString QUrl::query() const
Use encodedQuery() instead.
*/
/*!
\fn QString QUrl::ref() const
Use fragment() instead.
*/
/*!
\fn QString QUrl::fileName() const
Use QFileInfo(path()).fileName() instead.
*/
/*!
\fn QString QUrl::dirPath() const
Use QFileInfo(path()).absolutePath() or QFileInfo(path()) instead.
*/
#ifndef QT_NO_DATASTREAM
/*! \relates QUrl

View File

@ -506,14 +506,6 @@ QChildEvent::~QChildEvent()
*/
/*!
\fn bool QChildEvent::inserted() const
\compat
A child has been inserted if the event's type() is ChildInserted.
*/
/*!
\class QDynamicPropertyChangeEvent
\since 4.2

View File

@ -3774,67 +3774,6 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
}
#endif
/*!
\fn void QObject::insertChild(QObject *object)
Use setParent() instead, i.e., call object->setParent(this).
*/
/*!
\fn void QObject::removeChild(QObject *object)
Use setParent() instead, i.e., call object->setParent(0).
*/
/*!
\fn bool QObject::isA(const char *className) const
Compare \a className with the object's metaObject()->className() instead.
*/
/*!
\fn const char *QObject::className() const
Use metaObject()->className() instead.
*/
/*!
\fn const char *QObject::name() const
Use objectName() instead.
*/
/*!
\fn const char *QObject::name(const char *defaultName) const
Use objectName() instead.
*/
/*!
\fn void QObject::setName(const char *name)
Use setObjectName() instead.
*/
/*!
\fn bool QObject::checkConnectArgs(const char *signal, const
QObject *object, const char *method)
Use QMetaObject::checkConnectArgs() instead.
*/
/*!
\fn QByteArray QObject::normalizeSignalSlot(const char *signalSlot)
Use QMetaObject::normalizedSignature() instead.
*/
/*!
\fn const char *QMetaObject::superClassName() const
\internal
*/
/*!
\macro Q_CLASSINFO(Name, Value)
\relates QObject

View File

@ -2576,14 +2576,6 @@ QVariantList QVariant::toList() const
return qVariantToHelper<QVariantList>(d, List, handler);
}
/*! \fn QVariant::canCast(Type t) const
Use canConvert() instead.
*/
/*! \fn QVariant::cast(Type t)
Use convert() instead.
*/
static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] =
{
@ -2922,132 +2914,6 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
}
#endif
/*!
\fn int &QVariant::asInt()
Use toInt() instead.
*/
/*!
\fn uint &QVariant::asUInt()
Use toUInt() instead.
*/
/*!
\fn qlonglong &QVariant::asLongLong()
Use toLongLong() instead.
*/
/*!
\fn qulonglong &QVariant::asULongLong()
Use toULongLong() instead.
*/
/*!
\fn bool &QVariant::asBool()
Use toBool() instead.
*/
/*!
\fn double &QVariant::asDouble()
Use toDouble() instead.
*/
/*!
\fn QByteArray &QVariant::asByteArray()
Use toByteArray() instead.
*/
/*!
\fn QBitArray &QVariant::asBitArray()
Use toBitArray() instead.
*/
/*!
\fn QString &QVariant::asString()
Use toString() instead.
*/
/*!
\fn QStringList &QVariant::asStringList()
Use toStringList() instead.
*/
/*!
\fn QDate &QVariant::asDate()
Use toDate() instead.
*/
/*!
\fn QTime &QVariant::asTime()
Use toTime() instead.
*/
/*!
\fn QDateTime &QVariant::asDateTime()
Use toDateTime() instead.
*/
/*!
\fn QList<QVariant> &QVariant::asList()
Use toList() instead.
*/
/*!
\fn QMap<QString, QVariant> &QVariant::asMap()
Use toMap() instead.
*/
/*!
\fn QVariant::QVariant(bool b, int dummy)
Use the QVariant(bool) constructor instead.
*/
/*!
\fn const QByteArray QVariant::toCString() const
Use toByteArray() instead.
*/
/*!
\fn QByteArray &QVariant::asCString()
Use toByteArray() instead.
*/
/*!
\fn QPoint &QVariant::asPoint()
Use toPoint() instead.
*/
/*!
\fn QRect &QVariant::asRect()
Use toRect() instead.
*/
/*!
\fn QSize &QVariant::asSize()
Use toSize() instead.
*/
/*! \fn void QVariant::setValue(const T &value)

View File

@ -441,6 +441,7 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes)
#ifndef QT_NO_QUUID_STRING
/*!
\fn QUuid::operator QString() const
\obsolete
Returns the string representation of the uuid.
@ -926,4 +927,15 @@ QUuid QUuid::createUuid()
guid; otherwise returns false.
*/
/**
Returns a hash of the QUuid
*/
uint qHash(const QUuid &uuid)
{
return uuid.data1 ^ uuid.data2 ^ (uuid.data3 << 16)
^ ((uuid.data4[0] << 24) | (uuid.data4[1] << 16) | (uuid.data4[2] << 8) | uuid.data4[3])
^ ((uuid.data4[4] << 24) | (uuid.data4[5] << 16) | (uuid.data4[6] << 8) | uuid.data4[7]);
}
QT_END_NAMESPACE

View File

@ -108,7 +108,9 @@ struct Q_CORE_EXPORT QUuid
QUuid(const QString &);
QUuid(const char *);
QString toString() const;
operator QString() const { return toString(); } // ### Qt5 remove
#if QT_DEPRECATED_SINCE(5,0)
QT_DEPRECATED operator QString() const { return toString(); }
#endif
QUuid(const QByteArray &);
QByteArray toByteArray() const;
#endif
@ -187,6 +189,8 @@ Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QUuid &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QUuid &);
#endif
Q_CORE_EXPORT uint qHash(const QUuid &uuid);
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -60,6 +60,7 @@
# include <linux/futex.h>
# include <sys/syscall.h>
# include <unistd.h>
# include <QtCore/qelapsedtimer.h>
#endif
QT_BEGIN_NAMESPACE
@ -138,16 +139,31 @@ static inline int _q_futex(volatile int *addr, int op, int val, const struct tim
bool QMutexPrivate::wait(int timeout)
{
struct timespec ts, *pts = 0;
QElapsedTimer timer;
if (timeout >= 0) {
ts.tv_nsec = ((timeout % 1000) * 1000) * 1000;
ts.tv_sec = (timeout / 1000);
pts = &ts;
timer.start();
}
while (contenders.fetchAndStoreAcquire(2) > 0) {
struct timespec ts, *pts = 0;
if (timeout >= 0) {
ts.tv_nsec = ((timeout % 1000) * 1000) * 1000;
ts.tv_sec = (timeout / 1000);
pts = &ts;
}
int r = _q_futex(&contenders._q_value, FUTEX_WAIT, 2, pts, 0, 0);
if (r != 0 && errno == ETIMEDOUT)
return false;
if (pts) {
// recalculate the timeout
qint64 xtimeout = timeout * 1000 * 1000;
xtimeout -= timer.nsecsElapsed();
if (xtimeout < 0) {
// timer expired after we returned
return false;
}
ts.tv_sec = timeout / Q_INT64_C(1000) / 1000 / 1000;
ts.tv_nsec = timeout % (Q_INT64_C(1000) * 1000 * 1000);
}
}
return true;
}

View File

@ -4269,135 +4269,6 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA
\internal
*/
/*!
\fn QByteArray::QByteArray(int size)
Use QByteArray(int, char) instead.
*/
/*!
\fn QByteArray QByteArray::leftJustify(uint width, char fill, bool truncate) const
Use leftJustified() instead.
*/
/*!
\fn QByteArray QByteArray::rightJustify(uint width, char fill, bool truncate) const
Use rightJustified() instead.
*/
/*!
\fn QByteArray& QByteArray::duplicate(const QByteArray& a)
\oldcode
QByteArray bdata;
bdata.duplicate(original);
\newcode
QByteArray bdata;
bdata = original;
\endcode
\note QByteArray uses implicit sharing so if you modify a copy, only the
copy is changed.
*/
/*!
\fn QByteArray& QByteArray::duplicate(const char *a, uint n)
\overload
\oldcode
QByteArray bdata;
bdata.duplicate(ptr, size);
\newcode
QByteArray bdata;
bdata = QByteArray(ptr, size);
\endcode
\note QByteArray uses implicit sharing so if you modify a copy, only the
copy is changed.
*/
/*!
\fn void QByteArray::resetRawData(const char *data, uint n)
Use clear() instead.
*/
/*!
\fn QByteArray QByteArray::lower() const
Use toLower() instead.
*/
/*!
\fn QByteArray QByteArray::upper() const
Use toUpper() instead.
*/
/*!
\fn QByteArray QByteArray::stripWhiteSpace() const
Use trimmed() instead.
*/
/*!
\fn QByteArray QByteArray::simplifyWhiteSpace() const
Use simplified() instead.
*/
/*!
\fn int QByteArray::find(char c, int from = 0) const
Use indexOf() instead.
*/
/*!
\fn int QByteArray::find(const char *c, int from = 0) const
Use indexOf() instead.
*/
/*!
\fn int QByteArray::find(const QByteArray &ba, int from = 0) const
Use indexOf() instead.
*/
/*!
\fn int QByteArray::findRev(char c, int from = -1) const
Use lastIndexOf() instead.
*/
/*!
\fn int QByteArray::findRev(const char *c, int from = -1) const
Use lastIndexOf() instead.
*/
/*!
\fn int QByteArray::findRev(const QByteArray &ba, int from = -1) const
Use lastIndexOf() instead.
*/
/*!
\fn int QByteArray::find(const QString &s, int from = 0) const
Use indexOf() instead.
*/
/*!
\fn int QByteArray::findRev(const QString &s, int from = -1) const
Use lastIndexOf() instead.
*/
/*!
\fn DataPtr &QByteArray::data_ptr()
\internal

View File

@ -72,8 +72,7 @@ QT_BEGIN_NAMESPACE
\ingroup string-processing
This class is only useful to avoid the codec for C strings business
in the QChar(ch) constructor. You can avoid it by writing
QChar(ch, 0).
in the QChar(ch) constructor. You can avoid it by writing QChar(ch, 0).
\sa QChar, QLatin1String, QString
*/
@ -81,8 +80,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn const char QLatin1Char::toLatin1() const
Converts a Latin-1 character to an 8-bit ASCII representation of
the character.
Converts a Latin-1 character to an 8-bit ASCII representation of the character.
*/
/*!
@ -132,14 +130,13 @@ QT_BEGIN_NAMESPACE
QChar also provides direction(), which indicates the "natural"
writing direction of this character. The joining() function
indicates how the character joins with its neighbors (needed
indicates how the character joins with it's neighbors (needed
mostly for Arabic) and finally hasMirrored(), which indicates
whether the character needs to be mirrored when it is printed in
its "unnatural" writing direction.
it's "unnatural" writing direction.
Composed Unicode characters (like \aring) can be converted to
decomposed Unicode ("a" followed by "ring above") by using
decomposition().
Composed Unicode characters (like \a ring) can be converted to
decomposed Unicode ("a" followed by "ring above") by using decomposition().
In Unicode, comparison is not necessarily possible and case
conversion is very difficult at best. Unicode, covering the
@ -148,8 +145,7 @@ QT_BEGIN_NAMESPACE
based purely on the numeric Unicode value (code point) of the
characters, and toUpper() and toLower() will do case changes when
the character has a well-defined uppercase/lowercase equivalent.
For locale-dependent comparisons, use
QString::localeAwareCompare().
For locale-dependent comparisons, use QString::localeAwareCompare().
The conversion functions include unicode() (to a scalar),
toLatin1() (to scalar, but converts all non-Latin-1 characters to
@ -165,7 +161,7 @@ QT_BEGIN_NAMESPACE
to construct a QChar from an 8-bit \c char, and you will need to
call toAscii() or toLatin1() to get the 8-bit value back.
\sa QString, Unicode, QLatin1Char
\sa Unicode, QString, QLatin1Char
*/
/*!
@ -186,7 +182,7 @@ QT_BEGIN_NAMESPACE
\value Unicode_Unassigned The value is not assigned to any character
in version 5.0 of Unicode.
\sa unicodeVersion()
\sa unicodeVersion(), currentUnicodeVersion()
*/
/*!
@ -259,10 +255,6 @@ QT_BEGIN_NAMESPACE
\value Symbol_Other Unicode class name So
\value NoCategory Qt cannot find an appropriate category for the character.
\omitvalue Punctuation_Dask
\sa category()
*/
@ -429,8 +421,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
Constructs a QChar corresponding to ASCII/Latin-1 character \a
ch.
Constructs a QChar corresponding to ASCII/Latin-1 character \a ch.
*/
QChar::QChar(char ch)
{
@ -469,35 +460,27 @@ QChar::QChar(uchar ch)
/*!
\fn QChar::QChar(ushort code)
Constructs a QChar for the character with Unicode code point \a
code.
Constructs a QChar for the character with Unicode code point \a code.
*/
/*!
\fn QChar::QChar(short code)
Constructs a QChar for the character with Unicode code point \a
code.
Constructs a QChar for the character with Unicode code point \a code.
*/
/*!
\fn QChar::QChar(uint code)
Constructs a QChar for the character with Unicode code point \a
code.
Constructs a QChar for the character with Unicode code point \a code.
*/
/*!
\fn QChar::QChar(int code)
Constructs a QChar for the character with Unicode code point \a
code.
Constructs a QChar for the character with Unicode code point \a code.
*/
/*!
\fn bool QChar::isNull() const
@ -508,8 +491,7 @@ QChar::QChar(uchar ch)
/*!
\fn uchar QChar::cell() const
Returns the cell (least significant byte) of the Unicode
character.
Returns the cell (least significant byte) of the Unicode character.
\sa row()
*/
@ -538,7 +520,8 @@ bool QChar::isPrint() const
/*!
Returns true if the character is a separator character
(Separator_* categories); otherwise returns false.
(Separator_* categories or certain code points from Other_Control category);
otherwise returns false.
*/
bool QChar::isSpace() const
{
@ -625,7 +608,6 @@ bool QChar::isLetterOrNumber() const
return FLAG(qGetProp(ucs)->category) & test;
}
/*!
Returns true if the character is a decimal digit
(Number_DecimalDigit); otherwise returns false.
@ -635,7 +617,6 @@ bool QChar::isDigit() const
return (qGetProp(ucs)->category == Number_DecimalDigit);
}
/*!
Returns true if the character is a symbol (Symbol_* categories);
otherwise returns false.
@ -652,74 +633,73 @@ bool QChar::isSymbol() const
/*!
\fn bool QChar::isHighSurrogate() const
Returns true if the QChar is the high part of a utf16 surrogate
(ie. if its code point is between 0xd800 and 0xdbff, inclusive).
Returns true if the QChar is the high part of a UTF16 surrogate
(i.e. if it's code point in range [0xd800..0xdbff]).
*/
/*!
\fn bool QChar::isLowSurrogate() const
Returns true if the QChar is the low part of a utf16 surrogate
(ie. if its code point is between 0xdc00 and 0xdfff, inclusive).
Returns true if the QChar is the low part of a UTF16 surrogate
(i.e. if it's code point in range [0xdc00..0xdfff]).
*/
/*!
\fn static bool QChar::isHighSurrogate(uint ucs4)
\since 4.7
\overload
Returns true if the UCS-4-encoded character specified by \a ucs4
is the high part of a utf16 surrogate
(ie. if its code point is between 0xd800 and 0xdbff, inclusive).
is the high part of a UTF16 surrogate
(i.e. if it's code point in range [0xd800..0xdbff]).
*/
/*!
\fn static bool QChar::isLowSurrogate(uint ucs4)
\since 4.7
\overload
Returns true if the UCS-4-encoded character specified by \a ucs4
is the low part of a utf16 surrogate
(ie. if its code point is between 0xdc00 and 0xdfff, inclusive).
is the low part of a UTF16 surrogate
(i.e. if it's code point in range [0xdc00..0xdfff]).
*/
/*!
\fn static bool QChar::requiresSurrogates(uint ucs4)
\since 4.7
Returns true if the UCS-4-encoded character specified by \a ucs4
can be split into the high and low parts of a utf16 surrogate
(ie. if its code point is greater than or equals to 0x10000).
can be split into the high and low parts of a UTF16 surrogate
(i.e. if it's code point is greater than or equals to 0x10000).
*/
/*!
\fn static uint QChar::surrogateToUcs4(ushort high, ushort low)
Converts a UTF16 surrogate pair with the given \a high and \a low values
to its UCS-4 code point.
to it's UCS-4-encoded code point.
*/
/*!
\fn static uint QChar::surrogateToUcs4(QChar high, QChar low)
\overload
Converts a utf16 surrogate pair (\a high, \a low) to its ucs4 code point.
Converts a UTF16 surrogate pair (\a high, \a low) to it's UCS-4-encoded code point.
*/
/*!
\fn static ushort QChar::highSurrogate(uint ucs4)
Returns the high surrogate value of a ucs4 code point.
Returns the high surrogate part of a UCS-4-encoded code point.
The returned result is undefined if \a ucs4 is smaller than 0x10000.
*/
/*!
\fn static ushort QChar::lowSurrogate(uint ucs4)
Returns the low surrogate value of a ucs4 code point.
Returns the low surrogate part of a UCS-4-encoded code point.
The returned result is undefined if \a ucs4 is smaller than 0x10000.
*/
/*!
Returns the numeric value of the digit, or -1 if the character is
not a digit.
Returns the numeric value of the digit, or -1 if the character is not a digit.
*/
int QChar::digitValue() const
{
@ -758,13 +738,12 @@ QChar::Category QChar::category() const
/*!
\overload
\since 4.3
Returns the category of the UCS-4-encoded character specified by \a ucs4.
*/
QChar::Category QChar::category(uint ucs4)
{
if (ucs4 > UNICODE_LAST_CODEPOINT)
return QChar::NoCategory;
return QChar::Other_NotAssigned;
return (QChar::Category) qGetProp(ucs4)->category;
}
@ -818,8 +797,7 @@ QChar::Joining QChar::joining() const
/*!
\overload
Returns information about the joining properties of the UCS-4-encoded
character specified by \a ucs4 (needed for certain languages such as
Arabic).
character specified by \a ucs4 (needed for certain languages such as Arabic).
*/
QChar::Joining QChar::joining(uint ucs4)
{
@ -831,15 +809,13 @@ QChar::Joining QChar::joining(uint ucs4)
/*!
\overload
Returns information about the joining properties of the UCS-2-encoded
character specified by \a ucs2 (needed for certain languages such as
Arabic).
character specified by \a ucs2 (needed for certain languages such as Arabic).
*/
QChar::Joining QChar::joining(ushort ucs2)
{
return (QChar::Joining) qGetProp(ucs2)->joining;
}
/*!
Returns true if the character should be reversed if the text
direction is reversed; otherwise returns false.
@ -873,7 +849,6 @@ bool QChar::hasMirrored() const
/*!
\fn bool QChar::isTitleCase() const
\since 4.3
Returns true if the character is a titlecase letter, i.e.
category() is Letter_Titlecase.
@ -958,8 +933,8 @@ static const unsigned short * QT_FASTCALL decompositionHelper
}
/*!
Decomposes a character into its parts. Returns an empty string if
no decomposition exists.
Decomposes a character into it's constituent parts. Returns an empty string
if no decomposition exists.
*/
QString QChar::decomposition() const
{
@ -968,7 +943,7 @@ QString QChar::decomposition() const
/*!
\overload
Decomposes the UCS-4-encoded character specified by \a ucs4 into its
Decomposes the UCS-4-encoded character specified by \a ucs4 into it's
constituent parts. Returns an empty string if no decomposition exists.
*/
QString QChar::decomposition(uint ucs4)
@ -1070,8 +1045,6 @@ QChar::UnicodeVersion QChar::unicodeVersion(ushort ucs2)
}
/*!
\since 4.8
Returns the most recent supported Unicode version.
*/
QChar::UnicodeVersion QChar::currentUnicodeVersion()
@ -1260,18 +1233,6 @@ ushort QChar::toCaseFolded(ushort ucs2)
}
/*!
\fn char QChar::latin1() const
Use toLatin1() instead.
*/
/*!
\fn char QChar::ascii() const
Use toAscii() instead.
*/
/*!
\fn char QChar::toLatin1() const
@ -1282,7 +1243,6 @@ ushort QChar::toCaseFolded(ushort ucs2)
*/
/*!
\fn char QChar::toAscii() const
Returns the character value of the QChar obtained using the current
codec used to read C strings, or 0 if the character is not representable
using this codec. The default codec handles Latin-1 encoded text,
@ -1306,16 +1266,14 @@ char QChar::toAscii() const
}
/*!
\fn QChar QChar::fromLatin1(char c)
Converts the Latin-1 character \a c to its equivalent QChar. This
Converts the Latin-1 character \a c to it's equivalent QChar. This
is mainly useful for non-internationalized software.
\sa fromAscii(), unicode(), QTextCodec::codecForCStrings()
*/
/*!
Converts the ASCII character \a c to its equivalent QChar. This
Converts the ASCII character \a c to it's equivalent QChar. This
is mainly useful for non-internationalized software.
An alternative is to use QLatin1Char.
@ -1432,30 +1390,6 @@ QDataStream &operator>>(QDataStream &in, QChar &chr)
that of \a c2; otherwise returns false.
*/
/*!
\fn bool QChar::mirrored() const
Use hasMirrored() instead.
*/
/*!
\fn QChar QChar::lower() const
Use toLower() instead.
*/
/*!
\fn QChar QChar::upper() const
Use toUpper() instead.
*/
/*!
\fn bool QChar::networkOrdered()
See if QSysInfo::ByteOrder == QSysInfo::BigEndian instead.
*/
// ---------------------------------------------------------------------------

View File

@ -93,8 +93,6 @@ public:
enum Category
{
NoCategory, // ### Qt 5: replace with Other_NotAssigned
Mark_NonSpacing, // Mn
Mark_SpacingCombining, // Mc
Mark_Enclosing, // Me
@ -130,9 +128,7 @@ public:
Symbol_Math, // Sm
Symbol_Currency, // Sc
Symbol_Modifier, // Sk
Symbol_Other, // So
Punctuation_Dask = Punctuation_Dash // ### Qt 5: remove
Symbol_Other // So
};
enum Direction

View File

@ -3710,74 +3710,6 @@ QDataStream &operator>>(QDataStream &in, QDateTime &dateTime)
#endif // QT_NO_DATASTREAM
/*!
\fn QString QDate::monthName(int month)
Use shortMonthName() instead.
*/
/*!
\fn QString QDate::dayName(int weekday)
Use shortDayName() instead.
*/
/*!
\fn bool QDate::leapYear(int year)
Use isLeapYear() instead.
*/
/*!
\fn QDate QDate::currentDate(Qt::TimeSpec spec)
If \a spec is Qt::LocalTime, use the currentDate() overload that
takes no parameters instead; otherwise, use
QDateTime::currentDateTime().
\oldcode
QDate localDate = QDate::currentDate(Qt::LocalTime);
QDate utcDate = QDate::currentDate(Qt::UTC);
\newcode
QDate localDate = QDate::currentDate();
QDate utcDate = QDateTime::currentDateTime().toUTC().date();
\endcode
\sa QDateTime::toUTC()
*/
/*!
\fn QTime QTime::currentTime(Qt::TimeSpec specification)
Returns the current time for the given \a specification.
To replace uses of this function where the \a specification is Qt::LocalTime,
use the currentDate() overload that takes no parameters instead; otherwise,
use QDateTime::currentDateTime() and convert the result to a UTC measurement.
\oldcode
QTime localTime = QTime::currentTime(Qt::LocalTime);
QTime utcTime = QTime::currentTime(Qt::UTC);
\newcode
QTime localTime = QTime::currentTime();
QTime utcTime = QTimeTime::currentDateTime().toUTC().time();
\endcode
\sa QDateTime::toUTC()
*/
/*!
\fn void QDateTime::setTime_t(uint secsSince1Jan1970UTC, Qt::TimeSpec spec)
Use the single-argument overload of setTime_t() instead.
*/
/*!
\fn QDateTime QDateTime::currentDateTime(Qt::TimeSpec spec)
Use the currentDateTime() overload that takes no parameters
instead.
*/
// checks if there is an unqoted 'AP' or 'ap' in the string
static bool hasUnquotedAP(const QString &f)

View File

@ -1053,93 +1053,6 @@ QLinkedListData QLinkedListData::shared_null = {
\sa \link datastreamformat.html Format of the QDataStream operators \endlink
*/
/*!
\fn iterator QLinkedList::remove(iterator pos)
Use erase() instead.
*/
/*!
\fn int QLinkedList::findIndex(const T& t) const
If you need indexes then QList or QVector are better choices than
QLinkedList.
\oldcode
int index = list->findIndex(value);
\newcode
int index = 0;
bool found = false;
for (const_iterator i = list->begin(); i != list->end(); ++i; ++index)
if (*i == value) {
found = true;
break;
}
if (!found)
index = -1;
\endcode
*/
/*!
\fn iterator QLinkedList::find(iterator from, const T& t)
If you need random access to a data structure then QList, QVector,
QMap, or QHash, are all better choices than QLinkedList.
\oldcode
QLinkedList::iterator i = list->find(from, value);
\newcode
QLinkedList::iterator i = from;
while (i != list->end() && *i != value)
++i;
\endcode
*/
/*!
\fn iterator QLinkedList::find(const T& t)
If you need random access to a data structure then QList, QVector,
QMap, or QHash, are all better choices than QLinkedList.
\oldcode
QLinkedList::iterator i = list->find(value);
\newcode
QLinkedList::iterator i = list->begin();
while (i != list->end() && *i != value)
++i;
\endcode
*/
/*!
\fn const_iterator QLinkedList::find(const_iterator from, const T& t) const
If you need random access to a data structure then QList, QVector,
QMap, or QHash, are all better choices than QLinkedList.
\oldcode
QLinkedList::const_iterator i = list->find(from, value);
\newcode
QLinkedList::const_iterator i = from;
while (i != list->end() && *i != value)
++i;
\endcode
*/
/*!
\fn const_iterator QLinkedList::find(const T& t) const
If you need random access to a data structure then QList, QVector,
QMap, or QHash, are all better choices than QLinkedList.
\oldcode
QLinkedList::const_iterator i = list->find(value);
\newcode
QLinkedList::const_iterator i = list->begin();
while (i != list->end() && *i != value)
++i;
\endcode
*/
/*!
\since 4.1
\fn QLinkedList<T> QLinkedList<T>::fromStdList(const std::list<T> &list)

View File

@ -1714,48 +1714,6 @@ void **QListData::erase(void **xi)
\sa \link datastreamformat.html Format of the QDataStream operators \endlink
*/
/*!
\fn iterator QList::remove(iterator pos)
Use erase() instead.
*/
/*!
\fn int QList::remove(const T &t)
Use removeAll() instead.
*/
/*!
\fn int QList::findIndex(const T& t) const
Use indexOf() instead.
*/
/*!
\fn iterator QList::find(const T& t)
Use indexOf() instead.
*/
/*!
\fn const_iterator QList::find (const T& t) const
Use indexOf() instead.
*/
/*!
\fn iterator QList::find(iterator from, const T& t)
Use indexOf() instead.
*/
/*!
\fn const_iterator QList::find(const_iterator from, const T& t) const
Use indexOf() instead.
*/
/*! \fn QList<T> QList<T>::fromVector(const QVector<T> &vector)
Returns a QList object with the data contained in \a vector.

View File

@ -1595,52 +1595,4 @@ void QMapData::dump()
\sa QMap::constFind()
*/
/*!
\fn T &QMap::iterator::data() const
Use value() instead.
*/
/*!
\fn const T &QMap::const_iterator::data() const
Use value() instead.
*/
/*!
\fn iterator QMap::remove(iterator it)
Use erase(\a it) instead.
*/
/*!
\fn void QMap::erase(const Key &key)
Use remove(\a key) instead.
*/
/*!
\fn iterator QMap::insert(const Key &key, const T &value, bool overwrite);
Use the two-argument insert() overload instead. If you don't want
to overwrite, call contains() beforehand.
\oldcode
QMap<QString, int> map;
...
map.insert("delay", 30000, false);
\newcode
QMap<QString, int> map;
...
if (!map.contains("delay"))
map.insert("delay", 30000);
\endcode
*/
/*!
\fn iterator QMap::replace(const Key &key, const T &value)
Use remove() then insert().
*/
QT_END_NAMESPACE

View File

@ -316,16 +316,6 @@ QRect QRect::normalized() const
}
/*!
\fn QRect QRect::normalize() const
\compat
Returns a normalized rectangle; i.e., a rectangle that has a
non-negative width and height.
Use the normalized() function instead
*/
/*!
\fn int QRect::left() const
@ -366,42 +356,6 @@ QRect QRect::normalized() const
\sa setBottom(), bottomLeft(), bottomRight()
*/
/*!
\fn int &QRect::rLeft()
\compat
Returns a reference to the left coordinate of the rectangle.
Use the left() function instead.
*/
/*!
\fn int &QRect::rTop()
\compat
Returns a reference to the top coordinate of the rectangle.
Use the top() function instead.
*/
/*!
\fn int &QRect::rRight()
\compat
Returns a reference to the right coordinate of the rectangle.
Use the right() function instead.
*/
/*!
\fn int &QRect::rBottom()
\compat
Returns a reference to the bottom coordinate of the rectangle.
Use the bottom() function instead.
*/
/*!
\fn int QRect::x() const
@ -595,28 +549,6 @@ QRect QRect::normalized() const
\sa setCoords(), getRect()
*/
/*!
\fn void QRect::rect(int *x, int *y, int *width, int *height) const
\compat
Extracts the position of the rectangle's top-left corner to *\a x and
*\a y, and its dimensions to *\a width and * \a height.
Use the getRect() function instead.
*/
/*!
\fn void QRect::coords(int *x1, int *y1, int *x2, int *y2) const
\compat
Extracts the position of the rectangle's top-left corner to *\a x1
and *\a y1, and the position of the bottom-right corner to *\a x2
and *\a y2.
Use the getCoords() function instead.
*/
/*!
\fn void QRect::moveLeft(int x)
@ -718,23 +650,6 @@ void QRect::moveCenter(const QPoint &p)
y2 = y1 + h;
}
/*!
\fn void QRect::moveBy(int dx, int dy)
\compat
Moves the rectangle \a dx along the x axis and \a dy along the y
axis, relative to the current position.
Use the translate() function instead.
*/
/*!
\fn void QRect::moveBy(const QPoint &)
\compat
Use the translate() function instead.
*/
/*!
\fn void QRect::moveTo(int x, int y)
@ -818,16 +733,6 @@ void QRect::moveCenter(const QPoint &p)
*/
/*!
\fn void QRect::addCoords(int dx1, int dy1, int dx2, int dy2)
\compat
Adds \a dx1, \a dy1, \a dx2 and \a dy2 to the existing coordinates
of the rectangle respectively.
Use the adjust() function instead.
*/
/*! \fn QRect QRect::adjusted(int dx1, int dy1, int dx2, int dy2) const
Returns a new rectangle with \a dx1, \a dy1, \a dx2 and \a dy2

View File

@ -57,12 +57,12 @@ class RefCount
{
public:
inline void ref() {
if (atomic >= 0)
if (atomic > 0)
atomic.ref();
}
inline bool deref() {
if (atomic < 0)
if (atomic <= 0)
return true;
return atomic.deref();
}

View File

@ -1011,6 +1011,8 @@ Q_DECLARE_TYPEINFO(QRegExpAnchorAlternation, Q_PRIMITIVE_TYPE);
#endif
#ifndef QT_NO_REGEXP_CCLASS
#define FLAG(x) (1 << (x))
/*
The class QRegExpCharClass represents a set of characters, such as can
be found in regular expressions (e.g., [a-z] denotes the set
@ -1027,7 +1029,7 @@ public:
void clear();
bool negative() const { return n; }
void setNegative(bool negative);
void addCategories(int cats);
void addCategories(uint cats);
void addRange(ushort from, ushort to);
void addSingleton(ushort ch) { addRange(ch, ch); }
@ -1041,7 +1043,7 @@ public:
#endif
private:
int c; // character classes
uint c; // character classes
QVector<QRegExpCharClassRange> r; // character ranges
bool n; // negative?
#ifndef QT_NO_REGEXP_OPTIM
@ -2351,9 +2353,39 @@ void QRegExpCharClass::setNegative(bool negative)
#endif
}
void QRegExpCharClass::addCategories(int cats)
void QRegExpCharClass::addCategories(uint cats)
{
c |= cats;
static const int all_cats = FLAG(QChar::Mark_NonSpacing) |
FLAG(QChar::Mark_SpacingCombining) |
FLAG(QChar::Mark_Enclosing) |
FLAG(QChar::Number_DecimalDigit) |
FLAG(QChar::Number_Letter) |
FLAG(QChar::Number_Other) |
FLAG(QChar::Separator_Space) |
FLAG(QChar::Separator_Line) |
FLAG(QChar::Separator_Paragraph) |
FLAG(QChar::Other_Control) |
FLAG(QChar::Other_Format) |
FLAG(QChar::Other_Surrogate) |
FLAG(QChar::Other_PrivateUse) |
FLAG(QChar::Other_NotAssigned) |
FLAG(QChar::Letter_Uppercase) |
FLAG(QChar::Letter_Lowercase) |
FLAG(QChar::Letter_Titlecase) |
FLAG(QChar::Letter_Modifier) |
FLAG(QChar::Letter_Other) |
FLAG(QChar::Punctuation_Connector) |
FLAG(QChar::Punctuation_Dash) |
FLAG(QChar::Punctuation_Open) |
FLAG(QChar::Punctuation_Close) |
FLAG(QChar::Punctuation_InitialQuote) |
FLAG(QChar::Punctuation_FinalQuote) |
FLAG(QChar::Punctuation_Other) |
FLAG(QChar::Symbol_Math) |
FLAG(QChar::Symbol_Currency) |
FLAG(QChar::Symbol_Modifier) |
FLAG(QChar::Symbol_Other);
c |= (all_cats & cats);
#ifndef QT_NO_REGEXP_OPTIM
occ1.fill(0, NumBadChars);
#endif
@ -2394,7 +2426,7 @@ bool QRegExpCharClass::in(QChar ch) const
return n;
#endif
if (c != 0 && (c & (1 << (int)ch.category())) != 0)
if (c != 0 && (c & FLAG(ch.category())) != 0)
return !n;
const int uc = ch.unicode();
@ -2900,18 +2932,32 @@ int QRegExpEngine::getEscape()
#ifndef QT_NO_REGEXP_CCLASS
case 'D':
// see QChar::isDigit()
yyCharClass->addCategories(0x7fffffef);
yyCharClass->addCategories(uint(-1) ^ FLAG(QChar::Number_DecimalDigit));
return Tok_CharClass;
case 'S':
// see QChar::isSpace()
yyCharClass->addCategories(0x7ffff87f);
yyCharClass->addCategories(uint(-1) ^ (FLAG(QChar::Separator_Space) |
FLAG(QChar::Separator_Line) |
FLAG(QChar::Separator_Paragraph) |
FLAG(QChar::Other_Control)));
yyCharClass->addRange(0x0000, 0x0008);
yyCharClass->addRange(0x000e, 0x001f);
yyCharClass->addRange(0x007f, 0x009f);
return Tok_CharClass;
case 'W':
// see QChar::isLetterOrNumber() and QChar::isMark()
yyCharClass->addCategories(0x7fe07f81);
yyCharClass->addCategories(uint(-1) ^ (FLAG(QChar::Mark_NonSpacing) |
FLAG(QChar::Mark_SpacingCombining) |
FLAG(QChar::Mark_Enclosing) |
FLAG(QChar::Number_DecimalDigit) |
FLAG(QChar::Number_Letter) |
FLAG(QChar::Number_Other) |
FLAG(QChar::Letter_Uppercase) |
FLAG(QChar::Letter_Lowercase) |
FLAG(QChar::Letter_Titlecase) |
FLAG(QChar::Letter_Modifier) |
FLAG(QChar::Letter_Other) |
FLAG(QChar::Punctuation_Connector)));
yyCharClass->addRange(0x203f, 0x2040);
yyCharClass->addSingleton(0x2040);
yyCharClass->addSingleton(0x2054);
@ -2929,16 +2975,28 @@ int QRegExpEngine::getEscape()
#ifndef QT_NO_REGEXP_CCLASS
case 'd':
// see QChar::isDigit()
yyCharClass->addCategories(0x00000010);
yyCharClass->addCategories(FLAG(QChar::Number_DecimalDigit));
return Tok_CharClass;
case 's':
// see QChar::isSpace()
yyCharClass->addCategories(0x00000380);
yyCharClass->addCategories(FLAG(QChar::Separator_Space) |
FLAG(QChar::Separator_Line) |
FLAG(QChar::Separator_Paragraph));
yyCharClass->addRange(0x0009, 0x000d);
return Tok_CharClass;
case 'w':
// see QChar::isLetterOrNumber() and QChar::isMark()
yyCharClass->addCategories(0x000f807e);
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
FLAG(QChar::Mark_SpacingCombining) |
FLAG(QChar::Mark_Enclosing) |
FLAG(QChar::Number_DecimalDigit) |
FLAG(QChar::Number_Letter) |
FLAG(QChar::Number_Other) |
FLAG(QChar::Letter_Uppercase) |
FLAG(QChar::Letter_Lowercase) |
FLAG(QChar::Letter_Titlecase) |
FLAG(QChar::Letter_Modifier) |
FLAG(QChar::Letter_Other));
yyCharClass->addSingleton(0x005f); // '_'
return Tok_CharClass;
case 'I':
@ -2948,7 +3006,17 @@ int QRegExpEngine::getEscape()
}
case 'i':
if (xmlSchemaExtensions) {
yyCharClass->addCategories(0x000f807e);
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
FLAG(QChar::Mark_SpacingCombining) |
FLAG(QChar::Mark_Enclosing) |
FLAG(QChar::Number_DecimalDigit) |
FLAG(QChar::Number_Letter) |
FLAG(QChar::Number_Other) |
FLAG(QChar::Letter_Uppercase) |
FLAG(QChar::Letter_Lowercase) |
FLAG(QChar::Letter_Titlecase) |
FLAG(QChar::Letter_Modifier) |
FLAG(QChar::Letter_Other));
yyCharClass->addSingleton(0x003a); // ':'
yyCharClass->addSingleton(0x005f); // '_'
yyCharClass->addRange(0x0041, 0x005a); // [A-Z]
@ -2974,7 +3042,17 @@ int QRegExpEngine::getEscape()
}
case 'c':
if (xmlSchemaExtensions) {
yyCharClass->addCategories(0x000f807e);
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
FLAG(QChar::Mark_SpacingCombining) |
FLAG(QChar::Mark_Enclosing) |
FLAG(QChar::Number_DecimalDigit) |
FLAG(QChar::Number_Letter) |
FLAG(QChar::Number_Other) |
FLAG(QChar::Letter_Uppercase) |
FLAG(QChar::Letter_Lowercase) |
FLAG(QChar::Letter_Titlecase) |
FLAG(QChar::Letter_Modifier) |
FLAG(QChar::Letter_Other));
yyCharClass->addSingleton(0x002d); // '-'
yyCharClass->addSingleton(0x002e); // '.'
yyCharClass->addSingleton(0x003a); // ':'
@ -3024,79 +3102,102 @@ int QRegExpEngine::getEscape()
yyCh = getChar(); // skip closing '}'
if (category == "M") {
yyCharClass->addCategories(0x0000000e);
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
FLAG(QChar::Mark_SpacingCombining) |
FLAG(QChar::Mark_Enclosing));
} else if (category == "Mn") {
yyCharClass->addCategories(0x00000002);
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing));
} else if (category == "Mc") {
yyCharClass->addCategories(0x00000004);
yyCharClass->addCategories(FLAG(QChar::Mark_SpacingCombining));
} else if (category == "Me") {
yyCharClass->addCategories(0x00000008);
yyCharClass->addCategories(FLAG(QChar::Mark_Enclosing));
} else if (category == "N") {
yyCharClass->addCategories(0x00000070);
yyCharClass->addCategories(FLAG(QChar::Number_DecimalDigit) |
FLAG(QChar::Number_Letter) |
FLAG(QChar::Number_Other));
} else if (category == "Nd") {
yyCharClass->addCategories(0x00000010);
yyCharClass->addCategories(FLAG(QChar::Number_DecimalDigit));
} else if (category == "Nl") {
yyCharClass->addCategories(0x00000020);
yyCharClass->addCategories(FLAG(QChar::Number_Letter));
} else if (category == "No") {
yyCharClass->addCategories(0x00000040);
yyCharClass->addCategories(FLAG(QChar::Number_Other));
} else if (category == "Z") {
yyCharClass->addCategories(0x00000380);
yyCharClass->addCategories(FLAG(QChar::Separator_Space) |
FLAG(QChar::Separator_Line) |
FLAG(QChar::Separator_Paragraph));
} else if (category == "Zs") {
yyCharClass->addCategories(0x00000080);
yyCharClass->addCategories(FLAG(QChar::Separator_Space));
} else if (category == "Zl") {
yyCharClass->addCategories(0x00000100);
yyCharClass->addCategories(FLAG(QChar::Separator_Line));
} else if (category == "Zp") {
yyCharClass->addCategories(0x00000200);
yyCharClass->addCategories(FLAG(QChar::Separator_Paragraph));
} else if (category == "C") {
yyCharClass->addCategories(0x00006c00);
yyCharClass->addCategories(FLAG(QChar::Other_Control) |
FLAG(QChar::Other_Format) |
FLAG(QChar::Other_Surrogate) |
FLAG(QChar::Other_PrivateUse) |
FLAG(QChar::Other_NotAssigned));
} else if (category == "Cc") {
yyCharClass->addCategories(0x00000400);
yyCharClass->addCategories(FLAG(QChar::Other_Control));
} else if (category == "Cf") {
yyCharClass->addCategories(0x00000800);
yyCharClass->addCategories(FLAG(QChar::Other_Format));
} else if (category == "Cs") {
yyCharClass->addCategories(0x00001000);
yyCharClass->addCategories(FLAG(QChar::Other_Surrogate));
} else if (category == "Co") {
yyCharClass->addCategories(0x00002000);
yyCharClass->addCategories(FLAG(QChar::Other_PrivateUse));
} else if (category == "Cn") {
yyCharClass->addCategories(0x00004000);
yyCharClass->addCategories(FLAG(QChar::Other_NotAssigned));
} else if (category == "L") {
yyCharClass->addCategories(0x000f8000);
yyCharClass->addCategories(FLAG(QChar::Letter_Uppercase) |
FLAG(QChar::Letter_Lowercase) |
FLAG(QChar::Letter_Titlecase) |
FLAG(QChar::Letter_Modifier) |
FLAG(QChar::Letter_Other));
} else if (category == "Lu") {
yyCharClass->addCategories(0x00008000);
yyCharClass->addCategories(FLAG(QChar::Letter_Uppercase));
} else if (category == "Ll") {
yyCharClass->addCategories(0x00010000);
yyCharClass->addCategories(FLAG(QChar::Letter_Lowercase));
} else if (category == "Lt") {
yyCharClass->addCategories(0x00020000);
yyCharClass->addCategories(FLAG(QChar::Letter_Titlecase));
} else if (category == "Lm") {
yyCharClass->addCategories(0x00040000);
yyCharClass->addCategories(FLAG(QChar::Letter_Modifier));
} else if (category == "Lo") {
yyCharClass->addCategories(0x00080000);
yyCharClass->addCategories(FLAG(QChar::Letter_Other));
} else if (category == "P") {
yyCharClass->addCategories(0x4f580780);
yyCharClass->addCategories(FLAG(QChar::Punctuation_Connector) |
FLAG(QChar::Punctuation_Dash) |
FLAG(QChar::Punctuation_Open) |
FLAG(QChar::Punctuation_Close) |
FLAG(QChar::Punctuation_InitialQuote) |
FLAG(QChar::Punctuation_FinalQuote) |
FLAG(QChar::Punctuation_Other));
} else if (category == "Pc") {
yyCharClass->addCategories(0x00100000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_Connector));
} else if (category == "Pd") {
yyCharClass->addCategories(0x00200000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_Dash));
} else if (category == "Ps") {
yyCharClass->addCategories(0x00400000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_Open));
} else if (category == "Pe") {
yyCharClass->addCategories(0x00800000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_Close));
} else if (category == "Pi") {
yyCharClass->addCategories(0x01000000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_InitialQuote));
} else if (category == "Pf") {
yyCharClass->addCategories(0x02000000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_FinalQuote));
} else if (category == "Po") {
yyCharClass->addCategories(0x04000000);
yyCharClass->addCategories(FLAG(QChar::Punctuation_Other));
} else if (category == "S") {
yyCharClass->addCategories(0x78000000);
yyCharClass->addCategories(FLAG(QChar::Symbol_Math) |
FLAG(QChar::Symbol_Currency) |
FLAG(QChar::Symbol_Modifier) |
FLAG(QChar::Symbol_Other));
} else if (category == "Sm") {
yyCharClass->addCategories(0x08000000);
yyCharClass->addCategories(FLAG(QChar::Symbol_Math));
} else if (category == "Sc") {
yyCharClass->addCategories(0x10000000);
yyCharClass->addCategories(FLAG(QChar::Symbol_Currency));
} else if (category == "Sk") {
yyCharClass->addCategories(0x20000000);
yyCharClass->addCategories(FLAG(QChar::Symbol_Modifier));
} else if (category == "So") {
yyCharClass->addCategories(0x40000000);
yyCharClass->addCategories(FLAG(QChar::Symbol_Other));
} else if (category.startsWith("Is")) {
if (categoriesRangeMap.isEmpty())
setupCategoriesRangeMap();
@ -4392,73 +4493,6 @@ QString QRegExp::escape(const QString &str)
return quoted;
}
/*!
\fn bool QRegExp::caseSensitive() const
Use \l caseSensitivity() instead.
*/
/*!
\fn void QRegExp::setCaseSensitive(bool sensitive)
Use \l setCaseSensitivity() instead.
*/
/*!
\fn bool QRegExp::wildcard() const
Use \l patternSyntax() instead.
\oldcode
bool wc = rx.wildcard();
\newcode
bool wc = (rx.patternSyntax() == QRegExp::Wildcard);
\endcode
*/
/*!
\fn void QRegExp::setWildcard(bool wildcard)
Use \l setPatternSyntax() instead.
\oldcode
rx.setWildcard(wc);
\newcode
rx.setPatternSyntax(wc ? QRegExp::Wildcard : QRegExp::RegExp);
\endcode
*/
/*!
\fn bool QRegExp::minimal() const
Use \l isMinimal() instead.
*/
/*!
\fn int QRegExp::search(const QString &str, int from = 0,
CaretMode caretMode = CaretAtZero) const
Use \l indexIn() instead.
*/
/*!
\fn int QRegExp::searchRev(const QString &str, int from = -1, \
CaretMode caretMode = CaretAtZero) const
Use \l lastIndexIn() instead.
*/
/*!
\fn QRegExp::QRegExp(const QString &pattern, bool cs, bool wildcard = false)
Use another constructor instead.
\oldcode
QRegExp rx("*.txt", false, true);
\newcode
QRegExp rx("*.txt", Qt::CaseInsensitive, QRegExp::Wildcard);
\endcode
*/
#ifndef QT_NO_DATASTREAM
/*!

View File

@ -3536,29 +3536,6 @@ bool QString::endsWith(const QChar &c, Qt::CaseSensitivity cs) const
: foldCase(d->data()[d->size - 1]) == foldCase(c.unicode()));
}
/*! \fn const char *QString::ascii() const
\nonreentrant
Use toAscii() instead.
*/
/*! \fn const char *QString::latin1() const
\nonreentrant
Use toLatin1() instead.
*/
/*! \fn const char *QString::utf8() const
\nonreentrant
Use toUtf8() instead.
*/
/*! \fn const char *QString::local8Bit() const
\nonreentrant
Use toLocal8Bit() instead.
*/
static QByteArray toLatin1_helper(const QChar *data, int length)
{
@ -4547,14 +4524,6 @@ QString& QString::fill(QChar ch, int size)
\sa operator==(), operator<(), operator>()
*/
/*!
\fn int QString::compare(const QString & s1, const QString & s2)
\overload compare()
Performs a case sensitive compare of \a s1 and \a s2.
*/
/*!
\fn int QString::compare(const QString &s1, const QLatin1String &s2, Qt::CaseSensitivity cs)
\since 4.2
@ -7206,13 +7175,6 @@ QString &QString::setRawData(const QChar *unicode, int size)
\sa latin1()
*/
/*!
\since 4.1
\fn QLatin1String &QLatin1String::operator=(const QLatin1String &other)
Constructs a copy of \a other.
*/
/*! \fn const char *QLatin1String::latin1() const
Returns the Latin-1 string stored in this object.
@ -7511,244 +7473,6 @@ QDataStream &operator>>(QDataStream &in, QString &str)
}
#endif // QT_NO_DATASTREAM
/*!
\fn void QString::setLength(int nl)
Use resize() instead.
*/
/*!
\fn QString QString::copy() const
Use simple assignment instead. QString is implicitly shared so if
a copy is modified only the copy is changed.
*/
/*!
\fn QString &QString::remove(QChar c, bool cs)
Use the remove(QChar, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QString &QString::remove(const QString &s, bool cs)
Use the remove(QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QString &QString::replace(QChar c, const QString &after, bool cs)
Use the replace(QChar, QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QString &QString::replace(const QString &before, const QString &after, bool cs)
Use the replace(QString, QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QString &QString::replace(char c, const QString &after, bool cs)
Use the replace(QChar, QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QString &QString::replace(char c, const QString &after, Qt::CaseSensitivity cs)
Use the replace(QChar, QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn int QString::find(QChar c, int i = 0, bool cs = true) const
Use indexOf() instead.
*/
/*!
\fn int QString::find(const QString &s, int i = 0, bool cs = true) const
Use indexOf() instead.
*/
/*!
\fn int QString::findRev(QChar c, int i = -1, bool cs = true) const
Use lastIndexOf() instead.
*/
/*!
\fn int QString::findRev(const QString &s, int i = -1, bool cs = true) const
Use lastIndexOf() instead.
*/
/*!
\fn int QString::find(const QRegExp &rx, int i=0) const
Use indexOf() instead.
*/
/*!
\fn int QString::find(QRegExp &rx, int i=0) const
\internal
\since 4.5
Use indexOf() instead.
*/
/*!
\fn int QString::findRev(const QRegExp &rx, int i=-1) const
Use lastIndexOf() instead.
*/
/*!
\fn int QString::findRev(QRegExp &rx, int i=0) const
\internal
\since 4.5
Use lastIndexOf() instead.
*/
/*!
\fn QBool QString::contains(QChar c, bool cs) const
Use the contains(QChar, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QBool QString::contains(const QString &s, bool cs) const
Use the contains(QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn bool QString::startsWith(const QString &s, bool cs) const
Use the startsWith(QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn bool QString::endsWith(const QString &s, bool cs) const
Use the endsWith(QString, Qt::CaseSensitive) overload instead.
*/
/*!
\fn QString QString::leftJustify(int width, QChar fill = QLatin1Char(' '), bool trunc=false) const
Use leftJustified() instead.
*/
/*!
\fn QString QString::rightJustify(int width, QChar fill = QLatin1Char(' '), bool trunc=false) const
Use rightJustified() instead.
*/
/*!
\fn QString QString::lower() const
Use toLower() instead.
*/
/*!
\fn QString QString::upper() const
Use toUpper() instead.
*/
/*!
\fn QString QString::stripWhiteSpace() const
Use trimmed() instead.
*/
/*!
\fn QString QString::simplifyWhiteSpace() const
Use simplified() instead.
*/
/*!
\fn QString &QString::setUnicodeCodes(const ushort *unicode_as_ushorts, int size)
Use setUtf16() instead.
*/
/*!
\fn ushort *QString::ucs2() const
Use utf16() instead.
*/
/*!
\fn QString QString::fromUcs2(const ushort *unicode, int size = -1)
Use fromUtf16() instead.
*/
/*!
\fn QString &QString::setAscii(const char *str, int len = -1)
Use fromAscii() instead.
*/
/*!
\fn QString &QString::setLatin1(const char *str, int len = -1)
Use fromLatin1() instead.
*/
/*!
\fn QChar QString::constref(uint i) const
Use at() instead.
*/
/*!
\fn QChar &QString::ref(uint i);
Use operator[]() instead.
*/
/*!
\fn QString::operator const char *() const
Use toAscii().constData() instead.
*/
/*!
\class QConstString
\brief The QConstString class is a wrapper for constant Unicode string data.
\compat
In Qt 4, QConstString is replaced by QString::fromRawData(), a
static function that constructs a QString object based on Unicode
string data.
Because QString::fromRawData() has slightly more stringent
constraints than QConstString had in Qt 3, the new QConstString
class takes a deep copy of the string data.
\sa QString::fromRawData()
*/
/*!
\fn QConstString::QConstString(const QChar *unicode, int size)
Use QString(\a unicode, \a size) or
QString::fromRawData(\a unicode, \a size) instead.
*/
/*!
\fn const QString &QConstString::string() const
Returns \c *this. Not necessary in Qt 4.
*/

View File

@ -185,7 +185,7 @@ public:
int capacity() const;
inline void reserve(int size);
inline void squeeze() { if (d->size < (int)d->alloc || d->ref != 1) realloc(); d->capacityReserved = false;}
inline void squeeze() { if (d->size < int(d->alloc) || d->ref != 1) realloc(); d->capacityReserved = false;}
inline const QChar *unicode() const;
inline QChar *data();
@ -337,7 +337,7 @@ public:
inline QString &prepend(const QLatin1String &s) { return insert(0, s); }
inline QString &operator+=(QChar c) {
if (d->ref != 1 || d->size + 1 > (int)d->alloc)
if (d->ref != 1 || d->size + 1 > int(d->alloc))
realloc(grow(d->size + 1));
d->data()[d->size++] = c.unicode();
d->data()[d->size] = '\0';
@ -633,7 +633,7 @@ public:
class Q_CORE_EXPORT QLatin1String
{
public:
inline explicit QLatin1String(const char *s) : m_size(s ? (int)strlen(s) : 0), m_data(s) {}
inline explicit QLatin1String(const char *s) : m_size(s ? int(strlen(s)) : 0), m_data(s) {}
inline const char *latin1() const { return m_data; }
inline int size() const { return m_size; }
@ -842,7 +842,7 @@ inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); }
inline QString::QString() : d(const_cast<Data *>(&shared_null.str)) {}
inline QString::~QString() { if (!d->ref.deref()) free(d); }
inline void QString::reserve(int asize) { if (d->ref != 1 || asize > (int)d->alloc) realloc(asize); d->capacityReserved = true;}
inline void QString::reserve(int asize) { if (d->ref != 1 || asize > int(d->alloc)) realloc(asize); d->capacityReserved = true;}
inline QString &QString::setUtf16(const ushort *autf16, int asize)
{ return setUnicode(reinterpret_cast<const QChar *>(autf16), asize); }
inline QCharRef QString::operator[](int i)

View File

@ -437,54 +437,6 @@ QString QtPrivate::QStringList_join(const QStringList *that, const QString &sep)
*/
#endif // QT_NO_DATASTREAM
/*!
\fn QStringList QStringList::grep(const QString &str, bool cs = true) const
Use filter() instead.
*/
/*!
\fn QStringList QStringList::grep(const QRegExp &rx) const
Use filter() instead.
*/
/*!
\fn QStringList &QStringList::gres(const QString &before, const QString &after, bool cs = true)
Use replaceInStrings() instead.
*/
/*!
\fn QStringList &QStringList::gres(const QRegExp &rx, const QString &after)
Use replaceInStrings() instead.
*/
/*!
\fn Iterator QStringList::fromLast()
Use end() instead.
\oldcode
QStringList::Iterator i = list.fromLast();
\newcode
QStringList::Iterator i = list.isEmpty() ? list.end() : --list.end();
\endcode
*/
/*!
\fn ConstIterator QStringList::fromLast() const
Use end() instead.
\oldcode
QStringList::ConstIterator i = list.fromLast();
\newcode
QStringList::ConstIterator i = list.isEmpty() ? list.end() : --list.end();
\endcode
*/
#ifndef QT_NO_REGEXP
static int indexOfMutating(const QStringList *that, QRegExp &rx, int from)

File diff suppressed because it is too large Load Diff

View File

@ -147,7 +147,9 @@ public:
inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0);
void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0);
int serialNumber() const;
#ifdef QT_DEPRECATED
QT_DEPRECATED int serialNumber() const;
#endif
qint64 cacheKey() const;
bool isDetached() const;

View File

@ -112,6 +112,7 @@ QPixmap qt_pixmapForBrush(int brushStyle, bool invert)
return pm;
}
static void qt_cleanup_brush_pattern_image_cache();
class QBrushPatternImageCache
{
public:
@ -123,6 +124,7 @@ public:
void init()
{
qAddPostRoutine(qt_cleanup_brush_pattern_image_cache);
for (int style = Qt::Dense1Pattern; style <= Qt::DiagCrossPattern; ++style) {
int i = style - Qt::Dense1Pattern;
m_images[i][0] = QImage(qt_patternForBrush(style, 0), 8, 8, 1, QImage::Format_MonoLSB);
@ -153,11 +155,7 @@ private:
bool m_initialized;
};
static void qt_cleanup_brush_pattern_image_cache();
Q_GLOBAL_STATIC_WITH_INITIALIZER(QBrushPatternImageCache, qt_brushPatternImageCache,
{
qAddPostRoutine(qt_cleanup_brush_pattern_image_cache);
})
Q_GLOBAL_STATIC(QBrushPatternImageCache, qt_brushPatternImageCache)
static void qt_cleanup_brush_pattern_image_cache()
{
@ -339,33 +337,29 @@ struct QBrushDataPointerDeleter
\sa Qt::BrushStyle, QPainter, QColor
*/
#ifndef QT_NO_THREAD
// Special deleter that only deletes if the ref-count goes to zero
template <>
class QGlobalStaticDeleter<QBrushData>
class QNullBrushData
{
public:
QGlobalStatic<QBrushData> &globalStatic;
QGlobalStaticDeleter(QGlobalStatic<QBrushData> &_globalStatic)
: globalStatic(_globalStatic)
{ }
inline ~QGlobalStaticDeleter()
QBrushData *brush;
QNullBrushData() : brush(new QBrushData)
{
if (!globalStatic.pointer->ref.deref())
delete globalStatic.pointer;
globalStatic.pointer = 0;
globalStatic.destroyed = true;
brush->ref = 1;
brush->style = Qt::BrushStyle(0);
brush->color = Qt::black;
}
~QNullBrushData()
{
if (!brush->ref.deref())
delete brush;
brush = 0;
}
};
#endif
Q_GLOBAL_STATIC_WITH_INITIALIZER(QBrushData, nullBrushInstance,
{
x->ref = 1;
x->style = Qt::BrushStyle(0);
x->color = Qt::black;
})
Q_GLOBAL_STATIC(QNullBrushData, nullBrushInstance_holder)
static QBrushData *nullBrushInstance()
{
return nullBrushInstance_holder()->brush;
}
static bool qbrush_check_type(Qt::BrushStyle style) {
switch (style) {

View File

@ -2799,6 +2799,9 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
return;
}
if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
op = Qt::ReplaceClip;
d->state->clipRegion = rect;
d->state->clipOperation = op;
if (op == Qt::NoClip || op == Qt::ReplaceClip)
@ -2854,6 +2857,9 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
return;
}
if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
op = Qt::ReplaceClip;
d->state->clipRegion = r;
d->state->clipOperation = op;
if (op == Qt::NoClip || op == Qt::ReplaceClip)
@ -3259,6 +3265,9 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
return;
}
if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
op = Qt::ReplaceClip;
d->state->clipPath = path;
d->state->clipOperation = op;
if (op == Qt::NoClip || op == Qt::ReplaceClip)

View File

@ -244,30 +244,25 @@ inline QPenPrivate::QPenPrivate(const QBrush &_brush, qreal _width, Qt::PenStyle
static const Qt::PenCapStyle qpen_default_cap = Qt::SquareCap;
static const Qt::PenJoinStyle qpen_default_join = Qt::BevelJoin;
#ifndef QT_NO_THREAD
// Special deleter that only deletes if the ref-count goes to zero
template <>
class QGlobalStaticDeleter<QPenPrivate>
class QPenDataHolder
{
public:
QGlobalStatic<QPenPrivate> &globalStatic;
QGlobalStaticDeleter(QGlobalStatic<QPenPrivate> &_globalStatic)
: globalStatic(_globalStatic)
QPenData *pen;
QPenDataHolder(const QBrush &brush, qreal width, Qt::PenStyle penStyle,
Qt::PenCapStyle penCapStyle, Qt::PenJoinStyle _joinStyle)
: pen(new QPenData(brush, width, penStyle, penCapStyle, _joinStyle))
{ }
inline ~QGlobalStaticDeleter()
~QPenDataHolder()
{
if (!globalStatic.pointer->ref.deref())
delete globalStatic.pointer;
globalStatic.pointer = 0;
globalStatic.destroyed = true;
if (!pen->ref.deref())
delete pen;
pen = 0;
}
};
#endif
Q_GLOBAL_STATIC_WITH_ARGS(QPenData, defaultPenInstance,
Q_GLOBAL_STATIC_WITH_ARGS(QPenDataHolder, defaultPenInstance,
(Qt::black, 0, Qt::SolidLine, qpen_default_cap, qpen_default_join))
Q_GLOBAL_STATIC_WITH_ARGS(QPenData, nullPenInstance,
Q_GLOBAL_STATIC_WITH_ARGS(QPenDataHolder, nullPenInstance,
(Qt::black, 0, Qt::NoPen, qpen_default_cap, qpen_default_join))
/*!
@ -276,7 +271,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QPenData, nullPenInstance,
QPen::QPen()
{
d = defaultPenInstance();
d = defaultPenInstance()->pen;
d->ref.ref();
}
@ -289,7 +284,7 @@ QPen::QPen()
QPen::QPen(Qt::PenStyle style)
{
if (style == Qt::NoPen) {
d = nullPenInstance();
d = nullPenInstance()->pen;
d->ref.ref();
} else {
d = new QPenData(Qt::black, 0, style, qpen_default_cap, qpen_default_join);

View File

@ -198,7 +198,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
Coord c = { 0, 0, // will be filled in later
glyph_width,
glyph_height, // texture coords
metrics.x.round().truncate(),
metrics.x.truncate(),
-metrics.y.truncate() }; // baseline for horizontal scripts
listItemCoordinates.insert(key, c);

View File

@ -2239,6 +2239,16 @@ int QFontDatabase::weight(const QString &family,
}
/*! \internal */
bool QFontDatabase::hasFamily(const QString &family) const
{
QString parsedFamily, foundry;
parseFontName(family, foundry, parsedFamily);
const QString familyAlias = resolveFontFamilyAlias(parsedFamily);
return families().contains(familyAlias, Qt::CaseInsensitive);
}
/*!
Returns the names the \a writingSystem (e.g. for displaying to the
user in a dialog).

View File

@ -134,6 +134,8 @@ public:
bool bold(const QString &family, const QString &style) const;
int weight(const QString &family, const QString &style) const;
bool hasFamily(const QString &family) const;
static QString writingSystemName(WritingSystem writingSystem);
static QString writingSystemSample(WritingSystem writingSystem);

View File

@ -1110,12 +1110,19 @@ QByteArray QFontEngine::convertToPostscriptFontFamilyName(const QByteArray &fami
return f;
}
Q_GLOBAL_STATIC_WITH_INITIALIZER(QVector<QRgb>, qt_grayPalette, {
x->resize(256);
QRgb *it = x->data();
for (int i = 0; i < x->size(); ++i, ++it)
*it = 0xff000000 | i | (i<<8) | (i<<16);
})
class QRgbGreyPalette: public QVector<QRgb>
{
public:
QRgbGreyPalette()
{
resize(256);
QRgb *it = data();
for (int i = 0; i < size(); ++i, ++it)
*it = 0xff000000 | i | (i<<8) | (i<<16);
}
};
Q_GLOBAL_STATIC(QVector<QRgb>, qt_grayPalette)
const QVector<QRgb> &QFontEngine::grayPalette()
{

View File

@ -319,6 +319,26 @@ static void appendItems(QScriptAnalysis *analysis, int &start, int &stop, const
start = stop;
}
static QChar::Direction skipBoundryNeutrals(QScriptAnalysis *analysis,
const ushort *unicode, int length,
int &sor, int &eor, QBidiControl &control)
{
QChar::Direction dir = control.basicDirection();
int level = sor > 0 ? analysis[sor - 1].bidiLevel : control.level;
while (sor < length) {
dir = QChar::direction(unicode[sor]);
// Keep skipping DirBN as if it doesn't exist
if (dir != QChar::DirBN)
break;
analysis[sor++].bidiLevel = level;
}
eor = sor;
if (eor == length)
dir = control.basicDirection();
return dir;
}
// creates the next QScript items.
static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiControl &control)
@ -430,8 +450,7 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
case QChar::DirAN:
if (eor >= 0) {
appendItems(analysis, sor, eor, control, dir);
dir = eor < length ? QChar::direction(unicode[eor]) : control.basicDirection();
status.eor = dir;
status.eor = dir = skipBoundryNeutrals(analysis, unicode, length, sor, eor, control);
} else {
eor = current; status.eor = dir;
}
@ -455,8 +474,7 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
}
eor = current - 1;
appendItems(analysis, sor, eor, control, dir);
dir = eor < length ? QChar::direction(unicode[eor]) : control.basicDirection();
status.eor = dir;
status.eor = dir = skipBoundryNeutrals(analysis, unicode, length, sor, eor, control);
} else {
if(status.eor != QChar::DirL) {
appendItems(analysis, sor, eor, control, dir);
@ -2790,7 +2808,7 @@ QFixed QTextEngine::alignLine(const QScriptLine &line)
if (align & Qt::AlignRight)
x = line.width - (line.textAdvance + leadingSpaceWidth(line));
else if (align & Qt::AlignHCenter)
x = (line.width - (line.textAdvance + leadingSpaceWidth(line)))/2;
x = (line.width - line.textAdvance)/2 - leadingSpaceWidth(line);
}
return x;
}
@ -2872,6 +2890,7 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end,
}
const HB_CharAttributes *attrs = attributes();
logClusters = this->logClusters(si);
clusterLength = getClusterLength(logClusters, attrs, 0, end, glyph_pos, &clusterStart);
if (clusterLength) {
@ -3032,6 +3051,22 @@ QStackTextEngine::QStackTextEngine(const QString &string, const QFont &f)
QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format)
: justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
num_chars(0), chars(0), logClusters(0), f(0), fontEngine(0)
{
f = font;
fontEngine = f->d->engineForScript(si.analysis.script);
Q_ASSERT(fontEngine);
initWithScriptItem(si);
}
QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format)
: flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe)
{
}
// Fix up flags and underlineStyle with given info
void QTextItemInt::initWithScriptItem(const QScriptItem &si)
{
// explicitly initialize flags so that initFontAttributes can be called
// multiple times on the same TextItem
@ -3040,13 +3075,10 @@ QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFo
flags |= QTextItem::RightToLeft;
ascent = si.ascent;
descent = si.descent;
f = font;
fontEngine = f->d->engineForScript(si.analysis.script);
Q_ASSERT(fontEngine);
if (format.hasProperty(QTextFormat::TextUnderlineStyle)) {
underlineStyle = format.underlineStyle();
} else if (format.boolProperty(QTextFormat::FontUnderline)
if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) {
underlineStyle = charFormat.underlineStyle();
} else if (charFormat.boolProperty(QTextFormat::FontUnderline)
|| f->d->underline) {
underlineStyle = QTextCharFormat::SingleUnderline;
}
@ -3055,18 +3087,12 @@ QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFo
if (underlineStyle == QTextCharFormat::SingleUnderline)
flags |= QTextItem::Underline;
if (f->d->overline || format.fontOverline())
if (f->d->overline || charFormat.fontOverline())
flags |= QTextItem::Overline;
if (f->d->strikeOut || format.fontStrikeOut())
if (f->d->strikeOut || charFormat.fontStrikeOut())
flags |= QTextItem::StrikeOut;
}
QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe)
: flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline),
num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe)
{
}
QTextItemInt QTextItemInt::midItem(QFontEngine *fontEngine, int firstGlyphIndex, int numGlyphs) const
{
QTextItemInt ti = *this;

View File

@ -314,11 +314,13 @@ public:
logClusters(0), f(0), fontEngine(0)
{}
QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe);
QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe,
const QTextCharFormat &format = QTextCharFormat());
/// copy the structure items, adjusting the glyphs arrays to the right subarrays.
/// the width of the returned QTextItemInt is not adjusted, for speed reasons
QTextItemInt midItem(QFontEngine *fontEngine, int firstGlyphIndex, int numGlyphs) const;
void initWithScriptItem(const QScriptItem &si);
QFixed descent;
QFixed ascent;

View File

@ -2418,13 +2418,13 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR
unsigned short *logClusters = eng->logClusters(&si);
QGlyphLayout glyphs = eng->shapedGlyphs(&si);
QTextItemInt gf(si, &f, format);
gf.glyphs = glyphs.mid(iterator.glyphsStart, iterator.glyphsEnd - iterator.glyphsStart);
gf.chars = eng->layoutData->string.unicode() + iterator.itemStart;
QTextItemInt gf(glyphs.mid(iterator.glyphsStart, iterator.glyphsEnd - iterator.glyphsStart),
&f, eng->layoutData->string.unicode() + iterator.itemStart,
iterator.itemEnd - iterator.itemStart, eng->fontEngine(si), format);
gf.logClusters = logClusters + iterator.itemStart - si.position;
gf.num_chars = iterator.itemEnd - iterator.itemStart;
gf.width = iterator.itemWidth;
gf.justified = line.justified;
gf.initWithScriptItem(si);
Q_ASSERT(gf.fontEngine);

View File

@ -67,7 +67,7 @@ QNetworkAccessFileBackendFactory::create(QNetworkAccessManager::Operation op,
QUrl url = request.url();
if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0 || url.isLocalFile()) {
return new QNetworkAccessFileBackend;
} else if (!url.scheme().isEmpty() && url.authority().isEmpty()) {
} else if (!url.scheme().isEmpty() && url.authority().isEmpty() && (url.scheme().length() > 1)) {
// check if QFile could, in theory, open this URL via the file engines
// it has to be in the format:
// prefix:path/to/file
@ -75,8 +75,6 @@ QNetworkAccessFileBackendFactory::create(QNetworkAccessManager::Operation op,
//
// this construct here must match the one below in open()
QFileInfo fi(url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery));
if ((url.scheme().length()==1) && fi.exists())
qWarning("QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files");
if (fi.exists() || (op == QNetworkAccessManager::PutOperation && fi.dir().exists()))
return new QNetworkAccessFileBackend;
}

View File

@ -1022,6 +1022,20 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
return reply;
}
/*!
\since 5.0
Flushes the internal cache of authentication data and network connections.
This function is useful for doing auto tests.
*/
void QNetworkAccessManager::clearAccessCache()
{
QNetworkAccessManagerPrivate::clearCache(this);
}
void QNetworkAccessManagerPrivate::_q_replyFinished()
{
Q_Q(QNetworkAccessManager);

View File

@ -100,6 +100,8 @@ public:
explicit QNetworkAccessManager(QObject *parent = 0);
~QNetworkAccessManager();
void clearAccessCache();
#ifndef QT_NO_NETWORKPROXY
QNetworkProxy proxy() const;
void setProxy(const QNetworkProxy &proxy);

View File

@ -913,30 +913,6 @@ bool QHostAddress::isNull() const
return d->protocol == QAbstractSocket::UnknownNetworkLayerProtocol;
}
/*!
\fn quint32 QHostAddress::ip4Addr() const
Use toIPv4Address() instead.
*/
/*!
\fn bool QHostAddress::isIp4Addr() const
Use protocol() instead.
*/
/*!
\fn bool QHostAddress::isIPv4Address() const
Use protocol() instead.
*/
/*!
\fn bool QHostAddress::isIPv6Address() const
Use protocol() instead.
*/
/*!
\since 4.5

View File

@ -1525,7 +1525,7 @@ QList<QSslError> QSslSocketBackendPrivate::verify(QList<QSslCertificate> certifi
}
}
_q_sslErrorList()->mutex.lock();
QMutexLocker sslErrorListMutexLocker(&_q_sslErrorList()->mutex);
// Register a custom callback to get all verification errors.
X509_STORE_set_verify_cb_func(certStore, q_X509Callback);
@ -1585,7 +1585,7 @@ QList<QSslError> QSslSocketBackendPrivate::verify(QList<QSslCertificate> certifi
const QList<QPair<int, int> > errorList = _q_sslErrorList()->errors;
_q_sslErrorList()->errors.clear();
_q_sslErrorList()->mutex.unlock();
sslErrorListMutexLocker.unlock();
// Translate the errors
if (QSslCertificatePrivate::isBlacklisted(certificateChain[0])) {

View File

@ -0,0 +1,573 @@
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** 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.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QRBTREE_P_H
#define QRBTREE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
template <class T>
struct QRBTree
{
struct Node
{
inline Node() : parent(0), left(0), right(0), red(true) { }
inline ~Node() {if (left) delete left; if (right) delete right;}
T data;
Node *parent;
Node *left;
Node *right;
bool red;
};
inline QRBTree() : root(0), freeList(0) { }
inline ~QRBTree();
inline void clear();
void attachBefore(Node *parent, Node *child);
void attachAfter(Node *parent, Node *child);
inline Node *front(Node *node) const;
inline Node *back(Node *node) const;
Node *next(Node *node) const;
Node *previous(Node *node) const;
inline void deleteNode(Node *&node);
inline Node *newNode();
// Return 1 if 'left' comes after 'right', 0 if equal, and -1 otherwise.
// 'left' and 'right' cannot be null.
int order(Node *left, Node *right);
inline bool validate() const;
private:
void rotateLeft(Node *node);
void rotateRight(Node *node);
void update(Node *node);
inline void attachLeft(Node *parent, Node *child);
inline void attachRight(Node *parent, Node *child);
int blackDepth(Node *top) const;
bool checkRedBlackProperty(Node *top) const;
void swapNodes(Node *n1, Node *n2);
void detach(Node *node);
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
void rebalance(Node *node);
public:
Node *root;
private:
Node *freeList;
};
template <class T>
inline QRBTree<T>::~QRBTree()
{
clear();
while (freeList) {
// Avoid recursively calling the destructor, as this list may become large.
Node *next = freeList->right;
freeList->right = 0;
delete freeList;
freeList = next;
}
}
template <class T>
inline void QRBTree<T>::clear()
{
if (root)
delete root;
root = 0;
}
template <class T>
void QRBTree<T>::rotateLeft(Node *node)
{
// | | //
// N B //
// / \ / \ //
// A B ---> N D //
// / \ / \ //
// C D A C //
Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
ref = node->right;
node->right->parent = node->parent;
// : //
// N //
// / :| //
// A B //
// / \ //
// C D //
node->right = ref->left;
if (ref->left)
ref->left->parent = node;
// : | //
// N B //
// / \ : \ //
// A C D //
ref->left = node;
node->parent = ref;
// | //
// B //
// / \ //
// N D //
// / \ //
// A C //
}
template <class T>
void QRBTree<T>::rotateRight(Node *node)
{
// | | //
// N A //
// / \ / \ //
// A B ---> C N //
// / \ / \ //
// C D D B //
Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
ref = node->left;
node->left->parent = node->parent;
node->left = ref->right;
if (ref->right)
ref->right->parent = node;
ref->right = node;
node->parent = ref;
}
template <class T>
void QRBTree<T>::update(Node *node) // call this after inserting a node
{
for (;;) {
Node *parent = node->parent;
// if the node is the root, color it black
if (!parent) {
node->red = false;
return;
}
// if the parent is black, the node can be left red
if (!parent->red)
return;
// at this point, the parent is red and cannot be the root
Node *grandpa = parent->parent;
Q_ASSERT(grandpa);
Node *uncle = (parent == grandpa->left ? grandpa->right : grandpa->left);
if (uncle && uncle->red) {
// grandpa's black, parent and uncle are red.
// let parent and uncle be black, grandpa red and recursively update grandpa.
Q_ASSERT(!grandpa->red);
parent->red = false;
uncle->red = false;
grandpa->red = true;
node = grandpa;
continue;
}
// at this point, uncle is black
if (node == parent->right && parent == grandpa->left)
rotateLeft(node = parent);
else if (node == parent->left && parent == grandpa->right)
rotateRight(node = parent);
parent = node->parent;
if (parent == grandpa->left) {
rotateRight(grandpa);
parent->red = false;
grandpa->red = true;
} else {
rotateLeft(grandpa);
parent->red = false;
grandpa->red = true;
}
return;
}
}
template <class T>
inline void QRBTree<T>::attachLeft(Node *parent, Node *child)
{
Q_ASSERT(!parent->left);
parent->left = child;
child->parent = parent;
update(child);
}
template <class T>
inline void QRBTree<T>::attachRight(Node *parent, Node *child)
{
Q_ASSERT(!parent->right);
parent->right = child;
child->parent = parent;
update(child);
}
template <class T>
void QRBTree<T>::attachBefore(Node *parent, Node *child)
{
if (!root)
update(root = child);
else if (!parent)
attachRight(back(root), child);
else if (parent->left)
attachRight(back(parent->left), child);
else
attachLeft(parent, child);
}
template <class T>
void QRBTree<T>::attachAfter(Node *parent, Node *child)
{
if (!root)
update(root = child);
else if (!parent)
attachLeft(front(root), child);
else if (parent->right)
attachLeft(front(parent->right), child);
else
attachRight(parent, child);
}
template <class T>
void QRBTree<T>::swapNodes(Node *n1, Node *n2)
{
// Since iterators must not be invalidated, it is not sufficient to only swap the data.
if (n1->parent == n2) {
n1->parent = n2->parent;
n2->parent = n1;
} else if (n2->parent == n1) {
n2->parent = n1->parent;
n1->parent = n2;
} else {
qSwap(n1->parent, n2->parent);
}
qSwap(n1->left, n2->left);
qSwap(n1->right, n2->right);
qSwap(n1->red, n2->red);
if (n1->parent) {
if (n1->parent->left == n2)
n1->parent->left = n1;
else
n1->parent->right = n1;
} else {
root = n1;
}
if (n2->parent) {
if (n2->parent->left == n1)
n2->parent->left = n2;
else
n2->parent->right = n2;
} else {
root = n2;
}
if (n1->left)
n1->left->parent = n1;
if (n1->right)
n1->right->parent = n1;
if (n2->left)
n2->left->parent = n2;
if (n2->right)
n2->right->parent = n2;
}
template <class T>
void QRBTree<T>::detach(Node *node) // call this before removing a node.
{
if (node->right)
swapNodes(node, front(node->right));
Node *child = (node->left ? node->left : node->right);
if (!node->red) {
if (child && child->red)
child->red = false;
else
rebalance(node);
}
Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
ref = child;
if (child)
child->parent = node->parent;
node->left = node->right = node->parent = 0;
}
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
template <class T>
void QRBTree<T>::rebalance(Node *node)
{
Q_ASSERT(!node->red);
for (;;) {
if (!node->parent)
return;
// at this point, node is not a parent, it is black, thus it must have a sibling.
Node *sibling = (node == node->parent->left ? node->parent->right : node->parent->left);
Q_ASSERT(sibling);
if (sibling->red) {
sibling->red = false;
node->parent->red = true;
if (node == node->parent->left)
rotateLeft(node->parent);
else
rotateRight(node->parent);
sibling = (node == node->parent->left ? node->parent->right : node->parent->left);
Q_ASSERT(sibling);
}
// at this point, the sibling is black.
Q_ASSERT(!sibling->red);
if ((!sibling->left || !sibling->left->red) && (!sibling->right || !sibling->right->red)) {
bool parentWasRed = node->parent->red;
sibling->red = true;
node->parent->red = false;
if (parentWasRed)
return;
node = node->parent;
continue;
}
// at this point, at least one of the sibling's children is red.
if (node == node->parent->left) {
if (!sibling->right || !sibling->right->red) {
Q_ASSERT(sibling->left);
sibling->red = true;
sibling->left->red = false;
rotateRight(sibling);
sibling = sibling->parent;
Q_ASSERT(sibling);
}
sibling->red = node->parent->red;
node->parent->red = false;
Q_ASSERT(sibling->right->red);
sibling->right->red = false;
rotateLeft(node->parent);
} else {
if (!sibling->left || !sibling->left->red) {
Q_ASSERT(sibling->right);
sibling->red = true;
sibling->right->red = false;
rotateLeft(sibling);
sibling = sibling->parent;
Q_ASSERT(sibling);
}
sibling->red = node->parent->red;
node->parent->red = false;
Q_ASSERT(sibling->left->red);
sibling->left->red = false;
rotateRight(node->parent);
}
return;
}
}
template <class T>
inline typename QRBTree<T>::Node *QRBTree<T>::front(Node *node) const
{
while (node->left)
node = node->left;
return node;
}
template <class T>
inline typename QRBTree<T>::Node *QRBTree<T>::back(Node *node) const
{
while (node->right)
node = node->right;
return node;
}
template <class T>
typename QRBTree<T>::Node *QRBTree<T>::next(Node *node) const
{
if (node->right)
return front(node->right);
while (node->parent && node == node->parent->right)
node = node->parent;
return node->parent;
}
template <class T>
typename QRBTree<T>::Node *QRBTree<T>::previous(Node *node) const
{
if (node->left)
return back(node->left);
while (node->parent && node == node->parent->left)
node = node->parent;
return node->parent;
}
template <class T>
int QRBTree<T>::blackDepth(Node *top) const
{
if (!top)
return 0;
int leftDepth = blackDepth(top->left);
int rightDepth = blackDepth(top->right);
if (leftDepth != rightDepth)
return -1;
if (!top->red)
++leftDepth;
return leftDepth;
}
template <class T>
bool QRBTree<T>::checkRedBlackProperty(Node *top) const
{
if (!top)
return true;
if (top->left && !checkRedBlackProperty(top->left))
return false;
if (top->right && !checkRedBlackProperty(top->right))
return false;
return !(top->red && ((top->left && top->left->red) || (top->right && top->right->red)));
}
template <class T>
inline bool QRBTree<T>::validate() const
{
return checkRedBlackProperty(root) && blackDepth(root) != -1;
}
template <class T>
inline void QRBTree<T>::deleteNode(Node *&node)
{
Q_ASSERT(node);
detach(node);
node->right = freeList;
freeList = node;
node = 0;
}
template <class T>
inline typename QRBTree<T>::Node *QRBTree<T>::newNode()
{
if (freeList) {
Node *node = freeList;
freeList = freeList->right;
node->parent = node->left = node->right = 0;
node->red = true;
return node;
}
return new Node;
}
// Return 1 if 'left' comes after 'right', 0 if equal, and -1 otherwise.
// 'left' and 'right' cannot be null.
template <class T>
int QRBTree<T>::order(Node *left, Node *right)
{
Q_ASSERT(left && right);
if (left == right)
return 0;
QVector<Node *> leftAncestors;
QVector<Node *> rightAncestors;
while (left) {
leftAncestors.push_back(left);
left = left->parent;
}
while (right) {
rightAncestors.push_back(right);
right = right->parent;
}
Q_ASSERT(leftAncestors.back() == root && rightAncestors.back() == root);
while (!leftAncestors.empty() && !rightAncestors.empty() && leftAncestors.back() == rightAncestors.back()) {
leftAncestors.pop_back();
rightAncestors.pop_back();
}
if (!leftAncestors.empty())
return (leftAncestors.back() == leftAncestors.back()->parent->left ? -1 : 1);
if (!rightAncestors.empty())
return (rightAncestors.back() == rightAncestors.back()->parent->right ? -1 : 1);
// The code should never reach this point.
Q_ASSERT(!leftAncestors.empty() || !rightAncestors.empty());
return 0;
}
QT_END_NAMESPACE
#endif

View File

@ -53,11 +53,11 @@
#include <QtCore/qglobal.h>
#include <QtCore/qpoint.h>
#include <QtCore/qalgorithms.h>
#include <QtDebug>
#include <math.h>
#include <private/qgl_p.h>
#include <private/qrbtree_p.h>
#include <math.h>
QT_BEGIN_NAMESPACE
@ -587,521 +587,6 @@ T QMaxHeap<T>::pop()
return result;
}
//============================================================================//
// QRBTree //
//============================================================================//
template <class T>
struct QRBTree
{
struct Node
{
inline Node() : parent(0), left(0), right(0), red(true) { }
inline ~Node() {if (left) delete left; if (right) delete right;}
T data;
Node *parent;
Node *left;
Node *right;
bool red;
};
inline QRBTree() : root(0), freeList(0) { }
inline ~QRBTree();
inline void clear();
void attachBefore(Node *parent, Node *child);
void attachAfter(Node *parent, Node *child);
inline Node *front(Node *node) const;
inline Node *back(Node *node) const;
Node *next(Node *node) const;
Node *previous(Node *node) const;
inline void deleteNode(Node *&node);
inline Node *newNode();
// Return 1 if 'left' comes after 'right', 0 if equal, and -1 otherwise.
// 'left' and 'right' cannot be null.
int order(Node *left, Node *right);
inline bool validate() const;
private:
void rotateLeft(Node *node);
void rotateRight(Node *node);
void update(Node *node);
inline void attachLeft(Node *parent, Node *child);
inline void attachRight(Node *parent, Node *child);
int blackDepth(Node *top) const;
bool checkRedBlackProperty(Node *top) const;
void swapNodes(Node *n1, Node *n2);
void detach(Node *node);
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
void rebalance(Node *node);
public:
Node *root;
private:
Node *freeList;
};
template <class T>
inline QRBTree<T>::~QRBTree()
{
clear();
while (freeList) {
// Avoid recursively calling the destructor, as this list may become large.
Node *next = freeList->right;
freeList->right = 0;
delete freeList;
freeList = next;
}
}
template <class T>
inline void QRBTree<T>::clear()
{
if (root)
delete root;
root = 0;
}
template <class T>
void QRBTree<T>::rotateLeft(Node *node)
{
// | | //
// N B //
// / \ / \ //
// A B ---> N D //
// / \ / \ //
// C D A C //
Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
ref = node->right;
node->right->parent = node->parent;
// : //
// N //
// / :| //
// A B //
// / \ //
// C D //
node->right = ref->left;
if (ref->left)
ref->left->parent = node;
// : | //
// N B //
// / \ : \ //
// A C D //
ref->left = node;
node->parent = ref;
// | //
// B //
// / \ //
// N D //
// / \ //
// A C //
}
template <class T>
void QRBTree<T>::rotateRight(Node *node)
{
// | | //
// N A //
// / \ / \ //
// A B ---> C N //
// / \ / \ //
// C D D B //
Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
ref = node->left;
node->left->parent = node->parent;
node->left = ref->right;
if (ref->right)
ref->right->parent = node;
ref->right = node;
node->parent = ref;
}
template <class T>
void QRBTree<T>::update(Node *node) // call this after inserting a node
{
for (;;) {
Node *parent = node->parent;
// if the node is the root, color it black
if (!parent) {
node->red = false;
return;
}
// if the parent is black, the node can be left red
if (!parent->red)
return;
// at this point, the parent is red and cannot be the root
Node *grandpa = parent->parent;
Q_ASSERT(grandpa);
Node *uncle = (parent == grandpa->left ? grandpa->right : grandpa->left);
if (uncle && uncle->red) {
// grandpa's black, parent and uncle are red.
// let parent and uncle be black, grandpa red and recursively update grandpa.
Q_ASSERT(!grandpa->red);
parent->red = false;
uncle->red = false;
grandpa->red = true;
node = grandpa;
continue;
}
// at this point, uncle is black
if (node == parent->right && parent == grandpa->left)
rotateLeft(node = parent);
else if (node == parent->left && parent == grandpa->right)
rotateRight(node = parent);
parent = node->parent;
if (parent == grandpa->left) {
rotateRight(grandpa);
parent->red = false;
grandpa->red = true;
} else {
rotateLeft(grandpa);
parent->red = false;
grandpa->red = true;
}
return;
}
}
template <class T>
inline void QRBTree<T>::attachLeft(Node *parent, Node *child)
{
Q_ASSERT(!parent->left);
parent->left = child;
child->parent = parent;
update(child);
}
template <class T>
inline void QRBTree<T>::attachRight(Node *parent, Node *child)
{
Q_ASSERT(!parent->right);
parent->right = child;
child->parent = parent;
update(child);
}
template <class T>
void QRBTree<T>::attachBefore(Node *parent, Node *child)
{
if (!root)
update(root = child);
else if (!parent)
attachRight(back(root), child);
else if (parent->left)
attachRight(back(parent->left), child);
else
attachLeft(parent, child);
}
template <class T>
void QRBTree<T>::attachAfter(Node *parent, Node *child)
{
if (!root)
update(root = child);
else if (!parent)
attachLeft(front(root), child);
else if (parent->right)
attachLeft(front(parent->right), child);
else
attachRight(parent, child);
}
template <class T>
void QRBTree<T>::swapNodes(Node *n1, Node *n2)
{
// Since iterators must not be invalidated, it is not sufficient to only swap the data.
if (n1->parent == n2) {
n1->parent = n2->parent;
n2->parent = n1;
} else if (n2->parent == n1) {
n2->parent = n1->parent;
n1->parent = n2;
} else {
qSwap(n1->parent, n2->parent);
}
qSwap(n1->left, n2->left);
qSwap(n1->right, n2->right);
qSwap(n1->red, n2->red);
if (n1->parent) {
if (n1->parent->left == n2)
n1->parent->left = n1;
else
n1->parent->right = n1;
} else {
root = n1;
}
if (n2->parent) {
if (n2->parent->left == n1)
n2->parent->left = n2;
else
n2->parent->right = n2;
} else {
root = n2;
}
if (n1->left)
n1->left->parent = n1;
if (n1->right)
n1->right->parent = n1;
if (n2->left)
n2->left->parent = n2;
if (n2->right)
n2->right->parent = n2;
}
template <class T>
void QRBTree<T>::detach(Node *node) // call this before removing a node.
{
if (node->right)
swapNodes(node, front(node->right));
Node *child = (node->left ? node->left : node->right);
if (!node->red) {
if (child && child->red)
child->red = false;
else
rebalance(node);
}
Node *&ref = (node->parent ? (node == node->parent->left ? node->parent->left : node->parent->right) : root);
ref = child;
if (child)
child->parent = node->parent;
node->left = node->right = node->parent = 0;
}
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
template <class T>
void QRBTree<T>::rebalance(Node *node)
{
Q_ASSERT(!node->red);
for (;;) {
if (!node->parent)
return;
// at this point, node is not a parent, it is black, thus it must have a sibling.
Node *sibling = (node == node->parent->left ? node->parent->right : node->parent->left);
Q_ASSERT(sibling);
if (sibling->red) {
sibling->red = false;
node->parent->red = true;
if (node == node->parent->left)
rotateLeft(node->parent);
else
rotateRight(node->parent);
sibling = (node == node->parent->left ? node->parent->right : node->parent->left);
Q_ASSERT(sibling);
}
// at this point, the sibling is black.
Q_ASSERT(!sibling->red);
if ((!sibling->left || !sibling->left->red) && (!sibling->right || !sibling->right->red)) {
bool parentWasRed = node->parent->red;
sibling->red = true;
node->parent->red = false;
if (parentWasRed)
return;
node = node->parent;
continue;
}
// at this point, at least one of the sibling's children is red.
if (node == node->parent->left) {
if (!sibling->right || !sibling->right->red) {
Q_ASSERT(sibling->left);
sibling->red = true;
sibling->left->red = false;
rotateRight(sibling);
sibling = sibling->parent;
Q_ASSERT(sibling);
}
sibling->red = node->parent->red;
node->parent->red = false;
Q_ASSERT(sibling->right->red);
sibling->right->red = false;
rotateLeft(node->parent);
} else {
if (!sibling->left || !sibling->left->red) {
Q_ASSERT(sibling->right);
sibling->red = true;
sibling->right->red = false;
rotateLeft(sibling);
sibling = sibling->parent;
Q_ASSERT(sibling);
}
sibling->red = node->parent->red;
node->parent->red = false;
Q_ASSERT(sibling->left->red);
sibling->left->red = false;
rotateRight(node->parent);
}
return;
}
}
template <class T>
inline typename QRBTree<T>::Node *QRBTree<T>::front(Node *node) const
{
while (node->left)
node = node->left;
return node;
}
template <class T>
inline typename QRBTree<T>::Node *QRBTree<T>::back(Node *node) const
{
while (node->right)
node = node->right;
return node;
}
template <class T>
typename QRBTree<T>::Node *QRBTree<T>::next(Node *node) const
{
if (node->right)
return front(node->right);
while (node->parent && node == node->parent->right)
node = node->parent;
return node->parent;
}
template <class T>
typename QRBTree<T>::Node *QRBTree<T>::previous(Node *node) const
{
if (node->left)
return back(node->left);
while (node->parent && node == node->parent->left)
node = node->parent;
return node->parent;
}
template <class T>
int QRBTree<T>::blackDepth(Node *top) const
{
if (!top)
return 0;
int leftDepth = blackDepth(top->left);
int rightDepth = blackDepth(top->right);
if (leftDepth != rightDepth)
return -1;
if (!top->red)
++leftDepth;
return leftDepth;
}
template <class T>
bool QRBTree<T>::checkRedBlackProperty(Node *top) const
{
if (!top)
return true;
if (top->left && !checkRedBlackProperty(top->left))
return false;
if (top->right && !checkRedBlackProperty(top->right))
return false;
return !(top->red && ((top->left && top->left->red) || (top->right && top->right->red)));
}
template <class T>
inline bool QRBTree<T>::validate() const
{
return checkRedBlackProperty(root) && blackDepth(root) != -1;
}
template <class T>
inline void QRBTree<T>::deleteNode(Node *&node)
{
Q_ASSERT(node);
detach(node);
node->right = freeList;
freeList = node;
node = 0;
}
template <class T>
inline typename QRBTree<T>::Node *QRBTree<T>::newNode()
{
if (freeList) {
Node *node = freeList;
freeList = freeList->right;
node->parent = node->left = node->right = 0;
node->red = true;
return node;
}
return new Node;
}
// Return 1 if 'left' comes after 'right', 0 if equal, and -1 otherwise.
// 'left' and 'right' cannot be null.
template <class T>
int QRBTree<T>::order(Node *left, Node *right)
{
Q_ASSERT(left && right);
if (left == right)
return 0;
QVector<Node *> leftAncestors;
QVector<Node *> rightAncestors;
while (left) {
leftAncestors.push_back(left);
left = left->parent;
}
while (right) {
rightAncestors.push_back(right);
right = right->parent;
}
Q_ASSERT(leftAncestors.back() == root && rightAncestors.back() == root);
while (!leftAncestors.empty() && !rightAncestors.empty() && leftAncestors.back() == rightAncestors.back()) {
leftAncestors.pop_back();
rightAncestors.pop_back();
}
if (!leftAncestors.empty())
return (leftAncestors.back() == leftAncestors.back()->parent->left ? -1 : 1);
if (!rightAncestors.empty())
return (rightAncestors.back() == rightAncestors.back()->parent->right ? -1 : 1);
// The code should never reach this point.
Q_ASSERT(!leftAncestors.empty() || !rightAncestors.empty());
return 0;
}
//============================================================================//
// QInt64Hash //
//============================================================================//

View File

@ -65,6 +65,7 @@ SOURCES += qgl.cpp \
gl2paintengineex/qglcustomshaderstage_p.h \
gl2paintengineex/qtriangulatingstroker_p.h \
gl2paintengineex/qtriangulator_p.h \
gl2paintengineex/qrbtree_p.h \
gl2paintengineex/qtextureglyphcache_gl_p.h \
gl2paintengineex/qglshadercache_p.h \
gl2paintengineex/qglshadercache_meego_p.h

View File

@ -9,6 +9,8 @@ DEFINES += QT_QWS_KBD_LINUXINPUT
HEADERS = qlinuxinput.h
QT += core-private
SOURCES = main.cpp \
qlinuxinput.cpp

View File

@ -14,9 +14,9 @@ LinuxTouchScreen:/dev/input/eventN to explicitly set the device file
name.
By default the surface of the touch device is mapped to the entire
screen. If this is not desired, define FORCE_TO_ACTIVE_WINDOW in
qtoucheventsenderqpa.cpp. This will map the touch surface to the
active window instead.
screen. If this is not desired, pass force_window in the plugin
specification. This will cause mapping the touch surface to the active
window instead.
Only touch events are generated (via
QWindowSystemInterface::handleTouchEvent), mouse events are not. This

View File

@ -67,8 +67,8 @@ QObject* QTouchScreenPlugin::create(const QString &key,
const QString &spec)
{
if (!key.compare(QLatin1String("LinuxTouchScreen"), Qt::CaseInsensitive)) {
QTouchScreenHandler *h = new QTouchScreenHandler(spec);
h->addObserver(new QTouchEventSenderQPA);
QTouchScreenObserver *obs = new QTouchEventSenderQPA(spec);
QTouchScreenHandlerThread *h = new QTouchScreenHandlerThread(spec, obs);
return h;
}

View File

@ -47,7 +47,11 @@
QT_BEGIN_NAMESPACE
//#define POINT_DEBUG
//#define FORCE_TO_ACTIVE_WINDOW
QTouchEventSenderQPA::QTouchEventSenderQPA(const QString &spec)
{
m_forceToActiveWindow = spec.split(QLatin1Char(':')).contains(QLatin1String("force_window"));
}
void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int y_max)
{
@ -60,21 +64,18 @@ void QTouchEventSenderQPA::touch_configure(int x_min, int x_max, int y_min, int
void QTouchEventSenderQPA::touch_point(QEvent::Type state,
const QList<QWindowSystemInterface::TouchPoint> &points)
{
#ifdef FORCE_TO_ACTIVE_WINDOW
QWidget *win = QApplication::activeWindow(); // ### migrate to QWindow later on
if (!win) {
#ifdef POINT_DEBUG
qDebug("sendTouchEvent: No active window");
#endif
return;
QRect winRect;
if (m_forceToActiveWindow) {
QWidget *win = QApplication::activeWindow(); // ### migrate to QWindow later on
if (!win)
return;
winRect = win->geometry();
} else {
winRect = QApplication::desktop()->screenGeometry();
}
const QRect winRect = win->geometry();
#else
const QRect winRect = QApplication::desktop()->screenGeometry();
#endif
#ifdef POINT_DEBUG
qDebug() << points.size() << "points" << winRect << state;
qDebug() << "QPA: Mapping" << points.size() << "points to" << winRect << state;
#endif
QList<QWindowSystemInterface::TouchPoint> touchPoints = points;

View File

@ -51,10 +51,12 @@ QT_BEGIN_NAMESPACE
class QTouchEventSenderQPA : public QTouchScreenObserver
{
public:
QTouchEventSenderQPA(const QString &spec = QString());
void touch_configure(int x_min, int x_max, int y_min, int y_max);
void touch_point(QEvent::Type state, const QList<QWindowSystemInterface::TouchPoint> &points);
private:
bool m_forceToActiveWindow;
int hw_range_x_min;
int hw_range_x_max;
int hw_range_y_min;

View File

@ -43,6 +43,7 @@
#include <QStringList>
#include <QSocketNotifier>
#include <QtCore/private/qcore_unix_p.h>
#include <QTimer>
#include <QDebug>
#include <libudev.h>
@ -58,9 +59,9 @@ QT_BEGIN_NAMESPACE
class QTouchScreenData
{
public:
QTouchScreenData(QTouchScreenHandler *q_ptr);
QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList &args);
void handle(input_event *data);
void processInputEvent(input_event *data);
QTouchScreenHandler *q;
QEvent::Type m_state;
@ -78,6 +79,8 @@ public:
QMap<int, Slot> m_slots;
QMap<int, QPoint> m_lastReport;
int m_currentSlot;
QTimer m_clearTimer;
bool m_clearTimerEnabled;
int hw_range_x_min;
int hw_range_x_max;
@ -88,7 +91,7 @@ public:
QList<QTouchScreenObserver *> m_observers;
};
QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr)
QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr, const QStringList &args)
: q(q_ptr),
m_state(QEvent::TouchBegin),
m_prevState(m_state),
@ -96,6 +99,15 @@ QTouchScreenData::QTouchScreenData(QTouchScreenHandler *q_ptr)
hw_range_x_min(0), hw_range_x_max(0),
hw_range_y_min(0), hw_range_y_max(0)
{
m_clearTimerEnabled = !args.contains(QLatin1String("no_timeout"));
if (m_clearTimerEnabled) {
QObject::connect(&m_clearTimer, SIGNAL(timeout()), q, SLOT(onTimeout()));
m_clearTimer.setSingleShot(true);
m_clearTimer.setInterval(2000); // default timeout is 2 seconds
for (int i = 0; i < args.count(); ++i)
if (args.at(i).startsWith(QLatin1String("timeout=")))
m_clearTimer.setInterval(args.at(i).mid(8).toInt());
}
}
QTouchScreenHandler::QTouchScreenHandler(const QString &spec)
@ -130,7 +142,7 @@ QTouchScreenHandler::QTouchScreenHandler(const QString &spec)
return;
}
d = new QTouchScreenData(this);
d = new QTouchScreenData(this, args);
input_absinfo absInfo;
memset(&absInfo, 0, sizeof(input_absinfo));
@ -203,12 +215,25 @@ void QTouchScreenHandler::readData()
} else if (n > 0) {
for (int i = 0; i < n; ++i) {
input_event *data = &buffer[i];
d->handle(data);
d->processInputEvent(data);
}
}
}
void QTouchScreenData::handle(input_event *data)
void QTouchScreenHandler::onTimeout()
{
#ifdef POINT_DEBUG
qDebug("TIMEOUT (%d slots)", d->m_slots.count());
#endif
d->m_slots.clear();
if (d->m_state != QEvent::TouchEnd)
for (int i = 0; i < d->m_observers.count(); ++i)
d->m_observers.at(i)->touch_point(QEvent::TouchEnd,
QList<QWindowSystemInterface::TouchPoint>());
d->m_state = QEvent::TouchBegin;
}
void QTouchScreenData::processInputEvent(input_event *data)
{
if (data->type == EV_ABS) {
if (data->code == ABS_MT_POSITION_X) {
@ -233,6 +258,8 @@ void QTouchScreenData::handle(input_event *data)
m_slots[m_currentSlot].state = Qt::TouchPointReleased;
}
} else if (data->type == EV_SYN && data->code == SYN_REPORT) {
if (m_clearTimerEnabled)
m_clearTimer.stop();
m_touchPoints.clear();
QList<int> keys = m_slots.keys();
int ignoredSlotCount = 0;
@ -270,10 +297,6 @@ void QTouchScreenData::handle(input_event *data)
}
}
// ### TODO Add timestamps and remove points that stay unchanged for too long.
// The user's finger may fall off the touchscreen, which means there will be
// no released event sent ever for that particular point.
#ifdef POINT_DEBUG
qDebug() << m_touchPoints.count() << "touchpoints, event type" << m_state;
for (int i = 0; i < m_touchPoints.count(); ++i)
@ -294,6 +317,13 @@ void QTouchScreenData::handle(input_event *data)
m_state = QEvent::TouchUpdate;
else if (m_state == QEvent::TouchEnd)
m_state = QEvent::TouchBegin;
// The user's finger may fall off the touchscreen which in some rare
// cases may mean there will be no released event ever received for that
// particular point. Use a timer to clear all points when no activity
// occurs for a certain period of time.
if (m_clearTimerEnabled && m_state != QEvent::TouchBegin)
m_clearTimer.start();
}
}

View File

@ -75,6 +75,7 @@ public:
private slots:
void readData();
void onTimeout();
private:
void try_udev(QString *path);

Some files were not shown because too many files have changed in this diff Show More