summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig.tests/unix/fvisibility.test4
-rw-r--r--demos/spectrum/3rdparty/fftreal/fftreal.pro1
-rw-r--r--demos/spectrum/app/app.pro2
-rw-r--r--demos/spectrum/app/engine.cpp53
-rw-r--r--demos/spectrum/app/engine.h56
-rw-r--r--demos/spectrum/app/frequencyspectrum.cpp53
-rw-r--r--demos/spectrum/app/frequencyspectrum.h47
-rw-r--r--demos/spectrum/app/levelmeter.cpp53
-rw-r--r--demos/spectrum/app/levelmeter.h47
-rw-r--r--demos/spectrum/app/main.cpp57
-rw-r--r--demos/spectrum/app/mainwidget.cpp53
-rw-r--r--demos/spectrum/app/mainwidget.h58
-rw-r--r--demos/spectrum/app/progressbar.cpp53
-rw-r--r--demos/spectrum/app/progressbar.h47
-rw-r--r--demos/spectrum/app/settingsdialog.cpp53
-rw-r--r--demos/spectrum/app/settingsdialog.h59
-rw-r--r--demos/spectrum/app/spectrograph.cpp53
-rw-r--r--demos/spectrum/app/spectrograph.h51
-rw-r--r--demos/spectrum/app/spectrum.h47
-rw-r--r--demos/spectrum/app/spectrumanalyser.cpp53
-rw-r--r--demos/spectrum/app/spectrumanalyser.h53
-rw-r--r--demos/spectrum/app/tonegenerator.cpp53
-rw-r--r--demos/spectrum/app/tonegenerator.h53
-rw-r--r--demos/spectrum/app/tonegeneratordialog.cpp53
-rw-r--r--demos/spectrum/app/tonegeneratordialog.h57
-rw-r--r--demos/spectrum/app/utils.cpp53
-rw-r--r--demos/spectrum/app/utils.h51
-rw-r--r--demos/spectrum/app/waveform.cpp53
-rw-r--r--demos/spectrum/app/waveform.h51
-rw-r--r--demos/spectrum/app/wavfile.cpp53
-rw-r--r--demos/spectrum/app/wavfile.h47
-rw-r--r--dist/changes-4.6.3419
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc463
-rwxr-xr-xdoc/src/template/style/style.css7
-rw-r--r--src/corelib/arch/qatomic_alpha.h12
-rw-r--r--src/corelib/kernel/qmetaobject.cpp7
-rw-r--r--src/corelib/tools/qvarlengtharray.h15
-rw-r--r--src/gui/egl/qegl.cpp8
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp8
-rw-r--r--src/opengl/qglbuffer.cpp92
-rw-r--r--src/opengl/qglbuffer.h9
-rw-r--r--src/testlib/qbenchmark.cpp2
-rw-r--r--src/testlib/qbenchmarkmeasurement.cpp7
-rw-r--r--src/testlib/qbenchmarkmeasurement_p.h1
-rw-r--r--tests/auto/qmetaobject/tst_qmetaobject.cpp51
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp4
-rw-r--r--tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp8
-rw-r--r--tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp298
-rw-r--r--tools/qdoc3/doc.cpp12
-rw-r--r--tools/qdoc3/htmlgenerator.cpp3
50 files changed, 1642 insertions, 1261 deletions
diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test
index 99e6fbe..5bc4b93 100755
--- a/config.tests/unix/fvisibility.test
+++ b/config.tests/unix/fvisibility.test
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -x
FVISIBILITY_SUPPORT=no
COMPILER=$1
@@ -34,7 +34,7 @@ EOF
case "$COMPILER" in
-gcc|g++)
+*g++*|*c++*)
CMDLINE="-fvisibility=hidden"
RunCompileTest
;;
diff --git a/demos/spectrum/3rdparty/fftreal/fftreal.pro b/demos/spectrum/3rdparty/fftreal/fftreal.pro
index 5dd02a4..8d9f46e 100644
--- a/demos/spectrum/3rdparty/fftreal/fftreal.pro
+++ b/demos/spectrum/3rdparty/fftreal/fftreal.pro
@@ -30,6 +30,7 @@ DEFINES += FFTREAL_LIBRARY
symbian {
# Provide unique ID for the generated binary, required by Symbian OS
TARGET.UID3 = 0xA000E3FB
+ TARGET.CAPABILITY = UserEnvironment
} else {
macx {
CONFIG += lib_bundle
diff --git a/demos/spectrum/app/app.pro b/demos/spectrum/app/app.pro
index a80ae9b..c4b0943 100644
--- a/demos/spectrum/app/app.pro
+++ b/demos/spectrum/app/app.pro
@@ -45,7 +45,7 @@ RESOURCES = spectrum.qrc
symbian {
# Platform security capability required to record audio on Symbian
- TARGET.CAPABILITY += UserEnvironment
+ TARGET.CAPABILITY = UserEnvironment
# Provide unique ID for the generated binary, required by Symbian OS
TARGET.UID3 = 0xA000E3FA
diff --git a/demos/spectrum/app/engine.cpp b/demos/spectrum/app/engine.cpp
index 5cdfb6d..119a0e3 100644
--- a/demos/spectrum/app/engine.cpp
+++ b/demos/spectrum/app/engine.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/engine.h b/demos/spectrum/app/engine.h
index 93733fe..b6fe3ed 100644
--- a/demos/spectrum/app/engine.h
+++ b/demos/spectrum/app/engine.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 ENGINE_H
#define ENGINE_H
@@ -61,13 +64,10 @@
#include <QDir>
#endif
-QT_BEGIN_NAMESPACE
-class QAudioInput;
-class QAudioOutput;
-class QFile;
-QT_END_NAMESPACE
-
class FrequencySpectrum;
+QT_FORWARD_DECLARE_CLASS(QAudioInput)
+QT_FORWARD_DECLARE_CLASS(QAudioOutput)
+QT_FORWARD_DECLARE_CLASS(QFile)
/**
* This class interfaces with the QtMultimedia audio classes, and also with
diff --git a/demos/spectrum/app/frequencyspectrum.cpp b/demos/spectrum/app/frequencyspectrum.cpp
index 6ab80c2..3057428 100644
--- a/demos/spectrum/app/frequencyspectrum.cpp
+++ b/demos/spectrum/app/frequencyspectrum.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/frequencyspectrum.h b/demos/spectrum/app/frequencyspectrum.h
index 0dd814e..d974a44 100644
--- a/demos/spectrum/app/frequencyspectrum.h
+++ b/demos/spectrum/app/frequencyspectrum.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 FREQUENCYSPECTRUM_H
#define FREQUENCYSPECTRUM_H
diff --git a/demos/spectrum/app/levelmeter.cpp b/demos/spectrum/app/levelmeter.cpp
index 39e43c9..819b98d 100644
--- a/demos/spectrum/app/levelmeter.cpp
+++ b/demos/spectrum/app/levelmeter.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/levelmeter.h b/demos/spectrum/app/levelmeter.h
index ab8340b..38d13b1 100644
--- a/demos/spectrum/app/levelmeter.h
+++ b/demos/spectrum/app/levelmeter.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 LEVELMETER_H
#define LEVELMETER_H
diff --git a/demos/spectrum/app/main.cpp b/demos/spectrum/app/main.cpp
index 6e2b6fc..3bdfb7d 100644
--- a/demos/spectrum/app/main.cpp
+++ b/demos/spectrum/app/main.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/mainwidget.cpp b/demos/spectrum/app/mainwidget.cpp
index 3b7c306..dd51a91 100644
--- a/demos/spectrum/app/mainwidget.cpp
+++ b/demos/spectrum/app/mainwidget.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/mainwidget.h b/demos/spectrum/app/mainwidget.h
index c59dbd6..b3dc352 100644
--- a/demos/spectrum/app/mainwidget.h
+++ b/demos/spectrum/app/mainwidget.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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
@@ -51,12 +54,11 @@ class LevelMeter;
class SettingsDialog;
class ToneGeneratorDialog;
-QT_BEGIN_NAMESPACE
-class QAudioFormat;
-class QLabel;
-class QPushButton;
-class QMenu;
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QAudioFormat)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QPushButton)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QAction)
QT_END_NAMESPACE
/**
diff --git a/demos/spectrum/app/progressbar.cpp b/demos/spectrum/app/progressbar.cpp
index 256acf0..6bfc690 100644
--- a/demos/spectrum/app/progressbar.cpp
+++ b/demos/spectrum/app/progressbar.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/progressbar.h b/demos/spectrum/app/progressbar.h
index de9e5a9..8514adb 100644
--- a/demos/spectrum/app/progressbar.h
+++ b/demos/spectrum/app/progressbar.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 PROGRESSBAR_H
#define PROGRESSBAR_H
diff --git a/demos/spectrum/app/settingsdialog.cpp b/demos/spectrum/app/settingsdialog.cpp
index 204b43f..b5e8459 100644
--- a/demos/spectrum/app/settingsdialog.cpp
+++ b/demos/spectrum/app/settingsdialog.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/settingsdialog.h b/demos/spectrum/app/settingsdialog.h
index fda518b..796b4af 100644
--- a/demos/spectrum/app/settingsdialog.h
+++ b/demos/spectrum/app/settingsdialog.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
@@ -42,13 +45,11 @@
#include <QDialog>
#include <QtMultimedia/QAudioDeviceInfo>
-QT_BEGIN_NAMESPACE
-class QComboBox;
-class QCheckBox;
-class QSlider;
-class QSpinBox;
-class QGridLayout;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QComboBox)
+QT_FORWARD_DECLARE_CLASS(QCheckBox)
+QT_FORWARD_DECLARE_CLASS(QSlider)
+QT_FORWARD_DECLARE_CLASS(QSpinBox)
+QT_FORWARD_DECLARE_CLASS(QGridLayout)
/**
* Dialog used to control settings such as the audio input / output device
diff --git a/demos/spectrum/app/spectrograph.cpp b/demos/spectrum/app/spectrograph.cpp
index 1fcf434..3ec0804 100644
--- a/demos/spectrum/app/spectrograph.cpp
+++ b/demos/spectrum/app/spectrograph.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/spectrograph.h b/demos/spectrum/app/spectrograph.h
index a7790ff..ce59d90 100644
--- a/demos/spectrum/app/spectrograph.h
+++ b/demos/spectrum/app/spectrograph.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 SPECTROGRAPH_H
#define SPECTROGRAPH_H
@@ -41,9 +44,7 @@
#include <QWidget>
#include "frequencyspectrum.h"
-QT_BEGIN_NAMESPACE
-class QMouseEvent;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QMouseEvent)
/**
* Widget which displays a spectrograph showing the frequency spectrum
diff --git a/demos/spectrum/app/spectrum.h b/demos/spectrum/app/spectrum.h
index 6cfe29f..cac320e 100644
--- a/demos/spectrum/app/spectrum.h
+++ b/demos/spectrum/app/spectrum.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 SPECTRUM_H
#define SPECTRUM_H
diff --git a/demos/spectrum/app/spectrumanalyser.cpp b/demos/spectrum/app/spectrumanalyser.cpp
index 54d3f5e..c467f61 100644
--- a/demos/spectrum/app/spectrumanalyser.cpp
+++ b/demos/spectrum/app/spectrumanalyser.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/spectrumanalyser.h b/demos/spectrum/app/spectrumanalyser.h
index f10da63..ab4abe1 100644
--- a/demos/spectrum/app/spectrumanalyser.h
+++ b/demos/spectrum/app/spectrumanalyser.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 SPECTRUMANALYSER_H
#define SPECTRUMANALYSER_H
@@ -55,10 +58,8 @@
#include "FFTRealFixLenParam.h"
#endif
-QT_BEGIN_NAMESPACE
-class QAudioFormat;
-class QThread;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QAudioFormat)
+QT_FORWARD_DECLARE_CLASS(QThread)
class FFTRealWrapper;
diff --git a/demos/spectrum/app/tonegenerator.cpp b/demos/spectrum/app/tonegenerator.cpp
index 6458a7d..470eb4c 100644
--- a/demos/spectrum/app/tonegenerator.cpp
+++ b/demos/spectrum/app/tonegenerator.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/tonegenerator.h b/demos/spectrum/app/tonegenerator.h
index d387768..bf31179 100644
--- a/demos/spectrum/app/tonegenerator.h
+++ b/demos/spectrum/app/tonegenerator.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 TONEGENERATOR_H
#define TONEGENERATOR_H
@@ -41,10 +44,8 @@
#include <QtCore/qglobal.h>
#include "spectrum.h"
-QT_BEGIN_NAMESPACE
-class QAudioFormat;
-class QByteArray;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QAudioFormat)
+QT_FORWARD_DECLARE_CLASS(QByteArray)
/**
* Generate a sine wave
diff --git a/demos/spectrum/app/tonegeneratordialog.cpp b/demos/spectrum/app/tonegeneratordialog.cpp
index 06e453c..01e1198 100644
--- a/demos/spectrum/app/tonegeneratordialog.cpp
+++ b/demos/spectrum/app/tonegeneratordialog.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/tonegeneratordialog.h b/demos/spectrum/app/tonegeneratordialog.h
index d6fcffa..c2aa892 100644
--- a/demos/spectrum/app/tonegeneratordialog.h
+++ b/demos/spectrum/app/tonegeneratordialog.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 TONEGENERATORDIALOG_H
#define TONEGENERATORDIALOG_H
@@ -42,12 +45,10 @@
#include <QDialog>
#include <QtMultimedia/QAudioDeviceInfo>
-QT_BEGIN_NAMESPACE
-class QCheckBox;
-class QSlider;
-class QSpinBox;
-class QGridLayout;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QCheckBox)
+QT_FORWARD_DECLARE_CLASS(QSlider)
+QT_FORWARD_DECLARE_CLASS(QSpinBox)
+QT_FORWARD_DECLARE_CLASS(QGridLayout)
/**
* Dialog which controls the parameters of the tone generator.
diff --git a/demos/spectrum/app/utils.cpp b/demos/spectrum/app/utils.cpp
index 97dc6e3..4ead6c2 100644
--- a/demos/spectrum/app/utils.cpp
+++ b/demos/spectrum/app/utils.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/utils.h b/demos/spectrum/app/utils.h
index 548f884..4e29030 100644
--- a/demos/spectrum/app/utils.h
+++ b/demos/spectrum/app/utils.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 UTILS_H
#define UTILS_H
@@ -41,9 +44,7 @@
#include <QtCore/qglobal.h>
#include <QDebug>
-QT_BEGIN_NAMESPACE
-class QAudioFormat;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QAudioFormat)
//-----------------------------------------------------------------------------
// Miscellaneous utility functions
diff --git a/demos/spectrum/app/waveform.cpp b/demos/spectrum/app/waveform.cpp
index 3fc4f76..1f7d315 100644
--- a/demos/spectrum/app/waveform.cpp
+++ b/demos/spectrum/app/waveform.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/waveform.h b/demos/spectrum/app/waveform.h
index 909e5ee..57c9eec 100644
--- a/demos/spectrum/app/waveform.h
+++ b/demos/spectrum/app/waveform.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 WAVEFORM_H
#define WAVEFORM_H
@@ -43,9 +46,7 @@
#include <QPixmap>
#include <QScopedPointer>
-QT_BEGIN_NAMESPACE
-class QByteArray;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QByteArray)
/**
* Widget which displays a section of the audio waveform.
diff --git a/demos/spectrum/app/wavfile.cpp b/demos/spectrum/app/wavfile.cpp
index ec911ad..b9467e3 100644
--- a/demos/spectrum/app/wavfile.cpp
+++ b/demos/spectrum/app/wavfile.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_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$
**
****************************************************************************/
diff --git a/demos/spectrum/app/wavfile.h b/demos/spectrum/app/wavfile.h
index 05866f7..f2f3304 100644
--- a/demos/spectrum/app/wavfile.h
+++ b/demos/spectrum/app/wavfile.h
@@ -9,31 +9,34 @@
** $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.
+** "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.
+** 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 WAVFILE_H
diff --git a/dist/changes-4.6.3 b/dist/changes-4.6.3
index 6a81f6a..3695f14 100644
--- a/dist/changes-4.6.3
+++ b/dist/changes-4.6.3
@@ -20,17 +20,14 @@ Merge Request: http://qt.gitorious.org
* General *
****************************************************************************
-New features
-------------
+Examples and Demos
+------------------
- - SomeClass, SomeOtherClass
- * New classes for foo, bar and baz
-
-Optimizations
--------------
-
- - Optimized foo in QSomeClass
- * See list of Important Behavior Changes below
+ - Added Spectrum analyzer demo application.
+ - Added exit softkey to Wiggly example.
+ - Added close button to Anomaly demo.
+ - [QTBUG-10635]: Fixed Anomaly demo controlstrip icon placement for very
+ small screens.
****************************************************************************
@@ -42,43 +39,98 @@ QtCore
- QStateMachine
* [QTBUG-8842] Ensure history configuration is cleared when a state
- machine is restarted
+ machine is restarted.
+
- QXmlStreamReader
- * [QTBUG-9196] fixed crash when parsing
+ * [QTBUG-9196] Fixed crash when parsing.
QtGui
-----
+ - QComboBox
+ * [QTBUG-10403] Fixed QComboBox ignoring the item data background role
+ for some styles.
+
+ - QCommonStyle
+ * [QTBUG-7137] Fixed a bug that led to missing text pixels in QTabBar when
+ using small font sizes.
+
+ - QCUPSSupport
+ * [QTBUG-10512] Fixed a potential crash with misconfigured CUPS printers.
+ * [QTBUG-6419] Make QCUPSSupport::printerHasPPD() release temporary file
+ handles.
+
+ - qDrawPixmaps()
+ * [QTBUG-8455] Fixed qDrawPixmaps() to draw on integer coordinates under
+ Mac OS X.
+
+ - QFontEngine
+ * [QTBUG-3976] Fixed a leak for QFont objects used in threads.
+
+ - QGifHandler
+ * [QTBUG-7037] Fixed QGifHandler::loopCount().
+ * [QTBUG-6696] Cache the sizes of images in an animated GIF.
+
- QGraphicsEffect
- * [QTBUG-5358] Fixed warnings and crash when painting graphics effects outside scene.
+ * [QTBUG-5358] Fixed warnings and crash when painting graphics effects
+ outside scene.
- QGraphicsItem
* [QTBUG-9391] Avoid a useless repaint when setting the cache mode to
DeviceCoordinateMode while already using that mode.
- * [QTBUG-8475] Fixed crash and loss of focus when deleting a child of a focus scope.
+ * [QTBUG-8475] Fixed crash and loss of focus when deleting a child of a
+ focus scope.
- QGraphicsProxyWidget
* [QTBUG-5349] Fixed tooltips not being shown for QGraphicsProxyWidget.
* [QTBUG-2883] Fixed tooltips appearing at wrong location.
- * [QTBUG-7296] Fixed painting artifacts on a scaled proxy when the view is scrolled.
+ * [QTBUG-7296] Fixed painting artifacts on a scaled proxy when the view
+ is scrolled.
- QGraphicsScene
- * [QTBUG-7863] Fixed incorrect blending when using QGraphicsItem:DeviceCoordinateCache
- and when the item is semi-transparent. If the item is transformed, the cache is now
- always fully repainted to avoid artifacts.
+ * [QTBUG-7863] Fixed incorrect blending when using
+ QGraphicsItem::DeviceCoordinateCache and when the item is semi-
+ transparent. If the item is transformed, the cache is now always fully
+ repainted to avoid artifacts.
- QGraphicsView
* Item tooltips are not clipped by the view anymore.
+ - QImageReader
+ * [QTBUG-7980] Fixed QImageReader::setAutoDetectImageFormat() to work with
+ plugins.
+
- QPainter
- * [QTBUG-10421] Fixed WebKit-specific justification bug for text containing
- more than one script.
+ * [QTBUG-8140] Speed up custom bitmap brushes under X11 without Xrender
+ support.
+ * [QTBUG-8032] Fixed drawing pixmaps onto bitmaps on X11 without Xrender
+ support.
+ * [QTBUG-10421] Fixed WebKit-specific justification bug for text containing
+ more than one script.
+
+ - QPDFBaseEngine
+ * [QTBUG-8451] Fixed line and point drawing in the PS and PDF generators.
+
+ - QPixmap
+ * [QTBUG-8606] Fixed QPixmap::load() to not modify referenced copies.
+
+ - QPSPrintEngine
+ * [QTBUG-10121] Fixed incorrect version setting for EPS files.
+ * [QTBUG-10140] Fixed generation of the %%BoundingBox operator to output
+ integer values instead of floating point values.
+
+ - QRasterPaintEngine
+ * [QTBUG-9036] Fixed ClearType text rendering on translucent surfaces under
+ Windows.
- QRegion
* [QTBUG-7699] Prevented crash on large x-coordinates.
+ - QTextDocument
+ * [QTBUG-10301] Fixed a leak in QTextDocument::print().
+
- QTextEdit
- * [QTBUG-9599] Fixed crash when copying the current text cursor as a result
+ * [QTBUG-9599] Fixed crash when copying the current text cursor as a result
of deleting a character.
- QTextEngine
@@ -92,82 +144,35 @@ QtGui
* [QTBUG-8557] Fixed bug in QTransform::type() potentially occuring
after using operator/ or operator* or their overloads.
- - Improved scrolling horizontally with a mouse wheel over sliders.
- - [QTBUG-7451] Gestures respect panels on QGraphicsView.
-
- - QCUPSSupport
- * [QTBUG-10512] Fixed a potential crash with misconfigured CUPS printers.
- * [QTBUG-6419] Make QCUPSSupport::printerHasPPD() release temporary file
- handles.
-
- - QPDFBaseEngine
- * [QTBUG-8451] Fixed line and point drawing in the PS and PDF generators.
-
- - QTextDocument
- * [QTBUG-10301] Fixed a leak in QTextDocument::print().
-
- - QFontEngine
- * [QTBUG-3976] Fixed a leak for QFont objects used in threads.
-
- - QPSPrintEngine
- * [QTBUG-10121] Fixed incorrect version setting for EPS files.
- * [QTBUG-10140] Fixed generation of the %%BoundingBox operator to output
- integer values instead of floating point values.
+ - QTriangulatingStroker
+ * [QTBUG-9548] Fixed possible data corruption when certain paths were
+ triangulated.
- QWin32PrintEngine
* [QTBUG-9938] Fixed a crash on Windows 7 systems with invalid PrinterPorts
registry entries.
- - QTriangulatingStroker
- * [QTBUG-9548] Fixed possible data corruption when certain paths were triangulated.
-
- - QRasterPaintEngine
- * [QTBUG-9036] Fixed ClearType text rendering on translucent surfaces under Windows.
-
- - QPixmap
- * [QTBUG-8606] Fixed QPixmap::load() to not modify referenced copies.
-
- - QPainter
- * [QTBUG-8140] Speed up custom bitmap brushes under X11 without Xrender support.
- * [QTBUG-8032] Fixed drawing pixmaps onto bitmaps on X11 without Xrender support.
-
- - QImageReader
- * [QTBUG-7980] Fixed QImageReader::setAutoDetectImageFormat() to work with plugins.
-
- - QGifHandler
- * [QTBUG-7037] Fixed QGifHandler::loopCount().
- * [QTBUG-6696] Cache the sizes of images in an animated GIF.
-
- - qDrawPixmaps()
- * [QTBUG-8455] Fixed qDrawPixmaps() to draw on integer coordinates under Mac OS X.
-
- - QCommonStyle
- * [QTBUG-7137] Fixed a bug that led to missing text pixels in QTabBar when using
- small font sizes.
-
-
-QtDBus
-------
-
- - foo
- * bar
-
-QtNetwork
----------
-
- - foo
- * bar
+ - Improved scrolling horizontally with a mouse wheel over sliders.
+ - [QTBUG-7451] Gestures respect panels on QGraphicsView.
QtOpenGL
--------
- QOpenGLPaintEngine
- * [QTBUG-10529] Fixed an issue where bound pixmaps were not released correctly
- in the GL 1 engine.
+ * [QTBUG-10529] Fixed an issue where bound pixmaps were not released
+ correctly in the GL 1 engine.
- QGL2PaintEngineEx
- * [QTBUG-8681] Fixed an application exit crash that could occur in
- the GL2 engine under X11.
+ * [QTBUG-8681] Fixed an application exit crash that could occur in the GL2
+ engine under X11.
+
+ - QGLContext
+ * [QTBUG-5732] Fixed a GLX warning that occured with some Intel chipsets
+ under X11.
+
+ - QGLPixelBuffer
+ * [QTBUG-8047] Fixed usage of QGLPixelBuffer with share widgets on other
+ X11 screens.
- QGLWidget
* [QTBUG-7545] Fixed QGLWidget::grabFrameBuffer() to honor the 'withAlpha' flag.
@@ -177,72 +182,38 @@ QtOpenGL
* [QTBUG-8753] Worked around driver bug causing clipping errors on the N900.
* [QTBUG-10510] Workaround ATI driver bug when using QGraphicsEffect with GL.
- - QGLContext
- * [QTBUG-5732] Fixed a GLX warning that occured with some Intel chipsets under X11.
-
- - QGLPixelBuffer
- * [QTBUG-8047] Fixed usage of QGLPixelBuffer with share widgets on other X11 screens.
-
QtScript
--------
- - [QTBUG-7066] Fixed regression introduced in 4.6.0 that made it not
- possible to change the prototype of the global object
- - [QTBUG-8366] Fixed regression introduced in 4.6.0 that caused the
- instanceof operator to throw an error when the right-hand-side is
- generated by QScriptEngine::newQMetaObject()
- - [QTBUG-8400] Fixed memory leak when lazily binding QScriptValue to an
- engine
- - [QTBUG-9775] Fixed regression introduced in 4.6.0 that caused the
- qsTr() function not to resolve the translation context correctly when
- invoked in the global scope
- - QScriptClass
- * [QTBUG-8364] Fixed regression introduced in 4.6.0 that could cause
- the Callable extension to crash
- - QScriptEngine
- * [QTBUG-6437] Fixed regression introduced in 4.6.0 that made
- installTranslatorFunctions() not work with custom global object
-
-QtSql
------
-
- - foo
- * bar
+ - [QTBUG-7066] Fixed regression introduced in 4.6.0 that made it impossible to
+ change the prototype of the global object.
+ - [QTBUG-8366] Fixed regression introduced in 4.6.0 that caused the instanceof
+ operator to throw an error when the right-hand-side is generated by
+ QScriptEngine::newQMetaObject().
+ - [QTBUG-8400] Fixed memory leak when lazily binding QScriptValue to an engine.
+ - [QTBUG-9775] Fixed regression introduced in 4.6.0 that caused the qsTr()
+ function not to resolve the translation context correctly when invoked in
+ the global scope.
+ - [QTBUG-8364] Fixed regression introduced in QScriptclass in 4.6.0 that could
+ cause the Callable extension to crash.
+ - [QTBUG-6437] Fixed regression introduced in QScriptEngine in 4.6.0 that made
+ installTranslatorFunctions() not work with custom global object.
QtXml
-----
- - [QTBUG-8398] QDom: prevent infinite loop when cloning a DTD
+ - [QTBUG-8398] QDom: prevent infinite loop when cloning a DTD.
QtXmlPatterns
-------------
-- [QTBUG-8920] fixed crash with anonymous types in XsdSchemaChecker
-- [QTBUG-8394] include/import/redefine schemas only once
-- QXmlSchema: fix crash with referencing elements
-
-Qt Plugins
-----------
-
- - foo
- * bar
-
-Third party components
-----------------------
-
- - Updated foo to version 2.3.9.
-
- - Updated bar to the latest version from baz.org.
-
+ - [QTBUG-8920] fixed crash with anonymous types in XsdSchemaChecker.
+ - [QTBUG-8394] include/import/redefine schemas only once.
+ - QXmlSchema: fix crash with referencing elements.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
-Qt for Unix (X11 and Mac OS X)
-------------------------------
-
- -
-
Qt for Linux/X11
----------------
@@ -250,6 +221,15 @@ Qt for Linux/X11
- [QTBUG-7063] Changed key bindings (XF86XK_MyComputer, Qt::Key_Launch0,
Key_Calculator) on X11 back to how it was in Qt 4.5 before MR 1742
accidentally changed it.
+ - [QTBUG-8666] Fixed a crash when using QIcon::fromTheme with icons declared
+ static.
+ - QGtkStyle
+ * [QTBUG-9240] Fixed a potensial crash in QGtkStyle when the gtk
+ theme engine is not unavaliable.
+ * [QTBUG-8537] Fixed a Glib-GObject-WARNING on application startup with
+ certain versions of GTK+.
+ * [QTBUG-8226] Fixed an atk_object_set_name assertion warning with certain
+ versions of GTK+.
Qt for Windows
--------------
@@ -257,26 +237,15 @@ Qt for Windows
- [QTBUG-6007] On Windows we query if there is a touch screen and do not try
to enable gestures otherwise.
- QLocalSocket
- * [QTBUG-7815] Pipe handle leak fixed, when closing a QLocalSocket that still has
- unwritten data.
+ * [QTBUG-7815] Pipe handle leak fixed, when closing a QLocalSocket that
+ still has unwritten data.
* [QTBUG-9681] Fixed closing state for local sockets with unwritten data.
- * [QTBUG-8418] Detection of Windows mobile 6.5 fixed.
-
-
-Qt for Mac OS X
----------------
+ * [QTBUG-8418] Detection of Windows Mobile 6.5 fixed.
- -
-
-Qt for Embedded Linux
----------------------
-
- -
-
-DirectFB
---------
-
- -
+ - [QTBUG-7662] Fixed an issue with clipped icon text.
+ - [QTBUG-7663] QFileIconProvider now show overlays when fetching native
+ filesystem icons.
+ - [QTBUG-8324] Fixed a potential crash when fetching native icons.
Qt for Windows CE
-----------------
@@ -288,34 +257,138 @@ Qt for Windows CE
- QWindowsMobileStyle
* [QTBUG-8419] Huge performance penalty for QTabWidget fixed for
- Windows mobile 6.5.
+ Windows Mobile 6.5.
* [QTBUG-8757] QTabBar scroll button size has been fixed.
+Qt for Mac
+-----------------
-Qt for Symbian
---------------
-
- - [QT-567] Implementation of QtMultimedia QAudio* APIs
- - [QTBUG-8919] Modified Phonon MMF backend to support video playback on
- platforms which use graphics surfaces (i.e. platforms using the
- New Graphics Architecture a.k.a. ScreenPlay)
+ - [QTBUG-8461] Fixed incorrect text rendering with document mode tabs.
-****************************************************************************
-* Tools *
-****************************************************************************
- - Designer
- * foo
+Qt for Symbian
+--------------
- - qdoc3
- * bar
+ - Multimedia
+ * [QT-567] Implementation of QtMultimedia QAudio* APIs.
+ * [QTBUG-8919] Modified Phonon MMF backend to support video playback on
+ platforms which use graphics surfaces (i.e. platforms using the
+ New Graphics Architecture a.k.a. ScreenPlay).
+
+ - mkspecs
+ * Changed pkg_prerules to not use default_deployment for vendor ID.
+ * Added forwarding headers for qplatformdefs.h in Symbian mkspecs.
+ * Added some missing IBY export paths to platform_path.prf.
+ * Fixed libstdcpp.dll version autodetection for Symbian.
+ * [QTBUG-7836]: Removed unnecessary dependency to moc.exe from Symbian
+ builds.
+ * [QT-1171]: Fixed libstdcpp.dll version autodetection.
+ * [QTBUG-8513]: Fixed misc FLM issues.
+ * [QT-2909]: Support for adding conditional MMP_RULES.
+ * [QT-3253]: Export .flm files always if they are different.
+ * [QTBUG-9279]: Made it possible to define more than one language using
+ pkg_prerules.
+ * [QTBUG-6795]: Made sure target path exists in qmake_extra_pre_targetdep.flm.
+ * [QTBUG-7883]: Only use unix-like tools when not building for Symbian
+ in Windows.
+
+ - configure
+ * [QTBUG-7942]: Fix QT_BUILD_KEY for Symbian in Windows builds.
+
+ IMPORTANT NOTE: The build key change causes all Qt for Symbian plugins
+ made with Qt 4.6.2 or earlier version incompatible with
+ Qt 4.6.3 and later.
+
+ * [QTBUG-9065]: Support for -qtlibinfix parameter in Symbian.
+
+ - qmake
+ * Changed canonical paths to absolute paths in symmake.
+ * Basic deployment support for ROM in Symbian.
+ * Add '.' dir as the first include directory in Symbian.
+ * [QT-3017]: Support for conditional subdirs.
+ * [QT-3083]: Expanded support for RSS_RULES.
+ * [QTBUG-8685]: RVCT 4 support to Symbian builds.
+ * [QT-3147]: Changed Symbian pkg files to deploy from under epoc32.
+ * [QT-2985]: Fix extensions section in bld.inf when CONFIG contains
+ symbian_test.
+
+ - S60installs
+ * Export qtdemoapps.iby to proper location.
+ * [QT-3163]: Removed QtDeclarative.dll deployment from qt.iby.
+
+ - QProcess
+ * [QTBUG-7735]: Fixed crash at application exit when QProcess was used in
+ Symbian.
+ * [QTBUG-8906]: Removed extra space from the command line passed to
+ QProcess in Symbian.
+
+ - QtGui
+ * QUnixPrintWidget is no longer declared in Symbian.
+ * [QTBUG-10207]: Fixed long menu item texts causing crash.
+ * [QTBUG-9910] Fixed incorrect dialog position when native AVKON combined
+ status-and-control pane is in use.
+ * [QTBUG-4875] Made QMessageBox match size with native Symbian messageBox.
+ * [QTBUG-5539] Fixed QMessageBox to stretch to screen width with very small
+ content.
+ * [QTBUG-7828] Fixed Virtual keyboard closing issue with Sym^3.
+ * [QTBUG-9480] Use focus widget palette colors to show T9 suggested or
+ autocompletion words in QCoeFepInputContext.
+ * [QTBUG-10006] Changed default supported text modes to all, instead of just
+ lower and upper cases in QCoeFepInputContext.
+ * [QT-3277] Support text selection in QCoeFepInputContext for Sym^3.
+ * [QT-3008] Fixed crash in QGraphicsScenePrivate::setFocusItemHelper.
+
+ - QS60Style
+ * [QTBUG-10697] Support native-like selection in item views.
+ * [QTBUG-10454] Made styled sliders match in size to native sliders.
+ * [QTBUG-10073] Fixed QMenu with a lot of menu items.
+ * [QTBUG-3102] Fixed QTabWidget icon size issue.
+ * [QTBUG-5001] Show combobox list as a popup instead of dropdown list.
+ * [QTBUG-7258] Fixed calculations of PM_FocusFrameVMargin and
+ PM_FocusFrameHMargin pixel metrics.
+ * [QTBUG-7996] Fixed squeezed scrollbar handle and groove ends.
+ * [QTBUG-8193] Fixed drag-n-drop drop area drawing issue.
+ * [QTBUG-8194] Removed scrollbar context menu support.
+ * [QTBUG-8704] Fixed palette issues when drawing highlighted text.
+ * [QTBUG-9212] Fixed itemview multiselection issues.
+ * [QTBUG-9321] Fixed very large spinboxes drawing issues.
+ * [QTBUG-9837] Fixed text cutting issues with narrow QComboBoxes.
+ * [QTBUG-9844] Fixed QTreeView branch drawing issues in right to left
+ UI layout.
+ * [QTBUG-9927] Fixed transparent list higlight to show up correctly for
+ S60 3rd edition FP1 devices.
+ * [QTBUG-10064] Removed focus frame drawing for context menus and popups.
+ * [QTBUG-10487] Fixed QToolButton to be drawn pressed when context menu
+ for that button is open.
+ * [QTBUG-10549] Fixed style to honor stylesheet when drawing focus frame
+ for QPushButtons.
+ * [QT-3295] Made QMenu to look more native-like.
+ * [QT-3185] Fixed border frames to be drawn transparent for Sym^3 devices.
+ * [QT-3148] Draw application background correctly when animated wallpaper
+ is used in Sym^3 device.
+ * [QT-3137] Launch virtual keyboard with single tap.
+ * [QT-3104] Re-locate QTabWidget's scrollbuttons to either side of widget.
+ * [QT-2179] Fixed QPushButton with text and QPushButton with standard icon
+ to be of same size.
+
+ - Examples & demos:
+ * Enabled more examples by default in Symbian builds.
+
+ - Documentation
+ * [QTBUG-9277]: Clarified pkg_prerules usage documentation.
+
+ - Plugins:
+ * Fixed sqlite3_v9.2.zip to export sqlite3.iby to correct location.
+
+ - General
+ * [QT-3055]: Fixed filename cases to support building Qt for Symbian in
+ Linux.
- - Linguist
- * baz
****************************************************************************
-* Important Behavior Changes *
+* Tools *
****************************************************************************
- -
+ - qmake
+ * Fixed qmake.pro for using with mingw
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 7568981..3bac8ce 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -46,71 +46,13 @@
/*!
\page model-view-programming.html
- \nextpage An Introduction to Model/View Programming
- \startpage index.html Qt Reference Documentation
\title Model/View Programming
- \brief A guide to the extensible model/view architecture used by Qt's
- item view classes.
+ \brief A guide to Qt's extensible model/view architecture.
- \ingroup frameworks-technologies
+ \section1 Introduction to Model/View Programming
- \list
- \o \l{An Introduction to Model/View Programming}
- \tableofcontents{1 An Introduction to Model/View Programming}
- \o \l{Using Models and Views}
- \tableofcontents{1 Using Models and Views}
- \o \l{Model Classes}
- \tableofcontents{1 Model Classes}
- \o \l{Creating New Models}
- \tableofcontents{1 Creating New Models}
- \o \l{View Classes}
- \tableofcontents{1 View Classes}
- \o \l{Handling Selections in Item Views}
- \tableofcontents{1 Handling Selections in Item Views}
- \o \l{Delegate Classes}
- \tableofcontents{1 Delegate Classes}
- \o \l{Item View Convenience Classes}
- \tableofcontents{1 Item View Convenience Classes}
- \o \l{Using Drag and Drop with Item Views}
- \tableofcontents{1 Using Drag and Drop with Item Views}
- \o \l{Proxy Models}
- \tableofcontents{1 Proxy Models}
- \o \l{Model Subclassing Reference}
- \tableofcontents{1 Model Subclassing Reference}
- \endlist
-
- \keyword Model/View Classes
- \section1 All Model/View Classes
-
- These classes use the model/view design pattern in which the
- underlying data (in the model) is kept separate from the way the data
- is presented and manipulated by the user (in the view).
-
- \annotatedlist model-view
-
- \section1 Related Examples
-
- \list
- \o \l{itemviews/dirview}{Dir View}
- \o \l{itemviews/spinboxdelegate}{Spin Box Delegate}
- \o \l{itemviews/pixelator}{Pixelator}
- \o \l{itemviews/simpletreemodel}{Simple Tree Model}
- \o \l{itemviews/chart}{Chart}
- \endlist
-*/
-
-/*!
- \page model-view-introduction.html
- \previouspage Model/View Programming
- \nextpage Using Models and Views
- \startpage index.html Qt Reference Documentation
-
- \title An Introduction to Model/View Programming
-
- \tableofcontents
-
- Qt 4 introduces a new set of item view classes that use a model/view
+ Qt 4 introduced a new set of item view classes that use a model/view
architecture to manage the relationship between data and the way it
is presented to the user. The separation of functionality introduced by
this architecture gives developers greater flexibility to customize the
@@ -121,7 +63,7 @@
view system. Each of the components in the architecture is explained,
and examples are given that show how to use the classes provided.
- \section1 The Model/View Architecture
+ \section2 The model/view architecture
Model-View-Controller (MVC) is a design pattern originating from
Smalltalk that is often used when building user interfaces.
@@ -185,7 +127,7 @@
model and view about the state of the editor.
\endlist
- \section2 Models
+ \section3 Models
All item models are based on the QAbstractItemModel class. This class
defines an interface that is used by views and delegates to access data.
@@ -225,7 +167,7 @@
QAbstractItemModel, QAbstractListModel, or QAbstractTableModel to create
your own custom models.
- \section2 Views
+ \section3 Views
Complete implementations are provided for different kinds of
views: QListView displays a list of items, QTableView displays data
@@ -237,7 +179,7 @@
The available views are examined in the section on \l{View Classes}.
- \section2 Delegates
+ \section3 Delegates
QAbstractItemDelegate is the abstract base class for delegates in the
model/view framework. Since Qt 4.4, the default delegate implementation is
@@ -251,7 +193,7 @@
Delegates are described in the section on \l{Delegate Classes}.
- \section2 Sorting
+ \section3 Sorting
There are two ways of approaching sorting in the model/view
architecture; which approach to choose depends on your underlying
@@ -272,7 +214,7 @@
before presenting the data in the view. This is covered in detail
in the section on \l {Proxy Models}.
- \section2 Convenience Classes
+ \section3 Convenience classes
A number of \e convenience classes are derived from the standard view
classes for the benefit of applications that rely on Qt's item-based
@@ -293,24 +235,13 @@
classes, such as QListView, QTableView, and QTreeView with
QStandardItemModel.
- \section1 The Model/View Components
+ \section1 Using models and views
- The following sections describe the way in which the model/view pattern
- is used in Qt. Each section provides an example of use, and is followed
- by a section showing how you can create new components.
-*/
-
-/*!
- \page model-view-using.html
- \contentspage model-view-programming.html Contents
- \previouspage An Introduction to Model/View Programming
- \nextpage Model Classes
+ The following sections explain how to use the model/view pattern
+ in Qt. Each section includes an an example and is followed by a
+ section showing how to create new components.
- \title Using Models and Views
-
- \tableofcontents
-
- \section1 Introduction
+ \section2 Two models included in Qt
Two of the standard models provided by Qt are QStandardItemModel and
QFileSystemModel. QStandardItemModel is a multi-purpose model that can be
@@ -325,7 +256,7 @@
to set up a model for use with ready-made views, and explore how to
manipulate data using model indexes.
- \section1 Using Views with an Existing Model
+ \section2 Using views with an existing model
The QListView and QTreeView classes are the most suitable views
to use with QFileSystemModel. The example presented below displays the
@@ -361,7 +292,7 @@
The \c index() function used in this case is unique to QFileSystemModel; we
supply it with a directory and it returns a model index. Model indexes are
- discussed in the \l{Model Classes} chapter.
+ discussed in \l{Model Classes}.
The rest of the function just displays the views within a splitter
widget, and runs the application's event loop:
@@ -369,23 +300,15 @@
\snippet doc/src/snippets/shareddirmodel/main.cpp 8
In the above example, we neglected to mention how to handle selections
- of items. This subject is covered in more detail in the chapter on
- \l{Handling Selections in Item Views}. Before examining how selections
- are handled, you may find it useful to read the \l{Model Classes} chapter
- which describes the concepts used in the model/view framework.
-*/
+ of items. This subject is covered in more detail in the section about
+ \l{Handling Selections in Item Views}.
-/*!
- \page model-view-model.html
- \contentspage model-view-programming.html Contents
- \previouspage Using Models and Views
- \nextpage Creating New Models
-
- \title Model Classes
+ \section1 Model classes
- \tableofcontents
+ Before examining how selections are handled, you may find it
+ useful to examine the concepts used in the model/view framework.
- \section1 Basic Concepts
+ \section2 Basic concepts
In the model/view architecture, the model provides a standard interface
that views and delegates use to access data. In Qt, the standard
@@ -401,11 +324,11 @@
Models also notify any attached views about changes to data through the
signals and slots mechanism.
- This chapter describes some basic concepts that are central to the way
+ This section describes some basic concepts that are central to the way
item of data are accessed by other components via a model class. More
- advanced concepts are discussed in later chapters.
+ advanced concepts are discussed in later sections.
- \section2 Model Indexes
+ \section3 Model indexes
To ensure that the representation of the data is kept separate from the
way it is accessed, the concept of a \e{model index} is introduced. Each
@@ -435,7 +358,7 @@
and the model index of a parent item. The following sections describe
and explain these properties in detail.
- \section2 Rows and Columns
+ \section3 Rows and columns
In its most basic form, a model can be accessed as a simple table in which
items are located by their row and column numbers. \e{This does not mean
@@ -468,7 +391,7 @@
section.
\endtable
- \section2 Parents of Items
+ \section3 Parents of items
The table-like interface to item data provided by models is ideal when
using data in a table or list view; the row and column number system maps
@@ -501,7 +424,7 @@
\snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 5
\endtable
- \section2 Item Roles
+ \section3 Item roles
Items in a model can perform various \e roles for other components,
allowing different kinds of data to be supplied for different situations.
@@ -534,7 +457,7 @@
interpret or ignore this information as required. It is also possible to
define additional roles for application-specific purposes.
- \section2 Summary of Concepts
+ \section3 Summary
\list
\o Model indexes give views and delegates information about the location
@@ -546,17 +469,16 @@
components, such as views and delegates.
\o If a valid model index is specified for the parent item when an index is
requested using \l{QAbstractItemModel::index()}{index()}, the index
- returned will refer to an item beneath that parent item in the
- model.
+ returned refers to an item beneath that parent item in the model.
The index obtained refers to a child of that item.
\o If an invalid model index is specified for the parent item when an index
is requested using \l{QAbstractItemModel::index()}{index()}, the index
- returned will refer to a top-level item in the model.
+ returned refers to a top-level item in the model.
\o The \l{Qt::ItemDataRole}{role} distinguishes between the
different kinds of data associated with an item.
\endlist
- \section2 Using Model Indexes
+ \section2 Using model indexes
To demonstrate how data can be retrieved from a model, using model
indexes, we set up a QFileSystemModel without a view and display the
@@ -610,26 +532,16 @@
to the model.
\endlist
+ \section2 Further reading
- \section1 Further Reading
-
- New models can be created by implementing the standard interface provided
- by QAbstractItemModel. In the \l{Creating New Models} chapter, we will
- demonstrate this by creating a convenient ready-to-use model for holding
- lists of strings.
-*/
-
-/*!
- \page model-view-view.html
- \contentspage model-view-programming.html Contents
- \previouspage Creating New Models
- \nextpage Handling Selections in Item Views
+ New models can be created by implementing the standard interface
+ provided by QAbstractItemModel. In the \l{Creating New Models}
+ section, we demonstrate this by creating a convenient ready-to-use
+ model for holding lists of strings.
- \title View Classes
+ \section1 View classes
- \tableofcontents
-
- \section1 Concepts
+ \section2 Concepts
In the model/view architecture, the view obtains items of data from the
model and presents them to the user. The way that the data is
@@ -668,7 +580,7 @@
subclassed from the QHeaderView class to provide more specialized
labels for views.
- \section1 Using an Existing View
+ \section2 Using an existing view
Qt provides three ready-to-use view classes that present data from
models in ways that are familiar to most users.
@@ -686,7 +598,7 @@
facilities, and can be customized to suit the needs of more specialized
user interfaces.
- \section2 Using a Model
+ \section3 Using a model
We take the string list model that \l{Creating New Models}{we created as
an example model}, set it up with some data, and construct a view to
@@ -697,8 +609,8 @@
Note that the \c StringListModel is declared as a \l QAbstractItemModel.
This allows us to use the abstract interface to the model, and
- ensures that the code will still work even if we replace the string list
- model with a different model in the future.
+ ensures that the code still works, even if we replace the string list
+ model with a different model.
The list view provided by \l QListView is sufficient for presenting
the items in the string list model. We construct the view, and set up
@@ -721,7 +633,7 @@
list model. Since the model is editable, the view automatically allows
each item in the list to be edited using the default delegate.
- \section2 Using Multiple Views onto the Same Model
+ \section3 Using multiple views of a model
Providing multiple views onto the same model is simply a matter of
setting the same model for each view. In the following code we create
@@ -745,7 +657,7 @@
selection model. This can be useful in certain situations but, for
many applications, a shared selection model is desirable.
- \section1 Handling Selections of Items
+ \section2 Handling selections of items
The mechanism for handling selections of items within views is provided
by the \l QItemSelectionModel class. All of the standard views construct
@@ -758,13 +670,12 @@
when we want to provide multiple consistent views onto the same model
data.
- Generally, unless you are subclassing a model or view, you will not
- need to manipulate the contents of selections directly. However, the
- interface to the selection model can be accessed, if required, and
- this is explored in the chapter on
- \l{Handling Selections in Item Views}.
+ Generally, unless you are subclassing a model or view, you don't
+ need to manipulate the contents of selections directly. However,
+ the interface to the selection model can be accessed, if required,
+ and this is explored in \l{Handling Selections in Item Views}.
- \section2 Sharing Selections Between Views
+ \section3 Sharing selections among views
Although it is convenient that the view classes provide their own
selection models by default, when we use more than one view onto the
@@ -788,19 +699,9 @@
each view; for example, a contiguous selection in a table view can be
represented as a fragmented set of highlighted items in a tree view.
-*/
-
-/*!
- \page model-view-delegate.html
- \contentspage model-view-programming.html Contents
- \previouspage Handling Selections in Item Views
- \nextpage Item View Convenience Classes
-
- \title Delegate Classes
-
- \tableofcontents
+ \section1 Delegate classes
- \section1 Concepts
+ \section2 Concepts
Unlike the Model-View-Controller pattern, the model/view design does not
include a completely separate component for managing interaction with
@@ -821,13 +722,13 @@
Editors for delegates can be implemented either by using widgets to manage
the editing process or by handling events directly.
- The first approach is covered later in this chapter, and it is also
+ The first approach is covered later in this section, and it is also
shown in the \l{Spin Box Delegate Example}{Spin Box Delegate} example.
The \l{Pixelator Example}{Pixelator} example shows how to create a
custom delegate that performs specialized rendering for a table view.
- \section1 Using an Existing Delegate
+ \section2 Using an existing delegate
The standard views provided with Qt use instances of \l QItemDelegate
to provide editing facilities. This default implementation of the
@@ -845,15 +746,15 @@
necessary to use this function when setting the delegate for a custom
view.
- \section1 A Simple Delegate
+ \section2 A simple delegate
- The delegate implemented here uses a \l QSpinBox to provide editing
- facilities, and is mainly intended for use with models that display
- integers. Although we set up a custom integer-based table model for
- this purpose, we could easily have used \l QStandardItemModel instead
- since the custom delegate will control data entry. We construct a
- table view to display the contents of the model, and this will use
- the custom delegate for editing.
+ The delegate implemented here uses a \l QSpinBox to provide
+ editing facilities, and is mainly intended for use with models
+ that display integers. Although we set up a custom integer-based
+ table model for this purpose, we could easily have used \l
+ QStandardItemModel instead, since the custom delegate controls
+ data entry. We construct a table view to display the contents of
+ the model, and this will use the custom delegate for editing.
\img spinboxdelegate-example.png
@@ -866,7 +767,7 @@
Note that no editor widgets are set up when the delegate is
constructed. We only construct an editor widget when it is needed.
- \section2 Providing an Editor
+ \section3 Providing an editor
In this example, when the table view needs to provide an editor, it
asks the delegate to provide an editor widget that is appropriate
@@ -906,7 +807,7 @@
the model, in which case we would need to cast the widget to the
appropriate type before accessing its member functions.
- \section2 Submitting Data to the Model
+ \section3 Submitting data to the model
When the user has finished editing the value in the spin box, the view
asks the delegate to store the edited value in the model by calling the
@@ -935,7 +836,7 @@
delegate with different kinds of models because \l{QVariant}
provides sensible default values for unexpected data.
- \section2 Updating the Editor's Geometry
+ \section3 Updating the editor's geometry
It is the responsibility of the delegate to manage the editor's
geometry. The geometry must be set when the editor is created, and
@@ -951,7 +852,7 @@
position the editor in relation to the other elements in the item.
\target EditingHints
- \section2 Editing Hints
+ \section3 Editing hints
After editing, delegates should provide hints to the other components
about the result of the editing process, and provide hints that will
@@ -982,19 +883,10 @@
Delegates do not have to emit these hints, but those that do not will
be less integrated into applications, and will be less usable than
those that emit hints to support common editing actions.
-*/
-
-/*!
- \page model-view-selection.html
- \contentspage model-view-programming.html Contents
- \previouspage View Classes
- \nextpage Delegate Classes
- \title Handling Selections in Item Views
+ \section1 Handling selections in item views
- \tableofcontents
-
- \section1 Concepts
+ \section2 Concepts
The selection model used in the item view classes offers many improvements
over the selection model used in Qt 3. It provides a more general
@@ -1022,8 +914,7 @@
after its application through the use of certain types of selection
commands. These are discussed later in this section.
-
- \section2 Current Item and Selected Items
+ \section3 Current item &amp selected items
In a view, there is always a current item and a selected item - two
independent states. An item can be the current item and selected at the
@@ -1068,8 +959,7 @@
be informed of changes to the selection model via the signals and slots
mechanism.
-
- \section1 Using a Selection Model
+ \section2 Using a selection model
The standard view classes provide default selection models that can
be used in most applications. A selection model belonging to one view
@@ -1088,8 +978,7 @@
each having a different effect on the selections already present in the
selection model.
-
- \section2 Selecting Items
+ \section3 Selecting items
To demonstrate some of the principal features of selections, we construct
an instance of a custom table model with 32 items in total, and open a
@@ -1122,12 +1011,12 @@
The selection of items can be modified using various operations that
are defined by the selection flags. The selection that results from
- these operations may have a complex structure, but will be represented
+ these operations may have a complex structure, but it is represented
efficiently by the selection model. The use of different selection
flags to manipulate the selected items is described when we examine
how to update a selection.
- \section2 Reading the Selection State
+ \section3 Reading the selection state
The model indexes stored in the selection model can be read using
the \l{QItemSelectionModel::selectedIndexes()}{selectedIndexes()}
@@ -1176,7 +1065,7 @@
Monitoring selections made by the user is straightforward with these
signals, but we can also update the selection model directly.
- \section2 Updating a Selection
+ \section3 Updating a selection
Selection commands are provided by a combination of selection flags,
defined by \l{QItemSelectionModel::SelectionFlag}.
@@ -1215,7 +1104,7 @@
with a command that is a combination of
\l{QItemSelectionModel::SelectionFlag}{Select} and
\l{QItemSelectionModel::SelectionFlag}{Rows}, the
- entire row containing the item referred to will be selected.
+ entire row containing the item referred to is selected.
The following code demonstrates the use of the
\l{QItemSelectionModel::SelectionFlag}{Rows} and
\l{QItemSelectionModel::SelectionFlag}{Columns} flags:
@@ -1248,7 +1137,7 @@
has the effect of resetting the selection model's collection of model
indexes.
- \section2 Selecting All Items in a Model
+ \section3 Selecting all items in a model
To select all items in a model, it is necessary to create a
selection for each level of the model that covers all items in that
@@ -1271,19 +1160,8 @@
\l{QAbstractItemModel::hasChildren()}{hasChildren()} function is used to
determine whether any given item is the parent of another level of
items.
-*/
-
-/*!
- \page model-view-creating-models.html
- \contentspage model-view-programming.html Contents
- \previouspage Model Classes
- \nextpage View Classes
-
- \title Creating New Models
- \tableofcontents
-
- \section1 Introduction
+ \section1 Creating new models
The separation of functionality between the model/view components allows
models to be created that can take advantage of existing views. This
@@ -1301,9 +1179,9 @@
for interfaces to simpler non-hierarchical data structures, and are
easier to use as a starting point for simple list and table models.
- In this chapter, we create a simple read-only model to explore
+ In this section, we create a simple read-only model to explore
the basic principles of the model/view architecture. Later in this
- chapter, we will adapt this simple model so that items can be modified
+ section, we adapt this simple model so that items can be modified
by the user.
For an example of a more complex model, see the
@@ -1312,21 +1190,21 @@
The requirements of QAbstractItemModel subclasses is described in more
detail in the \l{Model Subclassing Reference} document.
- \section1 Designing a Model
+ \section2 Designing a model
- When creating a new model for an existing data structure, it is important
- to consider which type of model should be used to provide an interface
- onto the data. If the data structure can be represented as a
- list or table of items, you can subclass QAbstractListModel or
- QAbstractTableModel since these classes provide suitable default
- implementations for many functions.
+ When creating a new model for an existing data structure, it is
+ important to consider which type of model should be used to
+ provide an interface onto the data. If the data structure can be
+ represented as a list or table of items, you can subclass
+ QAbstractListModel or QAbstractTableModel since these classes
+ provide suitable default implementations for many functions.
- However, if the underlying data structure can only be represented by a
- hierarchical tree structure, it is necessary to subclass
+ However, if the underlying data structure can only be represented
+ by a hierarchical tree structure, it is necessary to subclass
QAbstractItemModel. This approach is taken in the
\l{itemviews/simpletreemodel}{Simple Tree Model} example.
- In this chapter, we will implement a simple model based on a list of
+ In this section, we implement a simple model based on a list of
strings, so the QAbstractListModel provides an ideal base class on
which to build.
@@ -1338,7 +1216,7 @@
interact with it using the standard API. The model described below
provides a custom constructor for just this purpose.
- \section1 A Read-Only Example Model
+ \section2 A read-only example model
The model implemented here is a simple, non-hierarchical, read-only data
model based on the standard QStringListModel class. It has a \l QStringList
@@ -1355,7 +1233,6 @@
functions as there are default implementations for most of the
interface. The class declaration is as follows:
-
\snippet doc/src/snippets/stringlistmodel/model.h 0
\snippet doc/src/snippets/stringlistmodel/model.h 1
\codeline
@@ -1379,7 +1256,7 @@
The list of strings is stored internally in the \c stringList private
member variable.
- \section2 Dimensions of The Model
+ \section3 Dimensions of the model
We want the number of rows in the model to be the same as the number of
strings in the string list. We implement the
@@ -1394,7 +1271,7 @@
reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()}
function.
- \section2 Model Headers and Data
+ \section3 Model headers &amp data
For items in the view, we want to return the strings in the string list.
The \l{QAbstractItemModel::data()}{data()} function is responsible for
@@ -1433,7 +1310,7 @@
\l{Qt::ItemDataRole}{ToolTipRole} that views can use to
display information about items in a tooltip.
- \section1 An Editable Model
+ \section2 An editable model
The read-only model shows how simple choices could be presented to the
user but, for many applications, an editable list model is much more
@@ -1447,7 +1324,7 @@
\snippet doc/src/snippets/stringlistmodel/model.h 2
\snippet doc/src/snippets/stringlistmodel/model.h 3
- \section2 Making the Model Editable
+ \section3 Making the model editable
A delegate checks whether an item is editable before creating an
editor. The model must let the delegate know that its items are
@@ -1473,7 +1350,7 @@
\l{Qt::ItemDataRole}{EditRole} since this is the role used by the
standard item delegate. For boolean values, however, you can use
Qt::CheckStateRole and set the Qt::ItemIsUserCheckable flag; a
- checkbox will then be used for editing the value. The underlying
+ checkbox is then used for editing the value. The underlying
data in this model is the same for all roles, so this detail just
makes it easier to integrate the model with standard components.
@@ -1487,7 +1364,7 @@
\snippet doc/src/snippets/stringlistmodel/model.cpp 1
- \section2 Inserting and Removing Rows
+ \section3 Inserting &amp removing rows
It is possible to change the number of rows and columns in a model. In the
string list model it only makes sense to change the number of rows, so we
@@ -1536,39 +1413,29 @@
operation and let other components know that the dimensions of the model
have changed.
- \section1 Next Steps
+ \section2 Next steps
We can display the data provided by this model, or any other model, using
the \l QListView class to present the model's items in the form of a vertical
list.
For the string list model, this view also provides a default editor so that
the items can be manipulated. We examine the possibilities made available by
- the standard view classes in the chapter on \l{View Classes}.
+ the standard view classes in \l{View Classes}.
The \l{Model Subclassing Reference} document discusses the requirements of
QAbstractItemModel subclasses in more detail, and provides a guide to the
virtual functions that must be implemented to enable various features in
different types of models.
-*/
-
-/*!
- \page model-view-convenience.html
- \contentspage model-view-programming.html Contents
- \previouspage Delegate Classes
- \nextpage Using Drag and Drop with Item Views
-
- \title Item View Convenience Classes
- \tableofcontents
+ \section1 Item view convenience classes
- \section1 Overview
-
- Alongside the model/view classes, Qt 4 also includes standard widgets to
- provide classic item-based container widgets. These behave in a similar
- way to the item view classes in Qt 3, but have been rewritten to use the
- underlying model/view framework for performance and maintainability. The
- old item view classes are still available in the compatibility library
- (see the \l{porting4.html}{Porting Guide} for more information).
+ Qt 4 also introduced some standard widgets to provide classic
+ item-based container widgets. These behave in a similar way to the
+ item view classes in Qt 3, but have been rewritten to use the
+ underlying model/view framework for performance and
+ maintainability. The old item view classes are still available in
+ the compatibility library (see the \l{porting4.html}{Porting
+ Guide} for more information).
The item-based widgets have been given names which reflect their uses:
\c QListWidget provides a list of items, \c QTreeWidget displays a
@@ -1577,7 +1444,7 @@
class which implements common behavior for item selection and header
management.
- \section1 List Widgets
+ \section2 List widgets
Single level lists of items are typically displayed using a \c QListWidget
and a number of \c{QListWidgetItem}s. A list widget is constructed in the
@@ -1612,8 +1479,7 @@
\snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 4
\snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 5
-
- \section1 Tree Widgets
+ \section2 Tree widgets
Trees or hierarchical lists of items are provided by the \c QTreeWidget
and \c QTreeWidgetItem classes. Each item in the tree widget can have
@@ -1668,8 +1534,7 @@
\snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 8
\snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 9
-
- \section1 Table Widgets
+ \section2 Table widgets
Tables of items similar to those found in spreadsheet applications
are constructed with the \c QTableWidget and \c QTableWidgetItem. These
@@ -1693,7 +1558,7 @@
Note that the rows and columns in the table begin at zero.
- \section1 Common Features
+ \section2 Common features
There are a number of item-based features common to each of the
convenience classes that are available through the same interfaces
@@ -1702,7 +1567,7 @@
Look at the list of \l{Model/View Classes} for each of the widgets
for more details about the use of each function used.
- \section2 Hidden Items
+ \section3 Hidden items
It is sometimes useful to be able to hide items in an item view widget
rather than remove them. Items for all of the above widgets can be
@@ -1713,7 +1578,7 @@
Since this operation is item-based, the same function is available for
all three convenience classes.
- \section2 Selections
+ \section3 Selections
The way items are selected is controlled by the widget's selection mode
(\l{QAbstractItemView::SelectionMode}).
@@ -1764,7 +1629,7 @@
current item may not lie within the selection, depending on the way the
user formed the selection.
- \section2 Searching
+ \section3 Searching
It is often useful to be able to find items within an item view widget,
either as a developer or as a service to present to users. All three
@@ -1782,19 +1647,8 @@
The above code causes items in a tree widget to be selected if they
contain the text given in the search string. This pattern can also be
used in the list and table widgets.
-*/
-
-/*!
- \page model-view-dnd.html
- \contentspage model-view-programming.html Contents
- \previouspage Item View Convenience Classes
- \nextpage Proxy Models
- \title Using Drag and Drop with Item Views
-
- \tableofcontents
-
- \section1 Overview
+ \section1 Using drag &amp drop with item views
Qt's drag and drop infrastructure is fully supported by the model/view framework.
Items in lists, tables, and trees can be dragged within the views, and data can be
@@ -1813,7 +1667,7 @@
See also the \l{Model Subclassing Reference} for more information about
enabling drag and drop support in new models.
- \section1 Using Convenience Views
+ \section2 Using convenience views
Each of the types of item used with QListWidget, QTableWidget, and QTreeWidget
is configured to use a different set of flags by default. For example, each
@@ -1852,7 +1706,7 @@
\snippet doc/src/snippets/qlistwidget-dnd/mainwindow.cpp 1
- \section1 Using Model/View Classes
+ \section2 Using model/view classes
Setting up a view for drag and drop follows the same pattern used with the
convenience views. For example, a QListView can be set up in the same way as a
@@ -1874,7 +1728,7 @@
of QAbstractItemModel::removeRows(), either directly or by inheriting the
implementation from its base class.
- \section2 Enabling Drag and Drop for Items
+ \section3 Enabling drag &amp drop for items
Models indicate to views which items can be dragged, and which will accept drops,
by reimplementing the QAbstractItemModel::flags() function to provide suitable
@@ -1894,7 +1748,7 @@
obtain a default set of flags by calling its implementation of the flags()
function.
- \section2 Encoding Exported Data
+ \section3 Encoding exported data
When items of data are exported from a model in a drag and drop operation, they
are encoded into an appropriate format corresponding to one or more MIME types.
@@ -1923,7 +1777,7 @@
and that stream operators must be implemented for them. See the QMetaObject
class description for details.
- \section2 Inserting Dropped Data into a Model
+ \section3 Inserting dropped data into a model
The way that any given model handles dropped data depends on both its type
(list, table, or tree) and the way its contents is likely to be presented to
@@ -1988,7 +1842,7 @@
example shown here, the model only has one level, so this approach is not
appropriate.
- \section2 Decoding Imported Data
+ \section3 Decoding imported data
Each implementation of \l{QAbstractItemModel::dropMimeData()}{dropMimeData()} must
also decode the data and insert it into the model's underlying data structure.
@@ -2007,19 +1861,8 @@
QAbstractItemModel::insertRows() and QAbstractItemModel::setData() functions.
\sa {Item Views Puzzle Example}
-*/
-
-/*!
- \page model-view-proxy-models.html
- \contentspage model-view-programming.html Contents
- \previouspage Using Drag and Drop with Item Views
- \nextpage Model Subclassing Reference
- \title Proxy Models
-
- \tableofcontents
-
- \section1 Overview
+ \section1 Proxy models
In the model/view framework, items of data supplied by a single model can be shared
by any number of views, and each of these can possibly represent the same information
@@ -2042,7 +1885,7 @@
framework ensure that each view is updated appropriately no matter how many proxy models
are placed between itself and the source model.
- \section1 Using Proxy Models
+ \section2 Using proxy models
Proxy models can be inserted between an existing model and any number of views.
Qt is supplied with a standard proxy model, QSortFilterProxyModel, that is usually
@@ -2061,7 +1904,7 @@
in applications. More specialized proxy models can be created by subclassing this
classes and implementing the required comparison operations.
- \section1 Customizing Proxy Models
+ \section2 Customizing proxy models
Generally, the type of processing used in a proxy model involves mapping each item of
data from its original location in the source model to either a different location in
@@ -2074,7 +1917,7 @@
being supplied to views, and also allows the contents of a source model to
be supplied to views as pre-sorted data.
- \section2 Custom Filtering Models
+ \section3 Custom filtering models
The QSortFilterProxyModel class provides a filtering model that is fairly versatile,
and which can be used in a variety of common situations. For advanced users,
@@ -2095,7 +1938,7 @@
return true to ensure that all items are passed through to views; reimplementations
of these functions should return false to filter out individual rows and columns.
- \section2 Custom Sorting Models
+ \section3 Custom sorting models
QSortFilterProxyModel instances use Qt's built-in qStableSort() function to set up
mappings between items in the source model and those in the proxy model, allowing a
@@ -2103,18 +1946,8 @@
source model. To provide custom sorting behavior, reimplement the
\l{QSortFilterProxyModel::lessThan()}{lessThan()} function to perform custom
comparisons.
-*/
-
-/*!
- \page model-view-model-subclassing.html
- \contentspage model-view-programming.html Contents
- \previouspage Proxy Models
-
- \title Model Subclassing Reference
- \tableofcontents
-
- \section1 Introduction
+ \section1 Model subclassing reference
Model subclasses need to provide implementations of many of the virtual functions
defined in the QAbstractItemModel base class. The number of these functions that need
@@ -2143,13 +1976,13 @@
For more information, see the \l
{"Item View Classes" Chapter of C++ GUI Programming with Qt 4}.
- \section1 Item Data Handling
+ \section2 Item data handling
Models can provide varying levels of access to the data they provide: They can be
simple read-only components, some models may support resizing operations, and
others may allow items to be edited.
- \section2 Read-Only Access
+ \section2 Read-Only access
To provide read-only access to data provided by a model, the following functions
\e{must} be implemented in the model's subclass:
@@ -2185,7 +2018,7 @@
provide this function because it is already implemented in QAbstractListModel.
\endtable
- \section2 Editable Items
+ \section3 Editable items
Editable models allow items of data to be modified, and may also provide
functions to allow rows and columns to be inserted and removed. To enable
@@ -2211,7 +2044,7 @@
signal to inform other components of the change.
\endtable
- \section2 Resizable Models
+ \section3 Resizable models
All types of model can support the insertion and removal of rows. Table models
and hierarchical models can also support the insertion and removal of columns.
@@ -2271,7 +2104,7 @@
it is necessary to emit the \l{QAbstractItemModel::layoutChanged()}{layoutChanged()}
signal to cause any attached views to be updated.
- \section2 Lazy Population of Model Data
+ \section3 Lazy population of model data
Lazy population of model data effectively allows requests for information
about the model to be deferred until it is actually needed by views.
@@ -2305,13 +2138,12 @@
children may be displayed incorrectly in some views until the user
attempts to view the non-existent child items.
-
- \section1 Navigation and Model Index Creation
+ \section2 Navigation &amp model index creation
Hierarchical models need to provide functions that views can call to navigate the
tree-like structures they expose, and obtain model indexes for items.
- \section2 Parents and Children
+ \section3 Parents &amp children
Since the structure exposed to views is determined by the underlying data
structure, it is up to each model subclass to create its own model indexes
@@ -2335,7 +2167,7 @@
models to supply some unique identifier to this function to ensure that
the model index can be re-associated with its corresponding item later on.
- \section1 Drag and Drop Support and MIME Type Handling
+ \section2 Drag &amp drop support and MIME type handling
The model/view classes support drag and drop operations, providing default behavior
that is sufficient for many applications. However, it is also possible to customize
@@ -2347,7 +2179,7 @@
The \l{#Convenience Views}{Convenience Views} section provides an overview of this
behavior.
- \section2 MIME Data
+ \section3 MIME data
By default, the built-in models and views use an internal MIME type
(\c{application/x-qabstractitemmodeldatalist}) to pass around information about
@@ -2394,7 +2226,7 @@
the QMimeData::setImageData(), QMimeData::setColorData(), and
QMimeData::setHtml() functions.
- \section2 Accepting Dropped Data
+ \section3 Accepting dropped data
When a drag and drop operation is performed over a view, the underlying model is
queried to determine which types of operation it supports and the MIME types
@@ -2466,7 +2298,7 @@
For more information about drag and drop with item views, refer to
\l{Using Drag and Drop with Item Views}.
- \section2 Convenience Views
+ \section3 Convenience views
The convenience views (QListWidget, QTableWidget, and QTreeWidget) override
the default drag and drop functionality to provide less flexible, but more
@@ -2477,7 +2309,7 @@
into the model. For more information on drag and drop in convenience views,
you can see \l{Using Drag and Drop with Item Views}.
- \section1 Performance Optimization for Large Amounts of Data
+ \section2 Performance optimization for large amounts of data
The \l{QAbstractItemModel::}{canFetchMore()} function checks if the parent
has more data available and returns true or false accordingly. The
@@ -2498,4 +2330,23 @@
\l{QAbstractItemModel::}{canFetchMore()} and \l{QAbstractItemModel::}
{fetchMore()} must be reimplemented as their default implementation returns
false and does nothing.
+
+ \keyword Model/View Classes
+ \section1 The model/view classes
+
+ These classes use the model/view design pattern in which the
+ underlying data (in the model) is kept separate from the way the
+ data is presented and manipulated by the user (in the view).
+
+ \annotatedlist model-view
+
+ \section1 Related examples
+
+ \list
+ \o \l{itemviews/dirview}{Dir View}
+ \o \l{itemviews/spinboxdelegate}{Spin Box Delegate}
+ \o \l{itemviews/pixelator}{Pixelator}
+ \o \l{itemviews/simpletreemodel}{Simple Tree Model}
+ \o \l{itemviews/chart}{Chart}
+ \endlist
*/
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index c155d9b..47fe2e0 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -39,7 +39,7 @@
h1, h2, h3, h4, h5, h6
{
font-size: 100%;
- font-weight: normal;
+/* font-weight: normal; */
}
q:before, q:after
{
@@ -949,6 +949,11 @@
margin-left: 15px;
}
+ .wrap .content .toc .level3
+ {
+ margin-left: 30px;
+ }
+
.content .toc li
{
font: normal 10px/1.2 Verdana;
diff --git a/src/corelib/arch/qatomic_alpha.h b/src/corelib/arch/qatomic_alpha.h
index 5d0b2b6..6989c25 100644
--- a/src/corelib/arch/qatomic_alpha.h
+++ b/src/corelib/arch/qatomic_alpha.h
@@ -367,7 +367,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -385,7 +385,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -404,7 +404,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
@@ -423,7 +423,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -441,7 +441,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -460,7 +460,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 4ad78fd..79a38cd 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -1454,6 +1454,11 @@ QMetaMethod::MethodType QMetaMethod::methodType() const
If the "compute" slot does not take exactly one QString, one int
and one double in the specified order, the call will fail.
+ \warning this method will not test the validity of the arguments: \a object
+ must be an instance of the class of the QMetaObject of which this QMetaMethod
+ has been constructed with. The arguments must have the same type as the ones
+ expected by the method, else, the behaviour is undefined.
+
\sa Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), QMetaObject::invokeMethod()
*/
bool QMetaMethod::invoke(QObject *object,
@@ -1473,6 +1478,8 @@ bool QMetaMethod::invoke(QObject *object,
if (!object || !mobj)
return false;
+ Q_ASSERT(mobj->cast(object));
+
// check return type
if (returnValue.data()) {
const char *retType = typeName();
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index 9773d4b..bfede94 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -132,9 +132,9 @@ private:
friend class QPodList<T, Prealloc>;
void realloc(int size, int alloc);
- int a;
- int s;
- T *ptr;
+ int a; // capacity
+ int s; // size
+ T *ptr; // data
union {
// ### Qt 5: Use 'Prealloc * sizeof(T)' as array size
char array[sizeof(qint64) * (((Prealloc * sizeof(T)) / sizeof(qint64)) + 1)];
@@ -197,8 +197,8 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray<T, Prealloc>::realloc(int asize, int a
Q_ASSERT(aalloc >= asize);
T *oldPtr = ptr;
int osize = s;
- // s = asize;
+ const int copySize = qMin(asize, osize);
if (aalloc != a) {
ptr = reinterpret_cast<T *>(qMalloc(aalloc * sizeof(T)));
Q_CHECK_PTR(ptr);
@@ -209,7 +209,6 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray<T, Prealloc>::realloc(int asize, int a
if (QTypeInfo<T>::isStatic) {
QT_TRY {
// copy all the old elements
- const int copySize = qMin(asize, osize);
while (s < copySize) {
new (ptr+s) T(*(oldPtr+s));
(oldPtr+s)->~T();
@@ -225,19 +224,19 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray<T, Prealloc>::realloc(int asize, int a
QT_RETHROW;
}
} else {
- qMemCopy(ptr, oldPtr, qMin(asize, osize) * sizeof(T));
+ qMemCopy(ptr, oldPtr, copySize * sizeof(T));
}
} else {
ptr = oldPtr;
return;
}
}
+ s = copySize;
if (QTypeInfo<T>::isComplex) {
+ // destroy remaining old objects
while (osize > asize)
(oldPtr+(--osize))->~T();
- if (!QTypeInfo<T>::isStatic)
- s = osize;
}
if (oldPtr != reinterpret_cast<T *>(array) && oldPtr != ptr)
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 671a568..e6ea198 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -72,12 +72,12 @@ public:
static bool displayOpened() { return displayOpen; }
private:
- static QAtomicInt contexts;
- static QAtomicInt displayOpen;
+ static QBasicAtomicInt contexts;
+ static QBasicAtomicInt displayOpen;
};
-QAtomicInt QEglContextTracker::contexts = 0;
-QAtomicInt QEglContextTracker::displayOpen = 0;
+QBasicAtomicInt QEglContextTracker::contexts = Q_BASIC_ATOMIC_INITIALIZER(0);
+QBasicAtomicInt QEglContextTracker::displayOpen = Q_BASIC_ATOMIC_INITIALIZER(0);
// Current GL and VG contexts. These are used to determine if
// we can avoid an eglMakeCurrent() after a call to lazyDoneCurrent().
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index feffc9f..ce13de8 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -64,6 +64,9 @@
#include <private/qt_s60_p.h>
#include <qdebug.h>
+//Animated wallpapers in Qt applications are not supported.
+const TInt KAknDisableAnimationBackground = 0x02000000;
+
QT_BEGIN_NAMESPACE
/*!
@@ -115,6 +118,11 @@ void QS60MainAppUi::ConstructL()
TInt flags = CAknAppUi::EAknEnableSkin
| CAknAppUi::ENoScreenFurniture
| CAknAppUi::ENonStandardResourceFile;
+ // After 5th Edition S60, native side supports animated wallpapers.
+ // However, there is no support for that feature on Qt side, so indicate to
+ // native UI framework that this application will not support background animations.
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
+ flags |= KAknDisableAnimationBackground;
BaseConstructL(flags);
}
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index 223243c..d6e0109 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -42,6 +42,7 @@
#include <QtOpenGL/qgl.h>
#include <QtOpenGL/private/qgl_p.h>
#include <QtOpenGL/private/qglextensions_p.h>
+#include <QtCore/qatomic.h>
#include "qglbuffer.h"
QT_BEGIN_NAMESPACE
@@ -55,6 +56,20 @@ QT_BEGIN_NAMESPACE
Buffer objects are created in the GL server so that the
client application can avoid uploading vertices, indices,
texture image data, etc every time they are needed.
+
+ QGLBuffer objects can be copied around as a reference to the
+ underlying GL buffer object:
+
+ \code
+ QGLBuffer buffer1(QGLBuffer::IndexBuffer);
+ buffer1.create();
+
+ QGLBuffer buffer2 = buffer1;
+ \endcode
+
+ QGLBuffer performs a shallow copy when objects are copied in this
+ manner, but does not implement copy-on-write semantics. The original
+ object will be affected whenever the copy is modified.
*/
/*!
@@ -116,13 +131,15 @@ class QGLBufferPrivate
{
public:
QGLBufferPrivate(QGLBuffer::Type t)
- : type(t),
+ : ref(1),
+ type(t),
guard(0),
usagePattern(QGLBuffer::StaticDraw),
actualUsagePattern(QGLBuffer::StaticDraw)
{
}
+ QAtomicInt ref;
QGLBuffer::Type type;
QGLSharedResourceGuard guard;
QGLBuffer::UsagePattern usagePattern;
@@ -130,6 +147,19 @@ public:
};
/*!
+ Constructs a new buffer object of type QGLBuffer::VertexBuffer.
+
+ Note: this constructor just creates the QGLBuffer instance. The actual
+ buffer object in the GL server is not created until create() is called.
+
+ \sa create()
+*/
+QGLBuffer::QGLBuffer()
+ : d_ptr(new QGLBufferPrivate(QGLBuffer::VertexBuffer))
+{
+}
+
+/*!
Constructs a new buffer object of \a type.
Note: this constructor just creates the QGLBuffer instance. The actual
@@ -142,6 +172,18 @@ QGLBuffer::QGLBuffer(QGLBuffer::Type type)
{
}
+/*!
+ Constructs a shallow copy of \a other.
+
+ Note: QGLBuffer does not implement copy-on-write semantics,
+ so \a other will be affected whenever the copy is modified.
+*/
+QGLBuffer::QGLBuffer(const QGLBuffer &other)
+ : d_ptr(other.d_ptr)
+{
+ d_ptr->ref.ref();
+}
+
#define ctx d->guard.context()
/*!
@@ -150,13 +192,27 @@ QGLBuffer::QGLBuffer(QGLBuffer::Type type)
*/
QGLBuffer::~QGLBuffer()
{
- Q_D(QGLBuffer);
- GLuint bufferId = d->guard.id();
- if (bufferId) {
- // Switch to the original creating context to destroy it.
- QGLShareContextScope scope(d->guard.context());
- glDeleteBuffers(1, &bufferId);
+ if (!d_ptr->ref.deref()) {
+ destroy();
+ delete d_ptr;
+ }
+}
+
+/*!
+ Assigns a shallow copy of \a other to this object.
+
+ Note: QGLBuffer does not implement copy-on-write semantics,
+ so \a other will be affected whenever the copy is modified.
+*/
+QGLBuffer &QGLBuffer::operator=(const QGLBuffer &other)
+{
+ if (d_ptr != other.d_ptr) {
+ other.d_ptr->ref.ref();
+ if (!d_ptr->ref.deref())
+ destroy();
+ d_ptr = other.d_ptr;
}
+ return *this;
}
/*!
@@ -215,7 +271,7 @@ void QGLBuffer::setUsagePattern(QGLBuffer::UsagePattern value)
This function will return false if the GL implementation
does not support buffers, or there is no current QGLContext.
- \sa isCreated(), allocate(), write()
+ \sa isCreated(), allocate(), write(), destroy()
*/
bool QGLBuffer::create()
{
@@ -242,7 +298,7 @@ bool QGLBuffer::create()
/*!
Returns true if this buffer has been created; false otherwise.
- \sa create()
+ \sa create(), destroy()
*/
bool QGLBuffer::isCreated() const
{
@@ -251,6 +307,24 @@ bool QGLBuffer::isCreated() const
}
/*!
+ Destroys this buffer object, including the storage being
+ used in the GL server. All references to the buffer will
+ become invalid.
+*/
+void QGLBuffer::destroy()
+{
+ Q_D(QGLBuffer);
+ GLuint bufferId = d->guard.id();
+ if (bufferId) {
+ // Switch to the original creating context to destroy it.
+ QGLShareContextScope scope(d->guard.context());
+ glDeleteBuffers(1, &bufferId);
+ }
+ d->guard.setId(0);
+ d->guard.setContext(0);
+}
+
+/*!
Reads the \a count bytes in this buffer starting at \a offset
into \a data. Returns true on success; false if reading from
the buffer is not supported. Buffer reading is not supported
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index 2fe1f1f..a1b45ff 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -64,9 +64,13 @@ public:
PixelUnpackBuffer = 0x88EC // GL_PIXEL_UNPACK_BUFFER
};
+ QGLBuffer();
explicit QGLBuffer(QGLBuffer::Type type);
+ QGLBuffer(const QGLBuffer &other);
~QGLBuffer();
+ QGLBuffer &operator=(const QGLBuffer &other);
+
enum UsagePattern
{
StreamDraw = 0x88E0, // GL_STREAM_DRAW
@@ -95,6 +99,8 @@ public:
bool create();
bool isCreated() const;
+ void destroy();
+
bool bind() const;
void release() const;
@@ -114,9 +120,8 @@ public:
bool unmap();
private:
- QScopedPointer<QGLBufferPrivate> d_ptr;
+ QGLBufferPrivate *d_ptr;
- Q_DISABLE_COPY(QGLBuffer)
Q_DECLARE_PRIVATE(QGLBuffer)
};
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index 23c5639..c88ecb0 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -159,7 +159,7 @@ void QBenchmarkTestMethodData::setResult(
if (QBenchmarkGlobalData::current->iterationCount != -1)
accepted = true;
- if (QBenchmarkTestMethodData::current->runOnce || !setByMacro) {
+ else if (QBenchmarkTestMethodData::current->runOnce || !setByMacro) {
iterationCount = 1;
accepted = true;
}
diff --git a/src/testlib/qbenchmarkmeasurement.cpp b/src/testlib/qbenchmarkmeasurement.cpp
index c03cbff..0a84792 100644
--- a/src/testlib/qbenchmarkmeasurement.cpp
+++ b/src/testlib/qbenchmarkmeasurement.cpp
@@ -66,7 +66,7 @@ qint64 QBenchmarkTimeMeasurer::stop()
bool QBenchmarkTimeMeasurer::isMeasurementAccepted(qint64 measurement)
{
- return (measurement > 20);
+ return (measurement > 50);
}
int QBenchmarkTimeMeasurer::adjustIterationCount(int suggestion)
@@ -74,6 +74,11 @@ int QBenchmarkTimeMeasurer::adjustIterationCount(int suggestion)
return suggestion;
}
+bool QBenchmarkTimeMeasurer::needsWarmupIteration()
+{
+ return true;
+}
+
int QBenchmarkTimeMeasurer::adjustMedianCount(int)
{
return 1;
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h
index 8ad3613..932852c 100644
--- a/src/testlib/qbenchmarkmeasurement_p.h
+++ b/src/testlib/qbenchmarkmeasurement_p.h
@@ -84,6 +84,7 @@ public:
bool isMeasurementAccepted(qint64 measurement);
int adjustIterationCount(int sugestion);
int adjustMedianCount(int suggestion);
+ bool needsWarmupIteration();
QTest::QBenchmarkMetric metricType();
private:
QTime time;
diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp
index c0b1303..b6d4558 100644
--- a/tests/auto/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp
@@ -172,6 +172,8 @@ private slots:
void stdSet();
void classInfo();
+ void metaMethod();
+
signals:
void value6Changed();
void value7Changed(const QString &);
@@ -886,5 +888,54 @@ void tst_QMetaObject::classInfo()
QCOMPARE(QLatin1String(b.metaObject()->classInfo(index).value()), QLatin1String("Christopher Pike"));
}
+void tst_QMetaObject::metaMethod()
+{
+ QString str("foo");
+ QString ret("bar");
+ QMetaMethod method;
+ QVERIFY(!method.invoke(this));
+ QVERIFY(!method.invoke(this, Q_ARG(QString, str)));
+ QVERIFY(!method.invoke(this, Q_RETURN_ARG(QString, ret), Q_ARG(QString, str)));
+ QCOMPARE(str, QString("foo"));
+ QCOMPARE(ret, QString("bar"));
+
+
+ QtTestObject obj;
+ QString t1("1"); QString t2("2"); QString t3("3"); QString t4("4"); QString t5("5");
+ QString t6("6"); QString t7("7"); QString t8("8"); QString t9("9"); QString t10("X");
+
+ int index = QtTestObject::staticMetaObject.indexOfMethod("sl5(QString,QString,QString,QString,QString)");
+ QVERIFY(index > 0);
+ method = QtTestObject::staticMetaObject.method(index);
+ //wrong args
+ QVERIFY(!method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4")));
+ //QVERIFY(!method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5"), Q_ARG(QString, "6")));
+ //QVERIFY(!method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(int, 5)));
+ QVERIFY(!method.invoke(&obj, Q_RETURN_ARG(QString, ret), Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5")));
+
+ //wrong object
+ //QVERIFY(!method.invoke(this, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5")));
+ QVERIFY(!method.invoke(0, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5")));
+ QCOMPARE(ret, QString("bar"));
+ QCOMPARE(obj.slotResult, QString());
+
+ QVERIFY(method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5")));
+ QCOMPARE(obj.slotResult, QString("sl5:12345"));
+
+ index = QtTestObject::staticMetaObject.indexOfMethod("sl13(QList<QString>)");
+ QVERIFY(index > 0);
+ QMetaMethod sl13 = QtTestObject::staticMetaObject.method(index);
+ QList<QString> returnValue, argument;
+ argument << QString("one") << QString("two") << QString("three");
+ //wrong object
+ //QVERIFY(!sl13.invoke(this, Q_RETURN_ARG(QList<QString>, returnValue), Q_ARG(QList<QString>, argument)));
+ QVERIFY(!sl13.invoke(0, Q_RETURN_ARG(QList<QString>, returnValue), Q_ARG(QList<QString>, argument)));
+ QCOMPARE(returnValue, QList<QString>());
+
+ QVERIFY(sl13.invoke(&obj, Q_RETURN_ARG(QList<QString>, returnValue), Q_ARG(QList<QString>, argument)));
+ QCOMPARE(returnValue, argument);
+ QCOMPARE(obj.slotResult, QString("sl13"));
+}
+
QTEST_MAIN(tst_QMetaObject)
#include "tst_qmetaobject.moc"
diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp
index 4e7123f..0946c93 100644
--- a/tests/auto/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp
@@ -2001,6 +2001,8 @@ void tst_QTextCodec::threadSafety()
QCOMPARE(res.results(), codecList);
QCOMPARE(res2.results(), mibList);
+#else
+ QSKIP("This function is not yet supported with QT_NO_CONCURRENT defined.", SkipAll);
#endif
}
@@ -2012,7 +2014,7 @@ void tst_QTextCodec::invalidNames()
QVERIFY(!QTextCodec::codecForName("\1a\2b\3a\4d\5c\6s\7a\xffr\xec_\x9c_"));
QVERIFY(!QTextCodec::codecForName("\n"));
QVERIFY(!QTextCodec::codecForName("don't exist"));
- QByteArray huge = "azertyuiop^$qsdfghjklm<wxcvbn,;:=1234567890°_";
+ QByteArray huge = "azertyuiop^$qsdfghjklm<wxcvbn,;:=1234567890�_";
huge = huge + huge + huge + huge + huge + huge + huge + huge;
huge = huge + huge + huge + huge + huge + huge + huge + huge;
huge = huge + huge + huge + huge + huge + huge + huge + huge;
diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
index dac631b..1f65ae7 100644
--- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
+++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
@@ -56,7 +56,7 @@
#elif defined(Q_OS_WINCE)
#define LACKEYDIR SRCDIR
#else
-#define LACKEYDIR SRCDIR "../lackey"
+#define LACKEYDIR "../lackey"
#endif
Q_DECLARE_METATYPE(QSharedMemory::SharedMemoryError)
@@ -421,7 +421,7 @@ void tst_QSharedMemory::readOnly()
QString program = LACKEYDIR "/lackey";
QStringList arguments;
rememberKey("readonly_segfault");
- arguments << LACKEYDIR "/scripts/readonly_segfault.js";
+ arguments << SRCDIR "../lackey/scripts/readonly_segfault.js";
// ### on windows disable the popup somehow
QProcess p;
@@ -734,7 +734,7 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
rememberKey("market");
- QStringList arguments = QStringList() << LACKEYDIR "/scripts/producer.js";
+ QStringList arguments = QStringList() << SRCDIR "../lackey/scripts/producer.js";
QProcess producer;
producer.setProcessChannelMode(QProcess::ForwardedChannels);
producer.start( LACKEYDIR "/lackey", arguments);
@@ -744,7 +744,7 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
QList<QProcess*> consumers;
unsigned int failedProcesses = 0;
for (int i = 0; i < processes; ++i) {
- QStringList arguments = QStringList() << LACKEYDIR "/scripts/consumer.js";
+ QStringList arguments = QStringList() << SRCDIR "../lackey/scripts/consumer.js";
QProcess *p = new QProcess;
p->setProcessChannelMode(QProcess::ForwardedChannels);
#ifdef Q_OS_WINCE
diff --git a/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp
index 5708726..26da506 100644
--- a/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -63,6 +63,7 @@ private slots:
void oldTests();
void task214223();
void QTBUG6718_resize();
+ void QTBUG10978_realloc();
};
int fooCtor = 0;
@@ -304,5 +305,302 @@ void tst_QVarLengthArray::QTBUG6718_resize()
}
}
+struct MyBase
+{
+ MyBase()
+ : data(this)
+ , isCopy(false)
+ {
+ ++liveCount;
+ }
+
+ MyBase(MyBase const &)
+ : data(this)
+ , isCopy(true)
+ {
+ ++copyCount;
+ ++liveCount;
+ }
+
+ MyBase & operator=(MyBase const &)
+ {
+ if (!isCopy) {
+ isCopy = true;
+ ++copyCount;
+ } else {
+ ++errorCount;
+ }
+
+ return *this;
+ }
+
+ ~MyBase()
+ {
+ if (isCopy) {
+ if (!copyCount)
+ ++errorCount;
+ else
+ --copyCount;
+ }
+
+ if (!liveCount)
+ ++errorCount;
+ else
+ --liveCount;
+ }
+
+ bool hasMoved() const
+ {
+ return this != data;
+ }
+
+protected:
+ MyBase const * const data;
+ bool isCopy;
+
+public:
+ static int errorCount;
+ static int liveCount;
+ static int copyCount;
+};
+
+int MyBase::errorCount = 0;
+int MyBase::liveCount = 0;
+int MyBase::copyCount = 0;
+
+struct MyPrimitive
+ : MyBase
+{
+ MyPrimitive()
+ {
+ ++errorCount;
+ }
+
+ ~MyPrimitive()
+ {
+ ++errorCount;
+ }
+
+ MyPrimitive(MyPrimitive const &other)
+ : MyBase(other)
+ {
+ ++errorCount;
+ }
+};
+
+struct MyMovable
+ : MyBase
+{
+};
+
+struct MyComplex
+ : MyBase
+{
+};
+
+QT_BEGIN_NAMESPACE
+
+Q_DECLARE_TYPEINFO(MyPrimitive, Q_PRIMITIVE_TYPE);
+Q_DECLARE_TYPEINFO(MyMovable, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(MyComplex, Q_COMPLEX_TYPE);
+
+QT_END_NAMESPACE
+
+bool QTBUG10978_proceed = true;
+
+template <class T, int PreAlloc>
+int countMoved(QVarLengthArray<T, PreAlloc> const &c)
+{
+ int result = 0;
+ for (int i = 0; i < c.size(); ++i)
+ if (c[i].hasMoved())
+ ++result;
+
+ return result;
+}
+
+template <class T>
+void QTBUG10978_test()
+{
+ QTBUG10978_proceed = false;
+
+ typedef QVarLengthArray<T, 16> Container;
+ enum {
+ isStatic = QTypeInfo<T>::isStatic,
+ isComplex = QTypeInfo<T>::isComplex,
+
+ isPrimitive = !isComplex && !isStatic,
+ isMovable = !isStatic
+ };
+
+ // Constructors
+ Container a;
+ QCOMPARE( MyBase::liveCount, 0 );
+ QCOMPARE( MyBase::copyCount, 0 );
+
+ QVERIFY( a.capacity() >= 16 );
+ QCOMPARE( a.size(), 0 );
+
+ Container b_real(8);
+ Container const &b = b_real;
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 8 );
+ QCOMPARE( MyBase::copyCount, 0 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // Assignment
+ a = b;
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 16 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 8 : 0 );
+ QVERIFY( a.capacity() >= 16 );
+ QCOMPARE( a.size(), 8 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // append
+ a.append(b.data(), b.size());
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 24 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 16 : 0 );
+
+ QVERIFY( a.capacity() >= 16 );
+ QCOMPARE( a.size(), 16 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // removeLast
+ a.removeLast();
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 23 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 15 : 0 );
+
+ QVERIFY( a.capacity() >= 16 );
+ QCOMPARE( a.size(), 15 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // Movable types
+ const int capacity = a.capacity();
+ if (!isPrimitive)
+ QCOMPARE( countMoved(a), 0 );
+
+ // Reserve, no re-allocation
+ a.reserve(capacity);
+ if (!isPrimitive)
+ QCOMPARE( countMoved(a), 0 );
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 23 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 15 : 0 );
+
+ QCOMPARE( a.capacity(), capacity );
+ QCOMPARE( a.size(), 15 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // Reserve, force re-allocation
+ a.reserve(capacity * 2);
+ if (!isPrimitive)
+ QCOMPARE( countMoved(a), isMovable ? 15 : 0 );
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 23 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 15 : 0 );
+
+ QVERIFY( a.capacity() >= capacity * 2 );
+ QCOMPARE( a.size(), 15 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // resize, grow
+ a.resize(40);
+ if (!isPrimitive)
+ QCOMPARE( countMoved(a), isMovable ? 15 : 0 );
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 48 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 15 : 0 );
+
+ QVERIFY( a.capacity() >= a.size() );
+ QCOMPARE( a.size(), 40 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // Copy constructor, allocate
+ {
+ Container c(a);
+ if (!isPrimitive)
+ QCOMPARE( countMoved(c), 0 );
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 88 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 55 : 0 );
+
+ QVERIFY( a.capacity() >= a.size() );
+ QCOMPARE( a.size(), 40 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ QVERIFY( c.capacity() >= 40 );
+ QCOMPARE( c.size(), 40 );
+ }
+
+ // resize, shrink
+ a.resize(10);
+ if (!isPrimitive)
+ QCOMPARE( countMoved(a), isMovable ? 10 : 0 );
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 18 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 10 : 0 );
+
+ QVERIFY( a.capacity() >= a.size() );
+ QCOMPARE( a.size(), 10 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ // Copy constructor, don't allocate
+ {
+ Container c(a);
+ if (!isPrimitive)
+ QCOMPARE( countMoved(c), 0 );
+ QCOMPARE( MyBase::liveCount, isPrimitive ? 0 : 28 );
+ QCOMPARE( MyBase::copyCount, isComplex ? 20 : 0 );
+
+ QVERIFY( a.capacity() >= a.size() );
+ QCOMPARE( a.size(), 10 );
+
+ QVERIFY( b.capacity() >= 16 );
+ QCOMPARE( b.size(), 8 );
+
+ QVERIFY( c.capacity() >= 16 );
+ QCOMPARE( c.size(), 10 );
+ }
+
+ a.clear();
+ QCOMPARE( a.size(), 0 );
+
+ b_real.clear();
+ QCOMPARE( b.size(), 0 );
+
+ QCOMPARE(MyBase::errorCount, 0);
+ QCOMPARE(MyBase::liveCount, 0);
+
+ // All done
+ QTBUG10978_proceed = true;
+}
+
+void tst_QVarLengthArray::QTBUG10978_realloc()
+{
+ QTBUG10978_test<MyBase>();
+ QVERIFY(QTBUG10978_proceed);
+
+ QTBUG10978_test<MyPrimitive>();
+ QVERIFY(QTBUG10978_proceed);
+
+ QTBUG10978_test<MyMovable>();
+ QVERIFY(QTBUG10978_proceed);
+
+ QTBUG10978_test<MyComplex>();
+ QVERIFY(QTBUG10978_proceed);
+}
+
QTEST_APPLESS_MAIN(tst_QVarLengthArray)
#include "tst_qvarlengtharray.moc"
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 5716626..280f055 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -2746,18 +2746,6 @@ Doc::SectioningUnit Doc::granularity() const
}
}
-#if notyet // ###
-Doc::SectioningUnit Doc::sectioningUnit() const
-{
- if (priv == 0 || priv->extra == 0) {
- return DocPrivateExtra().sectioningUnit;
- }
- else {
- return priv->extra->sectioningUnit;
- }
-}
-#endif
-
const QSet<QString> &Doc::parameterNames() const
{
return priv == 0 ? *null_Set_QString() : priv->params;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 16df0c0..b103981 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -4060,10 +4060,13 @@ int HtmlGenerator::hOffset(const Node *node)
case Node::Class:
return 2;
case Node::Fake:
+ return 1;
+#if 0
if (node->doc().briefText().isEmpty())
return 1;
else
return 2;
+#endif
case Node::Enum:
case Node::Typedef:
case Node::Function: