diff options
1515 files changed, 46912 insertions, 9721 deletions
diff --git a/config.tests/mac/crc/main.cpp b/config.tests/mac/crc/main.cpp index 2ac10b3..92f4a85 100644 --- a/config.tests/mac/crc/main.cpp +++ b/config.tests/mac/crc/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <iostream> #include <cstdlib> #include <cstring> diff --git a/config.tests/mac/xcodeversion.cpp b/config.tests/mac/xcodeversion.cpp index e613cc5..f00207b 100644 --- a/config.tests/mac/xcodeversion.cpp +++ b/config.tests/mac/xcodeversion.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <stdlib.h> #include <stdio.h> #include <CoreFoundation/CoreFoundation.h> diff --git a/config.tests/qws/ahi/ahi.cpp b/config.tests/qws/ahi/ahi.cpp index a5e8951..7fcd427 100644 --- a/config.tests/qws/ahi/ahi.cpp +++ b/config.tests/qws/ahi/ahi.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <ahi.h> int main(int, char **) diff --git a/config.tests/qws/directfb/directfb.cpp b/config.tests/qws/directfb/directfb.cpp index f743864..2e2a571 100644 --- a/config.tests/qws/directfb/directfb.cpp +++ b/config.tests/qws/directfb/directfb.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <directfb.h> int main(int, char **) diff --git a/config.tests/qws/sound/sound.cpp b/config.tests/qws/sound/sound.cpp index be412bb..9ac9e08 100644 --- a/config.tests/qws/sound/sound.cpp +++ b/config.tests/qws/sound/sound.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sys/soundcard.h> int main(int, char **) diff --git a/config.tests/qws/svgalib/svgalib.cpp b/config.tests/qws/svgalib/svgalib.cpp index f4bf9c8..5954579 100644 --- a/config.tests/qws/svgalib/svgalib.cpp +++ b/config.tests/qws/svgalib/svgalib.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <vga.h> #include <vgagl.h> diff --git a/config.tests/unix/3dnow/3dnow.cpp b/config.tests/unix/3dnow/3dnow.cpp index 1b1d0ed..9fe0d6013 100644 --- a/config.tests/unix/3dnow/3dnow.cpp +++ b/config.tests/unix/3dnow/3dnow.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <mm3dnow.h> #if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3 #error GCC < 3.2 is known to create internal compiler errors with our MMX code diff --git a/config.tests/unix/clock-gettime/clock-gettime.cpp b/config.tests/unix/clock-gettime/clock-gettime.cpp index edb71f5..ac26c78 100644 --- a/config.tests/unix/clock-gettime/clock-gettime.cpp +++ b/config.tests/unix/clock-gettime/clock-gettime.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <unistd.h> #include <time.h> diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.cpp b/config.tests/unix/clock-monotonic/clock-monotonic.cpp index df99963..60a6487 100644 --- a/config.tests/unix/clock-monotonic/clock-monotonic.cpp +++ b/config.tests/unix/clock-monotonic/clock-monotonic.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <unistd.h> #include <time.h> diff --git a/config.tests/unix/cups/cups.cpp b/config.tests/unix/cups/cups.cpp index e8c17ea..cbfeb0e 100644 --- a/config.tests/unix/cups/cups.cpp +++ b/config.tests/unix/cups/cups.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <cups/cups.h> int main(int, char **) diff --git a/config.tests/unix/db2/db2.cpp b/config.tests/unix/db2/db2.cpp index e408d28..0ccef76 100644 --- a/config.tests/unix/db2/db2.cpp +++ b/config.tests/unix/db2/db2.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sqlcli.h> #include <sqlcli1.h> diff --git a/config.tests/unix/dbus/dbus.cpp b/config.tests/unix/dbus/dbus.cpp index 15ed45f..66374bc 100644 --- a/config.tests/unix/dbus/dbus.cpp +++ b/config.tests/unix/dbus/dbus.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #define DBUS_API_SUBJECT_TO_CHANGE #include <dbus/dbus.h> diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp index d71caba..bf96835 100644 --- a/config.tests/unix/doubleformat/doubleformattest.cpp +++ b/config.tests/unix/doubleformat/doubleformattest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* LE: strings | grep 0123ABCD0123ABCD diff --git a/config.tests/unix/endian/endiantest.cpp b/config.tests/unix/endian/endiantest.cpp index 40af746..656a969 100644 --- a/config.tests/unix/endian/endiantest.cpp +++ b/config.tests/unix/endian/endiantest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // "MostSignificantByteFirst" short msb_bigendian[] = { 0x0000, 0x4d6f, 0x7374, 0x5369, 0x676e, 0x6966, 0x6963, 0x616e, 0x7442, 0x7974, 0x6546, 0x6972, 0x7374, 0x0000 }; diff --git a/config.tests/unix/floatmath/floatmath.cpp b/config.tests/unix/floatmath/floatmath.cpp index 126f820..b63e21c 100644 --- a/config.tests/unix/floatmath/floatmath.cpp +++ b/config.tests/unix/floatmath/floatmath.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <math.h> int main(int argc, char **argv) diff --git a/config.tests/unix/freetype/freetype.cpp b/config.tests/unix/freetype/freetype.cpp index 3edf619..d5ec401 100644 --- a/config.tests/unix/freetype/freetype.cpp +++ b/config.tests/unix/freetype/freetype.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <ft2build.h> #include FT_FREETYPE_H diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp index 9dcd030..9b0b828 100644 --- a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp +++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test for getaddrinfo on the unix platform. we check for all structures and functions required. */ diff --git a/config.tests/unix/getifaddrs/getifaddrs.cpp b/config.tests/unix/getifaddrs/getifaddrs.cpp index 4e05a18..20949c4 100644 --- a/config.tests/unix/getifaddrs/getifaddrs.cpp +++ b/config.tests/unix/getifaddrs/getifaddrs.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test for if_nametoindex support on target platforms. */ diff --git a/config.tests/unix/glib/glib.cpp b/config.tests/unix/glib/glib.cpp index 16b787d..eac414a 100644 --- a/config.tests/unix/glib/glib.cpp +++ b/config.tests/unix/glib/glib.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + typedef struct _GMainContext GMainContext; #include <glib.h> diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp index 21f12dd..f0db060 100644 --- a/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp +++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #if defined(__sgi) #error "iconv not supported on IRIX" #else diff --git a/config.tests/unix/gstreamer/gstreamer.cpp b/config.tests/unix/gstreamer/gstreamer.cpp index 6ef85e1..de88123 100644 --- a/config.tests/unix/gstreamer/gstreamer.cpp +++ b/config.tests/unix/gstreamer/gstreamer.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <gst/gst.h> #include <gst/interfaces/propertyprobe.h> #include <gst/interfaces/xoverlay.h> diff --git a/config.tests/unix/ibase/ibase.cpp b/config.tests/unix/ibase/ibase.cpp index 2152260..e4d64be 100644 --- a/config.tests/unix/ibase/ibase.cpp +++ b/config.tests/unix/ibase/ibase.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <ibase.h> int main(int, char **) diff --git a/config.tests/unix/iconv/iconv.cpp b/config.tests/unix/iconv/iconv.cpp index c0f35a3..251862b 100644 --- a/config.tests/unix/iconv/iconv.cpp +++ b/config.tests/unix/iconv/iconv.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #if defined(__sgi) #error "iconv not supported on IRIX" #else diff --git a/config.tests/unix/inotify/inotifytest.cpp b/config.tests/unix/inotify/inotifytest.cpp index 8378a7e..5ce033b 100644 --- a/config.tests/unix/inotify/inotifytest.cpp +++ b/config.tests/unix/inotify/inotifytest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sys/inotify.h> int main() diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp index 5f87eeb..95d7a68 100644 --- a/config.tests/unix/ipv6/ipv6test.cpp +++ b/config.tests/unix/ipv6/ipv6test.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test IPv6 support on target platforms. We check for the required IPv6 data structures. */ diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.cpp b/config.tests/unix/ipv6ifname/ipv6ifname.cpp index 619a783..9a3e7fb 100644 --- a/config.tests/unix/ipv6ifname/ipv6ifname.cpp +++ b/config.tests/unix/ipv6ifname/ipv6ifname.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test for if_nametoindex support on target platforms. */ diff --git a/config.tests/unix/iwmmxt/iwmmxt.cpp b/config.tests/unix/iwmmxt/iwmmxt.cpp index 77b09b4..0f66b94 100644 --- a/config.tests/unix/iwmmxt/iwmmxt.cpp +++ b/config.tests/unix/iwmmxt/iwmmxt.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <mmintrin.h> int main(int, char**) diff --git a/config.tests/unix/largefile/largefiletest.cpp b/config.tests/unix/largefile/largefiletest.cpp index ed04e7a..4f3ba4a 100644 --- a/config.tests/unix/largefile/largefiletest.cpp +++ b/config.tests/unix/largefile/largefiletest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test Large File support on target platforms. */ diff --git a/config.tests/unix/libjpeg/libjpeg.cpp b/config.tests/unix/libjpeg/libjpeg.cpp index de1fb7b..10f7669 100644 --- a/config.tests/unix/libjpeg/libjpeg.cpp +++ b/config.tests/unix/libjpeg/libjpeg.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sys/types.h> #include <stdio.h> extern "C" { diff --git a/config.tests/unix/libmng/libmng.cpp b/config.tests/unix/libmng/libmng.cpp index cafb478..acb8ea9 100644 --- a/config.tests/unix/libmng/libmng.cpp +++ b/config.tests/unix/libmng/libmng.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <libmng.h> int main(int, char **) diff --git a/config.tests/unix/libpng/libpng.cpp b/config.tests/unix/libpng/libpng.cpp index 7a3f2a7..2eff398 100644 --- a/config.tests/unix/libpng/libpng.cpp +++ b/config.tests/unix/libpng/libpng.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <png.h> #if !defined(PNG_LIBPNG_VER) || PNG_LIBPNG_VER < 10017 diff --git a/config.tests/unix/libtiff/libtiff.cpp b/config.tests/unix/libtiff/libtiff.cpp index eac03ab..4634413 100644 --- a/config.tests/unix/libtiff/libtiff.cpp +++ b/config.tests/unix/libtiff/libtiff.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <tiffio.h> #if !defined(TIFF_VERSION) diff --git a/config.tests/unix/mmx/mmx.cpp b/config.tests/unix/mmx/mmx.cpp index 617cd62..ddbe78f 100644 --- a/config.tests/unix/mmx/mmx.cpp +++ b/config.tests/unix/mmx/mmx.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <mmintrin.h> #if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3 #error GCC < 3.2 is known to create internal compiler errors with our MMX code diff --git a/config.tests/unix/mremap/mremap.cpp b/config.tests/unix/mremap/mremap.cpp index 1a2ada1..785d223 100644 --- a/config.tests/unix/mremap/mremap.cpp +++ b/config.tests/unix/mremap/mremap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <unistd.h> #include <sys/mman.h> diff --git a/config.tests/unix/mysql/mysql.cpp b/config.tests/unix/mysql/mysql.cpp index c05da1c..306ee52 100644 --- a/config.tests/unix/mysql/mysql.cpp +++ b/config.tests/unix/mysql/mysql.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "mysql.h" int main(int, char **) diff --git a/config.tests/unix/nis/nis.cpp b/config.tests/unix/nis/nis.cpp index 65561f1..1d18b63 100644 --- a/config.tests/unix/nis/nis.cpp +++ b/config.tests/unix/nis/nis.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sys/types.h> #include <rpc/rpc.h> #include <rpcsvc/ypclnt.h> diff --git a/config.tests/unix/oci/oci.cpp b/config.tests/unix/oci/oci.cpp index 9f83a78..cb6198b 100644 --- a/config.tests/unix/oci/oci.cpp +++ b/config.tests/unix/oci/oci.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <oci.h> int main(int, char **) diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp index 6b64e12..6e80c2a 100644 --- a/config.tests/unix/odbc/odbc.cpp +++ b/config.tests/unix/odbc/odbc.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sql.h> #include <sqlext.h> diff --git a/config.tests/unix/opengles1/opengles1.cpp b/config.tests/unix/opengles1/opengles1.cpp index de690c9..d7ada87 100644 --- a/config.tests/unix/opengles1/opengles1.cpp +++ b/config.tests/unix/opengles1/opengles1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <GLES/gl.h> int main(int, char **) diff --git a/config.tests/unix/opengles1cl/opengles1cl.cpp b/config.tests/unix/opengles1cl/opengles1cl.cpp index 23ae710..18cf40c 100644 --- a/config.tests/unix/opengles1cl/opengles1cl.cpp +++ b/config.tests/unix/opengles1cl/opengles1cl.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <GLES/gl.h> int main(int, char **) diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp index 63c7b35..5e1dbd1 100644 --- a/config.tests/unix/opengles2/opengles2.cpp +++ b/config.tests/unix/opengles2/opengles2.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <GLES2/gl2.h> int main(int, char **) diff --git a/config.tests/unix/openssl/openssl.cpp b/config.tests/unix/openssl/openssl.cpp index 5ca3e9c..598939c 100644 --- a/config.tests/unix/openssl/openssl.cpp +++ b/config.tests/unix/openssl/openssl.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <openssl/opensslv.h> #if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x0090700fL diff --git a/config.tests/unix/psql/psql.cpp b/config.tests/unix/psql/psql.cpp index 4974425..f3647a7 100644 --- a/config.tests/unix/psql/psql.cpp +++ b/config.tests/unix/psql/psql.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "libpq-fe.h" int main(int, char **) diff --git a/config.tests/unix/ptrsize/ptrsizetest.cpp b/config.tests/unix/ptrsize/ptrsizetest.cpp index 9e15e81..ddb2aaf 100644 --- a/config.tests/unix/ptrsize/ptrsizetest.cpp +++ b/config.tests/unix/ptrsize/ptrsizetest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test pointer size on target platforms. */ diff --git a/config.tests/unix/sqlite/sqlite.cpp b/config.tests/unix/sqlite/sqlite.cpp index fe7301e..8d43abe 100644 --- a/config.tests/unix/sqlite/sqlite.cpp +++ b/config.tests/unix/sqlite/sqlite.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sqlite3.h> int main(int, char **) diff --git a/config.tests/unix/sqlite2/sqlite2.cpp b/config.tests/unix/sqlite2/sqlite2.cpp index 22c21ca..ebbd70b 100644 --- a/config.tests/unix/sqlite2/sqlite2.cpp +++ b/config.tests/unix/sqlite2/sqlite2.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sqlite.h> int main(int, char **) diff --git a/config.tests/unix/sse/sse.cpp b/config.tests/unix/sse/sse.cpp index e1c23bd..47a24fa 100644 --- a/config.tests/unix/sse/sse.cpp +++ b/config.tests/unix/sse/sse.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <xmmintrin.h> #if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3 #error GCC < 3.2 is known to create internal compiler errors with our MMX code diff --git a/config.tests/unix/sse2/sse2.cpp b/config.tests/unix/sse2/sse2.cpp index ea0737d..7729fc4 100644 --- a/config.tests/unix/sse2/sse2.cpp +++ b/config.tests/unix/sse2/sse2.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <emmintrin.h> #if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3 #error GCC < 3.2 is known to create internal compiler errors with our MMX code diff --git a/config.tests/unix/stdint/main.cpp b/config.tests/unix/stdint/main.cpp index 91e5c3a..7cf6842 100644 --- a/config.tests/unix/stdint/main.cpp +++ b/config.tests/unix/stdint/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Check for the presence of stdint.h */ #include <stdint.h> diff --git a/config.tests/unix/stl/stltest.cpp b/config.tests/unix/stl/stltest.cpp index 4d74ed1..f207ce2 100644 --- a/config.tests/unix/stl/stltest.cpp +++ b/config.tests/unix/stl/stltest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test STL support on target platforms. We are mainly concerned with being able to instantiate templates for common STL container classes. diff --git a/config.tests/unix/tds/tds.cpp b/config.tests/unix/tds/tds.cpp index 54a4859..b2f702b 100644 --- a/config.tests/unix/tds/tds.cpp +++ b/config.tests/unix/tds/tds.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <sybfront.h> #include <sybdb.h> diff --git a/config.tests/unix/tslib/tslib.cpp b/config.tests/unix/tslib/tslib.cpp index 7cd55ca..5dc4fab 100644 --- a/config.tests/unix/tslib/tslib.cpp +++ b/config.tests/unix/tslib/tslib.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <tslib.h> int main() diff --git a/config.tests/unix/zlib/zlib.cpp b/config.tests/unix/zlib/zlib.cpp index 58a286f..005ca3c 100644 --- a/config.tests/unix/zlib/zlib.cpp +++ b/config.tests/unix/zlib/zlib.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <zlib.h> int main(int, char **) diff --git a/config.tests/x11/fontconfig/fontconfig.cpp b/config.tests/x11/fontconfig/fontconfig.cpp index 8501162..64ab2d7 100644 --- a/config.tests/x11/fontconfig/fontconfig.cpp +++ b/config.tests/x11/fontconfig/fontconfig.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <ft2build.h> #include FT_FREETYPE_H #include <fontconfig/fontconfig.h> diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.cpp b/config.tests/x11/glxfbconfig/glxfbconfig.cpp index e86b02a..b4b780f 100644 --- a/config.tests/x11/glxfbconfig/glxfbconfig.cpp +++ b/config.tests/x11/glxfbconfig/glxfbconfig.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <GL/gl.h> #include <GL/glx.h> diff --git a/config.tests/x11/mitshm/mitshm.cpp b/config.tests/x11/mitshm/mitshm.cpp index b9be2e0..812c8cc 100644 --- a/config.tests/x11/mitshm/mitshm.cpp +++ b/config.tests/x11/mitshm/mitshm.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifdef Q_OS_HPUX #error "MITSHM not supported on HP-UX." #else diff --git a/config.tests/x11/notype/notypetest.cpp b/config.tests/x11/notype/notypetest.cpp index b33949c..922116b 100644 --- a/config.tests/x11/notype/notypetest.cpp +++ b/config.tests/x11/notype/notypetest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /* Sample program for configure to test for broken X11 headers that confuse gcc 2.95 and better on target platforms such as Solaris. */ diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp index ad69379..c067df2 100644 --- a/config.tests/x11/opengl/opengl.cpp +++ b/config.tests/x11/opengl/opengl.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <GL/gl.h> #include <GL/glu.h> diff --git a/config.tests/x11/sm/sm.cpp b/config.tests/x11/sm/sm.cpp index 8bb5ffb..05e2b11e 100644 --- a/config.tests/x11/sm/sm.cpp +++ b/config.tests/x11/sm/sm.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/SM/SMlib.h> int main(int, char **) diff --git a/config.tests/x11/xcursor/xcursor.cpp b/config.tests/x11/xcursor/xcursor.cpp index 08cd94b..0d96e61 100644 --- a/config.tests/x11/xcursor/xcursor.cpp +++ b/config.tests/x11/xcursor/xcursor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/Xcursor/Xcursor.h> diff --git a/config.tests/x11/xfixes/xfixes.cpp b/config.tests/x11/xfixes/xfixes.cpp index fd36480..07d95a4 100644 --- a/config.tests/x11/xfixes/xfixes.cpp +++ b/config.tests/x11/xfixes/xfixes.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/extensions/Xfixes.h> @@ -9,6 +50,6 @@ int main(int, char **) { XFixesSelectionNotifyEvent event; event.type = 0; - return 0; + return 0; } diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/x11/xinerama/xinerama.cpp index 2cb3cf9..1e83d1c 100644 --- a/config.tests/x11/xinerama/xinerama.cpp +++ b/config.tests/x11/xinerama/xinerama.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/extensions/Xinerama.h> diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/x11/xinput/xinput.cpp index 9a61bc2..1166269 100644 --- a/config.tests/x11/xinput/xinput.cpp +++ b/config.tests/x11/xinput/xinput.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifdef Q_OS_SOLARIS #error "Not supported." #else diff --git a/config.tests/x11/xkb/xkb.cpp b/config.tests/x11/xkb/xkb.cpp index afe3c57..0ddd65c 100644 --- a/config.tests/x11/xkb/xkb.cpp +++ b/config.tests/x11/xkb/xkb.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/XKBlib.h> diff --git a/config.tests/x11/xlib/xlib.cpp b/config.tests/x11/xlib/xlib.cpp index 8d25bf5..0ad7408 100644 --- a/config.tests/x11/xlib/xlib.cpp +++ b/config.tests/x11/xlib/xlib.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> int main(int, char **) diff --git a/config.tests/x11/xrandr/xrandr.cpp b/config.tests/x11/xrandr/xrandr.cpp index cd61c2d..a9f9e97 100644 --- a/config.tests/x11/xrandr/xrandr.cpp +++ b/config.tests/x11/xrandr/xrandr.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/extensions/Xrandr.h> diff --git a/config.tests/x11/xrender/xrender.cpp b/config.tests/x11/xrender/xrender.cpp index 7974d73..320b8e4 100644 --- a/config.tests/x11/xrender/xrender.cpp +++ b/config.tests/x11/xrender/xrender.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/extensions/Xrender.h> diff --git a/config.tests/x11/xshape/xshape.cpp b/config.tests/x11/xshape/xshape.cpp index 01b5ef4..0bc1341 100644 --- a/config.tests/x11/xshape/xshape.cpp +++ b/config.tests/x11/xshape/xshape.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/shape.h> @@ -6,5 +47,5 @@ int main(int, char **) { XShapeEvent shapeevent; shapeevent.type = 0; - return 0; + return 0; } diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp index a23fb08..8d5c625 100644 --- a/config.tests/x11/xsync/xsync.cpp +++ b/config.tests/x11/xsync/xsync.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/sync.h> @@ -110,11 +110,12 @@ EOF linkerSupportsFlag() { lflags=-Wl - for flag; do + for flag + do safe_flag=`shellEscape "$flag"` lflags=$lflags,$safe_flag done - compilerSupportsFlag "$lflags" + compilerSupportsFlag "$lflags" >/dev/null 2>&1 } #------------------------------------------------------------------------------- @@ -1215,7 +1216,7 @@ while [ "$#" -gt 0 ]; do fi fi ;; - + qvfb) # left for commandline compatibility, not documented if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then if [ "$VAL" = "yes" ]; then @@ -3201,9 +3202,8 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2] [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa] [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns] - [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend] + [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend] [-no-openssl] [-openssl] [-openssl-linked] - [-no-multimedia] [-multimedia] [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-script] [-script] [-no-scripttools] [-scripttools] @@ -3338,15 +3338,15 @@ fi QtXmlPatterns is built if a decent C++ compiler is used and exceptions are enabled. + -no-multimedia ..... Do not build the QtMultimedia module. + + -multimedia ........ Build the QtMultimedia module. + -no-phonon ......... Do not build the Phonon module. + -phonon ............ Build the Phonon module. Phonon is built if a decent C++ compiler is used. -no-phonon-backend.. Do not build the platform phonon plugin. + -phonon-backend..... Build the platform phonon plugin. - -no-multimedia ..... Do not build the multimedia module. - * -multimedia ........ Build the multimedia module. - -no-svg ............ Do not build the SVG module. + -svg ............... Build the SVG module. @@ -5816,7 +5816,7 @@ else fi fi; -# set the global Mac deployment target. This is overridden on an arch-by-arch basis +# set the global Mac deployment target. This is overridden on an arch-by-arch basis # in some cases, see code further down case "$PLATFORM,$CFG_MAC_COCOA" in macx*,yes) @@ -6321,6 +6321,12 @@ else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS" fi +if [ "$CFG_MULTIMEDIA" = "no" ]; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA" +else + QT_CONFIG="$QT_CONFIG multimedia" +fi + if [ "$CFG_SVG" = "yes" ]; then QT_CONFIG="$QT_CONFIG svg" else @@ -6366,12 +6372,6 @@ else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS" fi -if [ "$CFG_MULTIMEDIA" = "yes" ]; then - QT_CONFIG="$QT_CONFIG multimedia" -else - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA" -fi - if [ "$CFG_EXCEPTIONS" = "no" ]; then case "$COMPILER" in g++*) @@ -7039,8 +7039,6 @@ EOF # Ensure we can link to uninistalled libraries if linkerSupportsFlag -rpath-link "$outpath/lib"; then echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" -elif linkerSupportsFlag -rpath "$outpath/lib"; then - echo "QMAKE_LFLAGS += -Wl,-rpath,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" fi if [ -n "$QT_CFLAGS_PSQL" ]; then diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp index 3ce9c08..1e6dffd 100644 --- a/demos/browser/networkaccessmanager.cpp +++ b/demos/browser/networkaccessmanager.cpp @@ -106,10 +106,13 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply) if (reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool() == true) requestFinishedSecureCount++; + if (requestFinishedCount % 10) + return; + double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount)); double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount)); double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount)); - qDebug("%lli requests [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure); + qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure); } diff --git a/demos/deform/pathdeform.cpp b/demos/deform/pathdeform.cpp index 5530010..07c7829 100644 --- a/demos/deform/pathdeform.cpp +++ b/demos/deform/pathdeform.cpp @@ -53,11 +53,6 @@ #include <QDesktopWidget> #include <qmath.h> -#if defined(Q_OS_SYMBIAN) -// TODO: Remove all FONT_OUTLINE_TWEAK related code as soon as the S60FontEngine can deliver outlines -#define FONT_OUTLINE_TWEAK -#endif - PathDeformControls::PathDeformControls(QWidget *parent, PathDeformRenderer* renderer, bool smallScreen) : QWidget(parent) { @@ -246,13 +241,6 @@ void PathDeformControls::layoutForSmallScreen() QRect screen_size = QApplication::desktop()->screenGeometry(); radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/5); -#ifdef FONT_OUTLINE_TWEAK - radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/7); - fontSizeLabel->setText("Qt Logo Size:"); - m_renderer->setText("A"); // Any Letter would be fine - fontSizeSlider->setValue(100); -#endif - m_renderer->setText(tr("Qt")); } diff --git a/demos/embedded/anomaly/src/AddressBar.cpp b/demos/embedded/anomaly/src/AddressBar.cpp index 57ea6be..bb6292f 100644 --- a/demos/embedded/anomaly/src/AddressBar.cpp +++ b/demos/embedded/anomaly/src/AddressBar.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/AddressBar.h b/demos/embedded/anomaly/src/AddressBar.h index 2e9d1b5..6322531 100644 --- a/demos/embedded/anomaly/src/AddressBar.h +++ b/demos/embedded/anomaly/src/AddressBar.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/BookmarksView.cpp b/demos/embedded/anomaly/src/BookmarksView.cpp index aa2233da..11593fd 100644 --- a/demos/embedded/anomaly/src/BookmarksView.cpp +++ b/demos/embedded/anomaly/src/BookmarksView.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/BookmarksView.h b/demos/embedded/anomaly/src/BookmarksView.h index b918192..9cbfad9 100644 --- a/demos/embedded/anomaly/src/BookmarksView.h +++ b/demos/embedded/anomaly/src/BookmarksView.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp index 9eea7b2..398694f 100644 --- a/demos/embedded/anomaly/src/BrowserView.cpp +++ b/demos/embedded/anomaly/src/BrowserView.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/BrowserView.h b/demos/embedded/anomaly/src/BrowserView.h index e80166a..0d388a6 100644 --- a/demos/embedded/anomaly/src/BrowserView.h +++ b/demos/embedded/anomaly/src/BrowserView.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/BrowserWindow.cpp b/demos/embedded/anomaly/src/BrowserWindow.cpp index 9f81fe3..6a2a518 100644 --- a/demos/embedded/anomaly/src/BrowserWindow.cpp +++ b/demos/embedded/anomaly/src/BrowserWindow.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/BrowserWindow.h b/demos/embedded/anomaly/src/BrowserWindow.h index 2b9757f..51660ba 100644 --- a/demos/embedded/anomaly/src/BrowserWindow.h +++ b/demos/embedded/anomaly/src/BrowserWindow.h @@ -3,25 +3,42 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ - #ifndef BROWSERWINDOW_H #define BROWSERWINDOW_H diff --git a/demos/embedded/anomaly/src/ControlStrip.cpp b/demos/embedded/anomaly/src/ControlStrip.cpp index 190db30..564f1f2 100644 --- a/demos/embedded/anomaly/src/ControlStrip.cpp +++ b/demos/embedded/anomaly/src/ControlStrip.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/ControlStrip.h b/demos/embedded/anomaly/src/ControlStrip.h index bf8d7e8..0788bb9 100644 --- a/demos/embedded/anomaly/src/ControlStrip.h +++ b/demos/embedded/anomaly/src/ControlStrip.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/HomeView.cpp b/demos/embedded/anomaly/src/HomeView.cpp index def677d..18de6ef 100644 --- a/demos/embedded/anomaly/src/HomeView.cpp +++ b/demos/embedded/anomaly/src/HomeView.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/HomeView.h b/demos/embedded/anomaly/src/HomeView.h index 2a56295..92889fb 100644 --- a/demos/embedded/anomaly/src/HomeView.h +++ b/demos/embedded/anomaly/src/HomeView.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/Main.cpp b/demos/embedded/anomaly/src/Main.cpp index d73e58a..16c3676 100644 --- a/demos/embedded/anomaly/src/Main.cpp +++ b/demos/embedded/anomaly/src/Main.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/TitleBar.cpp b/demos/embedded/anomaly/src/TitleBar.cpp index f33ccab..31e9264 100644 --- a/demos/embedded/anomaly/src/TitleBar.cpp +++ b/demos/embedded/anomaly/src/TitleBar.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/TitleBar.h b/demos/embedded/anomaly/src/TitleBar.h index 5e982ff..7d9524f 100644 --- a/demos/embedded/anomaly/src/TitleBar.h +++ b/demos/embedded/anomaly/src/TitleBar.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/ZoomStrip.cpp b/demos/embedded/anomaly/src/ZoomStrip.cpp index 167a4f7..ce3acd0 100644 --- a/demos/embedded/anomaly/src/ZoomStrip.cpp +++ b/demos/embedded/anomaly/src/ZoomStrip.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/ZoomStrip.h b/demos/embedded/anomaly/src/ZoomStrip.h index 88ce264..dda09cf 100644 --- a/demos/embedded/anomaly/src/ZoomStrip.h +++ b/demos/embedded/anomaly/src/ZoomStrip.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Anomaly project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/flickcharm.cpp b/demos/embedded/anomaly/src/flickcharm.cpp index ec257b3..8f137b0 100644 --- a/demos/embedded/anomaly/src/flickcharm.cpp +++ b/demos/embedded/anomaly/src/flickcharm.cpp @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Graphics Dojo project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/anomaly/src/flickcharm.h b/demos/embedded/anomaly/src/flickcharm.h index 9e36296..971b517 100644 --- a/demos/embedded/anomaly/src/flickcharm.h +++ b/demos/embedded/anomaly/src/flickcharm.h @@ -3,21 +3,39 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the Graphics Dojo project on Qt Labs. +** This file is part of the demos of the Qt Toolkit. ** -** This file may be used under the terms of the GNU General Public -** License version 2.0 or 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of -** this file. Please review the following information to ensure GNU -** General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png b/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png Binary files differindex b9a73fd..8d537f4 100644 --- a/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/anomaly_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/context2d_s60.png b/demos/embedded/fluidlauncher/screenshots/context2d_s60.png Binary files differindex a53f5b0..c7225c7 100644 --- a/demos/embedded/fluidlauncher/screenshots/context2d_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/context2d_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png b/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png Binary files differindex f4aa1a2..a429be3 100644 --- a/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/desktopservices_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png b/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png Binary files differindex 50376c1..d4fd44f 100644 --- a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png b/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png Binary files differindex 11459dc..74f4ad1 100644 --- a/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png b/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png Binary files differindex 56da9dc..d31875d 100644 --- a/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/fridgemagnets_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/ftp_s60.png b/demos/embedded/fluidlauncher/screenshots/ftp_s60.png Binary files differindex ea6a321..5858daf 100644 --- a/demos/embedded/fluidlauncher/screenshots/ftp_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/ftp_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png b/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png Binary files differindex c451198..54b6321 100644 --- a/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/saxbookmarks_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png b/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png Binary files differindex 03989fb..df090e2 100644 --- a/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/softkeys_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png b/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png Binary files differindex bad9692..57480fb 100644 --- a/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/styledemo_s60.png diff --git a/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png b/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png Binary files differindex 690ab48..9c4cab3 100644 --- a/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png +++ b/demos/embedded/fluidlauncher/screenshots/wiggly_s60.png diff --git a/demos/embedded/styledemo/main.cpp b/demos/embedded/styledemo/main.cpp index 7aab532..7cb6b7f 100644 --- a/demos/embedded/styledemo/main.cpp +++ b/demos/embedded/styledemo/main.cpp @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(styledemo); app.setApplicationName("style"); - app.setOrganizationName("Trolltech"); - app.setOrganizationDomain("com.trolltech"); + app.setOrganizationName("Nokia"); + app.setOrganizationDomain("com.nokia.qt"); StyleWidget widget; widget.showFullScreen(); diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml index 6c8ddb0..f598780 100644 --- a/demos/qtdemo/xml/examples.xml +++ b/demos/qtdemo/xml/examples.xml @@ -196,6 +196,7 @@ <example filename="completer" name="Completer" /> <example filename="customcompleter" name="Custom Completer" /> <example filename="i18n" name="Internationalization" /> + <example filename="inputpanel" name="Input Panel" /> <example filename="plugandpaint" name="Plug and Paint" /> <example filename="regexp" name="Regular Expressions" /> <example filename="settingseditor" name="Settings Editor" /> diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index 8c2c2c8..194d670 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -49,10 +49,13 @@ information about a particular change. this is that Nokia focuses on OpenGL for desktop hardware accelerated rendering. - - When mixing OpenGL and QPainter calls you need to first call syncState() - on the paint engine, for example "painter->paintEngine()->syncState()". - This is to ensure that the engine flushes any pending drawing and sets up - the GL modelview/projection matrices properly. + - When mixing OpenGL and QPainter calls you need to surround your custom + OpenGL calls with QPainter::beginNativePainting() and + QPainter::endNativePainting(). + This is to ensure that the paint engine flushes any pending drawing and sets + up the GL modelview/projection matrices properly before you can issue custom + OpenGL calls, and to let the paint engine synchronize to the painter state + before resuming regular QPainter based drawing. - Graphics View has undergone heavy optimization work, and as a result of this work, the following behavior changes were introduced. diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 75b870f..4b1af71 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -913,6 +913,16 @@ The \l{How to Create Qt Plugins} document outlines the issues you need to pay attention to when building and deploying plugins for Qt applications. + + \section1 Related Third Party Resources + + \list + \o \l{http://silmor.de/29}{Cross compiling Qt/Win Apps on Linux} covers the + process of cross-compiling Windows applications on Linux. + \o \l{http://divided-mind.blogspot.com/2007/09/cross-compiling-qt4win-on-linux.html} + {Cross-compiling Qt4/Win on Linux} provides another Linux-to-Windows + cross-compilation guide. + \endlist */ /*! diff --git a/doc/src/development/developing-on-mac.qdoc b/doc/src/development/developing-on-mac.qdoc index dee6d4d..f9f3929 100644 --- a/doc/src/development/developing-on-mac.qdoc +++ b/doc/src/development/developing-on-mac.qdoc @@ -128,7 +128,7 @@ \row \o 10.6 \o Snow Leopard - \o Carbon + \o Cocoa/Carbon \o 32 \o PPC/Intel \o Yes @@ -136,10 +136,12 @@ \o 10.6 \o Snow Leopard \o Cocoa - \o 32/64 - \o PPC/Intel + \o 64 + \o Intel \o Yes \endtable + + Note that building for ppc-64 is not supported on 10.6. \section2 Which One Should I Use? diff --git a/doc/src/diagrams/designer-adding-dockwidget.txt b/doc/src/diagrams/designer-manual/designer-adding-dockwidget.txt index 97b4beb..97b4beb 100644 --- a/doc/src/diagrams/designer-adding-dockwidget.txt +++ b/doc/src/diagrams/designer-manual/designer-adding-dockwidget.txt diff --git a/doc/src/diagrams/designer-adding-dockwidget1.png b/doc/src/diagrams/designer-manual/designer-adding-dockwidget1.png Binary files differindex 960da83..960da83 100644 --- a/doc/src/diagrams/designer-adding-dockwidget1.png +++ b/doc/src/diagrams/designer-manual/designer-adding-dockwidget1.png diff --git a/doc/src/diagrams/designer-adding-dockwidget1.zip b/doc/src/diagrams/designer-manual/designer-adding-dockwidget1.zip Binary files differindex 0492df6..0492df6 100644 --- a/doc/src/diagrams/designer-adding-dockwidget1.zip +++ b/doc/src/diagrams/designer-manual/designer-adding-dockwidget1.zip diff --git a/doc/src/diagrams/designer-adding-menu-action1.png b/doc/src/diagrams/designer-manual/designer-adding-menu-action1.png Binary files differindex cde92d9..cde92d9 100644 --- a/doc/src/diagrams/designer-adding-menu-action1.png +++ b/doc/src/diagrams/designer-manual/designer-adding-menu-action1.png diff --git a/doc/src/diagrams/designer-adding-menu-action1.zip b/doc/src/diagrams/designer-manual/designer-adding-menu-action1.zip Binary files differindex 08395eb..08395eb 100644 --- a/doc/src/diagrams/designer-adding-menu-action1.zip +++ b/doc/src/diagrams/designer-manual/designer-adding-menu-action1.zip diff --git a/doc/src/diagrams/designer-adding-menu-action2.zip b/doc/src/diagrams/designer-manual/designer-adding-menu-action2.zip Binary files differindex ca1a5b3..ca1a5b3 100644 --- a/doc/src/diagrams/designer-adding-menu-action2.zip +++ b/doc/src/diagrams/designer-manual/designer-adding-menu-action2.zip diff --git a/doc/src/diagrams/designer-adding-toolbar-action1.png b/doc/src/diagrams/designer-manual/designer-adding-toolbar-action1.png Binary files differindex 6b82373..6b82373 100644 --- a/doc/src/diagrams/designer-adding-toolbar-action1.png +++ b/doc/src/diagrams/designer-manual/designer-adding-toolbar-action1.png diff --git a/doc/src/diagrams/designer-adding-toolbar-action1.zip b/doc/src/diagrams/designer-manual/designer-adding-toolbar-action1.zip Binary files differindex e673b3c..e673b3c 100644 --- a/doc/src/diagrams/designer-adding-toolbar-action1.zip +++ b/doc/src/diagrams/designer-manual/designer-adding-toolbar-action1.zip diff --git a/doc/src/diagrams/designer-adding-toolbar-action2.zip b/doc/src/diagrams/designer-manual/designer-adding-toolbar-action2.zip Binary files differindex 96a9d69..96a9d69 100644 --- a/doc/src/diagrams/designer-adding-toolbar-action2.zip +++ b/doc/src/diagrams/designer-manual/designer-adding-toolbar-action2.zip diff --git a/doc/src/diagrams/designer-creating-dynamic-property.png b/doc/src/diagrams/designer-manual/designer-creating-dynamic-property.png Binary files differindex 1c3d3ca..1c3d3ca 100644 --- a/doc/src/diagrams/designer-creating-dynamic-property.png +++ b/doc/src/diagrams/designer-manual/designer-creating-dynamic-property.png diff --git a/doc/src/diagrams/designer-creating-menu-entry1.png b/doc/src/diagrams/designer-manual/designer-creating-menu-entry1.png Binary files differindex 33aa0d6..33aa0d6 100644 --- a/doc/src/diagrams/designer-creating-menu-entry1.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry1.png diff --git a/doc/src/diagrams/designer-creating-menu-entry1.zip b/doc/src/diagrams/designer-manual/designer-creating-menu-entry1.zip Binary files differindex f9e64c8..f9e64c8 100644 --- a/doc/src/diagrams/designer-creating-menu-entry1.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry1.zip diff --git a/doc/src/diagrams/designer-creating-menu-entry2.png b/doc/src/diagrams/designer-manual/designer-creating-menu-entry2.png Binary files differindex 8338d08..8338d08 100644 --- a/doc/src/diagrams/designer-creating-menu-entry2.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry2.png diff --git a/doc/src/diagrams/designer-creating-menu-entry2.zip b/doc/src/diagrams/designer-manual/designer-creating-menu-entry2.zip Binary files differindex 67d81e4..67d81e4 100644 --- a/doc/src/diagrams/designer-creating-menu-entry2.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry2.zip diff --git a/doc/src/diagrams/designer-creating-menu-entry3.png b/doc/src/diagrams/designer-manual/designer-creating-menu-entry3.png Binary files differindex d242646..d242646 100644 --- a/doc/src/diagrams/designer-creating-menu-entry3.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry3.png diff --git a/doc/src/diagrams/designer-creating-menu-entry3.zip b/doc/src/diagrams/designer-manual/designer-creating-menu-entry3.zip Binary files differindex d530186..d530186 100644 --- a/doc/src/diagrams/designer-creating-menu-entry3.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry3.zip diff --git a/doc/src/diagrams/designer-creating-menu-entry4.png b/doc/src/diagrams/designer-manual/designer-creating-menu-entry4.png Binary files differindex 07a49ba..07a49ba 100644 --- a/doc/src/diagrams/designer-creating-menu-entry4.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry4.png diff --git a/doc/src/diagrams/designer-creating-menu-entry4.zip b/doc/src/diagrams/designer-manual/designer-creating-menu-entry4.zip Binary files differindex d800c31..d800c31 100644 --- a/doc/src/diagrams/designer-creating-menu-entry4.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu-entry4.zip diff --git a/doc/src/diagrams/designer-creating-menu.txt b/doc/src/diagrams/designer-manual/designer-creating-menu.txt index b5b2934..b5b2934 100644 --- a/doc/src/diagrams/designer-creating-menu.txt +++ b/doc/src/diagrams/designer-manual/designer-creating-menu.txt diff --git a/doc/src/diagrams/designer-creating-menu1.png b/doc/src/diagrams/designer-manual/designer-creating-menu1.png Binary files differindex d92a88a..d92a88a 100644 --- a/doc/src/diagrams/designer-creating-menu1.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu1.png diff --git a/doc/src/diagrams/designer-creating-menu1.zip b/doc/src/diagrams/designer-manual/designer-creating-menu1.zip Binary files differindex 780b1ac..780b1ac 100644 --- a/doc/src/diagrams/designer-creating-menu1.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu1.zip diff --git a/doc/src/diagrams/designer-creating-menu2.png b/doc/src/diagrams/designer-manual/designer-creating-menu2.png Binary files differindex 7be4891..7be4891 100644 --- a/doc/src/diagrams/designer-creating-menu2.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu2.png diff --git a/doc/src/diagrams/designer-creating-menu2.zip b/doc/src/diagrams/designer-manual/designer-creating-menu2.zip Binary files differindex 00664a6..00664a6 100644 --- a/doc/src/diagrams/designer-creating-menu2.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu2.zip diff --git a/doc/src/diagrams/designer-creating-menu3.png b/doc/src/diagrams/designer-manual/designer-creating-menu3.png Binary files differindex c2f1beb..c2f1beb 100644 --- a/doc/src/diagrams/designer-creating-menu3.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu3.png diff --git a/doc/src/diagrams/designer-creating-menu3.zip b/doc/src/diagrams/designer-manual/designer-creating-menu3.zip Binary files differindex 76ecbe0..76ecbe0 100644 --- a/doc/src/diagrams/designer-creating-menu3.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menu3.zip diff --git a/doc/src/diagrams/designer-creating-menu4.png b/doc/src/diagrams/designer-manual/designer-creating-menu4.png Binary files differindex 3a3ab54..3a3ab54 100644 --- a/doc/src/diagrams/designer-creating-menu4.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menu4.png diff --git a/doc/src/diagrams/designer-creating-menubar.png b/doc/src/diagrams/designer-manual/designer-creating-menubar.png Binary files differindex e8078e0..e8078e0 100644 --- a/doc/src/diagrams/designer-creating-menubar.png +++ b/doc/src/diagrams/designer-manual/designer-creating-menubar.png diff --git a/doc/src/diagrams/designer-creating-menubar.zip b/doc/src/diagrams/designer-manual/designer-creating-menubar.zip Binary files differindex bddbf0e..bddbf0e 100644 --- a/doc/src/diagrams/designer-creating-menubar.zip +++ b/doc/src/diagrams/designer-manual/designer-creating-menubar.zip diff --git a/doc/src/diagrams/designer-edit-resource.zip b/doc/src/diagrams/designer-manual/designer-edit-resource.zip Binary files differindex dc43d9e..dc43d9e 100644 --- a/doc/src/diagrams/designer-edit-resource.zip +++ b/doc/src/diagrams/designer-manual/designer-edit-resource.zip diff --git a/doc/src/diagrams/designer-find-icon.zip b/doc/src/diagrams/designer-manual/designer-find-icon.zip Binary files differindex e94abd9..e94abd9 100644 --- a/doc/src/diagrams/designer-find-icon.zip +++ b/doc/src/diagrams/designer-manual/designer-find-icon.zip diff --git a/doc/src/diagrams/designer-form-layoutfunction-crop.png b/doc/src/diagrams/designer-manual/designer-form-layoutfunction-crop.png Binary files differindex e8dd39f..e8dd39f 100644 --- a/doc/src/diagrams/designer-form-layoutfunction-crop.png +++ b/doc/src/diagrams/designer-manual/designer-form-layoutfunction-crop.png diff --git a/doc/src/diagrams/designer-form-layoutfunction.png b/doc/src/diagrams/designer-manual/designer-form-layoutfunction.png Binary files differindex 9101e89..9101e89 100644 --- a/doc/src/diagrams/designer-form-layoutfunction.png +++ b/doc/src/diagrams/designer-manual/designer-form-layoutfunction.png diff --git a/doc/src/diagrams/designer-form-layoutfunction.zip b/doc/src/diagrams/designer-manual/designer-form-layoutfunction.zip Binary files differindex fcce637..fcce637 100644 --- a/doc/src/diagrams/designer-form-layoutfunction.zip +++ b/doc/src/diagrams/designer-manual/designer-form-layoutfunction.zip diff --git a/doc/src/diagrams/designer-main-window.zip b/doc/src/diagrams/designer-manual/designer-main-window.zip Binary files differindex 69b7ee6..69b7ee6 100644 --- a/doc/src/diagrams/designer-main-window.zip +++ b/doc/src/diagrams/designer-manual/designer-main-window.zip diff --git a/doc/src/diagrams/designer-mainwindow-actions.ui b/doc/src/diagrams/designer-manual/designer-mainwindow-actions.ui index 593a2de..593a2de 100644 --- a/doc/src/diagrams/designer-mainwindow-actions.ui +++ b/doc/src/diagrams/designer-manual/designer-mainwindow-actions.ui diff --git a/doc/src/diagrams/designer-palette-brush-editor.zip b/doc/src/diagrams/designer-manual/designer-palette-brush-editor.zip Binary files differindex 698f271..698f271 100644 --- a/doc/src/diagrams/designer-palette-brush-editor.zip +++ b/doc/src/diagrams/designer-manual/designer-palette-brush-editor.zip diff --git a/doc/src/diagrams/designer-palette-editor.zip b/doc/src/diagrams/designer-manual/designer-palette-editor.zip Binary files differindex 96646ab..96646ab 100644 --- a/doc/src/diagrams/designer-palette-editor.zip +++ b/doc/src/diagrams/designer-manual/designer-palette-editor.zip diff --git a/doc/src/diagrams/designer-palette-gradient-editor.zip b/doc/src/diagrams/designer-manual/designer-palette-gradient-editor.zip Binary files differindex 4696516..4696516 100644 --- a/doc/src/diagrams/designer-palette-gradient-editor.zip +++ b/doc/src/diagrams/designer-manual/designer-palette-gradient-editor.zip diff --git a/doc/src/diagrams/designer-palette-pattern-editor.zip b/doc/src/diagrams/designer-manual/designer-palette-pattern-editor.zip Binary files differindex 7382bad..7382bad 100644 --- a/doc/src/diagrams/designer-palette-pattern-editor.zip +++ b/doc/src/diagrams/designer-manual/designer-palette-pattern-editor.zip diff --git a/doc/src/diagrams/designer-resource-editor.zip b/doc/src/diagrams/designer-manual/designer-resource-editor.zip Binary files differindex 2c11da4..2c11da4 100644 --- a/doc/src/diagrams/designer-resource-editor.zip +++ b/doc/src/diagrams/designer-manual/designer-resource-editor.zip diff --git a/doc/src/diagrams/designer-widget-box.zip b/doc/src/diagrams/designer-manual/designer-widget-box.zip Binary files differindex 7ba8f77..7ba8f77 100644 --- a/doc/src/diagrams/designer-widget-box.zip +++ b/doc/src/diagrams/designer-manual/designer-widget-box.zip diff --git a/doc/src/diagrams/designer-manual/rgbController.ui b/doc/src/diagrams/designer-manual/rgbController.ui new file mode 100644 index 0000000..37c839f --- /dev/null +++ b/doc/src/diagrams/designer-manual/rgbController.ui @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>RGB Controller</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>RED</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSpinBox" name="spinBox"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QSlider" name="verticalSlider"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>GREEN</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSpinBox" name="spinBox_2"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QSlider" name="verticalSlider_2"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="0" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>BLUE</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSpinBox" name="spinBox_3"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QSlider" name="verticalSlider_3"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + </layout> + </item> + </layout> + <zorder>label</zorder> + <zorder>label_2</zorder> + <zorder>label_3</zorder> + <zorder>spinBox</zorder> + <zorder>spinBox_2</zorder> + <zorder>spinBox_3</zorder> + <zorder>verticalSlider</zorder> + <zorder>verticalSlider_2</zorder> + <zorder>verticalSlider_3</zorder> + <zorder>verticalSlider</zorder> + </widget> + <resources/> + <connections> + <connection> + <sender>spinBox</sender> + <signal>valueChanged(int)</signal> + <receiver>verticalSlider</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>55</x> + <y>51</y> + </hint> + <hint type="destinationlabel"> + <x>53</x> + <y>233</y> + </hint> + </hints> + </connection> + <connection> + <sender>spinBox_2</sender> + <signal>valueChanged(int)</signal> + <receiver>verticalSlider_2</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>193</x> + <y>46</y> + </hint> + <hint type="destinationlabel"> + <x>186</x> + <y>105</y> + </hint> + </hints> + </connection> + <connection> + <sender>spinBox_3</sender> + <signal>valueChanged(int)</signal> + <receiver>verticalSlider_3</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>312</x> + <y>38</y> + </hint> + <hint type="destinationlabel"> + <x>312</x> + <y>132</y> + </hint> + </hints> + </connection> + <connection> + <sender>verticalSlider</sender> + <signal>valueChanged(int)</signal> + <receiver>spinBox</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>57</x> + <y>86</y> + </hint> + <hint type="destinationlabel"> + <x>73</x> + <y>46</y> + </hint> + </hints> + </connection> + <connection> + <sender>verticalSlider_2</sender> + <signal>valueChanged(int)</signal> + <receiver>spinBox_2</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>187</x> + <y>135</y> + </hint> + <hint type="destinationlabel"> + <x>212</x> + <y>44</y> + </hint> + </hints> + </connection> + <connection> + <sender>verticalSlider_3</sender> + <signal>valueChanged(int)</signal> + <receiver>spinBox_3</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>315</x> + <y>187</y> + </hint> + <hint type="destinationlabel"> + <x>349</x> + <y>50</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/doc/src/examples/inputpanel.qdoc b/doc/src/examples/inputpanel.qdoc new file mode 100644 index 0000000..06c19ba --- /dev/null +++ b/doc/src/examples/inputpanel.qdoc @@ -0,0 +1,238 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example tools/inputpanel + \title Input Panel Example + + The Input Panel example shows how to create an input panel that + can be used to input text into widgets using only the pointer and + no keyboard. + + \image inputpanel-example.png + + The input fields in the main window have no function other than + to accept input. The main focus is on how the extra input panel + can be used to input text without the need for a real keyboard or + keypad. + + \section1 Main Form Class Definition + + Because the main window has no other function than to accept + input, it has no class definition. Instead, its whole layout is + made in Qt Designer. This emphasizes the point that no widget + specific code is needed to use input panels with Qt. + + \section1 MyInputPanelContext Class Definition + + \snippet examples/tools/inputpanel/myinputpanelcontext.h 0 + + The \c MyInputPanelContext class inherits QInputContext, which is + Qt's base class for handling input methods. + \c MyInputPanelContext is responsible for managing the state of + the input panel and sending input method events to the receiving + widgets. + + The \c inputPanel member is a pointer to the input panel widget + itself; in other words, the window that will display the buttons + used for input. + + The \c identifierName(), \c language(), \c isComposing() and + \c reset() functions are there mainly to fill in the pure virtual + functions in the base class, QInputContext, but they can be + useful in other scenarios. The important functions and slots are + the following: + + \list + \o \c filterEvent() is where we receive events telling us to open + or close the input panel. + \o \c sendCharacter() is a slot which is called when we want to + send a character to the focused widget. + \o \c updatePosition() is used to position the input panel + relative to the focused widget, and will be used when opening + the input panel. + \endlist + + \section1 MyInputPanelContext Class Implementation + + In the constructor we connect to the \c characterGenerated() + signal of the input panel, in order to receive key presses. We'll + see how it works in detail later on. + + \snippet examples/tools/inputpanel/myinputpanelcontext.cpp 0 + + In the \c filterEvent() function, we must look for the two event + types: \c RequestSoftwareInputPanel and \c CloseSoftwareInputPanel. + + \snippet examples/tools/inputpanel/myinputpanelcontext.cpp 1 + + The first type will be sent whenever + an input capable widget wants to ask for an input panel. Qt's + input widgets do this automatically. If we receive that type of + event, we call \c updatePosition() \mdash we'll see later on what it + does \mdash then show the actual input panel widget. If we receive + the \c CloseSoftwareInputPanel event, we do the opposite, and + hide the input panel. + + \snippet examples/tools/inputpanel/myinputpanelcontext.cpp 2 + + We implement the \c sendCharacter() function so that it sends the + supplied character to the focused widget. All QInputContext based + classes are always supposed to send events to the widget returned + by QInputContext::focusWidget(). Note the QPointer guards to make + sure that the widget does not get destroyed in between events. + + Also note that we chose to use key press events in this example. + For more complex use cases with composed text it might be more + appropriate to send QInputMethodEvent events. + + The \c updatePosition() function is implemented to position the + actual input panel window directly below the focused widget. + + \snippet examples/tools/inputpanel/myinputpanelcontext.cpp 3 + + It performs the positioning by obtaining the coordinates of the + focused widget and translating them to global coordinates. + + \section1 MyInputPanel Class Definition + + The \c MyInputPanel class inherits QWidget and is used to display + the input panel widget and its buttons. + + \snippet examples/tools/inputpanel/myinputpanel.h 0 + + If we look at the member variables first, we see that there is + \c form, which is made with Qt Designer, that contains the layout + of buttons to click. Note that all the buttons in the layout have + been declared with the \c NoFocus focus policy so that we can + maintain focus on the window receiving input instead of the + window containing buttons. + + The \c lastFocusedWidget is a helper variable, which also aids in + maintaining focus. + + \c signalMapper is an instance of the QSignalMapper class and is + there to help us tell which button was clicked. Since they are + all very similar this is a better solution than creating a separate + slot for each one. + + The functions that we implement in \c MyInputPanel are the + following: + + \list + \o \c event() is used to intercept and manipulate focus events, + so we can maintain focus in the main window. + \o \c saveFocusWidget() is a slot which will be called whenever + focus changes, and allows us to store the newly focused widget + in \c lastFocusedWidget, so that its focus can be restored + if it loses it to the input panel. + \o \c buttonClicked() is a slot which will be called by the + \c signalMapper whenever it receives a \c clicked() signal + from any of the buttons. + \endlist + + \section1 MyInputPanel Class Implementation + + If we look at the constructor first, we have a lot of signals to + connect to! + + We connect the QApplication::focusChanged() signal + to the \c saveFocusWidget() signal in order to get focus updates. + Then comes the interesting part with the signal mapper: the + series of \c setMapping() calls sets the mapper up so that each + signal from one of the buttons will result in a + QSignalMapper::mapped() signal, with the given widget as a + parameter. This allows us to do general processing of clicks. + + \snippet examples/tools/inputpanel/myinputpanel.cpp 0 + + The next series of connections then connect each button's + \c clicked() signal to the signal mapper. Finally, we create + a connection from the \c mapped() signal to the + \c buttonClicked() slot, where we will handle it. + + \snippet examples/tools/inputpanel/myinputpanel.cpp 3 + + In the \c buttonClicked() slot, we extract the value of the + "buttonValue" property. This is a custom property which was + created in Qt Designer and set to the character that we wish the + button to produce. Then we emit the \c characterGenerated() + signal, which \c MyInputPanelContext is connected to. This will + in turn cause it to send the input to the focused widget. + + In the \c saveFocusWidget() slot, we test whether the newly + focused widget is a child of the input panel or not, using the + QWidget::isAncestorOf() call. + + \snippet examples/tools/inputpanel/myinputpanel.cpp 2 + + If it isn't, it means that the widget is outside the input panel, + and we store a pointer to that widget for later. + + In the \c event() function we handle QEvent::WindowActivate + event, which occurs if the focus switches to the input panel. + + \snippet examples/tools/inputpanel/myinputpanel.cpp 1 + + Since we want avoid focus on the input panel, we immediately call + QWidget::activateWindow() on the widget that last had focus, so + that input into that widget can continue. We ignore any other events + that we receive. + + \section1 Setting the Input Context + + The main function for the example is very similar to those for other + examples. The only real difference is that it creates a + \c MyInputPanelContext and sets it as the application-wide input + context. + + \snippet examples/tools/inputpanel/main.cpp main + + With the input context in place, we set up and show the user interface + made in Qt Designer before running the event loop. + + \section1 Further Reading + + This example shows a specific kind of input context that uses interaction + with a widget to provide input for another. Qt's input context system can + also be used to create other kinds of input methods. We recommend starting + with the QInputContext documentation if you want to explore further. +*/ diff --git a/doc/src/examples/overpainting.qdoc b/doc/src/examples/overpainting.qdoc index 91100c0..b19b503 100644 --- a/doc/src/examples/overpainting.qdoc +++ b/doc/src/examples/overpainting.qdoc @@ -159,9 +159,10 @@ \snippet examples/opengl/overpainting/glwidget.cpp 7 - Once the list containing the object has been executed, the matrix stack - needs to be restored to its original state at the start of this function - before we can begin overpainting: + Once the list containing the object has been executed, the GL + states we changed and the matrix stack needs to be restored to its + original state at the start of this function before we can begin + overpainting: \snippet examples/opengl/overpainting/glwidget.cpp 8 diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc index 3b2caf3..95acc69 100644 --- a/doc/src/examples/tablet.qdoc +++ b/doc/src/examples/tablet.qdoc @@ -48,7 +48,7 @@ \image tabletexample.png When you use a tablet with Qt applications, \l{QTabletEvent}s are - genarated. You need to reimplement the + generated. You need to reimplement the \l{QWidget::}{tabletEvent()} event handler if you want to handle tablet events. Events are generated when the device used for drawing enters and leaves the proximity of the tablet (i.e., when diff --git a/doc/src/examples/videographicsitem.qdoc b/doc/src/examples/videographicsitem.qdoc new file mode 100644 index 0000000..861b587 --- /dev/null +++ b/doc/src/examples/videographicsitem.qdoc @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example video/videographicsitem + \title Video Graphics Item Example + + The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a + graphics scene using QtMultimedia's QAbstractVideoSurface. + + \image video-videographicsitem.png + + \sa {Video Widget Example} +*/ diff --git a/doc/src/examples/videowidget.qdoc b/doc/src/examples/videowidget.qdoc new file mode 100644 index 0000000..27d5711 --- /dev/null +++ b/doc/src/examples/videowidget.qdoc @@ -0,0 +1,187 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example video/videowidget + \title Video Widget Example + + The Video Widget example shows how to implement a video widget using + QtMultimedia's QAbstractVideoSurface + + \image video-videowidget.png + + \section1 VideoWidgetSurface Class Definition + + \snippet examples/video/videowidget/videowidgetsurface.h 0 + + The VideoWidgetSurface class inherits QAbstractVideoSurface and paints + video frames on a QWidget. This is a separate class to VideoWidget as both + QAbstractVideoSurface and QWidget inherit QObject. + + In addition to the functions from QAbstractVideoSurface, VideoWidgetSurface + has functions for determining the video display rectangle, and painting + the video. + + \section1 VideoWidgetSurface Class Implementation + + \snippet examples/video/videowidget/videowidgetsurface.cpp 0 + + From the supportedPixelFormats() function we return a list of pixel formats + the surface can paint. The order of the list hints at which formats are + preferred by the surface. Assuming a 32-bit RGB backbuffer, we'd expect + that a 32-bit RGB type with no alpha to be fastest to paint so + QVideoFrame::Image_RGB32 is first in the list. + + Since we don't support rendering using any special frame handles we don't + return any pixel formats if handleType is not + QAbstractVideoBuffer::NoHandle. + + \snippet examples/video/videowidget/videowidgetsurface.cpp 1 + + In isFormatSupported() we test if the frame type of a surface format maps + to a valid QImage format, that the frame size is not empty, and the handle + type is QAbstractVideoBuffer::NoHandle. Note that the + QAbstractVideoSurface implementation of isFormatSupported() will verify + that the list of supported pixel formats returned by + \c supportedPixelFormats(format.handleType()) contains the pixel format and + that the size is not empty so a reimplementation wasn't strictly necessary + in this case. + + \snippet examples/video/videowidget/videowidgetsurface.cpp 2 + + To start our surface we'll extract the image format and size from the + selected video format and save it for use in the paint() function. If the + image format, or size are invalid then we'll set an error and return false. + Otherwise we'll save the format and confirm the surface has been started, + by calling QAbstractVideoSurface::start(). Finally since the video size may + have changed we'll trigger an update of the widget, and video geometry. + + \snippet examples/video/videowidget/videowidgetsurface.cpp 5 + + The updateVideoRect() function calculates the region within the widget the + video occupies. The \l {QVideoSurfaceFormat::sizeHint()}{size hint} of the + video format gives a suggested size for the video calculated from the + \l {QVideoSurfaceFormat::viewport()}{viewport} and + \l {QVideoSurfaceFormat::pixelAspectRatio()}{pixel aspect ratio}. If the + suggested size fits within the widget then we create a new rect of that + size in the center of the widget. Otherwise we shrink the size maintaining + the aspect ratio so that it does fit. + + \snippet examples/video/videowidget/videowidgetsurface.cpp 4 + + We can't paint from outside a paint event, so when a new frame is received + in present() we save a reference to it and force an immediate repaint of + the video region. We retain the saved reference to the frame after the + repaint so that the widget can be repainted between frame changes if + necessary. + + If the format of the frame doesn't match the surface format we can't paint + it or very likely any future frames. So we set an + \l {QAbstractVideoSurface::UnsupportedFormatError}{UnsupportedFormatError} + on our surface and stop it immediately. + + \snippet examples/video/videowidget/videowidgetsurface.cpp 6 + + The paint() function is called by the video widget to paint the current + video frame. Before we draw the frame first we'll check the format for + the scan line direction and if the scan lines are arranged from bottom to + top we'll flip the painter so the frame isn't drawn upside down. Then + using the image format information saved in the start() function we'll + construct a new QImage from the current video frame, and draw it to the + the widget. + + \snippet examples/video/videowidget/videowidgetsurface.cpp 3 + + When the surface is stopped we need to release the current frame and + invalidate the video region. Then we confirm the surface has been + stopped by calling QAbstractVideoSurface::stop() which sets the started + state to false and finally we update so the video widget so paints over + the last frame. + + \section1 VideoWidget Class Definition + + The VideoWidget class uses the VideoWidgetSurface class to implement a + video widget. + + \snippet examples/video/videowidget/videowidget.h 0 + + The VideoWidget QWidget implementation is minimal with just the sizeHint(), + paintEvent(), and resizeEvent() functions in addition to the constructor, + destructor and an instance of VideoWidgetSurface. + + \section1 VideoWidget Class Implementation + + \snippet examples/video/videowidget/videowidget.cpp 0 + + In the VideoWidget constructor we set some flags to speed up re-paints a + little. Setting the Qt::WA_NoSystemBackground flag and disabling automatic + background fills will stop Qt from a painting a background that'll be + completely obscured by the video. The Qt::WA_PaintOnScreen flag will + allow us to paint to the screen instead of the back buffer where supported. + + Next we set the background color to black, so that any borders around the + video are filled in black rather the default background color. + + Finally we construct an instance of the VideoWidgetSurface class. + + \snippet examples/video/videowidget/videowidget.cpp 1 + + In the destructor we simply delete the VideoWidgetSurface instance. + + \snippet examples/video/videowidget/videowidget.cpp 2 + + We get the size hint for the widget from the video format of the surface + which is calculated from viewport and pixel aspect ratio of the video + format. + + \snippet examples/video/videowidget/videowidget.cpp 3 + + When the video widget receives a paint event we first check if the surface + is started, if not then we simply fill the widget with the background + color. If it is then we draw a border around the video region clipped + by the paint region, before calling paint on the video surface to draw the + current frame. + + \snippet examples/video/videowidget/videowidget.cpp 4 + + The resizeEvent() function is reimplemented to trigger an update of the + video region when the widget is resized. +*/ diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc index 8d7ea2c..397cb19 100644 --- a/doc/src/frameworks-technologies/graphicsview.qdoc +++ b/doc/src/frameworks-technologies/graphicsview.qdoc @@ -551,4 +551,24 @@ the widget is transformed resolution independently, allowing the fonts and style to stay crisp when zoomed in. (Note that the effect of resolution independence depends on the style.) + + \section1 Performance + + \section2 Floating Point Instructions + + In order to accurately and quickly apply transformations and effects to + items, Graphics View is built with the assumption that the user's hardware + is able to provide reasonable performance for floating point instructions. + + Many workstations and desktop computers are equipped with suitable hardware + to accelerate this kind of computation, but some embedded devices may only + provide libraries to handle mathematical operations or emulate floating + point instructions in software. + + As a result, certain kinds of effects may be slower than expected on certain + devices. It may be possible to compensate for this performance hit by making + optimizations in other areas; for example, by using \l{#OpenGL Rendering}{OpenGL} + to render a scene. However, any such optimizations may themselves cause a + reduction in performance if they also rely on the presence of floating point + hardware. */ diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc index 1eac06f..528494b 100644 --- a/doc/src/getting-started/demos.qdoc +++ b/doc/src/getting-started/demos.qdoc @@ -46,7 +46,7 @@ \previouspage Qt Examples \contentspage How to Learn Qt - \nextpage What's New in Qt 4.5 + \nextpage What's New in Qt 4.6 This is the list of demonstrations in Qt's \c demos directory. These are larger and more complicated programs than the diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 253a4e4..b0d6bf6 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -796,6 +796,13 @@ \o \l{multimedia/audio/audioinput}{Audio Input} \endlist + \section1 Video Output + + \list + \o \l{video/videowidget}{Video Widget}\raisedaster + \o \l{video/videographicsitem}{Video Graphics Item} + \endlist + \section1 Phonon The Phonon Multimedia Framework brings multimedia support to Qt applications. diff --git a/doc/src/images/gestures.png b/doc/src/images/gestures.png Binary files differnew file mode 100644 index 0000000..6bc5632 --- /dev/null +++ b/doc/src/images/gestures.png diff --git a/doc/src/images/graphicseffect-blur.png b/doc/src/images/graphicseffect-blur.png Binary files differnew file mode 100644 index 0000000..3fa403b --- /dev/null +++ b/doc/src/images/graphicseffect-blur.png diff --git a/doc/src/images/graphicseffect-colorize.png b/doc/src/images/graphicseffect-colorize.png Binary files differnew file mode 100644 index 0000000..96fbfe4 --- /dev/null +++ b/doc/src/images/graphicseffect-colorize.png diff --git a/doc/src/images/graphicseffect-drop-shadow.png b/doc/src/images/graphicseffect-drop-shadow.png Binary files differnew file mode 100644 index 0000000..c02415a --- /dev/null +++ b/doc/src/images/graphicseffect-drop-shadow.png diff --git a/doc/src/images/graphicseffect-effects.png b/doc/src/images/graphicseffect-effects.png Binary files differnew file mode 100644 index 0000000..422ae19 --- /dev/null +++ b/doc/src/images/graphicseffect-effects.png diff --git a/doc/src/images/graphicseffect-grayscale.png b/doc/src/images/graphicseffect-grayscale.png Binary files differnew file mode 100644 index 0000000..2bd0c93 --- /dev/null +++ b/doc/src/images/graphicseffect-grayscale.png diff --git a/doc/src/images/graphicseffect-opacity.png b/doc/src/images/graphicseffect-opacity.png Binary files differnew file mode 100644 index 0000000..de15859 --- /dev/null +++ b/doc/src/images/graphicseffect-opacity.png diff --git a/doc/src/images/graphicseffect-pixelize.png b/doc/src/images/graphicseffect-pixelize.png Binary files differnew file mode 100644 index 0000000..047c452 --- /dev/null +++ b/doc/src/images/graphicseffect-pixelize.png diff --git a/doc/src/images/graphicseffect-widget.png b/doc/src/images/graphicseffect-widget.png Binary files differnew file mode 100644 index 0000000..27245d1 --- /dev/null +++ b/doc/src/images/graphicseffect-widget.png diff --git a/doc/src/images/inputpanel-example.png b/doc/src/images/inputpanel-example.png Binary files differnew file mode 100644 index 0000000..0dd9325 --- /dev/null +++ b/doc/src/images/inputpanel-example.png diff --git a/doc/src/images/video-videographicsitem.png b/doc/src/images/video-videographicsitem.png Binary files differnew file mode 100644 index 0000000..e333c54 --- /dev/null +++ b/doc/src/images/video-videographicsitem.png diff --git a/doc/src/images/video-videowidget.png b/doc/src/images/video-videowidget.png Binary files differnew file mode 100644 index 0000000..a3c7bcb --- /dev/null +++ b/doc/src/images/video-videowidget.png diff --git a/doc/src/images/whatsnewanimatedtiles.png b/doc/src/images/whatsnewanimatedtiles.png Binary files differnew file mode 100644 index 0000000..7152ee2 --- /dev/null +++ b/doc/src/images/whatsnewanimatedtiles.png diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 4d92157..746a2de 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -76,7 +76,7 @@ <ul> <li><a href="installation.html">Installation</a> and <a href="how-to-learn-qt.html">First Steps with Qt</a></li> <li><a href="tutorials.html">Tutorials</a> and <a href="examples.html">Examples</a></li> - <li><a href="demos.html">Demonstrations</a> and <a href="qt4-5-intro.html"><b>New in Qt 4.5</b></a></li> + <li><a href="demos.html">Demonstrations</a> and <a href="qt4-6-intro.html"><b>New in Qt 4.6</b></a></li> </ul> </td> <td valign="top"> diff --git a/doc/src/platforms/emb-crosscompiling.qdoc b/doc/src/platforms/emb-crosscompiling.qdoc index 2e0ba4b..e1ce8db 100644 --- a/doc/src/platforms/emb-crosscompiling.qdoc +++ b/doc/src/platforms/emb-crosscompiling.qdoc @@ -181,11 +181,5 @@ \l{Qt for Embedded Linux Architecture} and \l{Deploying Qt for Embedded Linux Applications}. - - \row - \o \bold{Third party resources:} - - \l{http://silmor.de/29}{Cross compiling Qt/Win Apps on Linux} covers the - process of cross-compiling Windows applications on Linux. \endtable */ diff --git a/doc/src/platforms/emb-displaymanagement.qdoc b/doc/src/platforms/emb-displaymanagement.qdoc index 8a743b1..05267c1 100644 --- a/doc/src/platforms/emb-displaymanagement.qdoc +++ b/doc/src/platforms/emb-displaymanagement.qdoc @@ -152,7 +152,7 @@ \row \o \c offset=<x,y> \o Multi - \o Specifies the coordinates of a subscreens top-left corner + \o Specifies the coordinates of a subscreen's top-left corner (by default 0,0). \endtable diff --git a/doc/src/platforms/platform-notes-rtos.qdoc b/doc/src/platforms/platform-notes-rtos.qdoc index 8a52d84..4fef2f5 100644 --- a/doc/src/platforms/platform-notes-rtos.qdoc +++ b/doc/src/platforms/platform-notes-rtos.qdoc @@ -45,7 +45,7 @@ \row \o Phonon \o There is no standard audio backend, which could be integrated into Phonon. \row \o Qt3Support - \o The Qt3Support library is not available on QNX. + \o The Qt3Support library is not available on VxWorks. \endtable diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 5c2642e..83c01e6 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -78,6 +78,28 @@ The following features have been added to Qt since the first release of Qt 4: + In Qt 4.5: + \list + \o The WebKit browser engine included with Qt has been + upgraded to the latest upstream (trunk) version of WebKit, + bringing the latest features and improvements to Qt applications. + \o Qt for Mac OS X has been substantially rewritten to use + Apple's Cocoa API, enabling Qt applications to be deployed on + 64-bit Macintosh hardware. + \o The QtXmlPatterns module has been extended to cover XSLT, a + transformation language for XML documents. + \o Qt Script introduced its debugger, + providing error reporting for scripts, and to let users track down + bugs in their own scripts. + \o Qt 4.5 includes support for writing rich text documents as + OpenDocument files via the newly-introduced QTextDocumentWriter + class. + \o Qt Linguist can load and edit multiple translation + files simultaneously. + \o Support for ARGB top-level widgets (i.e., translucent + windows). + \endlist + In Qt 4.4: \list \o \l{QtWebkit Module}{Qt WebKit integration}, making it possible for developers @@ -87,8 +109,8 @@ \o \l{QtXmlPatterns Module}{XQuery and XPath} support, providing facilities for XML processing beyond that supported by the QtXml module. \o Support for embedded widgets in \l{Graphics View} scenes. - \o The \l{QtConcurrent} framework for concurrent programming using Qt paradigms and - threading features. + \o The \l{Thread Support in Qt}{QtConcurrent framework} for + concurrent programming using Qt paradigms and threading features. \o An \l{QtHelp Module}{improved help system} that can be used in conjunction with Qt Assistant or as an independent help resource manager. \o Printing system improvements, including the QPrinterInfo, QPrintPreviewWidget @@ -435,6 +457,157 @@ */ /*! + \page qt4-6-intro.html + \title What's New in Qt 4.6 + + Qt 4.6 provides many improvements and enhancements over the + previous releases in the Qt 4 series. This document covers the + most important features in this release, separated by category. + + A comprehensive list of changes between Qt 4.5 and Qt 4.6 is + included in the \c changes-4.6.0 file + \l{http://qt.nokia.com/developer/changes/changes-4.6.0}{available + online}. A \l{Known Issues in %VERSION%}{list of known issues} + for this release is also available. + + Changes between this release and the previous release are provided + in the \c{changes-%VERSION%} file (also + \l{http://qt.nokia.com/developer/changes/changes-%VERSION%}{available online}). + + A list of other Qt 4 features can be found on the \bold{\l{What's + New in Qt 4}} page. + + \bold{Highlights} + + \tableofcontents + + \section1 Animation Framework + + The animation framework helps build highly animated, + high-performance GUIs without the hassle of managing complex + structures, timers, and easing curves, not to mention the large + state graphs that all animated GUIs tend to be full of. + + The framework makes it easy to animate \l{QObject}s, including + QWidgets, by allowing Qt properties to be animated. It also allows + creating custom animations and interpolation functions. Graphics + views are not left out--one can animate \l{QGraphicsWidget}s, + which inherits from QObject (and thereby enables properties). + + Animations are controlled using easing curves and can be grouped + together. This enables animations of arbitrary complexity. + + The API is easy to grasp with functions such as start(), stop(), + pause(), and currentTime(). Here is an image from one of the + examples that come with the framework: + + \image whatsnewanimatedtiles.png + + The animation framework also plugs into the new Qt Statemachine by + allowing an animation to be played when transitions are triggered. + The state machine framework is introduced in 4.6 and is described + below. + + \section1 State Machine Framework + + The state machine framework provides a robust state chart + implementation based on Harel statecharts and SCXML. Qt's API lets + you construct such state graphs and execute them. The key benefits + of a state machine are: + + \list + \o Simplify complex application semantics. + \o Use of states to reduce code bloat. + \o Use states to improve maintainability. + \o Makes event-driven programming robust and more + reusable. + \endlist + + It is especially the last item here that makes using a state + machine worthwhile. A key characteristic of event-driven systems + (such as Qt applications) is that behavior often depends not only + on the last or current event, but also the events that preceded + it. With statecharts, this information is easy to express. + + The framework fits neatly into Qt by allowing transitions to + trigger on signals and \l{QEvent}s. By inserting animations into + the state machine, it is also easier to use the framework for + animating GUIs, for instance. + + \section1 Multi-touch & Gestures + + The new multi-touch and gestures support enables user interaction + with more than one finger, and combines sequential touch inputs to + a 'gesture'. + + \image gestures.png + + The main benefits of this new functionality are: + + \list + \o Allow users to interact with applications in better ways. + \o Simplify finger-based interaction with UI components. + \o Allowing common basic gestures and multi-touch + gestures. + \o Enable extensibility. + \endlist + + \section1 DOM access API + + Web pages and XML both have very complex document object models. + The W3C selector API provides a very simple way to access and + manipulate such structures. This API makes it intuitive to access + DOM, helps reuse CSS selector knowledge, and gives little + maintenance or footprint overhead. + + \code + QWebElement document = frame->documentElement(); + QList<QWebElement> allSpans = document.findAll("span"); + QList<QWebElement> introSpans = document.findAll("p.intro span"); + \endcode + + \section1 Qt3D enablers + + As more of Qt, and more of the applications built on Qt go 3D, + API's should be provided to simplify this. Mainly, the new API + aims to make it more easy to create 3D applications with OpenGL. + It will also unify the Qt OpenGL codebase, and enable + cross-platform 3D codebase. + + The main features of the Qt3D enablers are currently: Math + primitives for matrix multiplication, vectors, quaternions + (client-side), and API for vertex and fragment shaders, GLSL/ES. + Future research will, among other things include stencils, +scissors, vertex buffers and arrays, texture manipulation, and + geometry shaders. + + \section1 Performance Optimizations + + As always, Qt continuously strive to optimize its performance. + For this release, we have: + + \list + \o Rewritten the QGraphicsView rendering algorithm. + \o Made QPixmapCache support efficient Key datastructure. + \o Reduced overhead in QNetworkAccessManager. + \o Added the QContiguousCache class, which provides efficient caching of + contiguous data. + \o Removed Win9x support. + \endlist + + \section1 Multimedia Audio Services + + Qt 4.6 comes with new classes for handling audio. These classes + provide low-level access to the system's audio system. By + specifying the audio format (QAudioFormat) and supplying audio + data through a QIODevice, you get direct access to the + functionality of the sound device. The API also comes with + functions to query audio devices for which audio formats they + support. + +*/ + +/* \page qt4-5-intro.html \title What's New in Qt 4.5 @@ -563,7 +736,7 @@ \section1 Improved Network Proxy Support Qt's networking classes have been updated with - \l{Network Programming#Support for Network Proxies}{improved proxy support}. + \l{QtNetwork Module#Support for Network Proxies}{improved proxy support}. This includes improved integration with system proxy settings and the added ability to handle non-trivial proxy cases. diff --git a/doc/src/snippets/animation/sequential/tracer.h b/doc/src/snippets/animation/sequential/tracer.h index 1adb018..ff3b089 100644 --- a/doc/src/snippets/animation/sequential/tracer.h +++ b/doc/src/snippets/animation/sequential/tracer.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef TRACER_H #define TRACER_H diff --git a/doc/src/snippets/audioeffects.cpp b/doc/src/snippets/audioeffects.cpp index febf349..78d6fdf 100644 --- a/doc/src/snippets/audioeffects.cpp +++ b/doc/src/snippets/audioeffects.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include <phonon/audiooutput.h> @@ -6,7 +47,6 @@ #include <phonon/effect.h> #include <phonon/effectwidget.h> - int main(int argv, char **args) { QApplication app(argv, args); @@ -22,7 +62,7 @@ int main(int argv, char **args) QList<Phonon::EffectDescription> effectDescriptions = Phonon::BackendCapabilities::availableAudioEffects(); Phonon::EffectDescription effectDescription = effectDescriptions.at(4); - + Phonon::Path path = Phonon::createPath(mediaObject, audioOutput); //! [1] @@ -35,7 +75,7 @@ int main(int argv, char **args) //! [1] mediaObject->play(); - + effectWidget->setWindowTitle("Effect Name: " + effectDescription.name()); app.exec(); diff --git a/doc/src/snippets/code/doc.src.qtscripttools.qdoc b/doc/src/snippets/code/doc.src.qtscripttools.qdoc index c691f17..f9cc8bb 100644 --- a/doc/src/snippets/code/doc.src.qtscripttools.qdoc +++ b/doc/src/snippets/code/doc.src.qtscripttools.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtScriptTools> //! [0] diff --git a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc index df1d542..0526033 100644 --- a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc +++ b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Outlook::Application *outlook = new Outlook::Application; //! [0] diff --git a/doc/src/snippets/code/doc_src_appicon.qdoc b/doc/src/snippets/code/doc_src_appicon.qdoc index c763a68..84c6ce0 100644 --- a/doc/src/snippets/code/doc_src_appicon.qdoc +++ b/doc/src/snippets/code/doc_src_appicon.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] IDI_ICON1 ICON DISCARDABLE "myappico.ico" //! [0] diff --git a/doc/src/snippets/code/doc_src_assistant-manual.qdoc b/doc/src/snippets/code/doc_src_assistant-manual.qdoc index 383bd61..e6d72d1 100644 --- a/doc/src/snippets/code/doc_src_assistant-manual.qdoc +++ b/doc/src/snippets/code/doc_src_assistant-manual.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] assistant -collectionFile file //! [0] diff --git a/doc/src/snippets/code/doc_src_atomic-operations.qdoc b/doc/src/snippets/code/doc_src_atomic-operations.qdoc index acda5e4..fcf56b0 100644 --- a/doc/src/snippets/code/doc_src_atomic-operations.qdoc +++ b/doc/src/snippets/code/doc_src_atomic-operations.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] if (*ptr == expected) { *ptr = newval; diff --git a/doc/src/snippets/code/doc_src_compiler-notes.qdoc b/doc/src/snippets/code/doc_src_compiler-notes.qdoc index 12095d0..30e4385 100644 --- a/doc/src/snippets/code/doc_src_compiler-notes.qdoc +++ b/doc/src/snippets/code/doc_src_compiler-notes.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QTDIR=C:\Progra~1\Qt //! [0] diff --git a/doc/src/snippets/code/doc_src_containers.qdoc b/doc/src/snippets/code/doc_src_containers.qdoc index 9d6ba8d..fc18481 100644 --- a/doc/src/snippets/code/doc_src_containers.qdoc +++ b/doc/src/snippets/code/doc_src_containers.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class Employee { diff --git a/doc/src/snippets/code/doc_src_coordsys.qdoc b/doc/src/snippets/code/doc_src_coordsys.qdoc index 4674e75..0494351 100644 --- a/doc/src/snippets/code/doc_src_coordsys.qdoc +++ b/doc/src/snippets/code/doc_src_coordsys.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPainter painter(this); diff --git a/doc/src/snippets/code/doc_src_debug.qdoc b/doc/src/snippets/code/doc_src_debug.qdoc index 0e8a1c5..c42299e 100644 --- a/doc/src/snippets/code/doc_src_debug.qdoc +++ b/doc/src/snippets/code/doc_src_debug.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qDebug() << "Widget" << widget << "at position" << widget->pos(); //! [0] diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc index b8bf571..d33c13c 100644 --- a/doc/src/snippets/code/doc_src_deployment.qdoc +++ b/doc/src/snippets/code/doc_src_deployment.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cd /path/to/Qt ./configure -static -prefix /path/to/Qt <other parameters> diff --git a/doc/src/snippets/code/doc_src_designer-manual.qdoc b/doc/src/snippets/code/doc_src_designer-manual.qdoc index 6730815..ffc91e4 100644 --- a/doc/src/snippets/code/doc_src_designer-manual.qdoc +++ b/doc/src/snippets/code/doc_src_designer-manual.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] CONFIG += uitools //! [0] diff --git a/doc/src/snippets/code/doc_src_dnd.qdoc b/doc/src/snippets/code/doc_src_dnd.qdoc index 40df804..f990297 100644 --- a/doc/src/snippets/code/doc_src_dnd.qdoc +++ b/doc/src/snippets/code/doc_src_dnd.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyQt3Widget::customStartDragFunction() { diff --git a/doc/src/snippets/code/doc_src_emb-charinput.qdoc b/doc/src/snippets/code/doc_src_emb-charinput.qdoc index f6b33fe..4972386 100644 --- a/doc/src/snippets/code/doc_src_emb-charinput.qdoc +++ b/doc/src/snippets/code/doc_src_emb-charinput.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ./configure -help //! [0] diff --git a/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc b/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc index 3791bfc..ed028e7 100644 --- a/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc +++ b/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] export PATH=path/to/cross/compiler:$PATH //! [0] diff --git a/doc/src/snippets/code/doc_src_emb-envvars.qdoc b/doc/src/snippets/code/doc_src_emb-envvars.qdoc index c242ff3..d96c799 100644 --- a/doc/src/snippets/code/doc_src_emb-envvars.qdoc +++ b/doc/src/snippets/code/doc_src_emb-envvars.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] export QWS_DISPLAY=<driver>[:<driver specific options>]... [:<display num>] diff --git a/doc/src/snippets/code/doc_src_emb-features.qdoc b/doc/src/snippets/code/doc_src_emb-features.qdoc index e64a0ae..4d71717 100644 --- a/doc/src/snippets/code/doc_src_emb-features.qdoc +++ b/doc/src/snippets/code/doc_src_emb-features.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] configure.exe -D QT_NO_THREAD //! [0] diff --git a/doc/src/snippets/code/doc_src_emb-fonts.qdoc b/doc/src/snippets/code/doc_src_emb-fonts.qdoc index b39cb6f..8321ab6 100644 --- a/doc/src/snippets/code/doc_src_emb-fonts.qdoc +++ b/doc/src/snippets/code/doc_src_emb-fonts.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] name file renderer italic weight size flags //! [0] diff --git a/doc/src/snippets/code/doc_src_emb-install.qdoc b/doc/src/snippets/code/doc_src_emb-install.qdoc index fe53614..5464c34 100644 --- a/doc/src/snippets/code/doc_src_emb-install.qdoc +++ b/doc/src/snippets/code/doc_src_emb-install.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cd <anywhere> gunzip qt-embedded-linux-commercial-src-%VERSION%.tar.gz diff --git a/doc/src/snippets/code/doc_src_emb-performance.qdoc b/doc/src/snippets/code/doc_src_emb-performance.qdoc index 7dcba12..f17c3d4 100644 --- a/doc/src/snippets/code/doc_src_emb-performance.qdoc +++ b/doc/src/snippets/code/doc_src_emb-performance.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ./configure -static //! [0] diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc index 37eb9c6..6178f4d 100644 --- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc +++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] <qtopia-root-dir>/qtopiacore/qt/configure -embedded -help |grep -a1 mouse //! [0] diff --git a/doc/src/snippets/code/doc_src_emb-qvfb.qdoc b/doc/src/snippets/code/doc_src_emb-qvfb.qdoc index 827c84a..930eb3a 100644 --- a/doc/src/snippets/code/doc_src_emb-qvfb.qdoc +++ b/doc/src/snippets/code/doc_src_emb-qvfb.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cd path/to/QtEmbedded ./configure -qvfb diff --git a/doc/src/snippets/code/doc_src_emb-running.qdoc b/doc/src/snippets/code/doc_src_emb-running.qdoc index b15cfc1..6907ef9 100644 --- a/doc/src/snippets/code/doc_src_emb-running.qdoc +++ b/doc/src/snippets/code/doc_src_emb-running.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cd path/to/QtEmbedded/demos/textedit ./textedit -qws diff --git a/doc/src/snippets/code/doc_src_emb-vnc.qdoc b/doc/src/snippets/code/doc_src_emb-vnc.qdoc index c35274f..e1da06f 100644 --- a/doc/src/snippets/code/doc_src_emb-vnc.qdoc +++ b/doc/src/snippets/code/doc_src_emb-vnc.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cd path/to/QtEmbedded ./configure -qt-gfx-vnc diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc b/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc index 0414e50..eb90786 100644 --- a/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc +++ b/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Private Application As comappLib.Application Private MyApp As Boolean diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc b/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc index 3bdf9fa..d79fae6 100644 --- a/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc +++ b/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ' VB is case insensitive, but our C++ controls are not. ' Me.resetButton.enabled = True diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc b/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc index 8c9165a..43f6dba 100644 --- a/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc +++ b/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] <object ID="QMenus" CLASSID="CLSID:4dc3f340-a6f7-44e4-a79b-3e9217695fbd" CODEBASE="http://qt.nokia.com/demos/menusax.cab"> diff --git a/doc/src/snippets/code/doc_src_examples_ahigl.qdoc b/doc/src/snippets/code/doc_src_examples_ahigl.qdoc index bf29cda..f4f6f8b 100644 --- a/doc/src/snippets/code/doc_src_examples_ahigl.qdoc +++ b/doc/src/snippets/code/doc_src_examples_ahigl.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] myApplication -qws -display ahigl //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_application.qdoc b/doc/src/snippets/code/doc_src_examples_application.qdoc index 85e04f7..8b3b398 100644 --- a/doc/src/snippets/code/doc_src_examples_application.qdoc +++ b/doc/src/snippets/code/doc_src_examples_application.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] application -style=windows application -style=motif diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc index ba7f8eb..b02fa1d 100644 --- a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc +++ b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qApp->translate("ArrowPad", x) //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc b/doc/src/snippets/code/doc_src_examples_containerextension.qdoc index 299c0dc..cfd0395 100644 --- a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc +++ b/doc/src/snippets/code/doc_src_examples_containerextension.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target diff --git a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc index 299c0dc..cfd0395 100644 --- a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc +++ b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target diff --git a/doc/src/snippets/code/doc_src_examples_dropsite.qdoc b/doc/src/snippets/code/doc_src_examples_dropsite.qdoc index fd949ea..8738e1e 100644 --- a/doc/src/snippets/code/doc_src_examples_dropsite.qdoc +++ b/doc/src/snippets/code/doc_src_examples_dropsite.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] foreach(variable, container) //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc index 2475842..2249ae3 100644 --- a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc +++ b/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QVariant a = model->index(0, 0, QModelIndex()).data(); //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc index 4f31bc0..d1eb9c2 100644 --- a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc +++ b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] lupdate -verbose hellotr.pro //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_icons.qdoc b/doc/src/snippets/code/doc_src_examples_icons.qdoc index 3d33dff..b2b29d3 100644 --- a/doc/src/snippets/code/doc_src_examples_icons.qdoc +++ b/doc/src/snippets/code/doc_src_examples_icons.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] if (!condition) qFatal("ASSERT: "condition" in file ..."); diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc index c1854ec..87d8985 100644 --- a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc +++ b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] imageLabel->resize(imageLabel->pixmap()->size()); //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc index f958cc9..e60a784 100644 --- a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc +++ b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] var ba = new ByteArray(); // constructs an empty ByteArray var ba2 = new ByteArray(10); // constructs a ByteArray of length 10 (all bytes initialized to 0) diff --git a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc index c74a176..6bb8053 100644 --- a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc +++ b/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // file is an open QFile object. QDomDocument document; diff --git a/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc index 907f3db..4936b76 100644 --- a/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc +++ b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Getting Started How to familiarize yourself with Qt Designer Launching Designer Running the Qt Designer application diff --git a/doc/src/snippets/code/doc_src_examples_svgalib.qdoc b/doc/src/snippets/code/doc_src_examples_svgalib.qdoc index 3b63146..11c01be 100644 --- a/doc/src/snippets/code/doc_src_examples_svgalib.qdoc +++ b/doc/src/snippets/code/doc_src_examples_svgalib.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] myApplication -qws -display svgalib //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc b/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc index 299c0dc..cfd0395 100644 --- a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc +++ b/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target diff --git a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc b/doc/src/snippets/code/doc_src_examples_textfinder.qdoc index 349becf..b6ab6d9 100644 --- a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc +++ b/doc/src/snippets/code/doc_src_examples_textfinder.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] CONFIG += uitools HEADERS = textfinder.h diff --git a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc b/doc/src/snippets/code/doc_src_examples_trollprint.qdoc index 7f51a15..4902120 100644 --- a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc +++ b/doc/src/snippets/code/doc_src_examples_trollprint.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] twoSidedEnabledRadio = new QRadioButton(tr("Enabled", "two-sided")); twoSidedDisabledRadio = new QRadioButton(tr("Disabled", "two-sided")); diff --git a/doc/src/snippets/code/doc_src_examples_tutorial.qdoc b/doc/src/snippets/code/doc_src_examples_tutorial.qdoc index 0b79563..3375f13 100644 --- a/doc/src/snippets/code/doc_src_examples_tutorial.qdoc +++ b/doc/src/snippets/code/doc_src_examples_tutorial.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qmake -project qmake diff --git a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc index 299c0dc..cfd0395 100644 --- a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc +++ b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target diff --git a/doc/src/snippets/code/doc_src_exportedfunctions.qdoc b/doc/src/snippets/code/doc_src_exportedfunctions.qdoc index f0e5fb5..7b86034 100644 --- a/doc/src/snippets/code/doc_src_exportedfunctions.qdoc +++ b/doc/src/snippets/code/doc_src_exportedfunctions.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #ifdef Q_WS_X11 void qt_x11_wait_for_window_manager(QWidget *widget); diff --git a/doc/src/snippets/code/doc_src_gpl.qdoc b/doc/src/snippets/code/doc_src_gpl.qdoc index b6ef954..b83e500 100644 --- a/doc/src/snippets/code/doc_src_gpl.qdoc +++ b/doc/src/snippets/code/doc_src_gpl.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [GPL v3] You may use, distribute and copy the Qt GUI Toolkit under the terms of GNU General Public License version 3, which is displayed below. diff --git a/doc/src/snippets/code/doc_src_graphicsview.qdoc b/doc/src/snippets/code/doc_src_graphicsview.qdoc index 4c19784..00afcc1 100644 --- a/doc/src/snippets/code/doc_src_graphicsview.qdoc +++ b/doc/src/snippets/code/doc_src_graphicsview.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGraphicsScene scene; QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 100, 100)); diff --git a/doc/src/snippets/code/doc_src_groups.qdoc b/doc/src/snippets/code/doc_src_groups.qdoc index 51c2944..d511931 100644 --- a/doc/src/snippets/code/doc_src_groups.qdoc +++ b/doc/src/snippets/code/doc_src_groups.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void QPen::setStyle(Qt::PenStyle style) { diff --git a/doc/src/snippets/code/doc_src_i18n.qdoc b/doc/src/snippets/code/doc_src_i18n.qdoc index 857e70c..776724d 100644 --- a/doc/src/snippets/code/doc_src_i18n.qdoc +++ b/doc/src/snippets/code/doc_src_i18n.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] LoginWidget::LoginWidget() { diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc index 489016d..68cd19a 100644 --- a/doc/src/snippets/code/doc_src_installation.qdoc +++ b/doc/src/snippets/code/doc_src_installation.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cd /tmp gunzip qt-x11-opensource-desktop-%VERSION%.tar.gz # uncompress the archive diff --git a/doc/src/snippets/code/doc_src_introtodbus.qdoc b/doc/src/snippets/code/doc_src_introtodbus.qdoc index 97b14e9..89c5e2c 100644 --- a/doc/src/snippets/code/doc_src_introtodbus.qdoc +++ b/doc/src/snippets/code/doc_src_introtodbus.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] org.freedesktop.DBus //! [0] diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.qdoc index 60f36b0..7bacc4b 100644 --- a/doc/src/snippets/code/doc_src_layout.qdoc +++ b/doc/src/snippets/code/doc_src_layout.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #ifndef CARD_H #define CARD_H diff --git a/doc/src/snippets/code/doc_src_lgpl.qdoc b/doc/src/snippets/code/doc_src_lgpl.qdoc index dc76d85..b7c983c 100644 --- a/doc/src/snippets/code/doc_src_lgpl.qdoc +++ b/doc/src/snippets/code/doc_src_lgpl.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [LGPL v2.1] GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 diff --git a/doc/src/snippets/code/doc_src_licenses.qdoc b/doc/src/snippets/code/doc_src_licenses.qdoc index 4a95a50..f633c41 100644 --- a/doc/src/snippets/code/doc_src_licenses.qdoc +++ b/doc/src/snippets/code/doc_src_licenses.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [1] [utopiafonts] 1999 free font ---------------------------------------------------- diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc index 5697300..0fec5ce 100644 --- a/doc/src/snippets/code/doc_src_linguist-manual.qdoc +++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] HEADERS = main-dlg.h \ options-dlg.h diff --git a/doc/src/snippets/code/doc_src_mac-differences.qdoc b/doc/src/snippets/code/doc_src_mac-differences.qdoc index a4d9578..3630554 100644 --- a/doc/src/snippets/code/doc_src_mac-differences.qdoc +++ b/doc/src/snippets/code/doc_src_mac-differences.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/ //! [0] diff --git a/doc/src/snippets/code/doc_src_moc.qdoc b/doc/src/snippets/code/doc_src_moc.qdoc index 59739e1..1056bdd 100644 --- a/doc/src/snippets/code/doc_src_moc.qdoc +++ b/doc/src/snippets/code/doc_src_moc.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] moc_%.cpp: %.h moc $(DEFINES) $(INCPATH) $< -o $@ diff --git a/doc/src/snippets/code/doc_src_model-view-programming.qdoc b/doc/src/snippets/code/doc_src_model-view-programming.qdoc index 3501ce0..cb6038a 100644 --- a/doc/src/snippets/code/doc_src_model-view-programming.qdoc +++ b/doc/src/snippets/code/doc_src_model-view-programming.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QAbstractItemModel *model = index.model(); //! [0] diff --git a/doc/src/snippets/code/doc_src_modules.qdoc b/doc/src/snippets/code/doc_src_modules.qdoc index e9006fd..524ad0d 100644 --- a/doc/src/snippets/code/doc_src_modules.qdoc +++ b/doc/src/snippets/code/doc_src_modules.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QT -= gui //! [0] diff --git a/doc/src/snippets/code/doc_src_objecttrees.qdoc b/doc/src/snippets/code/doc_src_objecttrees.qdoc index 216027f..752e69d 100644 --- a/doc/src/snippets/code/doc_src_objecttrees.qdoc +++ b/doc/src/snippets/code/doc_src_objecttrees.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //![0] int main() { diff --git a/doc/src/snippets/code/doc_src_phonon-api.qdoc b/doc/src/snippets/code/doc_src_phonon-api.qdoc index e230792..93a4de0 100644 --- a/doc/src/snippets/code/doc_src_phonon-api.qdoc +++ b/doc/src/snippets/code/doc_src_phonon-api.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] PushStream::PushStream(QObject *parent) : AbstractMediaStream(parent), m_timer(new QTimer(this)) diff --git a/doc/src/snippets/code/doc_src_phonon.qdoc b/doc/src/snippets/code/doc_src_phonon.qdoc index 3e4bce4..f88554d 100644 --- a/doc/src/snippets/code/doc_src_phonon.qdoc +++ b/doc/src/snippets/code/doc_src_phonon.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QT += phonon //! [0] diff --git a/doc/src/snippets/code/doc_src_platform-notes.qdoc b/doc/src/snippets/code/doc_src_platform-notes.qdoc index ed56a08..ce444e4 100644 --- a/doc/src/snippets/code/doc_src_platform-notes.qdoc +++ b/doc/src/snippets/code/doc_src_platform-notes.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] undefined reference to `_vt.11QPushButton' //! [0] diff --git a/doc/src/snippets/code/doc_src_plugins-howto.qdoc b/doc/src/snippets/code/doc_src_plugins-howto.qdoc index 45c8690..a95f452 100644 --- a/doc/src/snippets/code/doc_src_plugins-howto.qdoc +++ b/doc/src/snippets/code/doc_src_plugins-howto.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyStylePlugin : public QStylePlugin { diff --git a/doc/src/snippets/code/doc_src_porting-qsa.qdoc b/doc/src/snippets/code/doc_src_porting-qsa.qdoc index 0dc572c..ef7216e 100644 --- a/doc/src/snippets/code/doc_src_porting-qsa.qdoc +++ b/doc/src/snippets/code/doc_src_porting-qsa.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] point = new Object(); point.x = 12; diff --git a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc b/doc/src/snippets/code/doc_src_porting4-canvas.qdoc index e386607..afdd4b0 100644 --- a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc +++ b/doc/src/snippets/code/doc_src_porting4-canvas.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] item->scene().sceneRect().intersects(item->sceneBoundingRect()); //! [0] diff --git a/doc/src/snippets/code/doc_src_porting4-designer.qdoc b/doc/src/snippets/code/doc_src_porting4-designer.qdoc index d4abaa0..85a3640 100644 --- a/doc/src/snippets/code/doc_src_porting4-designer.qdoc +++ b/doc/src/snippets/code/doc_src_porting4-designer.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] namespace Ui { diff --git a/doc/src/snippets/code/doc_src_porting4.qdoc b/doc/src/snippets/code/doc_src_porting4.qdoc index 14fddf8..aa12bf5 100644 --- a/doc/src/snippets/code/doc_src_porting4.qdoc +++ b/doc/src/snippets/code/doc_src_porting4.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyButton::paintEvent(QPaintEvent *) { diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc index 3c9109f..9d0b655 100644 --- a/doc/src/snippets/code/doc_src_properties.qdoc +++ b/doc/src/snippets/code/doc_src_properties.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q_PROPERTY(type name READ getFunction diff --git a/doc/src/snippets/code/doc_src_q3asciidict.qdoc b/doc/src/snippets/code/doc_src_q3asciidict.qdoc index e2c876a..fce4f2d 100644 --- a/doc/src/snippets/code/doc_src_q3asciidict.qdoc +++ b/doc/src/snippets/code/doc_src_q3asciidict.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3AsciiDict<QLineEdit> fields; // char* keys, QLineEdit* values fields.insert( "forename", new QLineEdit( this ) ); diff --git a/doc/src/snippets/code/doc_src_q3dict.qdoc b/doc/src/snippets/code/doc_src_q3dict.qdoc index f79d0f7..e8e6b9a 100644 --- a/doc/src/snippets/code/doc_src_q3dict.qdoc +++ b/doc/src/snippets/code/doc_src_q3dict.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3Dict<char> dict; ... diff --git a/doc/src/snippets/code/doc_src_q3intdict.qdoc b/doc/src/snippets/code/doc_src_q3intdict.qdoc index 0fae2c8..81d684b 100644 --- a/doc/src/snippets/code/doc_src_q3intdict.qdoc +++ b/doc/src/snippets/code/doc_src_q3intdict.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3IntDict<QLineEdit> fields; // long int keys, QLineEdit* values for ( int i = 0; i < 3; i++ ) diff --git a/doc/src/snippets/code/doc_src_q3memarray.qdoc b/doc/src/snippets/code/doc_src_q3memarray.qdoc index b56ef4e..10876f0 100644 --- a/doc/src/snippets/code/doc_src_q3memarray.qdoc +++ b/doc/src/snippets/code/doc_src_q3memarray.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <q3memarray.h> #include <stdio.h> diff --git a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc b/doc/src/snippets/code/doc_src_q3ptrdict.qdoc index d23824b..f45de7d 100644 --- a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc +++ b/doc/src/snippets/code/doc_src_q3ptrdict.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3PtrDict<char> fields; // void* keys, char* values diff --git a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc b/doc/src/snippets/code/doc_src_q3ptrlist.qdoc index f416784..e8afd03 100644 --- a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc +++ b/doc/src/snippets/code/doc_src_q3ptrlist.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class Employee { diff --git a/doc/src/snippets/code/doc_src_q3valuelist.qdoc b/doc/src/snippets/code/doc_src_q3valuelist.qdoc index 5a6d564..4d56e4a 100644 --- a/doc/src/snippets/code/doc_src_q3valuelist.qdoc +++ b/doc/src/snippets/code/doc_src_q3valuelist.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class Employee { diff --git a/doc/src/snippets/code/doc_src_q3valuestack.qdoc b/doc/src/snippets/code/doc_src_q3valuestack.qdoc index 61d564b..f130d35 100644 --- a/doc/src/snippets/code/doc_src_q3valuestack.qdoc +++ b/doc/src/snippets/code/doc_src_q3valuestack.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3ValueStack<int> stack; stack.push( 1 ); diff --git a/doc/src/snippets/code/doc_src_q3valuevector.qdoc b/doc/src/snippets/code/doc_src_q3valuevector.qdoc index 792bfac..84c0eaa 100644 --- a/doc/src/snippets/code/doc_src_q3valuevector.qdoc +++ b/doc/src/snippets/code/doc_src_q3valuevector.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <qvaluevector.h> #include <qstring.h> diff --git a/doc/src/snippets/code/doc_src_qalgorithms.qdoc b/doc/src/snippets/code/doc_src_qalgorithms.qdoc index e2126dd..9955abe 100644 --- a/doc/src/snippets/code/doc_src_qalgorithms.qdoc +++ b/doc/src/snippets/code/doc_src_qalgorithms.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList list; list << "one" << "two" << "three"; diff --git a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc b/doc/src/snippets/code/doc_src_qaxcontainer.qdoc index 9edd87f..796bf44 100644 --- a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc +++ b/doc/src/snippets/code/doc_src_qaxcontainer.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] CONFIG += qaxcontainer //! [0] diff --git a/doc/src/snippets/code/doc_src_qaxserver.qdoc b/doc/src/snippets/code/doc_src_qaxserver.qdoc index 9b51e66..09ecb48 100644 --- a/doc/src/snippets/code/doc_src_qaxserver.qdoc +++ b/doc/src/snippets/code/doc_src_qaxserver.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] TEMPLATE = app CONFIG += qaxserver diff --git a/doc/src/snippets/code/doc_src_qcache.qdoc b/doc/src/snippets/code/doc_src_qcache.qdoc index 66bda6a..40ceb31 100644 --- a/doc/src/snippets/code/doc_src_qcache.qdoc +++ b/doc/src/snippets/code/doc_src_qcache.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QCache<int, Employee> cache; //! [0] diff --git a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc b/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc index 7f69a90..92170ef 100644 --- a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc +++ b/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MainApplicationAdaptor: public QDBusAbstractAdaptor { diff --git a/doc/src/snippets/code/doc_src_qiterator.qdoc b/doc/src/snippets/code/doc_src_qiterator.qdoc index 3dfa68a..f71d9c5 100644 --- a/doc/src/snippets/code/doc_src_qiterator.qdoc +++ b/doc/src/snippets/code/doc_src_qiterator.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QList<float> list; ... diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index 64dc559..d5b2177 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] make all //! [0] diff --git a/doc/src/snippets/code/doc_src_qnamespace.qdoc b/doc/src/snippets/code/doc_src_qnamespace.qdoc index 250d62d..ee0190f 100644 --- a/doc/src/snippets/code/doc_src_qnamespace.qdoc +++ b/doc/src/snippets/code/doc_src_qnamespace.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QObject::connect: Cannot queue arguments of type 'MyType' //! [0] diff --git a/doc/src/snippets/code/doc_src_qpair.qdoc b/doc/src/snippets/code/doc_src_qpair.qdoc index 74c7c83..184ee8f 100644 --- a/doc/src/snippets/code/doc_src_qpair.qdoc +++ b/doc/src/snippets/code/doc_src_qpair.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPair<QString, double> pair; //! [0] diff --git a/doc/src/snippets/code/doc_src_qplugin.qdoc b/doc/src/snippets/code/doc_src_qplugin.qdoc index d9b627e..365b67c 100644 --- a/doc/src/snippets/code/doc_src_qplugin.qdoc +++ b/doc/src/snippets/code/doc_src_qplugin.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] namespace Foo { diff --git a/doc/src/snippets/code/doc_src_qset.qdoc b/doc/src/snippets/code/doc_src_qset.qdoc index 7469d2a..f8afa7f 100644 --- a/doc/src/snippets/code/doc_src_qset.qdoc +++ b/doc/src/snippets/code/doc_src_qset.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSet<QString> set; //! [0] diff --git a/doc/src/snippets/code/doc_src_qsignalspy.qdoc b/doc/src/snippets/code/doc_src_qsignalspy.qdoc index d6b65dc..a5d797f 100644 --- a/doc/src/snippets/code/doc_src_qsignalspy.qdoc +++ b/doc/src/snippets/code/doc_src_qsignalspy.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QCheckBox *box = ...; QSignalSpy spy(box, SIGNAL(clicked(bool))); diff --git a/doc/src/snippets/code/doc_src_qt-conf.qdoc b/doc/src/snippets/code/doc_src_qt-conf.qdoc index d675795..818d99c 100644 --- a/doc/src/snippets/code/doc_src_qt-conf.qdoc +++ b/doc/src/snippets/code/doc_src_qt-conf.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] [Paths] Prefix = /some/path diff --git a/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc b/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc index a3ab4dd..e752197 100644 --- a/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc +++ b/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] $QPEDIR/qtopiacore/qt/configure -help //! [0] diff --git a/doc/src/snippets/code/doc_src_qt3support.qdoc b/doc/src/snippets/code/doc_src_qt3support.qdoc index e6f0272..5eaecb3 100644 --- a/doc/src/snippets/code/doc_src_qt3support.qdoc +++ b/doc/src/snippets/code/doc_src_qt3support.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <Qt3Support> //! [0] diff --git a/doc/src/snippets/code/doc_src_qt3to4.qdoc b/doc/src/snippets/code/doc_src_qt3to4.qdoc index da0832d..eadf501 100644 --- a/doc/src/snippets/code/doc_src_qt3to4.qdoc +++ b/doc/src/snippets/code/doc_src_qt3to4.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qt3to4 myfile.cpp qt3to4 myapp.pro diff --git a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc b/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc index 8bed0a9..980b327 100644 --- a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [environment] export QT_ACCESSIBILITY=1 //! [environment] diff --git a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc b/doc/src/snippets/code/doc_src_qt4-arthur.qdoc index 6ac30ae..ccc6db3 100644 --- a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-arthur.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLinearGradient gradient(0, 0, 100, 100); gradient.setColorAt(0, Qt::red); diff --git a/doc/src/snippets/code/doc_src_qt4-intro.qdoc b/doc/src/snippets/code/doc_src_qt4-intro.qdoc index ced563e..20b8f07 100644 --- a/doc/src/snippets/code/doc_src_qt4-intro.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-intro.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QT -= gui //! [0] diff --git a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc b/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc index 9e81fd1..651903f 100644 --- a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) diff --git a/doc/src/snippets/code/doc_src_qt4-sql.qdoc b/doc/src/snippets/code/doc_src_qt4-sql.qdoc index 74b04eb..8466a37 100644 --- a/doc/src/snippets/code/doc_src_qt4-sql.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-sql.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSqlQueryModel model; model.setQuery("select * from person"); diff --git a/doc/src/snippets/code/doc_src_qt4-styles.qdoc b/doc/src/snippets/code/doc_src_qt4-styles.qdoc index b75c135..4363d6b 100644 --- a/doc/src/snippets/code/doc_src_qt4-styles.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-styles.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] const QStyleOptionFocusRect *focusRectOption = qstyleoption_cast<const QStyleOptionFocusRect *>(option); diff --git a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc b/doc/src/snippets/code/doc_src_qt4-tulip.qdoc index 2bc5af1..42ac4d2 100644 --- a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc +++ b/doc/src/snippets/code/doc_src_qt4-tulip.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] foreach (variable, container) statement; diff --git a/doc/src/snippets/code/doc_src_qtcore.qdoc b/doc/src/snippets/code/doc_src_qtcore.qdoc index efa155f..f2d7906 100644 --- a/doc/src/snippets/code/doc_src_qtcore.qdoc +++ b/doc/src/snippets/code/doc_src_qtcore.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtCore> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtdbus.qdoc b/doc/src/snippets/code/doc_src_qtdbus.qdoc index 4c8c4b0..cd4103d 100644 --- a/doc/src/snippets/code/doc_src_qtdbus.qdoc +++ b/doc/src/snippets/code/doc_src_qtdbus.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtDBus> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtdesigner.qdoc b/doc/src/snippets/code/doc_src_qtdesigner.qdoc index b19a747..273ae9c 100644 --- a/doc/src/snippets/code/doc_src_qtdesigner.qdoc +++ b/doc/src/snippets/code/doc_src_qtdesigner.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtDesigner> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtestevent.qdoc b/doc/src/snippets/code/doc_src_qtestevent.qdoc index 87591e0..5553866 100644 --- a/doc/src/snippets/code/doc_src_qtestevent.qdoc +++ b/doc/src/snippets/code/doc_src_qtestevent.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QTestEventList events; events.addKeyClick('a'); diff --git a/doc/src/snippets/code/doc_src_qtestlib.qdoc b/doc/src/snippets/code/doc_src_qtestlib.qdoc index a0e4944..e85bda5 100644 --- a/doc/src/snippets/code/doc_src_qtestlib.qdoc +++ b/doc/src/snippets/code/doc_src_qtestlib.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyFirstTest: public QObject { diff --git a/doc/src/snippets/code/doc_src_qtgui.qdoc b/doc/src/snippets/code/doc_src_qtgui.qdoc index ff3afcf..4868660 100644 --- a/doc/src/snippets/code/doc_src_qtgui.qdoc +++ b/doc/src/snippets/code/doc_src_qtgui.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtGui> //! [0] diff --git a/doc/src/snippets/code/doc_src_qthelp.qdoc b/doc/src/snippets/code/doc_src_qthelp.qdoc index 949e2a5..b68884c 100644 --- a/doc/src/snippets/code/doc_src_qthelp.qdoc +++ b/doc/src/snippets/code/doc_src_qthelp.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtHelp> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc b/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc index 6ad42b9..1c88b36 100644 --- a/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc +++ b/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qmake -spec macx-xcode project.pro //! [0] diff --git a/doc/src/snippets/code/doc_src_qtnetwork.qdoc b/doc/src/snippets/code/doc_src_qtnetwork.qdoc index 4856686..8a47276 100644 --- a/doc/src/snippets/code/doc_src_qtnetwork.qdoc +++ b/doc/src/snippets/code/doc_src_qtnetwork.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QT += network //! [0] diff --git a/doc/src/snippets/code/doc_src_qtopengl.qdoc b/doc/src/snippets/code/doc_src_qtopengl.qdoc index e13cdf0..e006d33 100644 --- a/doc/src/snippets/code/doc_src_qtopengl.qdoc +++ b/doc/src/snippets/code/doc_src_qtopengl.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtOpenGL> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtscript.qdoc b/doc/src/snippets/code/doc_src_qtscript.qdoc index 4031fef..53f81fe 100644 --- a/doc/src/snippets/code/doc_src_qtscript.qdoc +++ b/doc/src/snippets/code/doc_src_qtscript.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtScript> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc b/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc index 24fb254..7c03045 100644 --- a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc +++ b/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] print("importing " + __extension__); __setupPackage__("cool.stuff"); diff --git a/doc/src/snippets/code/doc_src_qtsql.qdoc b/doc/src/snippets/code/doc_src_qtsql.qdoc index 1a687db..f7a6b23 100644 --- a/doc/src/snippets/code/doc_src_qtsql.qdoc +++ b/doc/src/snippets/code/doc_src_qtsql.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtSql> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtsvg.qdoc b/doc/src/snippets/code/doc_src_qtsvg.qdoc index c99ea41..b2a824c 100644 --- a/doc/src/snippets/code/doc_src_qtsvg.qdoc +++ b/doc/src/snippets/code/doc_src_qtsvg.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtSvg> //! [0] diff --git a/doc/src/snippets/code/doc_src_qttest.qdoc b/doc/src/snippets/code/doc_src_qttest.qdoc index c2aa27b..2f81488 100644 --- a/doc/src/snippets/code/doc_src_qttest.qdoc +++ b/doc/src/snippets/code/doc_src_qttest.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtTest> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtuiloader.qdoc b/doc/src/snippets/code/doc_src_qtuiloader.qdoc index 64f3eac..14019df 100644 --- a/doc/src/snippets/code/doc_src_qtuiloader.qdoc +++ b/doc/src/snippets/code/doc_src_qtuiloader.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] CONFIG += uitools //! [0] diff --git a/doc/src/snippets/code/doc_src_qtxml.qdoc b/doc/src/snippets/code/doc_src_qtxml.qdoc index 11b1fb0..53ffb73 100644 --- a/doc/src/snippets/code/doc_src_qtxml.qdoc +++ b/doc/src/snippets/code/doc_src_qtxml.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QtXml> //! [0] diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc index 638bf93..accdf4a 100644 --- a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc +++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc b/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc index 95db9d3..acc93f7 100644 --- a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc +++ b/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int myfunc(int n) { diff --git a/doc/src/snippets/code/doc_src_rcc.qdoc b/doc/src/snippets/code/doc_src_rcc.qdoc index 423f8e6..349f067 100644 --- a/doc/src/snippets/code/doc_src_rcc.qdoc +++ b/doc/src/snippets/code/doc_src_rcc.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] rcc [options] <inputs> //! [0] diff --git a/doc/src/snippets/code/doc_src_resources.qdoc b/doc/src/snippets/code/doc_src_resources.qdoc index bc85341..90a7124 100644 --- a/doc/src/snippets/code/doc_src_resources.qdoc +++ b/doc/src/snippets/code/doc_src_resources.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] <file alias="cut-img.png">images/cut.png</file> //! [0] diff --git a/doc/src/snippets/code/doc_src_richtext.qdoc b/doc/src/snippets/code/doc_src_richtext.qdoc index d6f54c2..7631fbb 100644 --- a/doc/src/snippets/code/doc_src_richtext.qdoc +++ b/doc/src/snippets/code/doc_src_richtext.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QTextDocument *newDocument = new QTextDocument; //! [0] diff --git a/doc/src/snippets/code/doc_src_session.qdoc b/doc/src/snippets/code/doc_src_session.qdoc index 6a32863..8c20317 100644 --- a/doc/src/snippets/code/doc_src_session.qdoc +++ b/doc/src/snippets/code/doc_src_session.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] xterm //! [0] diff --git a/doc/src/snippets/code/doc_src_sql-driver.qdoc b/doc/src/snippets/code/doc_src_sql-driver.qdoc index 74cd8dc..ab6f5e2 100644 --- a/doc/src/snippets/code/doc_src_sql-driver.qdoc +++ b/doc/src/snippets/code/doc_src_sql-driver.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] -no-sql-<driver> ... Disable SQL <driver> entirely. -qt-sql-<driver> ... Enable a SQL <driver> in the Qt Library, by default diff --git a/doc/src/snippets/code/doc_src_styles.qdoc b/doc/src/snippets/code/doc_src_styles.qdoc index 9d5756a..8bf7d51 100644 --- a/doc/src/snippets/code/doc_src_styles.qdoc +++ b/doc/src/snippets/code/doc_src_styles.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] opt.initFrom(q); if (down) diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc index a62148f..08729e8 100644 --- a/doc/src/snippets/code/doc_src_stylesheet.qdoc +++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLineEdit { background: yellow } QCheckBox { color: red } diff --git a/doc/src/snippets/code/doc_src_uic.qdoc b/doc/src/snippets/code/doc_src_uic.qdoc index 310e839..948c1bd 100644 --- a/doc/src/snippets/code/doc_src_uic.qdoc +++ b/doc/src/snippets/code/doc_src_uic.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] uic [options] <uifile> //! [0] diff --git a/doc/src/snippets/code/doc_src_unicode.qdoc b/doc/src/snippets/code/doc_src_unicode.qdoc index 30a3710..8410ad8 100644 --- a/doc/src/snippets/code/doc_src_unicode.qdoc +++ b/doc/src/snippets/code/doc_src_unicode.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] label->setText("Password:"); //! [0] diff --git a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc b/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc index 8abcba6..1de8726 100644 --- a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc +++ b/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyDaemon : public QObject { diff --git a/doc/src/snippets/code/doc_src_wince-customization.qdoc b/doc/src/snippets/code/doc_src_wince-customization.qdoc index 0399231..3a54e9f 100644 --- a/doc/src/snippets/code/doc_src_wince-customization.qdoc +++ b/doc/src/snippets/code/doc_src_wince-customization.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] wince<version><SDK-shortcut>-[architecture]-msvc2005 //! [0] diff --git a/doc/src/snippets/code/doc_src_wince-introduction.qdoc b/doc/src/snippets/code/doc_src_wince-introduction.qdoc index ffb4cfb..6d23b24 100644 --- a/doc/src/snippets/code/doc_src_wince-introduction.qdoc +++ b/doc/src/snippets/code/doc_src_wince-introduction.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qmake nmake diff --git a/doc/src/snippets/code/doc_src_wince-opengl.qdoc b/doc/src/snippets/code/doc_src_wince-opengl.qdoc index db2bfaa..d9f9acc 100644 --- a/doc/src/snippets/code/doc_src_wince-opengl.qdoc +++ b/doc/src/snippets/code/doc_src_wince-opengl.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -opengl-es-cl //! [0] diff --git a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp b/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp index 3f206ea..038757d 100644 --- a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp +++ b/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QTextDocumentWriter writer; writer.setFormat("odf"); // same as writer.setFormat("ODF"); diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp b/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp index c9b3b7c..fede516 100644 --- a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp +++ b/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + { //! [0] QDBusPendingCall async = iface->asyncCall("RemoteMethod", value1, value2); diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp b/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp index 49363a8..532363f 100644 --- a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp +++ b/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + { //! [0] QDBusPendingReply<QString> reply = interface->asyncCall("RemoteMethod"); diff --git a/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp b/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp index f81611c..2b070d4 100644 --- a/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp +++ b/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QScriptEngine engine; QScriptEngineDebugger debugger; diff --git a/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp b/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp index 219fb70..c4a3030 100644 --- a/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp +++ b/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] connect(buttonBack, SIGNAL(clicked()), webBrowser, SLOT(GoBack())); //! [0] diff --git a/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp b/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp index 07fca1e..cb10396 100644 --- a/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp +++ b/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] function setNumber(number) { diff --git a/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp b/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp index c296789..9043878 100644 --- a/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp +++ b/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyActiveX : public QWidget, public QAxBindable { diff --git a/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp b/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp index 6eca434..4ec04c1 100644 --- a/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp +++ b/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList ActiveQtFactory::featureList() const { diff --git a/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp b/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp index 1dfd325..25b93a0 100644 --- a/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp +++ b/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QByteArray encodedString = "..."; QTextCodec *codec = QTextCodec::codecForName("KOI8-R"); diff --git a/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp b/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp index a6870b8..ae29ba6 100644 --- a/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp +++ b/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QList<QByteArray> MyCodecPlugin::names() const { diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp index 24fc791..fc5d778 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFuture<QString> future = ...; diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp index a50a99e..52c0f42 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void someFunction() { diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp index e1f06cc..92113ff 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // Instantiate the objects and connect to the finished signal. MyClass myObject; diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp index 8b4d10a..62ad2b9 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyException : public QtConcurrent::Exception diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp index d284d02..59809ee 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] bool function(const T &t); //! [0] diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp index cbff318..657780b 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] U function(const T &t); //! [0] diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp index 99583ba..63b247d 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] extern void aFunction(); QFuture<void> future = QtConcurrent::run(aFunction); diff --git a/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp b/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp index 327a00f..7c52360 100644 --- a/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp +++ b/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class HelloWorldTask : public QRunnable { diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp index 50052c3..f1b2582 100644 --- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp +++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] label->setAlignment(Qt::AlignLeft | Qt::AlignTop); //! [0] diff --git a/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp b/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp index a7d7c75..0958f9e 100644 --- a/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp +++ b/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class ZipEngineHandler : public QAbstractFileEngineHandler { diff --git a/doc/src/snippets/code/src_corelib_io_qdatastream.cpp b/doc/src/snippets/code/src_corelib_io_qdatastream.cpp index c1f3469..023cb9b 100644 --- a/doc/src/snippets/code/src_corelib_io_qdatastream.cpp +++ b/doc/src/snippets/code/src_corelib_io_qdatastream.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_corelib_io_qdir.cpp b/doc/src/snippets/code/src_corelib_io_qdir.cpp index 4af4d4b..6effeaa 100644 --- a/doc/src/snippets/code/src_corelib_io_qdir.cpp +++ b/doc/src/snippets/code/src_corelib_io_qdir.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp b/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp index 2983a25..7740e5d 100644 --- a/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp +++ b/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDirIterator it("/etc", QDirIterator::Subdirectories); while (it.hasNext()) { diff --git a/doc/src/snippets/code/src_corelib_io_qfile.cpp b/doc/src/snippets/code/src_corelib_io_qfile.cpp index 84b8b4a..abdb037 100644 --- a/doc/src/snippets/code/src_corelib_io_qfile.cpp +++ b/doc/src/snippets/code/src_corelib_io_qfile.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFile file; QDir::setCurrent("/tmp"); diff --git a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp index 89b4f33..049d5c7 100644 --- a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp +++ b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //![newstuff] QFileInfo fi("c:/temp/foo"); => fi.absoluteFilePath() => "C:/temp/foo" diff --git a/doc/src/snippets/code/src_corelib_io_qiodevice.cpp b/doc/src/snippets/code/src_corelib_io_qiodevice.cpp index 422ca11..83afae5 100644 --- a/doc/src/snippets/code/src_corelib_io_qiodevice.cpp +++ b/doc/src/snippets/code/src_corelib_io_qiodevice.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QProcess gzip; gzip.start("gzip", QStringList() << "-c"); diff --git a/doc/src/snippets/code/src_corelib_io_qprocess.cpp b/doc/src/snippets/code/src_corelib_io_qprocess.cpp index 6eb8ccb..a8b2c96 100644 --- a/doc/src/snippets/code/src_corelib_io_qprocess.cpp +++ b/doc/src/snippets/code/src_corelib_io_qprocess.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_corelib_io_qsettings.cpp b/doc/src/snippets/code/src_corelib_io_qsettings.cpp index dfe666f..856b9ca 100644 --- a/doc/src/snippets/code/src_corelib_io_qsettings.cpp +++ b/doc/src/snippets/code/src_corelib_io_qsettings.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSettings settings("MySoft", "Star Runner"); QColor color = settings.value("DataPump/bgcolor").value<QColor>(); diff --git a/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp b/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp index adb8a71..9ed5f3f 100644 --- a/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp +++ b/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + { //! [0] // Within a function/method... diff --git a/doc/src/snippets/code/src_corelib_io_qtextstream.cpp b/doc/src/snippets/code/src_corelib_io_qtextstream.cpp index e85fcc1..596dba6 100644 --- a/doc/src/snippets/code/src_corelib_io_qtextstream.cpp +++ b/doc/src/snippets/code/src_corelib_io_qtextstream.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFile data("output.txt"); if (data.open(QFile::WriteOnly | QFile::Truncate)) { diff --git a/doc/src/snippets/code/src_corelib_io_qurl.cpp b/doc/src/snippets/code/src_corelib_io_qurl.cpp index c058e4b..7ac00dc 100644 --- a/doc/src/snippets/code/src_corelib_io_qurl.cpp +++ b/doc/src/snippets/code/src_corelib_io_qurl.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QUrl url("http://www.example.com/List of holidays.xml"); // url.toEncoded() == "http://www.example.com/List%20of%20holidays.xml" diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp index a531f22..7826e27 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] bool myEventFilter(void *message); //! [0] diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp index 31576d5..d38ecdb 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] beginInsertRows(parent, 2, 4); //! [0] diff --git a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp index 748d894..5de45f8 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QMouseEvent event(QEvent::MouseButtonPress, pos, 0, 0, 0); QApplication::sendEvent(mainWindow, &event); diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp index c181a40..fc5697e 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp index 783852b..7b23047 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] struct MyStruct { diff --git a/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp b/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp index 94f1dc9..bc1b20b 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyWidget::dragEnterEvent(QDragEnterEvent *event) { diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp index 5c0f80c..e6b6908 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLineEdit *lineEdit = static_cast<QLineEdit *>( qt_find_obj_child(myWidget, "QLineEdit", "my line edit")); @@ -39,10 +80,10 @@ timer->inherits("QTimer"); // returns true timer->inherits("QObject"); // returns true timer->inherits("QAbstractButton"); // returns false -// QLayout inherits QObject and QLayoutItem -QLayout *layout = new QLayout; +// QVBoxLayout inherits QObject and QLayoutItem +QVBoxLayout *layout = new QVBoxLayout; layout->inherits("QObject"); // returns true -layout->inherits("QLayoutItem"); // returns false +layout->inherits("QLayoutItem"); // returns true (even though QLayoutItem is not a QObject) //! [4] diff --git a/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp b/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp index cd5665f..2622ac3 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSystemSemaphore sem("market", 3, QSystemSemaphore::Create); // resources available == 3 diff --git a/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp b/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp index 02cdc0a..f278552 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QApplication> #include <QTimer> diff --git a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp index ef19dbb..2449d2a 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDataStream out(...); QVariant v(123); // The variant now contains an int diff --git a/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp b/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp index 0659061..5979268 100644 --- a/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp +++ b/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLibrary myLib("mylib"); typedef void (*MyPrototype)(); diff --git a/doc/src/snippets/code/src_corelib_plugin_quuid.cpp b/doc/src/snippets/code/src_corelib_plugin_quuid.cpp index 5c91afc..492df36 100644 --- a/doc/src/snippets/code/src_corelib_plugin_quuid.cpp +++ b/doc/src/snippets/code/src_corelib_plugin_quuid.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // {67C8770B-44F1-410A-AB9A-F9B5446F13EE} QUuid IID_MyInterface(0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee) diff --git a/doc/src/snippets/code/src_corelib_thread_qatomic.cpp b/doc/src/snippets/code/src_corelib_thread_qatomic.cpp index 3f67ddf..3c038f6 100644 --- a/doc/src/snippets/code/src_corelib_thread_qatomic.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qatomic.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] MySharedType &MySharedType::operator=(const MySharedType &other) { diff --git a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp index e79bb35..af219d0 100644 --- a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int number = 6; diff --git a/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp b/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp index 8e64a36..6b863b6 100644 --- a/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class Number { public: diff --git a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp index dd4f533..fb26508 100644 --- a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QReadWriteLock lock; diff --git a/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp b/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp index e02f05e..58d3793 100644 --- a/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSemaphore sem(5); // sem.available() == 5 diff --git a/doc/src/snippets/code/src_corelib_thread_qthread.cpp b/doc/src/snippets/code/src_corelib_thread_qthread.cpp index 58c35e5..b924429 100644 --- a/doc/src/snippets/code/src_corelib_thread_qthread.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qthread.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyThread : public QThread { diff --git a/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp b/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp index 5c83d97..1465414 100644 --- a/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] forever { mutex.lock(); diff --git a/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp b/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp index e931d40..6dab990 100644 --- a/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QBitArray ba(200); //! [0] diff --git a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp index c113b72..c032318 100644 --- a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp b/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp index a1424f4..cc2f24b 100644 --- a/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDate d1(1995, 5, 17); // May 17, 1995 QDate d2(1995, 5, 20); // May 20, 1995 diff --git a/doc/src/snippets/code/src_corelib_tools_qhash.cpp b/doc/src/snippets/code/src_corelib_tools_qhash.cpp index 05f6eb3..bfde0b0 100644 --- a/doc/src/snippets/code/src_corelib_tools_qhash.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qhash.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QHash<QString, int> hash; //! [0] diff --git a/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp b/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp index 3d63b2c..35e8fbd 100644 --- a/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLinkedList<int> integerList; QLinkedList<QTime> timeList; diff --git a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp index 3b9a756..07ff157 100644 --- a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QList<int> integerList; QList<QDate> dateList; diff --git a/doc/src/snippets/code/src_corelib_tools_qlocale.cpp b/doc/src/snippets/code/src_corelib_tools_qlocale.cpp index 37ddb4e..7b44946 100644 --- a/doc/src/snippets/code/src_corelib_tools_qlocale.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qlocale.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLocale egyptian(QLocale::Arabic, QLocale::Egypt); QString s1 = egyptian.toString(1.571429E+07, 'e'); diff --git a/doc/src/snippets/code/src_corelib_tools_qmap.cpp b/doc/src/snippets/code/src_corelib_tools_qmap.cpp index 924ed22..4704a78 100644 --- a/doc/src/snippets/code/src_corelib_tools_qmap.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qmap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QMap<QString, int> map; //! [0] diff --git a/doc/src/snippets/code/src_corelib_tools_qpoint.cpp b/doc/src/snippets/code/src_corelib_tools_qpoint.cpp index f16d856..e39a66c 100644 --- a/doc/src/snippets/code/src_corelib_tools_qpoint.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qpoint.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPoint p; diff --git a/doc/src/snippets/code/src_corelib_tools_qqueue.cpp b/doc/src/snippets/code/src_corelib_tools_qqueue.cpp index da4c4a6..6cc289c 100644 --- a/doc/src/snippets/code/src_corelib_tools_qqueue.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qqueue.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QQueue<int> queue; queue.enqueue(1); diff --git a/doc/src/snippets/code/src_corelib_tools_qrect.cpp b/doc/src/snippets/code/src_corelib_tools_qrect.cpp index fdab506..fe9ae63 100644 --- a/doc/src/snippets/code/src_corelib_tools_qrect.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qrect.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QRect r1(100, 200, 11, 16); QRect r2(QPoint(100, 200), QSize(11, 16)); diff --git a/doc/src/snippets/code/src_corelib_tools_qregexp.cpp b/doc/src/snippets/code/src_corelib_tools_qregexp.cpp index c41cd06..2ad4d61 100644 --- a/doc/src/snippets/code/src_corelib_tools_qregexp.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qregexp.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QRegExp rx("(\\d+)"); QString str = "Offsets: 12 14 99 231 7"; diff --git a/doc/src/snippets/code/src_corelib_tools_qsize.cpp b/doc/src/snippets/code/src_corelib_tools_qsize.cpp index 4804dd0..7095ba5 100644 --- a/doc/src/snippets/code/src_corelib_tools_qsize.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qsize.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSize t1(10, 12); t1.scale(60, 60, Qt::IgnoreAspectRatio); diff --git a/doc/src/snippets/code/src_corelib_tools_qstring.cpp b/doc/src/snippets/code/src_corelib_tools_qstring.cpp index 13cdbd5..cd5e7b2 100644 --- a/doc/src/snippets/code/src_corelib_tools_qstring.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qstring.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] DEFINES += QT_NO_CAST_FROM_ASCII \ QT_NO_CAST_TO_ASCII diff --git a/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp b/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp index a16205f..bd8e7c4 100644 --- a/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ... progressBar = new QProgressBar(this); diff --git a/doc/src/snippets/code/src_corelib_tools_qvector.cpp b/doc/src/snippets/code/src_corelib_tools_qvector.cpp index bbe7ca2..51c9e21 100644 --- a/doc/src/snippets/code/src_corelib_tools_qvector.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qvector.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QVector<int> integerVector; QVector<QString> stringVector; diff --git a/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp b/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp index b445a61..17f5457 100644 --- a/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp +++ b/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlStreamReader xml; ... diff --git a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp index 69ebeb2..3853ba9 100644 --- a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp +++ b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QAccessibleInterface *child = 0; int targetChild = object->navigate(Accessible::Child, 1, &child); diff --git a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp index e947bd7..76955f7 100644 --- a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp +++ b/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPrintDialog printDialog(printer, parent); if (printDialog.exec() == QDialog::Accepted) { diff --git a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp index 6962f4d..ab41aa4 100644 --- a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp +++ b/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)")); diff --git a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp index f1b06ec..71b1b5b 100644 --- a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp +++ b/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] bool ok; QFont font = QFontDialog::getFont( diff --git a/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp b/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp index ff0d128..14ead34 100644 --- a/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp +++ b/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int ret = QMessageBox::warning(this, tr("My Application"), tr("The document has been modified.\n" diff --git a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp b/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp index 7890e13..d2bad3a 100644 --- a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp +++ b/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int LicenseWizard::nextId() const { diff --git a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp new file mode 100644 index 0000000..6265c80 --- /dev/null +++ b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp @@ -0,0 +1,33 @@ +//! [0] +MyGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +{ + // Fully opaque; draw directly without going through a pixmap. + if (qFuzzyCompare(m_opacity, 1)) { + source->draw(painter); + return; + } + ... +} +//! [0] + +//! [1] +MyGraphicsEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +{ + ... + QPoint offset; + if (source->isPixmap()) { + // No point in drawing in device coordinates (pixmap will be scaled anyways). + const QPixmap pixmap = source->pixmap(Qt::LogicalCoordinates, &offset); + ... + painter->drawPixmap(offset, pixmap); + } else { + // Draw pixmap in device coordinates to avoid pixmap scaling; + const QPixmap pixmap = source->pixmap(Qt::DeviceCoordinates, &offset); + painter->setWorldTransform(QTransform()); + ... + painter->drawPixmap(offset, pixmap); + } + ... +} +//! [1] + diff --git a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp index 98fa4a9..8006df2 100644 --- a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp +++ b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyClass::receive(const QString &message, const QByteArray &data) { diff --git a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp index 0ad3997..9d5c020 100644 --- a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp +++ b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] s*Xs = a*Xd + b*Yd + c s*Ys = d*Xd + e*Yd + f diff --git a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp index 26cd76c..ba507fa 100644 --- a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp +++ b/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] configure -L <path to tslib library> -I <path to tslib headers> //! [0] diff --git a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp index 52ce3b7..59bdc9c 100644 --- a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp +++ b/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] [screen driver][:driver specific options][:display number] //! [0] diff --git a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp index 5ccebe2..4386b07 100644 --- a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp +++ b/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp index 1364f23..ff98a15 100644 --- a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp +++ b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] bool MyScreenSaver::save( int level ) { diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp index ed09b97..a8734f0 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGraphicsScene scene; QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit); diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp index d9e38ed..6d4b0e2 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class SimpleItem : public QGraphicsItem { diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp index 77f7491..d6527d2 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGraphicsScene scene; QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit); diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp index 6c62f26..ecafe01 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int main(int argc, char **argv) { diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp index 20b0979..de3cf1b 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGraphicsScene scene; scene.addText("Hello, world!"); diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp index 9b6c22e..b65a546 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] setDropAction(proposedAction()); diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp index d22b872..9538882 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGraphicsScene scene; scene.addText("Hello, world!"); diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp index 06fa642..5bd995a 100644 --- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp +++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyGroupBoxWidget::initStyleOption(QStyleOption *option) const { diff --git a/doc/src/snippets/code/src_gui_image_qbitmap.cpp b/doc/src/snippets/code/src_gui_image_qbitmap.cpp index fa8317a..9a201e1 100644 --- a/doc/src/snippets/code/src_gui_image_qbitmap.cpp +++ b/doc/src/snippets/code/src_gui_image_qbitmap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 }; QBitmap bm(8, 8, arrow_bits, true); diff --git a/doc/src/snippets/code/src_gui_image_qicon.cpp b/doc/src/snippets/code/src_gui_image_qicon.cpp index 455fd84..506dd37 100644 --- a/doc/src/snippets/code/src_gui_image_qicon.cpp +++ b/doc/src/snippets/code/src_gui_image_qicon.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QToolButton *button = new QToolButton; button->setIcon(QIcon("open.xpm")); diff --git a/doc/src/snippets/code/src_gui_image_qimage.cpp b/doc/src/snippets/code/src_gui_image_qimage.cpp index 3b7d8de..c8a92e8 100644 --- a/doc/src/snippets/code/src_gui_image_qimage.cpp +++ b/doc/src/snippets/code/src_gui_image_qimage.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QImage image(3, 3, QImage::Format_RGB32); QRgb value; diff --git a/doc/src/snippets/code/src_gui_image_qimagereader.cpp b/doc/src/snippets/code/src_gui_image_qimagereader.cpp index c645144..0f61b44 100644 --- a/doc/src/snippets/code/src_gui_image_qimagereader.cpp +++ b/doc/src/snippets/code/src_gui_image_qimagereader.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QImageReader reader; reader.setFormat("png"); // same as reader.setFormat("PNG"); diff --git a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp b/doc/src/snippets/code/src_gui_image_qimagewriter.cpp index d4a4118..1fc3f9b 100644 --- a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp +++ b/doc/src/snippets/code/src_gui_image_qimagewriter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QImageWriter writer; writer.setFormat("png"); // same as writer.setFormat("PNG"); diff --git a/doc/src/snippets/code/src_gui_image_qmovie.cpp b/doc/src/snippets/code/src_gui_image_qmovie.cpp index 77130e8..b5889a7 100644 --- a/doc/src/snippets/code/src_gui_image_qmovie.cpp +++ b/doc/src/snippets/code/src_gui_image_qmovie.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLabel label; QMovie *movie = new QMovie("animations/fire.gif"); diff --git a/doc/src/snippets/code/src_gui_image_qpixmap.cpp b/doc/src/snippets/code/src_gui_image_qpixmap.cpp index 822b466..a320318 100644 --- a/doc/src/snippets/code/src_gui_image_qpixmap.cpp +++ b/doc/src/snippets/code/src_gui_image_qpixmap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] static const char * const start_xpm[]={ "16 15 8 1", diff --git a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp index 2a04f64..7f27a16cd 100644 --- a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp +++ b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPixmap* pp; QPixmap p; diff --git a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp b/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp index e305109..7c1398f 100644 --- a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp +++ b/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPixmapColorizeFilter *myFilter = new QPixmapColorFilter; myFilter->setColor(QColor(128, 0, 0)); diff --git a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp b/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp index 9814c74..c7711c1 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyView::resizeEvent(QResizeEvent *event) { horizontalScrollBar()->setRange(0, realWidth - width()); diff --git a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp b/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp index ea5363c..ec48f15 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDataWidgetMapper *mapper = new QDataWidgetMapper; mapper->setModel(model); diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp b/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp index 29601bf..34cc926 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q_PROPERTY(QColor color READ color WRITE setColor USER true) //! [0] @@ -19,5 +60,5 @@ editorFactory->registerEditor(QVariant::DateType, creator); //! [3] -Q_PROPERTY(QColor color READ color WRITE setColor USER true) +Q_PROPERTY(QColor color READ color WRITE setColor USER true) //! [3] diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp index 9302fa6..1a150ed 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QItemSelection *selection = new QItemSelection(topLeft, bottomRight); //! [0] diff --git a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp index 7480ccd..a072127 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStandardItemModel model(4, 4); for (int row = 0; row < 4; ++row) { diff --git a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp b/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp index 80adc0b..4023451 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] setCellWidget(index, new QLineEdit); ... diff --git a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp b/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp index ea0478e..491d46e 100644 --- a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp +++ b/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QTreeWidget *treeWidget = new QTreeWidget(); treeWidget->setColumnCount(1); diff --git a/doc/src/snippets/code/src_gui_kernel_qaction.cpp b/doc/src/snippets/code/src_gui_kernel_qaction.cpp index b052feb..006682b 100644 --- a/doc/src/snippets/code/src_gui_kernel_qaction.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qaction.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QApplication app(argc, argv); app.setAttribute(Qt::AA_DontShowIconsInMenus); // Icons are *no longer shown* in menus diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp index bfb09e3..d106cd1 100644 --- a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int main(int argc, char **argv) { diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp index 2782200..22d968f 100644 --- a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); calculateHugeMandelbrot(); // lunch time... diff --git a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp b/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp index 5d1cf2b..abadeba 100644 --- a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QClipboard *clipboard = QApplication::clipboard(); QString originalText = clipboard->text(); diff --git a/doc/src/snippets/code/src_gui_kernel_qevent.cpp b/doc/src/snippets/code/src_gui_kernel_qevent.cpp index cd3d019..ed3ff2f 100644 --- a/doc/src/snippets/code/src_gui_kernel_qevent.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qevent.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyWidget::wheelEvent(QWheelEvent *event) { diff --git a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp b/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp index aed6956..24ec8b4 100644 --- a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFormLayout *formLayout = new QFormLayout; formLayout->addRow(tr("&Name:"), nameLineEdit); diff --git a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp b/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp index a5c734d..66c8aad 100644 --- a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QKeySequence(QKeySequence::Print); QKeySequence(tr("Ctrl+P")); diff --git a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp b/doc/src/snippets/code/src_gui_kernel_qlayout.cpp index 26d178f..7f1715e 100644 --- a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qlayout.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] static void paintLayout(QPainter *painter, QLayoutItem *item) { diff --git a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp b/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp index db6438e..a0cbd19 100644 --- a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int MyLayout::heightForWidth(int w) const { diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp b/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp index b5fdf95..4e7b0ca 100644 --- a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] shortcut = new QShortcut(QKeySequence(tr("Ctrl+O", "File|Open")), parent); diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp b/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp index 6a85c3e..c79e0f7 100644 --- a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] key = QKeySequence(); //! [0] diff --git a/doc/src/snippets/code/src_gui_kernel_qsound.cpp b/doc/src/snippets/code/src_gui_kernel_qsound.cpp index bdbd1ce..c33244f 100644 --- a/doc/src/snippets/code/src_gui_kernel_qsound.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qsound.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSound::play("mysounds/bells.wav"); //! [0] diff --git a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp b/doc/src/snippets/code/src_gui_kernel_qwidget.cpp index 4285edd..c2b7e1a 100644 --- a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp +++ b/doc/src/snippets/code/src_gui_kernel_qwidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] w->setWindowState(w->windowState() ^ Qt::WindowFullScreen); //! [0] diff --git a/doc/src/snippets/code/src_gui_painting_qbrush.cpp b/doc/src/snippets/code/src_gui_painting_qbrush.cpp index 8cb5310..d42b59e 100644 --- a/doc/src/snippets/code/src_gui_painting_qbrush.cpp +++ b/doc/src/snippets/code/src_gui_painting_qbrush.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPainter painter(this); diff --git a/doc/src/snippets/code/src_gui_painting_qcolor.cpp b/doc/src/snippets/code/src_gui_painting_qcolor.cpp index c21e589..33d882f 100644 --- a/doc/src/snippets/code/src_gui_painting_qcolor.cpp +++ b/doc/src/snippets/code/src_gui_painting_qcolor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // Specify semi-transparent red painter.setBrush(QColor(255, 0, 0, 127)); diff --git a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp b/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp index 7e94d59..156f0ce 100644 --- a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp +++ b/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFrame frame: frame.setFrameStyle(QFrame::HLine | QFrame::Sunken); diff --git a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp b/doc/src/snippets/code/src_gui_painting_qmatrix.cpp index 4a8a427..e34e4e1 100644 --- a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp +++ b/doc/src/snippets/code/src_gui_painting_qmatrix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy diff --git a/doc/src/snippets/code/src_gui_painting_qpainter.cpp b/doc/src/snippets/code/src_gui_painting_qpainter.cpp index 536473c..0ef4b73 100644 --- a/doc/src/snippets/code/src_gui_painting_qpainter.cpp +++ b/doc/src/snippets/code/src_gui_painting_qpainter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void SimpleExampleWidget::paintEvent(QPaintEvent *) { diff --git a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp b/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp index f5d1e8b..92f174a 100644 --- a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp +++ b/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPainterPath path; path.addRect(20, 20, 60, 60); diff --git a/doc/src/snippets/code/src_gui_painting_qpen.cpp b/doc/src/snippets/code/src_gui_painting_qpen.cpp index b5995f7..8ee46bb 100644 --- a/doc/src/snippets/code/src_gui_painting_qpen.cpp +++ b/doc/src/snippets/code/src_gui_painting_qpen.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPainter painter(this); QPen pen(Qt::green, 3, Qt::DashDotLine, Qt::RoundCap, Qt::RoundJoin); diff --git a/doc/src/snippets/code/src_gui_painting_qregion.cpp b/doc/src/snippets/code/src_gui_painting_qregion.cpp index 6c5dfa5..c1aa649 100644 --- a/doc/src/snippets/code/src_gui_painting_qregion.cpp +++ b/doc/src/snippets/code/src_gui_painting_qregion.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyWidget::paintEvent(QPaintEvent *) { diff --git a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp index 50771ef..439c014 100644 --- a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp +++ b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QRegion r1(10, 10, 20, 20); r1.isNull(); // false diff --git a/doc/src/snippets/code/src_gui_painting_qtransform.cpp b/doc/src/snippets/code/src_gui_painting_qtransform.cpp index 91b1e94..d21c5c3 100644 --- a/doc/src/snippets/code/src_gui_painting_qtransform.cpp +++ b/doc/src/snippets/code/src_gui_painting_qtransform.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] x' = m11*x + m21*y + dx y' = m22*y + m12*x + dy diff --git a/doc/src/snippets/code/src_gui_styles_qstyle.cpp b/doc/src/snippets/code/src_gui_styles_qstyle.cpp index a78a6c8..6f1c180 100644 --- a/doc/src/snippets/code/src_gui_styles_qstyle.cpp +++ b/doc/src/snippets/code/src_gui_styles_qstyle.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ./myapplication -style motif //! [0] diff --git a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp b/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp index bf0c670..b32c2df 100644 --- a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp +++ b/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int MyStyle::styleHint(StyleHint stylehint, const QStyleOption *opt, const QWidget *widget, QStyleHintReturn* returnData) const; diff --git a/doc/src/snippets/code/src_gui_text_qfont.cpp b/doc/src/snippets/code/src_gui_text_qfont.cpp index c74772c..4a37b18 100644 --- a/doc/src/snippets/code/src_gui_text_qfont.cpp +++ b/doc/src/snippets/code/src_gui_text_qfont.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFont serifFont("Times", 10, QFont::Bold); QFont sansFont("Helvetica [Cronyx]", 12); diff --git a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp b/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp index d7b17ab..54c19f0 100644 --- a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp +++ b/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFont font("times", 24); QFontMetrics fm(font); diff --git a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp index 5dd2e0d..64a703f 100644 --- a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp +++ b/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QTextEdit *editor = new QTextEdit; MyHighlighter *highlighter = new MyHighlighter(editor->document()); diff --git a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp b/doc/src/snippets/code/src_gui_text_qtextcursor.cpp index 19c60b9..74838b8 100644 --- a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp +++ b/doc/src/snippets/code/src_gui_text_qtextcursor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] cursor.clearSelection(); cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor); diff --git a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp b/doc/src/snippets/code/src_gui_text_qtextdocument.cpp index 60840f7..8c8610c 100644 --- a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp +++ b/doc/src/snippets/code/src_gui_text_qtextdocument.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QString plain = "#include <QtCore>" QString html = Qt::escape(plain); diff --git a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp index 548bb78..ed73c50 100644 --- a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp +++ b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] int leading = fontMetrics.leading(); qreal height = 0; diff --git a/doc/src/snippets/code/src_gui_util_qcompleter.cpp b/doc/src/snippets/code/src_gui_util_qcompleter.cpp index 3017d8c..0717864 100644 --- a/doc/src/snippets/code/src_gui_util_qcompleter.cpp +++ b/doc/src/snippets/code/src_gui_util_qcompleter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList wordList; wordList << "alpha" << "omega" << "omicron" << "zeta"; diff --git a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp index 5001984..57f3a87 100644 --- a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp +++ b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyHelpHandler : public QObject { diff --git a/doc/src/snippets/code/src_gui_util_qundostack.cpp b/doc/src/snippets/code/src_gui_util_qundostack.cpp index 3949e1e..f191e18 100644 --- a/doc/src/snippets/code/src_gui_util_qundostack.cpp +++ b/doc/src/snippets/code/src_gui_util_qundostack.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class AppendText : public QUndoCommand { diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp b/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp index 3c2b192..b07df24 100644 --- a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPushButton *button = new QPushButton(tr("Ro&ck && Roll"), this); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp b/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp index 67cfeb7..3225bd6 100644 --- a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSpinBox *spinBox = new QSpinBox(this); spinBox->setRange(0, 100); diff --git a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp b/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp index 10ceecc..e9e43be 100644 --- a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QCalendarWidget *calendar; calendar->setGridVisible(true); diff --git a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp b/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp index 7300838..eca5930 100644 --- a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QCheckBox *checkbox = new QCheckBox("C&ase sensitive", this); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp index 796358d..9409f27 100644 --- a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate()); dateEdit->setMinimumDate(QDate::currentDate().addDays(-365)); diff --git a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp b/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp index 2204e11..b7fcf08 100644 --- a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDockWidget *dockWidget = qobject_cast<QDockWidget*>(parentWidget()); if (dockWidget->features() & QDockWidget::DockWidgetVerticalTitleBar) { diff --git a/doc/src/snippets/code/src_gui_widgets_qframe.cpp b/doc/src/snippets/code/src_gui_widgets_qframe.cpp index 99fe79d..2360980 100644 --- a/doc/src/snippets/code/src_gui_widgets_qframe.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qframe.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLabel label(...); label.setFrameStyle(QFrame::Panel | QFrame::Raised); diff --git a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp b/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp index efd2246..bbe98d5 100644 --- a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] g->setTitle("&User information"); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp b/doc/src/snippets/code/src_gui_widgets_qlabel.cpp index d3b9254..7d04a05 100644 --- a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qlabel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLabel *label = new QLabel(this); label->setFrameStyle(QFrame::Panel | QFrame::Sunken); diff --git a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp b/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp index 8191a4f..e2ffc2d 100644 --- a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void LineEdit::contextMenuEvent(QContextMenuEvent *event) { diff --git a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp b/doc/src/snippets/code/src_gui_widgets_qmenu.cpp index f30ac35..5230bd3 100644 --- a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qmenu.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] exec(QCursor::pos()); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp b/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp index 3ff24d3..58f03cf 100644 --- a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] menubar->addMenu(fileMenu); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp b/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp index 7f18995..1163261 100644 --- a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyQPlainTextEdit::contextMenuEvent(QContextMenuEvent *event) { diff --git a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp b/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp index e4fc4ce..af7f266 100644 --- a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPushButton *button = new QPushButton("&Download", this); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp b/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp index 05344fc..54771c3 100644 --- a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QRadioButton *button = new QRadioButton("Search from the &cursor", this); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp b/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp index 38a0dad..09c9556 100644 --- a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void Widget::mousePressEvent(QMouseEvent *event) { diff --git a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp b/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp index a77dc20..053a978 100644 --- a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLabel *imageLabel = new QLabel; QImage image("happyguy.png"); diff --git a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp b/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp index 7dbd6d6..7111c6f 100644 --- a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] sb->setPrefix("$"); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp b/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp index d20f1f2..1946973 100644 --- a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPixmap pixmap(":/splash.png"); QSplashScreen *splash = new QSplashScreen(pixmap); diff --git a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp b/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp index 62f5db1..f701c1e 100644 --- a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QWidget *widget = splitter->widget(index); QSizePolicy policy = widget->sizePolicy(); diff --git a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp b/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp index d03f5af..2996a3f 100644 --- a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] statusBar()->addWidget(new MyReadWriteIndication); //! [0] diff --git a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp b/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp index 0beb133..ec1fdde 100644 --- a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] backaction.setToolTip(browser.historyTitle(-1)); forwardaction.setToolTip(browser.historyTitle(+1)); diff --git a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp b/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp index 5f0b73f..5974760 100644 --- a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyTextEdit::contextMenuEvent(QContextMenuEvent *event) { diff --git a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp b/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp index 0240eea..b3c5201 100644 --- a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QValidator *validator = new QIntValidator(100, 999, this); QLineEdit *edit = new QLineEdit(this); diff --git a/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp b/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp index 0c55e5f..b6574c7 100644 --- a/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp +++ b/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] MainWindow::MainWindow() { diff --git a/doc/src/snippets/code/src_network_access_qftp.cpp b/doc/src/snippets/code/src_network_access_qftp.cpp index 4230d56..97841ae 100644 --- a/doc/src/snippets/code/src_network_access_qftp.cpp +++ b/doc/src/snippets/code/src_network_access_qftp.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFtp *ftp = new QFtp(parent); ftp->connectToHost("ftp.qt.nokia.com"); diff --git a/doc/src/snippets/code/src_network_access_qhttp.cpp b/doc/src/snippets/code/src_network_access_qhttp.cpp index d6e814b..ea04549 100644 --- a/doc/src/snippets/code/src_network_access_qhttp.cpp +++ b/doc/src/snippets/code/src_network_access_qhttp.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] content-type: text/html //! [0] diff --git a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp index 48db4cb..d90cc71 100644 --- a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp +++ b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QNetworkAccessManager *manager = new QNetworkAccessManager(this); connect(manager, SIGNAL(finished(QNetworkReply*)), diff --git a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp b/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp index d1f6962..1d22640 100644 --- a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp +++ b/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] request.setRawHeader("Last-Modified", "Sun, 06 Nov 1994 08:49:37 GMT"); //! [0] diff --git a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp b/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp index 0b90404..769b691 100644 --- a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp +++ b/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q_IPV6ADDR addr = hostAddr.toIPv6Address(); // addr contains 16 unsigned characters diff --git a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp index b96a777..e955dcf 100644 --- a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp +++ b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // To find the IP address of qt.nokia.com QHostInfo::lookupHost("qt.nokia.com", diff --git a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp b/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp index 34e9466..87ba6b9 100644 --- a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp +++ b/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QNetworkProxy proxy; proxy.setType(QNetworkProxy::Socks5Proxy); diff --git a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp b/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp index d64931a..f26658f 100644 --- a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp +++ b/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] socket->connectToHost("imap", 143); if (socket->waitForConnected(1000)) diff --git a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp index da96e6f..66d55de 100644 --- a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp +++ b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] socket->connectToServer("market"); if (socket->waitForConnected(1000)) diff --git a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp b/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp index 2aca1e1..269a7c2 100644 --- a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp +++ b/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QNativeSocketEngine socketLayer; socketLayer.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol); diff --git a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp b/doc/src/snippets/code/src_network_socket_qtcpserver.cpp index 0021e3b..df21fa9 100644 --- a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp +++ b/doc/src/snippets/code/src_network_socket_qtcpserver.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] server->setProxy(QNetworkProxy::NoProxy); //! [0] diff --git a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp b/doc/src/snippets/code/src_network_socket_qudpsocket.cpp index 966fb50..2b58bb5 100644 --- a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp +++ b/doc/src/snippets/code/src_network_socket_qudpsocket.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void Server::initSocket() { diff --git a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp index 2ec84ae..7bbff87 100644 --- a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp +++ b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] foreach (QSslCertificate cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem", QSsl::Pem, QRegExp::Wildcard)) { diff --git a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp b/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp index fb3e1ab..158dbfc 100644 --- a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp +++ b/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSslConfiguration config = sslSocket.sslConfiguration(); config.setProtocol(QSsl::TlsV1); diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp index 7845e9b..ed45556 100644 --- a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp +++ b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSslSocket *socket = new QSslSocket(this); connect(socket, SIGNAL(encrypted()), this, SLOT(ready())); diff --git a/doc/src/snippets/code/src_opengl_qgl.cpp b/doc/src/snippets/code/src_opengl_qgl.cpp index 15b0005..2c7de53 100644 --- a/doc/src/snippets/code/src_opengl_qgl.cpp +++ b/doc/src/snippets/code/src_opengl_qgl.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGLFormat fmt; fmt.setAlpha(true); diff --git a/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/doc/src/snippets/code/src_opengl_qglcolormap.cpp index b47de76..fb8775b 100644 --- a/doc/src/snippets/code/src_opengl_qglcolormap.cpp +++ b/doc/src/snippets/code/src_opengl_qglcolormap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <QApplication> #include <QGLColormap> diff --git a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp b/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp index 589ffc0..548f99e 100644 --- a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp +++ b/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QGLPixelBuffer pbuffer(...); ... diff --git a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp b/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp index cc5b86d..a5efd06 100644 --- a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp +++ b/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QString value = retrieveValue(); QDBusMessage reply; diff --git a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp b/doc/src/snippets/code/src_qdbus_qdbusargument.cpp index efd54ac..9cc0064 100644 --- a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp +++ b/doc/src/snippets/code/src_qdbus_qdbusargument.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] struct MyStructure { diff --git a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp b/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp index 2a8c868..fe08a04 100644 --- a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp +++ b/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyObject: public QObject, protected QDBusContext diff --git a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp b/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp index df883e7..071d94a 100644 --- a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp +++ b/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDBusInterface remoteApp( "com.example.Calculator", "/Calculator/Operations", "org.mathematics.RPNCalculator" ); diff --git a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp b/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp index 99fd6e4..05c4ea0 100644 --- a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp +++ b/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qDBusRegisterMetaType<MyClass>(); //! [0] diff --git a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp b/doc/src/snippets/code/src_qdbus_qdbusreply.cpp index 4dc896f..3a99a0a 100644 --- a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp +++ b/doc/src/snippets/code/src_qdbus_qdbusreply.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDBusReply<QString> reply = interface->call("RemoteMethod"); if (reply.isValid()) diff --git a/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp b/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp index bca056c..b97548c 100644 --- a/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp +++ b/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPrinter pr; if (pr.setup()) { diff --git a/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp b/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp index ea66985..d9e022c 100644 --- a/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp +++ b/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QString s = Q3FileDialog::getOpenFileName( "/home", diff --git a/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp b/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp index 8aeafe8..c4a7b90 100644 --- a/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp +++ b/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3ProgressDialog progress("Copying files...", "Abort Copy", numFiles, this, "progress", true); diff --git a/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp b/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp index 8c30389..ccd5547 100644 --- a/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp +++ b/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] (void) new Q3IconViewItem( iconView, // A pointer to a Q3IconView diff --git a/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp b/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp index 615f124..9d9767b 100644 --- a/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp +++ b/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] (void) new Q3ListViewItem(listView, "Column 1", "Column 2"); (void) new Q3ListViewItem(listView->firstChild(), "A", "B", "C"); diff --git a/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp b/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp index 47f9c4e..607560f 100644 --- a/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp +++ b/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_qt3support_network_q3dns.cpp b/doc/src/snippets/code/src_qt3support_network_q3dns.cpp index 9638ff1..9537985 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3dns.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3dns.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList list = myDns.qualifiedNames(); QStringList::Iterator it = list.begin(); diff --git a/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp b/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp index cda1be4..67d6e3b 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QUrlOperator op( "ftp://ftp.qt.nokia.com" ); op.listChildren(); // Asks the server to provide a directory listing diff --git a/doc/src/snippets/code/src_qt3support_network_q3http.cpp b/doc/src/snippets/code/src_qt3support_network_q3http.cpp index 6df626a..bd79228 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3http.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3http.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] content-type: text/html //! [0] diff --git a/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp b/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp index 243be9e..a90c7ba 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3UrlOperator op( "file:///tmp" ); op.listChildren(); // Asks the server to provide a directory listing diff --git a/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp b/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp index 51d1059..3d65a08 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3NetworkProtocol::registerNetworkProtocol( "nntp", new Q3NetworkProtocolFactory<Nntp> ); //! [0] diff --git a/doc/src/snippets/code/src_qt3support_network_q3socket.cpp b/doc/src/snippets/code/src_qt3support_network_q3socket.cpp index 34474fb..69adacf 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3socket.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3socket.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] while( !socket->canReadLine() ) // WRONG ; diff --git a/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp b/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp index cd50fd2..29457a7 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ::close( sd->socket() ); sd->writeBlock( someData, 42 ); diff --git a/doc/src/snippets/code/src_qt3support_network_q3url.cpp b/doc/src/snippets/code/src_qt3support_network_q3url.cpp index d0174a9..9c49906 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3url.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3url.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3Url url( "http://qt.nokia.com" ); // or diff --git a/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp b/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp index f076a7c..36a4f27 100644 --- a/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp +++ b/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3UrlOperator *op = new Q3UrlOperator(); op->copy( QString("ftp://ftp.qt.nokia.com/qt/source/qt-2.1.0.tar.gz"), diff --git a/doc/src/snippets/code/src_qt3support_other_q3accel.cpp b/doc/src/snippets/code/src_qt3support_other_q3accel.cpp index ba315c0..b2d9d23 100644 --- a/doc/src/snippets/code/src_qt3support_other_q3accel.cpp +++ b/doc/src/snippets/code/src_qt3support_other_q3accel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPushButton p("&Exit", parent); // automatic shortcut Alt+E Q3PopupMenu *fileMenu = new fileMenu(parent); diff --git a/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp b/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp index f00ad73..76b2431 100644 --- a/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp +++ b/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] static const char* myimage_data[]={ "...", diff --git a/doc/src/snippets/code/src_qt3support_other_q3process.cpp b/doc/src/snippets/code/src_qt3support_other_q3process.cpp index 2ce94bb..753dd46 100644 --- a/doc/src/snippets/code/src_qt3support_other_q3process.cpp +++ b/doc/src/snippets/code/src_qt3support_other_q3process.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList list = myProcess.arguments(); QStringList::Iterator it = list.begin(); diff --git a/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp b/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp index c443c2e..a6f898a 100644 --- a/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp +++ b/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] process->tryTerminate(); QTimer::singleShot( 5000, process, SLOT(kill()) ); diff --git a/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp b/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp index 1e807d5..01b0b09 100644 --- a/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp +++ b/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3PaintDeviceMetrics pdm(myWidget); double aspect = (double)pdm.widthMM() / (double)pdm.heightMM(); diff --git a/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp b/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp index e932250..c164c814 100644 --- a/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp +++ b/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QPainter p(myWidget); p.drawArc(QRect(10,10, 70,100), 100*16, 160*16); // draws a "(" arc diff --git a/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp b/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp index 709b386..4213a29 100644 --- a/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp +++ b/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3Picture picture; picture.load("drawing.svg", SVG); diff --git a/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp b/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp index cb86b32..9ae7151 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList list = myDataBrowser.sort(); QStringList::Iterator it = list.begin(); diff --git a/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp b/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp index aa72f44..27ba4ff 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList list = myDataTable.sort(); QStringList::Iterator it = list.begin(); diff --git a/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp b/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp index b0b9a59..11e6416 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] myView.setRecord(record); myView.readFields(); diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp index b3b643d..8b1fb8a 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3SqlCursor cur( "staff" ); // Specify the table/view name cur.select(); // We'll retrieve every record diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp index e91b7ed..3af77b1 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QLineEdit myEditor(this); Q3SqlForm myForm(this); diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp index 9d5b2c1..82c0f41 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3SqlCursor* myCursor = myManager.cursor(); ... diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp index 55146de..f909164 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3SqlPropertyMap *myMap = new Q3SqlPropertyMap(); Q3SqlForm *myForm = new Q3SqlForm(this); diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp index bfb7b04..c47cb48 100644 --- a/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp +++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ... Q3SqlSelectCursor* cur = new Q3SqlSelectCursor("SELECT id, firstname, lastname FROM author"); diff --git a/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp b/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp index 073d716..d418418 100644 --- a/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp +++ b/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3SimpleRichText myrichtext(contents, mywidget->font()); //! [0] diff --git a/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp b/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp index b042efb..bf84c19 100644 --- a/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp +++ b/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] mimeSourceFactory()->setExtensionType("qml", "text/utf8"); //! [0] diff --git a/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp b/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp index e8d5784..9a18c8e 100644 --- a/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp +++ b/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QFile file(fileName); // Read the text from a file if (file.open(IO_ReadOnly)) { diff --git a/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp b/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp index 664a690..5b7232f 100644 --- a/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp +++ b/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QString str; Q3TextStream ts( &str, IO_WriteOnly ); diff --git a/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp b/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp index 9985e9d..a40fe46 100644 --- a/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp +++ b/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3CString str("helloworld", 6); // assigns "hello" to str //! [0] diff --git a/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp b/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp index 36f7491..6e07066 100644 --- a/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp +++ b/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // all 5 strings share the same data QString s1 = "abcd"; diff --git a/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp b/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp index 7108262..6c70b96 100644 --- a/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp +++ b/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] static uchar bindata[] = { 231, 1, 44, ... }; QByteArray a; diff --git a/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp b/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp index 7793ba2..1a7886f 100644 --- a/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp +++ b/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] #include <q3signal.h> diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp index 90d7b14..f967652 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3ComboBox *c = new Q3ComboBox(this, tr("read-only combobox")); //! [0] diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp index 74070ec..ad03aca 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp index bde7d84..6aa306d 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] ts << *myDockArea; //! [0] diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp index 1476dcb..171190a 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3ToolBar *fileTools = new Q3ToolBar(this, "File Actions"); moveDockWindow(fileTools, Left); diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp index 43dca3e..1c572b3 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] p->setClipRect(cellRect(), QPainter::CoordPainter); //... your drawing code diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp index 684d182..41a9e10 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // Allow resizing of all current and future sections header->setResizeEnabled(true); diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp index c63b481..83e55bb 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3MainWindow *mw = new Q3MainWindow; QTextEdit *edit = new QTextEdit(mw, "editor"); diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp index 58d5acf..7496b4f 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] Q3ScrollView* sv = new Q3ScrollView(...); QWidget *widget = new QWidget(sv->viewport()); diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp index f7b48ba..adafd94 100644 --- a/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp +++ b/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] (void)Q3WhatsThis::whatsThisButton( my_help_tool_bar ); //! [0] diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp index c143e33..19280c4 100644 --- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp +++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + void wrapInFunction() { diff --git a/doc/src/snippets/code/src_script_qscriptable.cpp b/doc/src/snippets/code/src_script_qscriptable.cpp index 3a02d51..b890307 100644 --- a/doc/src/snippets/code/src_script_qscriptable.cpp +++ b/doc/src/snippets/code/src_script_qscriptable.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] class MyScriptableObject: public QObject, protected QScriptable diff --git a/doc/src/snippets/code/src_script_qscriptclass.cpp b/doc/src/snippets/code/src_script_qscriptclass.cpp index 9d55e0f..ad34587 100644 --- a/doc/src/snippets/code/src_script_qscriptclass.cpp +++ b/doc/src/snippets/code/src_script_qscriptclass.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] if (extension == Callable) { QScriptContext *context = qvariant_cast<QScriptContext*>(argument); diff --git a/doc/src/snippets/code/src_script_qscriptcontext.cpp b/doc/src/snippets/code/src_script_qscriptcontext.cpp index a2f18158..70e60f6 100644 --- a/doc/src/snippets/code/src_script_qscriptcontext.cpp +++ b/doc/src/snippets/code/src_script_qscriptcontext.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] foo(20.5, "hello", new Object()) //! [0] diff --git a/doc/src/snippets/code/src_script_qscriptengine.cpp b/doc/src/snippets/code/src_script_qscriptengine.cpp index 81d4fbc..8fdbfca 100644 --- a/doc/src/snippets/code/src_script_qscriptengine.cpp +++ b/doc/src/snippets/code/src_script_qscriptengine.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QScriptEngine myEngine; QScriptValue three = myEngine.evaluate("1 + 2"); diff --git a/doc/src/snippets/code/src_script_qscriptengineagent.cpp b/doc/src/snippets/code/src_script_qscriptengineagent.cpp index 649d782..b498382 100644 --- a/doc/src/snippets/code/src_script_qscriptengineagent.cpp +++ b/doc/src/snippets/code/src_script_qscriptengineagent.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] var a = Math.random() + 2; //! [0] diff --git a/doc/src/snippets/code/src_script_qscriptvalue.cpp b/doc/src/snippets/code/src_script_qscriptvalue.cpp index d050f2e..026c4da 100644 --- a/doc/src/snippets/code/src_script_qscriptvalue.cpp +++ b/doc/src/snippets/code/src_script_qscriptvalue.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QScriptEngine myEngine; QScriptValue myObject = myEngine.newObject(); diff --git a/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp b/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp index c9de602..2b2999f 100644 --- a/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp +++ b/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QScriptValue object; ... diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp index 8194611..04eeff9 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] // WRONG QSqlDatabase db = QSqlDatabase::database("sales"); diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp index d5992c3..8568f31 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSqlDatabase db = ...; QVariant v = db.driver()->handle(); diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp index e25948c..cca02b7 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSqlQueryModel model; model.setQuery("select * from myTable"); diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp index a372c3e..9783f7c 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QStringList list = myIndex.toStringList(); QStringList::Iterator it = list.begin(); diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp index d0544b8..9560cb7 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] SELECT forename, surname FROM people; //! [0] diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp index 7e6c913..f58f6d0 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSqlQuery q; q.prepare("insert into test (i1, i2, s) values (?, ?, ?)"); diff --git a/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp b/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp index e3bce75..0d7bc8e 100644 --- a/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp +++ b/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] while (myModel->canFetchMore()) myModel->fetchMore(); diff --git a/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp b/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp index f0846e6..01b1df9 100644 --- a/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp +++ b/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QSvgRenderer *renderer = new QSvgRenderer(QLatin1String("SvgCardDeck.svg")); QGraphicsSvgItem *black = new QGraphicsSvgItem(); diff --git a/doc/src/snippets/code/src_xml_dom_qdom.cpp b/doc/src/snippets/code/src_xml_dom_qdom.cpp index 622295d..30db7ac 100644 --- a/doc/src/snippets/code/src_xml_dom_qdom.cpp +++ b/doc/src/snippets/code/src_xml_dom_qdom.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDomDocument doc; QDomImplementation impl; diff --git a/doc/src/snippets/code/src_xml_sax_qxml.cpp b/doc/src/snippets/code/src_xml_sax_qxml.cpp index 478cf9d..ab73244 100644 --- a/doc/src/snippets/code/src_xml_sax_qxml.cpp +++ b/doc/src/snippets/code/src_xml_sax_qxml.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); //! [0] diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp index 990a849..e48691d 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] return baseURI.resolved(relative); //! [0] diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp index f31ea3f..3210234 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] OutputType inputToOutputItem(const InputType &inputType) const; //! [0] diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp index 351a30b..db92ff5 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] myInstance = QXmlNodeModelIndex(); //! [0] diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp index e286fa9..bb985e5 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlQuery query; query.setQuery("doc('index.html')/html/body/p[1]"); diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp index 0906328..c132b0e 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlNodeModelIndex MyTreeModel::nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &ni) const { diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp index d7e6ab1..98680ef 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlQuery query; query.setQuery("doc('index.html')/html/body/p[1]"); diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp index 2c891b5..3d0f326 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // Fills the bits from begin to end with 1s and leaves the rest as 0. template<typename IntegralT> diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp index 76e1b34..9743f7d 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlNamePool namePool(query.namePool()); query.bindVariable(QXmlName(namePool, localName), value); diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp index 190d610..012ca99 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlQuery query; query.setQuery("<e/>, 1, 'two'"); diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp index e286fa9..bb985e5 100644 --- a/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp +++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QXmlQuery query; query.setQuery("doc('index.html')/html/body/p[1]"); diff --git a/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp b/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp index f5097a9..0e37495 100644 --- a/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp +++ b/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QProcess *process = new QProcess(this); QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) diff --git a/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp b/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp index cdfd076..5bb4dcc 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QObject *ANewExtensionFactory::createExtension(QObject *object, const QString &iid, QObject *parent) const diff --git a/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp b/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp index 60bd0cc..6151266 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerPropertySheetExtension *propertySheet; QExtensionManager manager = formEditor->extensionManager(); diff --git a/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp b/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp index 47cee58..0c302de 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] void MyPlugin::initialize(QDesignerFormEditorInterface *formEditor) { diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp index ef13069..7802758 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerObjectInspectorInterface *objectInspector = 0; objectInspector = formEditor->objectInspector(); diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp index 840697d..260d867 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerFormWindowInterface *formWindow; formWindow = QDesignerFormWindowInterface::findFormWindow(myWidget); diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp index fbe4fb8..6eccc80 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerFormWindowInterface *formWindow = 0; formWindow = QDesignerFormWindowInterface::findFormWindow(myWidget); diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp index b54f0a6..840a9a1 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerFormWindowManagerInterface *manager = 0; QDesignerFormWindowInterface *formWindow = 0; diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp index ef13069..7802758 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerObjectInspectorInterface *objectInspector = 0; objectInspector = formEditor->objectInspector(); diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp index bbc396f..efbe87f 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerPropertyEditorInterface *propertyEditor = 0; propertyEditor = formEditor->propertyEditor(); diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp index b80c59e..3c2786e 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QDesignerWidgetBoxInterface *widgetBox = 0: widgetBox = formEditor->widgetBox(); diff --git a/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp b/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp index b572fba..3f9e774 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] MyForm::MyForm(QWidget *parent) : QWidget(parent) diff --git a/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp b/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp index a88dab5..056c7c9 100644 --- a/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp +++ b/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] MyForm::MyForm(QWidget *parent) : QWidget(parent) diff --git a/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp b/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp index da28cd5..c0620bc 100644 --- a/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp +++ b/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] \include main.cpp //! [0] diff --git a/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp b/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp index 72e86ba..74e3feb 100644 --- a/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp +++ b/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] bool ok; QGradient gradient = QtGradientDialog::getGradient(&ok, QRadialGradient(), this); diff --git a/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp index 62f4319..42d4cb4 100644 --- a/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp +++ b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QtSpinBoxFactory *factory; QSet<QtIntPropertyManager *> managers = factory->propertyManagers(); diff --git a/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp index fbc9682..0a95639 100644 --- a/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp +++ b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QtVariantPropertyManager *variantPropertyManager; QtProperty *property; diff --git a/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp b/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp index 9162b63..4fba02b 100644 --- a/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp +++ b/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QtToolBarManager *toolBarManager; diff --git a/doc/src/snippets/customviewstyle.cpp b/doc/src/snippets/customviewstyle.cpp index 6cfbac7..cf04f15 100644 --- a/doc/src/snippets/customviewstyle.cpp +++ b/doc/src/snippets/customviewstyle.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include "customviewstyle.h" diff --git a/doc/src/snippets/filedialogurls.cpp b/doc/src/snippets/filedialogurls.cpp index 4b59590..05845d2 100644 --- a/doc/src/snippets/filedialogurls.cpp +++ b/doc/src/snippets/filedialogurls.cpp @@ -1,10 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include <QtGui> int main(int argv, char **args) { QApplication app(argv, args); - + //![0] QList<QUrl> urls; urls << QUrl::fromLocalFile("/home/gvatteka/dev/qt-45") diff --git a/doc/src/snippets/medianodesnippet.cpp b/doc/src/snippets/medianodesnippet.cpp index 8b74111..05b6c86 100644 --- a/doc/src/snippets/medianodesnippet.cpp +++ b/doc/src/snippets/medianodesnippet.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include <phonon/mediaobject.h> diff --git a/doc/src/snippets/ntfsp.cpp b/doc/src/snippets/ntfsp.cpp index ad5dc48..f47e3ef 100644 --- a/doc/src/snippets/ntfsp.cpp +++ b/doc/src/snippets/ntfsp.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ //! [0] diff --git a/doc/src/snippets/phonon/samplebackend/main.cpp b/doc/src/snippets/phonon/samplebackend/main.cpp index 724ef5c..f9d2997 100644 --- a/doc/src/snippets/phonon/samplebackend/main.cpp +++ b/doc/src/snippets/phonon/samplebackend/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [snippet] QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args) { diff --git a/doc/src/snippets/phononeffectparameter.cpp b/doc/src/snippets/phononeffectparameter.cpp index e0351f5..bc99fbe 100644 --- a/doc/src/snippets/phononeffectparameter.cpp +++ b/doc/src/snippets/phononeffectparameter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include <phonon/backendcapabilities.h> @@ -16,7 +57,7 @@ int main(int argv, char **args) Phonon::BackendCapabilities::availableAudioEffects(); Phonon::Effect *effect = new Phonon::Effect(effects.at(3)); - + //![0] QList<Phonon::EffectParameter> parameters = effect->parameters(); @@ -28,7 +69,7 @@ int main(int argv, char **args) //![1] Phonon::EffectWidget *effectWidget = new Phonon::EffectWidget(effect); //![1] - + effectWidget->show(); return app.exec(); diff --git a/doc/src/snippets/phononobjectdescription.cpp b/doc/src/snippets/phononobjectdescription.cpp index b9d1f29..3355068 100644 --- a/doc/src/snippets/phononobjectdescription.cpp +++ b/doc/src/snippets/phononobjectdescription.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include <phonon/phononnamespace.h> @@ -14,7 +55,7 @@ int main(int argv, char **args) { QApplication app(argv, args); - + //![0] QList<Phonon::EffectDescription> effectDescriptions = Phonon::BackendCapabilities::availableAudioEffects(); diff --git a/doc/src/snippets/printing-qprinter/errors.cpp b/doc/src/snippets/printing-qprinter/errors.cpp index 55f78e8..3f6adeb 100644 --- a/doc/src/snippets/printing-qprinter/errors.cpp +++ b/doc/src/snippets/printing-qprinter/errors.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> int main(int argc, char **argv) diff --git a/doc/src/snippets/scriptdebugger.cpp b/doc/src/snippets/scriptdebugger.cpp index a1889d5..0cfe605 100644 --- a/doc/src/snippets/scriptdebugger.cpp +++ b/doc/src/snippets/scriptdebugger.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include <QtGui> #include <QtScript> @@ -25,7 +65,7 @@ int main(int argv, char **args) //![0] QWidget *codeWindow = debugger->widget(QScriptEngineDebugger::CodeWidget); QWidget *stackWidget = debugger->widget(QScriptEngineDebugger::StackWidget); - + QLayout *layout = new QHBoxLayout; layout->addWidget(codeWindow); layout->addWidget(stackWidget); @@ -47,7 +87,7 @@ int main(int argv, char **args) debugger->setAutoShowStandardWindow(false); - widget->setLayout(layout); + widget->setLayout(layout); widget->show(); QPushButton button; diff --git a/doc/src/snippets/seekslider.cpp b/doc/src/snippets/seekslider.cpp index d5dfd14..5ac87d1 100644 --- a/doc/src/snippets/seekslider.cpp +++ b/doc/src/snippets/seekslider.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include <phonon/audiooutput.h> @@ -17,7 +58,7 @@ int main(int argv, char **args) Phonon::SeekSlider *slider = new Phonon::SeekSlider; slider->setMediaObject(moo); - + slider->show(); moo->play(); //![0] diff --git a/doc/src/snippets/signalmapper/filereader.h b/doc/src/snippets/signalmapper/filereader.h index a3be088..d8ceb2e 100644 --- a/doc/src/snippets/signalmapper/filereader.h +++ b/doc/src/snippets/signalmapper/filereader.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef FILEREADER_H #define FILEREADER_H diff --git a/doc/src/snippets/stylesheet/common-mistakes.cpp b/doc/src/snippets/stylesheet/common-mistakes.cpp index 1c7e3a8..0993e38 100644 --- a/doc/src/snippets/stylesheet/common-mistakes.cpp +++ b/doc/src/snippets/stylesheet/common-mistakes.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [1] QPushButton { color: grey; diff --git a/doc/src/snippets/videomedia.cpp b/doc/src/snippets/videomedia.cpp index 323aca9..8e6b5a2 100644 --- a/doc/src/snippets/videomedia.cpp +++ b/doc/src/snippets/videomedia.cpp @@ -1,9 +1,47 @@ - +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include <QtGui> #include <phonon> - int main(int argv, char **args) { QApplication app(argv, args); diff --git a/doc/src/snippets/volumeslider.cpp b/doc/src/snippets/volumeslider.cpp index 960ca59..38c1884 100644 --- a/doc/src/snippets/volumeslider.cpp +++ b/doc/src/snippets/volumeslider.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #include <phonon/audiooutput.h> diff --git a/doc/src/snippets/widgetdelegate.cpp b/doc/src/snippets/widgetdelegate.cpp index 83237fe..a3354c2 100644 --- a/doc/src/snippets/widgetdelegate.cpp +++ b/doc/src/snippets/widgetdelegate.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include <QtGui> diff --git a/doc/src/snippets/widgets-tutorial/childwidget/main.cpp b/doc/src/snippets/widgets-tutorial/childwidget/main.cpp index 8a97810..e858668 100644 --- a/doc/src/snippets/widgets-tutorial/childwidget/main.cpp +++ b/doc/src/snippets/widgets-tutorial/childwidget/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> int main(int argc, char *argv[]) diff --git a/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp b/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp index f541464..f0c38d9 100644 --- a/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp +++ b/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> int main(int argc, char *argv[]) diff --git a/doc/src/snippets/widgets-tutorial/toplevel/main.cpp b/doc/src/snippets/widgets-tutorial/toplevel/main.cpp index cffdff8..febe965 100644 --- a/doc/src/snippets/widgets-tutorial/toplevel/main.cpp +++ b/doc/src/snippets/widgets-tutorial/toplevel/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> int main(int argc, char *argv[]) diff --git a/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp b/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp index 0c6e814..0d2d7ba 100644 --- a/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp +++ b/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> int main(int argc, char *argv[]) diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro index 1cd05f6..db63104 100644 --- a/examples/activeqt/activeqt.pro +++ b/examples/activeqt/activeqt.pro @@ -19,4 +19,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS activeqt.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/comapp/comapp.pro b/examples/activeqt/comapp/comapp.pro index 29aebae..99b8933 100644 --- a/examples/activeqt/comapp/comapp.pro +++ b/examples/activeqt/comapp/comapp.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS comapp.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/hierarchy/hierarchy.pro b/examples/activeqt/hierarchy/hierarchy.pro index d0ebbcd..cd1d754 100644 --- a/examples/activeqt/hierarchy/hierarchy.pro +++ b/examples/activeqt/hierarchy/hierarchy.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hierarchy.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/menus/menus.pro b/examples/activeqt/menus/menus.pro index 8963bad..f197833 100644 --- a/examples/activeqt/menus/menus.pro +++ b/examples/activeqt/menus/menus.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS menus.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/multiple/multiple.pro b/examples/activeqt/multiple/multiple.pro index 97acc9a..9c95921 100644 --- a/examples/activeqt/multiple/multiple.pro +++ b/examples/activeqt/multiple/multiple.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS multiple.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/opengl/opengl.pro b/examples/activeqt/opengl/opengl.pro index 4979dc0..978bd66 100644 --- a/examples/activeqt/opengl/opengl.pro +++ b/examples/activeqt/opengl/opengl.pro @@ -18,4 +18,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/simple/simple.pro b/examples/activeqt/simple/simple.pro index 4d8480e..243d06a 100644 --- a/examples/activeqt/simple/simple.pro +++ b/examples/activeqt/simple/simple.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS simple.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/webbrowser/webbrowser.pro index c3e6e1e..13b1983 100644 --- a/examples/activeqt/webbrowser/webbrowser.pro +++ b/examples/activeqt/webbrowser/webbrowser.pro @@ -16,4 +16,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webbrowser.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/activeqt/wrapper/wrapper.pro b/examples/activeqt/wrapper/wrapper.pro index e109dba..a207f2e 100644 --- a/examples/activeqt/wrapper/wrapper.pro +++ b/examples/activeqt/wrapper/wrapper.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wrapper.pro sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/animation/states/main.cpp b/examples/animation/states/main.cpp index f326aae..a9eebbc 100644 --- a/examples/animation/states/main.cpp +++ b/examples/animation/states/main.cpp @@ -139,12 +139,12 @@ int main(int argc, char *argv[]) state1->assignProperty(p4, "geometry", QRectF(68-150, 48-150, 64, 64)); state1->assignProperty(p5, "geometry", QRectF(168, 48-150, 64, 64)); state1->assignProperty(p6, "geometry", QRectF(268+150, 48-150, 64, 64)); - state1->assignProperty(p1, "zRotation", qreal(0)); - state1->assignProperty(p2, "zRotation", qreal(0)); - state1->assignProperty(p3, "zRotation", qreal(0)); - state1->assignProperty(p4, "zRotation", qreal(-270)); - state1->assignProperty(p5, "zRotation", qreal(-90)); - state1->assignProperty(p6, "zRotation", qreal(270)); + state1->assignProperty(p1, "rotation", qreal(0)); + state1->assignProperty(p2, "rotation", qreal(0)); + state1->assignProperty(p3, "rotation", qreal(0)); + state1->assignProperty(p4, "rotation", qreal(-270)); + state1->assignProperty(p5, "rotation", qreal(-90)); + state1->assignProperty(p6, "rotation", qreal(270)); state1->assignProperty(boxProxy, "opacity", qreal(0)); state1->assignProperty(p1, "opacity", qreal(1)); state1->assignProperty(p2, "opacity", qreal(1)); @@ -163,12 +163,12 @@ int main(int argc, char *argv[]) state2->assignProperty(p4, "geometry", QRectF(64, 48, 64, 64)); state2->assignProperty(p5, "geometry", QRectF(168, 48, 64, 64)); state2->assignProperty(p6, "geometry", QRectF(268, 48, 64, 64)); - state2->assignProperty(p1, "zRotation", qreal(-270)); - state2->assignProperty(p2, "zRotation", qreal(90)); - state2->assignProperty(p3, "zRotation", qreal(270)); - state2->assignProperty(p4, "zRotation", qreal(0)); - state2->assignProperty(p5, "zRotation", qreal(0)); - state2->assignProperty(p6, "zRotation", qreal(0)); + state2->assignProperty(p1, "rotation", qreal(-270)); + state2->assignProperty(p2, "rotation", qreal(90)); + state2->assignProperty(p3, "rotation", qreal(270)); + state2->assignProperty(p4, "rotation", qreal(0)); + state2->assignProperty(p5, "rotation", qreal(0)); + state2->assignProperty(p6, "rotation", qreal(0)); state2->assignProperty(boxProxy, "opacity", qreal(1)); state2->assignProperty(p1, "opacity", qreal(0)); state2->assignProperty(p2, "opacity", qreal(0)); @@ -208,12 +208,12 @@ int main(int argc, char *argv[]) animation1.addAnimation(new QPropertyAnimation(p4, "geometry")); animation1.addAnimation(new QPropertyAnimation(p5, "geometry")); animation1.addAnimation(new QPropertyAnimation(p6, "geometry")); - animation1.addAnimation(new QPropertyAnimation(p1, "zRotation")); - animation1.addAnimation(new QPropertyAnimation(p2, "zRotation")); - animation1.addAnimation(new QPropertyAnimation(p3, "zRotation")); - animation1.addAnimation(new QPropertyAnimation(p4, "zRotation")); - animation1.addAnimation(new QPropertyAnimation(p5, "zRotation")); - animation1.addAnimation(new QPropertyAnimation(p6, "zRotation")); + animation1.addAnimation(new QPropertyAnimation(p1, "rotation")); + animation1.addAnimation(new QPropertyAnimation(p2, "rotation")); + animation1.addAnimation(new QPropertyAnimation(p3, "rotation")); + animation1.addAnimation(new QPropertyAnimation(p4, "rotation")); + animation1.addAnimation(new QPropertyAnimation(p5, "rotation")); + animation1.addAnimation(new QPropertyAnimation(p6, "rotation")); animation1.addAnimation(new QPropertyAnimation(p1, "opacity")); animation1.addAnimation(new QPropertyAnimation(p2, "opacity")); animation1.addAnimation(new QPropertyAnimation(p3, "opacity")); @@ -230,12 +230,12 @@ int main(int argc, char *argv[]) animation2.addAnimation(new QPropertyAnimation(p4, "geometry")); animation2.addAnimation(new QPropertyAnimation(p5, "geometry")); animation2.addAnimation(new QPropertyAnimation(p6, "geometry")); - animation2.addAnimation(new QPropertyAnimation(p1, "zRotation")); - animation2.addAnimation(new QPropertyAnimation(p2, "zRotation")); - animation2.addAnimation(new QPropertyAnimation(p3, "zRotation")); - animation2.addAnimation(new QPropertyAnimation(p4, "zRotation")); - animation2.addAnimation(new QPropertyAnimation(p5, "zRotation")); - animation2.addAnimation(new QPropertyAnimation(p6, "zRotation")); + animation2.addAnimation(new QPropertyAnimation(p1, "rotation")); + animation2.addAnimation(new QPropertyAnimation(p2, "rotation")); + animation2.addAnimation(new QPropertyAnimation(p3, "rotation")); + animation2.addAnimation(new QPropertyAnimation(p4, "rotation")); + animation2.addAnimation(new QPropertyAnimation(p5, "rotation")); + animation2.addAnimation(new QPropertyAnimation(p6, "rotation")); animation2.addAnimation(new QPropertyAnimation(p1, "opacity")); animation2.addAnimation(new QPropertyAnimation(p2, "opacity")); animation2.addAnimation(new QPropertyAnimation(p3, "opacity")); @@ -252,12 +252,12 @@ int main(int argc, char *argv[]) animation3.addAnimation(new QPropertyAnimation(p4, "geometry")); animation3.addAnimation(new QPropertyAnimation(p5, "geometry")); animation3.addAnimation(new QPropertyAnimation(p6, "geometry")); - animation3.addAnimation(new QPropertyAnimation(p1, "zRotation")); - animation3.addAnimation(new QPropertyAnimation(p2, "zRotation")); - animation3.addAnimation(new QPropertyAnimation(p3, "zRotation")); - animation3.addAnimation(new QPropertyAnimation(p4, "zRotation")); - animation3.addAnimation(new QPropertyAnimation(p5, "zRotation")); - animation3.addAnimation(new QPropertyAnimation(p6, "zRotation")); + animation3.addAnimation(new QPropertyAnimation(p1, "rotation")); + animation3.addAnimation(new QPropertyAnimation(p2, "rotation")); + animation3.addAnimation(new QPropertyAnimation(p3, "rotation")); + animation3.addAnimation(new QPropertyAnimation(p4, "rotation")); + animation3.addAnimation(new QPropertyAnimation(p5, "rotation")); + animation3.addAnimation(new QPropertyAnimation(p6, "rotation")); animation3.addAnimation(new QPropertyAnimation(p1, "opacity")); animation3.addAnimation(new QPropertyAnimation(p2, "opacity")); animation3.addAnimation(new QPropertyAnimation(p3, "opacity")); diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro index b724bcb..ff1f947 100644 --- a/examples/assistant/assistant.pro +++ b/examples/assistant/assistant.pro @@ -7,4 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/assistant INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro index 4bbdaf1..2c0eada 100644 --- a/examples/assistant/simpletextviewer/simpletextviewer.pro +++ b/examples/assistant/simpletextviewer/simpletextviewer.pro @@ -14,5 +14,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/complexpingpong/complexping.pro b/examples/dbus/complexpingpong/complexping.pro index 7c46533..a01aed6 100644 --- a/examples/dbus/complexpingpong/complexping.pro +++ b/examples/dbus/complexpingpong/complexping.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/complexpingpong/complexpong.pro b/examples/dbus/complexpingpong/complexpong.pro index b4d4d1a..f60863f 100644 --- a/examples/dbus/complexpingpong/complexpong.pro +++ b/examples/dbus/complexpingpong/complexpong.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/dbus-chat/chat_adaptor.cpp b/examples/dbus/dbus-chat/chat_adaptor.cpp index 4292a58..7dabc39 100644 --- a/examples/dbus/dbus-chat/chat_adaptor.cpp +++ b/examples/dbus/dbus-chat/chat_adaptor.cpp @@ -1,12 +1,52 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** Do not edit! All changes made to it will be lost. +** +****************************************************************************/ #include "chat_adaptor.h" #include <QtCore/QMetaObject> diff --git a/examples/dbus/dbus-chat/chat_adaptor.h b/examples/dbus/dbus-chat/chat_adaptor.h index 9d8e7a6..984a012 100644 --- a/examples/dbus/dbus-chat/chat_adaptor.h +++ b/examples/dbus/dbus-chat/chat_adaptor.h @@ -1,13 +1,53 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** This file may have been hand-edited. Look for HAND-EDIT comments +** before re-generating it. +** +****************************************************************************/ #ifndef CHAT_ADAPTOR_H_142741156243605 #define CHAT_ADAPTOR_H_142741156243605 diff --git a/examples/dbus/dbus-chat/chat_interface.cpp b/examples/dbus/dbus-chat/chat_interface.cpp index 5e2d2a7..b9bb125 100644 --- a/examples/dbus/dbus-chat/chat_interface.cpp +++ b/examples/dbus/dbus-chat/chat_interface.cpp @@ -1,13 +1,53 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -i chat_interface.h -p :chat_interface.cpp chat/com.trolltech.chat.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -i chat_interface.h -p :chat_interface.cpp chat/com.trolltech.chat.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** This file may have been hand-edited. Look for HAND-EDIT comments +** before re-generating it. +** +****************************************************************************/ #include "chat_interface.h" /* diff --git a/examples/dbus/dbus-chat/chat_interface.h b/examples/dbus/dbus-chat/chat_interface.h index 75140cc..b6d7343 100644 --- a/examples/dbus/dbus-chat/chat_interface.h +++ b/examples/dbus/dbus-chat/chat_interface.h @@ -1,12 +1,52 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** Do not edit! All changes made to it will be lost. +** +****************************************************************************/ #ifndef CHAT_INTERFACE_H_143021156243606 #define CHAT_INTERFACE_H_143021156243606 diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro index e04c641..1316f64 100644 --- a/examples/dbus/dbus-chat/dbus-chat.pro +++ b/examples/dbus/dbus-chat/dbus-chat.pro @@ -18,4 +18,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/chat INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro index e4a4f70..f365829 100644 --- a/examples/dbus/dbus.pro +++ b/examples/dbus/dbus.pro @@ -11,4 +11,4 @@ sources.files = *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/listnames/listnames.pro b/examples/dbus/listnames/listnames.pro index b8a648e..4b484a5 100644 --- a/examples/dbus/listnames/listnames.pro +++ b/examples/dbus/listnames/listnames.pro @@ -15,5 +15,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/listnames INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/pingpong/ping.pro b/examples/dbus/pingpong/ping.pro index e28060f..4b1affe 100644 --- a/examples/dbus/pingpong/ping.pro +++ b/examples/dbus/pingpong/ping.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/pingpong/pong.pro b/examples/dbus/pingpong/pong.pro index ed06d22..bd824e1 100644 --- a/examples/dbus/pingpong/pong.pro +++ b/examples/dbus/pingpong/pong.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro index 600c3f2..9b426d3 100644 --- a/examples/dbus/remotecontrolledcar/car/car.pro +++ b/examples/dbus/remotecontrolledcar/car/car.pro @@ -19,4 +19,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp index f0c9aa0..8877957 100644 --- a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp +++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp @@ -1,12 +1,52 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** Do not edit! All changes made to it will be lost. +** +****************************************************************************/ #include "car_adaptor_p.h" #include <QtCore/QMetaObject> diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h index 39782f5..976ae5d 100644 --- a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h +++ b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h @@ -1,13 +1,53 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** This file may have been hand-edited. Look for HAND-EDIT comments +** before re-generating it. +** +****************************************************************************/ #ifndef CAR_ADAPTOR_P_H_1157030132 #define CAR_ADAPTOR_P_H_1157030132 diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp index daa9467..eeb96f3 100644 --- a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp +++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp @@ -1,13 +1,53 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** This file may have been hand-edited. Look for HAND-EDIT comments +** before re-generating it. +** +****************************************************************************/ #include "car_interface_p.h" diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h index 3373312..d26696f 100644 --- a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h +++ b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h @@ -1,12 +1,52 @@ -/* - * This file was generated by dbusxml2cpp version 0.6 - * Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml - * - * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +** +** This file was generated by dbusxml2cpp version 0.6 +** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml +** +** dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** This is an auto-generated file. +** Do not edit! All changes made to it will be lost. +** +****************************************************************************/ #ifndef CAR_INTERFACE_P_H_1156853585 #define CAR_INTERFACE_P_H_1156853585 diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro index b31d418..159e3b1 100644 --- a/examples/dbus/remotecontrolledcar/controller/controller.pro +++ b/examples/dbus/remotecontrolledcar/controller/controller.pro @@ -20,4 +20,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/controller INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro index 0df8e1f..6f29977 100644 --- a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro +++ b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro @@ -7,4 +7,4 @@ sources.files = *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/calculatorbuilder/calculatorbuilder.pro b/examples/designer/calculatorbuilder/calculatorbuilder.pro index e08220a..cd8ac2c 100644 --- a/examples/designer/calculatorbuilder/calculatorbuilder.pro +++ b/examples/designer/calculatorbuilder/calculatorbuilder.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorbuilder INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/calculatorform/calculatorform.pro b/examples/designer/calculatorform/calculatorform.pro index 5a133a9..87e9eb9 100644 --- a/examples/designer/calculatorform/calculatorform.pro +++ b/examples/designer/calculatorform/calculatorform.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorform INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/containerextension/containerextension.pro b/examples/designer/containerextension/containerextension.pro index 9b2b8bc..8183f2d 100644 --- a/examples/designer/containerextension/containerextension.pro +++ b/examples/designer/containerextension/containerextension.pro @@ -25,4 +25,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/containerextension INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.pro b/examples/designer/customwidgetplugin/customwidgetplugin.pro index 6cc376f..dc9281d 100644 --- a/examples/designer/customwidgetplugin/customwidgetplugin.pro +++ b/examples/designer/customwidgetplugin/customwidgetplugin.pro @@ -20,4 +20,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/customwidgetplugin INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/designer.pro b/examples/designer/designer.pro index b7eacc0..8f9553b 100644 --- a/examples/designer/designer.pro +++ b/examples/designer/designer.pro @@ -18,4 +18,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/taskmenuextension/taskmenuextension.pro b/examples/designer/taskmenuextension/taskmenuextension.pro index 89c0c44..d0e76e8 100644 --- a/examples/designer/taskmenuextension/taskmenuextension.pro +++ b/examples/designer/taskmenuextension/taskmenuextension.pro @@ -24,4 +24,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/taskmenuextension INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro index 0123fd1..369cdff 100644 --- a/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro +++ b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockbuilder INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro index 5eb133f..44500cb 100644 --- a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro +++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro @@ -20,4 +20,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockplugin INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/desktop/desktop.pro b/examples/desktop/desktop.pro index 61108e5..1c4e05b 100644 --- a/examples/desktop/desktop.pro +++ b/examples/desktop/desktop.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS desktop.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/desktop INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/desktop/screenshot/screenshot.pro b/examples/desktop/screenshot/screenshot.pro index b610812..ad743a0 100644 --- a/examples/desktop/screenshot/screenshot.pro +++ b/examples/desktop/screenshot/screenshot.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS screenshot.pro sources.path = $$[QT_INSTALL_EXAMPLES]/desktop/screenshot INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/desktop/systray/systray.pro b/examples/desktop/systray/systray.pro index 3c08626..9b25916 100644 --- a/examples/desktop/systray/systray.pro +++ b/examples/desktop/systray/systray.pro @@ -10,7 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS systray.pro resources im sources.path = $$[QT_INSTALL_EXAMPLES]/desktop/systray INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince* { CONFIG(debug, release|debug) { diff --git a/examples/dialogs/classwizard/classwizard.pro b/examples/dialogs/classwizard/classwizard.pro index 0515a8a..7d2e491 100644 --- a/examples/dialogs/classwizard/classwizard.pro +++ b/examples/dialogs/classwizard/classwizard.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/classwizard INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dialogs/configdialog/configdialog.pro b/examples/dialogs/configdialog/configdialog.pro index 5ef3810..3785718 100644 --- a/examples/dialogs/configdialog/configdialog.pro +++ b/examples/dialogs/configdialog/configdialog.pro @@ -11,6 +11,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/configdialog INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib diff --git a/examples/dialogs/dialogs.pro b/examples/dialogs/dialogs.pro index 6d0ed8d..ed41166 100644 --- a/examples/dialogs/dialogs.pro +++ b/examples/dialogs/dialogs.pro @@ -16,4 +16,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dialogs/extension/extension.pro b/examples/dialogs/extension/extension.pro index 7f80f9c..f064dc2 100644 --- a/examples/dialogs/extension/extension.pro +++ b/examples/dialogs/extension/extension.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/extension INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dialogs/findfiles/findfiles.pro b/examples/dialogs/findfiles/findfiles.pro index 6820c17..2d97b3d 100644 --- a/examples/dialogs/findfiles/findfiles.pro +++ b/examples/dialogs/findfiles/findfiles.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/findfiles INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dialogs/licensewizard/licensewizard.pro b/examples/dialogs/licensewizard/licensewizard.pro index 789dae0..b76ae14 100644 --- a/examples/dialogs/licensewizard/licensewizard.pro +++ b/examples/dialogs/licensewizard/licensewizard.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/licensewizard INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/dialogs/sipdialog/sipdialog.pro b/examples/dialogs/sipdialog/sipdialog.pro index 3d5503f..01ef411 100644 --- a/examples/dialogs/sipdialog/sipdialog.pro +++ b/examples/dialogs/sipdialog/sipdialog.pro @@ -8,7 +8,7 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/sipdialog INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib diff --git a/examples/dialogs/standarddialogs/standarddialogs.pro b/examples/dialogs/standarddialogs/standarddialogs.pro index 9b06e5c..86ae1d1 100644 --- a/examples/dialogs/standarddialogs/standarddialogs.pro +++ b/examples/dialogs/standarddialogs/standarddialogs.pro @@ -8,6 +8,6 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/standarddialogs INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib diff --git a/examples/dialogs/tabdialog/tabdialog.pro b/examples/dialogs/tabdialog/tabdialog.pro index f3fa95d..d716b64 100644 --- a/examples/dialogs/tabdialog/tabdialog.pro +++ b/examples/dialogs/tabdialog/tabdialog.pro @@ -8,5 +8,5 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/tabdialog INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib diff --git a/examples/dialogs/trivialwizard/trivialwizard.pro b/examples/dialogs/trivialwizard/trivialwizard.pro index 27bb8d9..f17fe37 100644 --- a/examples/dialogs/trivialwizard/trivialwizard.pro +++ b/examples/dialogs/trivialwizard/trivialwizard.pro @@ -6,4 +6,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/trivialwizard INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/draganddrop/draggableicons/draggableicons.pro b/examples/draganddrop/draggableicons/draggableicons.pro index 6d53baa..f177bd6 100644 --- a/examples/draganddrop/draggableicons/draggableicons.pro +++ b/examples/draganddrop/draggableicons/draggableicons.pro @@ -9,6 +9,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/draggableicons INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C615
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C615 +} diff --git a/examples/draganddrop/draggabletext/draggabletext.pro b/examples/draganddrop/draggabletext/draggabletext.pro index 15d909d..19fee2d 100644 --- a/examples/draganddrop/draggabletext/draggabletext.pro +++ b/examples/draganddrop/draggabletext/draggabletext.pro @@ -11,6 +11,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.txt *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/draggabletext INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000CF64
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000CF64 +} diff --git a/examples/draganddrop/dropsite/dropsite.pro b/examples/draganddrop/dropsite/dropsite.pro index a42f717..5f81b09 100644 --- a/examples/draganddrop/dropsite/dropsite.pro +++ b/examples/draganddrop/dropsite/dropsite.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/dropsite INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.pro b/examples/draganddrop/fridgemagnets/fridgemagnets.pro index b452746..b8388cf 100644 --- a/examples/draganddrop/fridgemagnets/fridgemagnets.pro +++ b/examples/draganddrop/fridgemagnets/fridgemagnets.pro @@ -10,6 +10,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/fridgemagnets sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.txt sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/fridgemagnets INSTALLS += target sources -TARGET.UID3 = 0xA000C610 -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C610 +} + + diff --git a/examples/draganddrop/puzzle/puzzle.pro b/examples/draganddrop/puzzle/puzzle.pro index ecaf706..20080e9 100644 --- a/examples/draganddrop/puzzle/puzzle.pro +++ b/examples/draganddrop/puzzle/puzzle.pro @@ -13,9 +13,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/puzzle INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - symbian:{ + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) addFile.sources = example.jpg addFile.path = . DEPLOYMENT += addFile diff --git a/examples/effects/blurpicker/blureffect.cpp b/examples/effects/blurpicker/blureffect.cpp index 82be44f..0b806aa 100644 --- a/examples/effects/blurpicker/blureffect.cpp +++ b/examples/effects/blurpicker/blureffect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -52,7 +52,7 @@ BlurEffect::BlurEffect(QGraphicsItem *item) void BlurEffect::adjustForItem() { qreal y = m_baseLine - item->pos().y(); - qreal radius = qBound(0.0, y / 32, 16.0); + qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0)); setBlurRadius(radius); } diff --git a/examples/effects/blurpicker/blureffect.h b/examples/effects/blurpicker/blureffect.h index 89694b6..25e84fe 100644 --- a/examples/effects/blurpicker/blureffect.h +++ b/examples/effects/blurpicker/blureffect.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/blurpicker/blurpicker.cpp b/examples/effects/blurpicker/blurpicker.cpp index 9904dfa..791949a 100644 --- a/examples/effects/blurpicker/blurpicker.cpp +++ b/examples/effects/blurpicker/blurpicker.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/blurpicker/blurpicker.h b/examples/effects/blurpicker/blurpicker.h index b7ea3b4..cef4637 100644 --- a/examples/effects/blurpicker/blurpicker.h +++ b/examples/effects/blurpicker/blurpicker.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/blurpicker/main.cpp b/examples/effects/blurpicker/main.cpp index b88a51d..b557db6 100644 --- a/examples/effects/blurpicker/main.cpp +++ b/examples/effects/blurpicker/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp index 2b5237b..9923324 100644 --- a/examples/effects/customshader/blureffect.cpp +++ b/examples/effects/customshader/blureffect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -52,7 +52,7 @@ BlurEffect::BlurEffect(QGraphicsItem *item) void BlurEffect::adjustForItem() { qreal y = m_baseLine - item->pos().y(); - qreal radius = qBound(0.0, y / 32, 16.0); + qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0)); setBlurRadius(radius); } diff --git a/examples/effects/customshader/blureffect.h b/examples/effects/customshader/blureffect.h index bf72226..b7efde3 100644 --- a/examples/effects/customshader/blureffect.h +++ b/examples/effects/customshader/blureffect.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/customshader/blurpicker.cpp b/examples/effects/customshader/blurpicker.cpp index de80312..4b03f31 100644 --- a/examples/effects/customshader/blurpicker.cpp +++ b/examples/effects/customshader/blurpicker.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/customshader/blurpicker.h b/examples/effects/customshader/blurpicker.h index b7ea3b4..cef4637 100644 --- a/examples/effects/customshader/blurpicker.h +++ b/examples/effects/customshader/blurpicker.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/customshader/customshadereffect.cpp b/examples/effects/customshader/customshadereffect.cpp index 293123c..69fdb15 100644 --- a/examples/effects/customshader/customshadereffect.cpp +++ b/examples/effects/customshader/customshadereffect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -43,10 +43,8 @@ #include <QGLShaderProgram> static char const colorizeShaderCode[] = - "varying highp vec2 textureCoords;\n" - "uniform sampler2D imageTexture;\n" "uniform lowp vec4 effectColor;\n" - "lowp vec4 srcPixel() {\n" + "mediump vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n" " vec4 src = texture2D(imageTexture, textureCoords);\n" " float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n" " vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n" diff --git a/examples/effects/customshader/customshadereffect.h b/examples/effects/customshader/customshadereffect.h index 6482bd5..610af4b 100644 --- a/examples/effects/customshader/customshadereffect.h +++ b/examples/effects/customshader/customshadereffect.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/customshader/main.cpp b/examples/effects/customshader/main.cpp index b88a51d..b557db6 100644 --- a/examples/effects/customshader/main.cpp +++ b/examples/effects/customshader/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/lighting/lighting.cpp b/examples/effects/lighting/lighting.cpp index 63f0a6c..c9851a5 100644 --- a/examples/effects/lighting/lighting.cpp +++ b/examples/effects/lighting/lighting.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/lighting/lighting.h b/examples/effects/lighting/lighting.h index 70a4d48..1c4553c 100644 --- a/examples/effects/lighting/lighting.h +++ b/examples/effects/lighting/lighting.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/lighting/main.cpp b/examples/effects/lighting/main.cpp index 07415f6..52ede4a 100644 --- a/examples/effects/lighting/main.cpp +++ b/examples/effects/lighting/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/lighting/shadoweffect.cpp b/examples/effects/lighting/shadoweffect.cpp index 8a41aaa..1871b89 100644 --- a/examples/effects/lighting/shadoweffect.cpp +++ b/examples/effects/lighting/shadoweffect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/effects/lighting/shadoweffect.h b/examples/effects/lighting/shadoweffect.h index 7ea409e..3221fd1 100644 --- a/examples/effects/lighting/shadoweffect.h +++ b/examples/effects/lighting/shadoweffect.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/examplebase.pri b/examples/examplebase.pri deleted file mode 100644 index 9f24232..0000000 --- a/examples/examplebase.pri +++ /dev/null @@ -1,12 +0,0 @@ -symbian { - RSS_RULES ="group_name=\"QtExamples\";" - - vendorinfo = \ - "; Localised Vendor name" \ - "%{\"Nokia, Qt\"}" \ - " " \ - "; Unique Vendor name" \ - ":\"Nokia, Qt\"" \ - " " - default_deployment.pkg_prerules += vendorinfo -} diff --git a/examples/examples.pro b/examples/examples.pro index 31a99bf..7acd67b 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -38,8 +38,13 @@ symbian: SUBDIRS = \ uitools \ xml +contains(QT_CONFIG, multimedia) { + SUBDIRS += video + !static: SUBDIRS += multimedia +} + contains(QT_CONFIG, script): SUBDIRS += script -contains(QT_CONFIG, multimedia):!static: SUBDIRS += multimedia + contains(QT_CONFIG, phonon):!static: SUBDIRS += phonon contains(QT_CONFIG, webkit): SUBDIRS += webkit embedded:SUBDIRS += qws @@ -61,4 +66,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES] INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp index 1285e9a..6803d84 100644 --- a/examples/gestures/imageviewer/imagewidget.cpp +++ b/examples/gestures/imageviewer/imagewidget.cpp @@ -44,207 +44,106 @@ #include <QtGui> ImageWidget::ImageWidget(QWidget *parent) - : QWidget(parent) -{ - setAttribute(Qt::WA_AcceptTouchEvents); - setAttribute(Qt::WA_PaintOnScreen); - setAttribute(Qt::WA_OpaquePaintEvent); - setAttribute(Qt::WA_NoSystemBackground); + : QWidget(parent), + position(0), + horizontalOffset(0), + verticalOffset(0), + rotationAngle(0), + scaleFactor(1) +{ setObjectName("ImageWidget"); - setMinimumSize(QSize(100,100)); - position = 0; - zoomed = rotated = false; + setAttribute(Qt::WA_PaintOnScreen); + setAttribute(Qt::WA_OpaquePaintEvent); + setAttribute(Qt::WA_NoSystemBackground); - zoomedIn = false; - horizontalOffset = 0; - verticalOffset = 0; + QGesture *panGesture = new QPanGesture(this); + connect(panGesture, SIGNAL(started()), this, SLOT(panTriggered())); + connect(panGesture, SIGNAL(finished()), this, SLOT(panTriggered())); + connect(panGesture, SIGNAL(cancelled()), this, SLOT(panTriggered())); + connect(panGesture, SIGNAL(triggered()), this, SLOT(panTriggered())); - panGesture = new QPanGesture(this); - connect(panGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered())); + QGesture *pinchGesture = new QPinchGesture(this); + connect(pinchGesture, SIGNAL(started()), this, SLOT(pinchTriggered())); + connect(pinchGesture, SIGNAL(finished()), this, SLOT(pinchTriggered())); + connect(pinchGesture, SIGNAL(cancelled()), this, SLOT(pinchTriggered())); + connect(pinchGesture, SIGNAL(triggered()), this, SLOT(pinchTriggered())); - tapAndHoldGesture = new TapAndHoldGesture(this); - connect(tapAndHoldGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered())); - connect(tapAndHoldGesture, SIGNAL(finished()), this, SLOT(gestureTriggered())); + QGesture *swipeGesture = new QSwipeGesture(this); + connect(swipeGesture, SIGNAL(triggered()), this, SLOT(swipeTriggered())); } void ImageWidget::paintEvent(QPaintEvent*) { QPainter p(this); - if (currentImage.isNull()) { - p.fillRect(geometry(), Qt::white); - return; - } - int hoffset = 0; - int voffset = 0; - const int w = pixmap.width(); - const int h = pixmap.height(); - p.save(); - if (zoomedIn) { - hoffset = horizontalOffset; - voffset = verticalOffset; - if (horizontalOffset > 0) - p.fillRect(0, 0, horizontalOffset, height(), Qt::white); - if (verticalOffset > 0) - p.fillRect(0, 0, width(), verticalOffset, Qt::white); - } - p.drawPixmap(hoffset, voffset, pixmap); - if (hoffset + w < width()) - p.fillRect(hoffset + w, 0, width() - w - hoffset, height(), Qt::white); - if (voffset + h < height()) - p.fillRect(0, voffset + h, width(), height() - h - voffset, Qt::white); - - // paint touch feedback - if (touchFeedback.tapped || touchFeedback.doubleTapped) { - p.setPen(QPen(Qt::gray, 2)); - p.drawEllipse(touchFeedback.position, 5, 5); - if (touchFeedback.doubleTapped) { - p.setPen(QPen(Qt::darkGray, 2, Qt::DotLine)); - p.drawEllipse(touchFeedback.position, 15, 15); - } else if (touchFeedback.tapAndHoldState != 0) { - QPoint pts[8] = { - touchFeedback.position + QPoint( 0, -15), - touchFeedback.position + QPoint( 10, -10), - touchFeedback.position + QPoint( 15, 0), - touchFeedback.position + QPoint( 10, 10), - touchFeedback.position + QPoint( 0, 15), - touchFeedback.position + QPoint(-10, 10), - touchFeedback.position + QPoint(-15, 0) - }; - for (int i = 0; i < touchFeedback.tapAndHoldState/5; ++i) - p.drawEllipse(pts[i], 3, 3); - } - } else if (touchFeedback.sliding) { - p.setPen(QPen(Qt::red, 3)); - QPoint endPos = QPoint(touchFeedback.position.x(), touchFeedback.slidingStartPosition.y()); - p.drawLine(touchFeedback.slidingStartPosition, endPos); - int dx = 10; - if (touchFeedback.slidingStartPosition.x() < endPos.x()) - dx = -1*dx; - p.drawLine(endPos, endPos + QPoint(dx, 5)); - p.drawLine(endPos, endPos + QPoint(dx, -5)); - } + p.fillRect(rect(), Qt::white); - for (int i = 0; i < TouchFeedback::MaximumNumberOfTouches; ++i) { - if (touchFeedback.touches[i].isNull()) - break; - p.drawEllipse(touchFeedback.touches[i], 10, 10); - } - p.restore(); -} + float iw = currentImage.width(); + float ih = currentImage.height(); + float wh = height(); + float ww = width(); -void ImageWidget::mousePressEvent(QMouseEvent *event) -{ - touchFeedback.tapped = true; - touchFeedback.position = event->pos(); + p.translate(ww/2, wh/2); + p.translate(horizontalOffset, verticalOffset); + p.rotate(rotationAngle); + p.scale(scaleFactor, scaleFactor); + p.translate(-iw/2, -ih/2); + p.drawImage(0, 0, currentImage); } -void ImageWidget::mouseDoubleClickEvent(QMouseEvent *event) +void ImageWidget::mouseDoubleClickEvent(QMouseEvent *) { - touchFeedback.doubleTapped = true; - const QPoint p = event->pos(); - touchFeedback.position = p; - horizontalOffset = p.x() - currentImage.width()*1.0*p.x()/width(); - verticalOffset = p.y() - currentImage.height()*1.0*p.y()/height(); - setZoomedIn(!zoomedIn); - zoomed = rotated = false; - updateImage(); - - feedbackFadeOutTimer.start(500, this); + rotationAngle = 0; + scaleFactor = 1; + verticalOffset = 0; + horizontalOffset = 0; + update(); } -void ImageWidget::gestureTriggered() +void ImageWidget::panTriggered() { - if (sender() == panGesture) { - touchFeedback.tapped = false; - touchFeedback.doubleTapped = false; - QPanGesture *pg = qobject_cast<QPanGesture*>(sender()); - if (zoomedIn) { + QPanGesture *pg = qobject_cast<QPanGesture*>(sender()); #ifndef QT_NO_CURSOR - switch (pg->state()) { - case Qt::GestureStarted: - case Qt::GestureUpdated: - setCursor(Qt::SizeAllCursor); - break; - default: - setCursor(Qt::ArrowCursor); - } -#endif - horizontalOffset += pg->lastOffset().width(); - verticalOffset += pg->lastOffset().height(); - } else { - // only slide gesture should be accepted - if (pg->state() == Qt::GestureFinished) { - touchFeedback.sliding = false; - zoomed = rotated = false; - if (pg->totalOffset().width() > 0) - goNextImage(); - else - goPrevImage(); - updateImage(); - } - } - update(); - feedbackFadeOutTimer.start(500, this); - } else if (sender() == tapAndHoldGesture) { - if (tapAndHoldGesture->state() == Qt::GestureFinished) { - qDebug() << "tap and hold detected"; - touchFeedback.reset(); - update(); - - QMenu menu; - menu.addAction("Action 1"); - menu.addAction("Action 2"); - menu.addAction("Action 3"); - menu.exec(mapToGlobal(tapAndHoldGesture->pos())); - } else { - ++touchFeedback.tapAndHoldState; - update(); - } - feedbackFadeOutTimer.start(500, this); + switch (pg->state()) { + case Qt::GestureStarted: + case Qt::GestureUpdated: + setCursor(Qt::SizeAllCursor); + break; + default: + setCursor(Qt::ArrowCursor); } +#endif + horizontalOffset += pg->lastOffset().width(); + verticalOffset += pg->lastOffset().height(); + update(); } -void ImageWidget::gestureFinished() +void ImageWidget::pinchTriggered() { - qDebug() << "gesture finished" << sender(); + QPinchGesture *pg = qobject_cast<QPinchGesture*>(sender()); + rotationAngle += pg->rotationAngle(); + scaleFactor += pg->scaleFactor(); + update(); } -void ImageWidget::gestureCancelled() +void ImageWidget::swipeTriggered() { - qDebug() << "gesture cancelled" << sender(); -} + QSwipeGesture *pg = qobject_cast<QSwipeGesture*>(sender()); + qDebug() << (int) pg->horizontalDirection(); + qDebug() << pg->swipeAngle(); -void ImageWidget::resizeEvent(QResizeEvent*) -{ - updateImage(); + if (pg->horizontalDirection() == QSwipeGesture::Left + || pg->verticalDirection() == QSwipeGesture::Up) + goPrevImage(); + else + goNextImage(); + update(); } -void ImageWidget::updateImage() +void ImageWidget::resizeEvent(QResizeEvent*) { - // should use qtconcurrent here? - transformation = QTransform(); - if (zoomedIn) { - } else { - if (currentImage.isNull()) - return; - if (zoomed) { - transformation = transformation.scale(zoom, zoom); - } else { - double xscale = (double)width()/currentImage.width(); - double yscale = (double)height()/currentImage.height(); - if (xscale < yscale) - yscale = xscale; - else - xscale = yscale; - transformation = transformation.scale(xscale, yscale); - } - if (rotated) - transformation = transformation.rotate(angle); - } - pixmap = QPixmap::fromImage(currentImage).transformed(transformation); update(); } @@ -258,7 +157,7 @@ void ImageWidget::openDirectory(const QString &path) position = 0; goToImage(0); - updateImage(); + update(); } QImage ImageWidget::loadImage(const QString &fileName) @@ -268,6 +167,7 @@ QImage ImageWidget::loadImage(const QString &fileName) qDebug() << fileName << ": can't load image"; return QImage(); } + QImage image; if (!reader.read(&image)) { qDebug() << fileName << ": corrupted image"; @@ -276,15 +176,11 @@ QImage ImageWidget::loadImage(const QString &fileName) return image; } -void ImageWidget::setZoomedIn(bool zoomed) -{ - zoomedIn = zoomed; -} - void ImageWidget::goNextImage() { if (files.isEmpty()) return; + if (position < files.size()-1) { ++position; prevImage = currentImage; @@ -294,14 +190,14 @@ void ImageWidget::goNextImage() else nextImage = QImage(); } - setZoomedIn(false); - updateImage(); + update(); } void ImageWidget::goPrevImage() { if (files.isEmpty()) return; + if (position > 0) { --position; nextImage = currentImage; @@ -311,28 +207,31 @@ void ImageWidget::goPrevImage() else prevImage = QImage(); } - setZoomedIn(false); - updateImage(); + update(); } void ImageWidget::goToImage(int index) { if (files.isEmpty()) return; + if (index < 0 || index >= files.size()) { qDebug() << "goToImage: invalid index: " << index; return; } + if (index == position+1) { goNextImage(); return; } + if (position > 0 && index == position-1) { goPrevImage(); return; } + position = index; - pixmap = QPixmap(); + if (index > 0) prevImage = loadImage(path+QLatin1String("/")+files.at(position-1)); else @@ -342,18 +241,6 @@ void ImageWidget::goToImage(int index) nextImage = loadImage(path+QLatin1String("/")+files.at(position+1)); else nextImage = QImage(); - setZoomedIn(false); - updateImage(); -} - -void ImageWidget::timerEvent(QTimerEvent *event) -{ - if (event->timerId() == touchFeedback.tapTimer.timerId()) { - touchFeedback.tapTimer.stop(); - } else if (event->timerId() == feedbackFadeOutTimer.timerId()) { - feedbackFadeOutTimer.stop(); - touchFeedback.reset(); - } update(); } diff --git a/examples/gestures/imageviewer/imagewidget.h b/examples/gestures/imageviewer/imagewidget.h index 588e59b..b20d8ad 100644 --- a/examples/gestures/imageviewer/imagewidget.h +++ b/examples/gestures/imageviewer/imagewidget.h @@ -44,12 +44,8 @@ #include <QWidget> #include <QImage> -#include <QPixmap> - #include <QtGui> -#include "tapandholdgesture.h" - class ImageWidget : public QWidget { Q_OBJECT @@ -62,74 +58,32 @@ public: protected: void paintEvent(QPaintEvent*); void resizeEvent(QResizeEvent*); - void timerEvent(QTimerEvent*); - void mousePressEvent(QMouseEvent*); void mouseDoubleClickEvent(QMouseEvent*); private slots: - void gestureTriggered(); - void gestureFinished(); - void gestureCancelled(); + void panTriggered(); + void pinchTriggered(); + void swipeTriggered(); private: void updateImage(); QImage loadImage(const QString &fileName); void loadImage(); - void setZoomedIn(bool zoomed); void goNextImage(); void goPrevImage(); void goToImage(int index); - QPanGesture *panGesture; - TapAndHoldGesture *tapAndHoldGesture; - QString path; QStringList files; int position; QImage prevImage, nextImage; QImage currentImage; - QPixmap pixmap; - QTransform transformation; - - bool zoomedIn; - int horizontalOffset; - int verticalOffset; - - bool zoomed; - qreal zoom; - bool rotated; - qreal angle; - - struct TouchFeedback - { - bool tapped; - QPoint position; - bool sliding; - QPoint slidingStartPosition; - QBasicTimer tapTimer; - int tapState; - bool doubleTapped; - int tapAndHoldState; - - enum { MaximumNumberOfTouches = 5 }; - QPoint touches[MaximumNumberOfTouches]; - inline TouchFeedback() { reset(); } - inline void reset() - { - tapped = false; - sliding = false; - tapTimer.stop(); - tapState = 0; - doubleTapped = false; - tapAndHoldState = 0; - for (int i = 0; i < MaximumNumberOfTouches; ++i) { - touches[i] = QPoint(); - } - } - } touchFeedback; - QBasicTimer feedbackFadeOutTimer; + float horizontalOffset; + float verticalOffset; + float rotationAngle; + float scaleFactor; }; #endif diff --git a/examples/gestures/imageviewer/tapandholdgesture.cpp b/examples/gestures/imageviewer/tapandholdgesture.cpp index 27458ce..fffe10f 100644 --- a/examples/gestures/imageviewer/tapandholdgesture.cpp +++ b/examples/gestures/imageviewer/tapandholdgesture.cpp @@ -72,8 +72,6 @@ TapAndHoldGesture::TapAndHoldGesture(QWidget *parent) /*! \internal */ bool TapAndHoldGesture::filterEvent(QEvent *event) { - if (!event->spontaneous()) - return false; const QTouchEvent *ev = static_cast<const QTouchEvent*>(event); switch (event->type()) { case QEvent::TouchBegin: { diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp index 5427bbf..ce6e937 100644 --- a/examples/graphicsview/anchorlayout/main.cpp +++ b/examples/graphicsview/anchorlayout/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QGraphicsWidget> #include <QGraphicsProxyWidget> #include <QGraphicsAnchorLayout> @@ -25,17 +66,17 @@ int main(int argc, char **argv) QGraphicsScene scene; scene.setSceneRect(0, 0, 800, 480); - QSizeF min(30, 100); - QSizeF pref(210, 100); - QSizeF max(300, 100); - - QGraphicsProxyWidget *a = createItem(min, pref, max, "A"); - QGraphicsProxyWidget *b = createItem(min, pref, max, "B"); - QGraphicsProxyWidget *c = createItem(min, pref, max, "C"); - QGraphicsProxyWidget *d = createItem(min, pref, max, "D"); - QGraphicsProxyWidget *e = createItem(min, pref, max, "E"); - QGraphicsProxyWidget *f = createItem(QSizeF(30, 50), QSizeF(150, 50), max, "F"); - QGraphicsProxyWidget *g = createItem(QSizeF(30, 50), QSizeF(30, 100), max, "G"); + QSizeF minSize(30, 100); + QSizeF prefSize(210, 100); + QSizeF maxSize(300, 100); + + QGraphicsProxyWidget *a = createItem(minSize, prefSize, maxSize, "A"); + QGraphicsProxyWidget *b = createItem(minSize, prefSize, maxSize, "B"); + QGraphicsProxyWidget *c = createItem(minSize, prefSize, maxSize, "C"); + QGraphicsProxyWidget *d = createItem(minSize, prefSize, maxSize, "D"); + QGraphicsProxyWidget *e = createItem(minSize, prefSize, maxSize, "E"); + QGraphicsProxyWidget *f = createItem(QSizeF(30, 50), QSizeF(150, 50), maxSize, "F"); + QGraphicsProxyWidget *g = createItem(QSizeF(30, 50), QSizeF(30, 100), maxSize, "G"); QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout; diff --git a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro index 956f5c2..8a6aae1 100644 --- a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro +++ b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro @@ -11,6 +11,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES basicgraphicslayouts.pro sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/basicgraphicslayouts INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A645
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A645 +} diff --git a/examples/graphicsview/collidingmice/collidingmice.pro b/examples/graphicsview/collidingmice/collidingmice.pro index a434efc..e4dc117 100644 --- a/examples/graphicsview/collidingmice/collidingmice.pro +++ b/examples/graphicsview/collidingmice/collidingmice.pro @@ -13,6 +13,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS collidingmice.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/collidingmice INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A643
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A643 +} diff --git a/examples/graphicsview/diagramscene/diagramscene.pro b/examples/graphicsview/diagramscene/diagramscene.pro index 9e90e0d..2021e24 100644 --- a/examples/graphicsview/diagramscene/diagramscene.pro +++ b/examples/graphicsview/diagramscene/diagramscene.pro @@ -18,5 +18,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS diagramscene.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/diagramscene INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/graphicsview/dragdroprobot/dragdroprobot.pro b/examples/graphicsview/dragdroprobot/dragdroprobot.pro index 756a9c8..3d100c0 100644 --- a/examples/graphicsview/dragdroprobot/dragdroprobot.pro +++ b/examples/graphicsview/dragdroprobot/dragdroprobot.pro @@ -17,4 +17,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dragdroprobot.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/dragdroprobot INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/graphicsview/elasticnodes/elasticnodes.pro b/examples/graphicsview/elasticnodes/elasticnodes.pro index 800eaae..ba17386 100644 --- a/examples/graphicsview/elasticnodes/elasticnodes.pro +++ b/examples/graphicsview/elasticnodes/elasticnodes.pro @@ -17,6 +17,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS elasticnodes.pro sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/elasticnodes INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A642
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A642 +} diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro index 95f66b7..0408111 100644 --- a/examples/graphicsview/graphicsview.pro +++ b/examples/graphicsview/graphicsview.pro @@ -19,4 +19,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS graphicsview.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/graphicsview/padnavigator/padnavigator.pro b/examples/graphicsview/padnavigator/padnavigator.pro index 7fa8507..cb09b90 100644 --- a/examples/graphicsview/padnavigator/padnavigator.pro +++ b/examples/graphicsview/padnavigator/padnavigator.pro @@ -23,7 +23,9 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS padnavigator.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/padnavigator INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) CONFIG += console -symbian:TARGET.UID3 = 0xA000A644
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A644 +} diff --git a/examples/graphicsview/portedasteroids/portedasteroids.pro b/examples/graphicsview/portedasteroids/portedasteroids.pro index 99dc042..b28ab54 100644 --- a/examples/graphicsview/portedasteroids/portedasteroids.pro +++ b/examples/graphicsview/portedasteroids/portedasteroids.pro @@ -18,4 +18,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS portedasteroids.pro bg.p sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/portedasteroids INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/graphicsview/portedcanvas/portedcanvas.pro b/examples/graphicsview/portedcanvas/portedcanvas.pro index 7c3946b..850b440 100644 --- a/examples/graphicsview/portedcanvas/portedcanvas.pro +++ b/examples/graphicsview/portedcanvas/portedcanvas.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS portedcanvas.pro *.png * sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/portedcanvas INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/help/contextsensitivehelp/contextsensitivehelp.pro b/examples/help/contextsensitivehelp/contextsensitivehelp.pro index 03a26fa..03b0a8d 100644 --- a/examples/help/contextsensitivehelp/contextsensitivehelp.pro +++ b/examples/help/contextsensitivehelp/contextsensitivehelp.pro @@ -17,4 +17,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.doc doc sources.path = $$[QT_INSTALL_EXAMPLES]/help/contextsensitivehelp INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/help/help.pro b/examples/help/help.pro index 293e511..79b005e 100644 --- a/examples/help/help.pro +++ b/examples/help/help.pro @@ -10,4 +10,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/help INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/help/remotecontrol/remotecontrol.pro b/examples/help/remotecontrol/remotecontrol.pro index e97af6d..5547359 100644 --- a/examples/help/remotecontrol/remotecontrol.pro +++ b/examples/help/remotecontrol/remotecontrol.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.doc doc sources.path = $$[QT_INSTALL_EXAMPLES]/help/remotecontrol INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/help/simpletextviewer/simpletextviewer.pro b/examples/help/simpletextviewer/simpletextviewer.pro index a8504e1..bfbd31b 100644 --- a/examples/help/simpletextviewer/simpletextviewer.pro +++ b/examples/help/simpletextviewer/simpletextviewer.pro @@ -14,5 +14,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/help/simpletextviewer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro index e70fc38..d084498 100644 --- a/examples/ipc/ipc.pro +++ b/examples/ipc/ipc.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ipc.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/ipc INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/ipc/localfortuneclient/localfortuneclient.pro b/examples/ipc/localfortuneclient/localfortuneclient.pro index a394169..a937ea1 100644 --- a/examples/ipc/localfortuneclient/localfortuneclient.pro +++ b/examples/ipc/localfortuneclient/localfortuneclient.pro @@ -9,6 +9,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS localfortuneclient.pro sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneclient INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/ipc/localfortuneserver/localfortuneserver.pro b/examples/ipc/localfortuneserver/localfortuneserver.pro index db20791..e14ec8e 100644 --- a/examples/ipc/localfortuneserver/localfortuneserver.pro +++ b/examples/ipc/localfortuneserver/localfortuneserver.pro @@ -9,6 +9,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS localfortuneserver.pro sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneserver INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/ipc/sharedmemory/sharedmemory.pro b/examples/ipc/sharedmemory/sharedmemory.pro index 4dad1d1..37ac2c8 100644 --- a/examples/ipc/sharedmemory/sharedmemory.pro +++ b/examples/ipc/sharedmemory/sharedmemory.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/sharedmemory INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/addressbook/addressbook.pro b/examples/itemviews/addressbook/addressbook.pro index a03e3b6..b53a1cf 100644 --- a/examples/itemviews/addressbook/addressbook.pro +++ b/examples/itemviews/addressbook/addressbook.pro @@ -16,6 +16,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES addressbook.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/addressbook INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A646
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A646 +} diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro index a2c8751..1daba5d 100644 --- a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro +++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/basicsortfiltermodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/chart/chart.pro b/examples/itemviews/chart/chart.pro index 3290170..8568181 100644 --- a/examples/itemviews/chart/chart.pro +++ b/examples/itemviews/chart/chart.pro @@ -14,6 +14,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.cht sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/chart INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A647 +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A647 +} diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro index f668e6a..934d880 100644 --- a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro +++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/coloreditorfactory INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro index 091cd9d..df32a2b 100644 --- a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro +++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/customsortfiltermodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/dirview/dirview.pro b/examples/itemviews/dirview/dirview.pro index 77290a8..3197000 100644 --- a/examples/itemviews/dirview/dirview.pro +++ b/examples/itemviews/dirview/dirview.pro @@ -6,4 +6,4 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/dirview INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.pro b/examples/itemviews/editabletreemodel/editabletreemodel.pro index 4213cd7..d9ce803 100644 --- a/examples/itemviews/editabletreemodel/editabletreemodel.pro +++ b/examples/itemviews/editabletreemodel/editabletreemodel.pro @@ -15,4 +15,4 @@ sources.files = $$FORMS $$HEADERS $$RESOURCES $$SOURCES *.pro *.txt sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/editabletreemodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/itemviews.pro b/examples/itemviews/itemviews.pro index 253549f..56eeee1 100644 --- a/examples/itemviews/itemviews.pro +++ b/examples/itemviews/itemviews.pro @@ -26,4 +26,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro index 8a139d4..a41d906 100644 --- a/examples/itemviews/pixelator/pixelator.pro +++ b/examples/itemviews/pixelator/pixelator.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/pixelator INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro index de17a69..b1c490a 100644 --- a/examples/itemviews/puzzle/puzzle.pro +++ b/examples/itemviews/puzzle/puzzle.pro @@ -13,7 +13,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince* { DEPLOYMENT_PLUGIN += qjpeg qgif qtiff diff --git a/examples/itemviews/simpledommodel/simpledommodel.pro b/examples/itemviews/simpledommodel/simpledommodel.pro index cc7b4de..c0c4b1d 100644 --- a/examples/itemviews/simpledommodel/simpledommodel.pro +++ b/examples/itemviews/simpledommodel/simpledommodel.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpledommodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.pro b/examples/itemviews/simpletreemodel/simpletreemodel.pro index b1dd37a..4f0e7c4 100644 --- a/examples/itemviews/simpletreemodel/simpletreemodel.pro +++ b/examples/itemviews/simpletreemodel/simpletreemodel.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.txt sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpletreemodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro index 8bbfef9..67eaf11 100644 --- a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro +++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simplewidgetmapper INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro index 31b55d4..42e957b 100644 --- a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro +++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/spinboxdelegate INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/stardelegate/stardelegate.pro b/examples/itemviews/stardelegate/stardelegate.pro index a55b55d..5b5c10b 100644 --- a/examples/itemviews/stardelegate/stardelegate.pro +++ b/examples/itemviews/stardelegate/stardelegate.pro @@ -12,5 +12,5 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/stardelegate INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/layouts/basiclayouts/basiclayouts.pro b/examples/layouts/basiclayouts/basiclayouts.pro index 4ffc8c0..95e6ec4 100644 --- a/examples/layouts/basiclayouts/basiclayouts.pro +++ b/examples/layouts/basiclayouts/basiclayouts.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/basiclayouts INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/layouts/borderlayout/borderlayout.pro b/examples/layouts/borderlayout/borderlayout.pro index 18b5e6c..e7214d9 100644 --- a/examples/layouts/borderlayout/borderlayout.pro +++ b/examples/layouts/borderlayout/borderlayout.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/borderlayout INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.pro b/examples/layouts/dynamiclayouts/dynamiclayouts.pro index dce1e29..58e6d79 100644 --- a/examples/layouts/dynamiclayouts/dynamiclayouts.pro +++ b/examples/layouts/dynamiclayouts/dynamiclayouts.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/dynamiclayouts INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/layouts/flowlayout/flowlayout.pro b/examples/layouts/flowlayout/flowlayout.pro index ece314f..40ff447 100644 --- a/examples/layouts/flowlayout/flowlayout.pro +++ b/examples/layouts/flowlayout/flowlayout.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/flowlayout INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/layouts/layouts.pro b/examples/layouts/layouts.pro index 81c15f2..d84e721 100644 --- a/examples/layouts/layouts.pro +++ b/examples/layouts/layouts.pro @@ -9,4 +9,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/layouts INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/linguist/arrowpad/arrowpad.pro b/examples/linguist/arrowpad/arrowpad.pro index 7e409a6..0a463d3 100644 --- a/examples/linguist/arrowpad/arrowpad.pro +++ b/examples/linguist/arrowpad/arrowpad.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/arrowpad INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/linguist/hellotr/hellotr.pro b/examples/linguist/hellotr/hellotr.pro index ecd480b..7a930ff 100644 --- a/examples/linguist/hellotr/hellotr.pro +++ b/examples/linguist/hellotr/hellotr.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/linguist/linguist.pro b/examples/linguist/linguist.pro index ad3f772..2b7515a 100644 --- a/examples/linguist/linguist.pro +++ b/examples/linguist/linguist.pro @@ -8,4 +8,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/linguist INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/linguist/trollprint/trollprint.pro b/examples/linguist/trollprint/trollprint.pro index 27cb38e..0ec64b0 100644 --- a/examples/linguist/trollprint/trollprint.pro +++ b/examples/linguist/trollprint/trollprint.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$TRANSLATIONS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/trollprint INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/mainwindows/application/application.pro b/examples/mainwindows/application/application.pro index fc022fc..0851f72 100644 --- a/examples/mainwindows/application/application.pro +++ b/examples/mainwindows/application/application.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS application.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/application INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro index ea8594d..a196587 100644 --- a/examples/mainwindows/dockwidgets/dockwidgets.pro +++ b/examples/mainwindows/dockwidgets/dockwidgets.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES dockwidgets.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/dockwidgets INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/mainwindows/mainwindows.pro b/examples/mainwindows/mainwindows.pro index e310e3d..661b741 100644 --- a/examples/mainwindows/mainwindows.pro +++ b/examples/mainwindows/mainwindows.pro @@ -16,4 +16,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mainwindows.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/mainwindows/mdi/mdi.pro b/examples/mainwindows/mdi/mdi.pro index b0db42c..8d859b0 100644 --- a/examples/mainwindows/mdi/mdi.pro +++ b/examples/mainwindows/mdi/mdi.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mdi.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/mdi INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/mainwindows/menus/menus.pro b/examples/mainwindows/menus/menus.pro index 8cf60bf..5ac5b34 100644 --- a/examples/mainwindows/menus/menus.pro +++ b/examples/mainwindows/menus/menus.pro @@ -8,6 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS menus.pro sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/menus INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000CF66
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000CF66 +} diff --git a/examples/mainwindows/recentfiles/recentfiles.pro b/examples/mainwindows/recentfiles/recentfiles.pro index 8f7ddaf..9724b77 100644 --- a/examples/mainwindows/recentfiles/recentfiles.pro +++ b/examples/mainwindows/recentfiles/recentfiles.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS recentfiles.pro sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/recentfiles INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/mainwindows/sdi/sdi.pro b/examples/mainwindows/sdi/sdi.pro index c033e19..5707c41 100644 --- a/examples/mainwindows/sdi/sdi.pro +++ b/examples/mainwindows/sdi/sdi.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS sdi.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/sdi INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.pro b/examples/network/blockingfortuneclient/blockingfortuneclient.pro index 96fbc1f..5840d30 100644 --- a/examples/network/blockingfortuneclient/blockingfortuneclient.pro +++ b/examples/network/blockingfortuneclient/blockingfortuneclient.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS blockingfortuneclient.pr sources.path = $$[QT_INSTALL_EXAMPLES]/network/blockingfortuneclient INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/broadcastreceiver/broadcastreceiver.pro b/examples/network/broadcastreceiver/broadcastreceiver.pro index 36ad096..0778f96 100644 --- a/examples/network/broadcastreceiver/broadcastreceiver.pro +++ b/examples/network/broadcastreceiver/broadcastreceiver.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastreceiver.pro sources.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastreceiver INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/broadcastsender/broadcastsender.pro b/examples/network/broadcastsender/broadcastsender.pro index 84e6593..6415706 100644 --- a/examples/network/broadcastsender/broadcastsender.pro +++ b/examples/network/broadcastsender/broadcastsender.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastsender.pro sources.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastsender INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/download/download.pro b/examples/network/download/download.pro index f0db340..432998d 100644 --- a/examples/network/download/download.pro +++ b/examples/network/download/download.pro @@ -18,4 +18,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/network/download INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/downloadmanager/downloadmanager.pro b/examples/network/downloadmanager/downloadmanager.pro index ef7052c..8d91cf0 100644 --- a/examples/network/downloadmanager/downloadmanager.pro +++ b/examples/network/downloadmanager/downloadmanager.pro @@ -19,4 +19,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/network/downloadmanager INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro index 4765208..d7ad9d5 100644 --- a/examples/network/fortuneclient/fortuneclient.pro +++ b/examples/network/fortuneclient/fortuneclient.pro @@ -9,9 +9,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fortuneclient.pro sources.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneclient INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h LIBS += -lesock TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData" diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro index ea37b58..0a132a5 100644 --- a/examples/network/fortuneserver/fortuneserver.pro +++ b/examples/network/fortuneserver/fortuneserver.pro @@ -9,12 +9,11 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fortuneserver.pro sources.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneserver INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h LIBS += -lesock TARGET.UID3 = 0xA000CF71 TARGET.CAPABILITY = "All -TCB" TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 -}
\ No newline at end of file +} diff --git a/examples/network/ftp/ftp.pro b/examples/network/ftp/ftp.pro index 0ddcb6c..73eb716 100644 --- a/examples/network/ftp/ftp.pro +++ b/examples/network/ftp/ftp.pro @@ -10,12 +10,11 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ftp.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/network/ftp INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += sym_iap_util.h INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.CAPABILITY="NetworkServices ReadUserData WriteUserData" TARGET.UID3 = 0xA000A648 LIBS+=-lesock -lcommdb -linsock # For IAP selection -}
\ No newline at end of file +} diff --git a/examples/network/http/http.pro b/examples/network/http/http.pro index 99aa717..2b702ea 100644 --- a/examples/network/http/http.pro +++ b/examples/network/http/http.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS http.pro sources.path = $$[QT_INSTALL_EXAMPLES]/network/http INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp index f1b7cda..6d10fad 100644 --- a/examples/network/http/main.cpp +++ b/examples/network/http/main.cpp @@ -46,6 +46,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); + qWarning("The usage of QHttp is not recommended anymore, please use QNetworkAccessManager."); HttpWindow httpWin; httpWin.show(); return httpWin.exec(); diff --git a/examples/network/loopback/loopback.pro b/examples/network/loopback/loopback.pro index 0a09e34..cf6a0f3 100644 --- a/examples/network/loopback/loopback.pro +++ b/examples/network/loopback/loopback.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS loopback.pro sources.path = $$[QT_INSTALL_EXAMPLES]/network/loopback INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro index 5ba2289..99e82ae 100644 --- a/examples/network/network-chat/network-chat.pro +++ b/examples/network/network-chat/network-chat.pro @@ -18,9 +18,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS network-chat.pro *.chat sources.path = $$[QT_INSTALL_EXAMPLES]/network/network-chat INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h LIBS += -lesock -lconnmon -lcharconv -linsock TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData" diff --git a/examples/network/network.pro b/examples/network/network.pro index 99c778c..38cdae8 100644 --- a/examples/network/network.pro +++ b/examples/network/network.pro @@ -25,4 +25,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS network.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/network INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/securesocketclient/securesocketclient.pro b/examples/network/securesocketclient/securesocketclient.pro index 2e9141d..48c8e0d 100644 --- a/examples/network/securesocketclient/securesocketclient.pro +++ b/examples/network/securesocketclient/securesocketclient.pro @@ -15,6 +15,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.jpg images sources.path = $$[QT_INSTALL_EXAMPLES]/network/securesocketclient INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000CF67
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000CF67 +} diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.pro b/examples/network/threadedfortuneserver/threadedfortuneserver.pro index 94543bf..7853d57 100644 --- a/examples/network/threadedfortuneserver/threadedfortuneserver.pro +++ b/examples/network/threadedfortuneserver/threadedfortuneserver.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS threadedfortuneserver.pr sources.path = $$[QT_INSTALL_EXAMPLES]/network/threadedfortuneserver INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/network/torrent/main.cpp b/examples/network/torrent/main.cpp index e2ecacf..1b66d0e 100644 --- a/examples/network/torrent/main.cpp +++ b/examples/network/torrent/main.cpp @@ -46,6 +46,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); + qWarning("The usage of QHttp is not recommended anymore, please use QNetworkAccessManager."); qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); Q_INIT_RESOURCE(icons); diff --git a/examples/network/torrent/torrent.pro b/examples/network/torrent/torrent.pro index bfd5767..7665455 100644 --- a/examples/network/torrent/torrent.pro +++ b/examples/network/torrent/torrent.pro @@ -36,4 +36,4 @@ sources.files += icons forms 3rdparty sources.path = $$[QT_INSTALL_EXAMPLES]/network/torrent INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/2dpainting/2dpainting.pro b/examples/opengl/2dpainting/2dpainting.pro index 01df1da..80c865c 100644 --- a/examples/opengl/2dpainting/2dpainting.pro +++ b/examples/opengl/2dpainting/2dpainting.pro @@ -16,4 +16,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS 2dpainting.pro sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/2dpainting INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/framebufferobject/bubbles.svg b/examples/opengl/framebufferobject/bubbles.svg index 65867da..5173012 100644 --- a/examples/opengl/framebufferobject/bubbles.svg +++ b/examples/opengl/framebufferobject/bubbles.svg @@ -72,7 +72,7 @@ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse" cx="0" cy="0" r="100" fx="-50" fy="50"> <stop offset="0%" stop-color="black" stop-opacity="1.0" /> - <stop offset="100%" stop-color="white" stop-opacity="0.0" /> + <stop offset="100%" stop-color="black" stop-opacity="0.0" /> </radialGradient> <!-- Define a shadow for each sphere. --> @@ -91,56 +91,56 @@ <g transform="translate(200,700)"> <use xlink:href="#bubble" fill="url(#blueBubble)" /> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(315,700)"> <g transform="scale(0.5,0.5)"> <use xlink:href="#bubble" fill="url(#redBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(80,700)"> <g transform="scale(0.65,0.65)"> <use xlink:href="#bubble" fill="url(#greenBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(255,700)"> <g transform="scale(0.3,0.3)"> <use xlink:href="#bubble" fill="url(#yellowBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(565,700)"> <g transform="scale(0.4,0.4)"> <use xlink:href="#bubble" fill="url(#blueBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(715,700)"> <g transform="scale(0.6,0.6)"> <use xlink:href="#bubble" fill="url(#redBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(645,700)"> <g transform="scale(0.375,0.375)"> <use xlink:href="#bubble" fill="url(#greenBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(555,700)"> <g transform="scale(0.9,0.9)"> <use xlink:href="#bubble" fill="url(#yellowBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" /> </g> @@ -148,28 +148,28 @@ <g transform="scale(0.5,0.5)"> <use xlink:href="#bubble" fill="url(#blueBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(215,700)"> <g transform="scale(0.45,0.45)"> <use xlink:href="#bubble" fill="url(#redBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(420,700)"> <g transform="scale(0.75,0.75)"> <use xlink:href="#bubble" fill="url(#greenBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(815,700)"> <g transform="scale(0.6,0.6)"> <use xlink:href="#bubble" fill="url(#yellowBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" /> </g> @@ -186,7 +186,7 @@ <circle fill="#a6ce39" cx="0" cy="0" r="33" /> <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10 L -11,22 L -1,12 Z" /> - <animateTransform attributeName="transform" type="rotate" values="0; 360" + <animateTransform attributeName="transform" type="rotate" additive="sum" values="0; 360" begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(200,375)"> diff --git a/examples/opengl/framebufferobject/framebufferobject.pro b/examples/opengl/framebufferobject/framebufferobject.pro index a5927ec..f9ee7e7 100644 --- a/examples/opengl/framebufferobject/framebufferobject.pro +++ b/examples/opengl/framebufferobject/framebufferobject.pro @@ -20,5 +20,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.png *.svg sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/framebufferobject2/framebufferobject2.pro b/examples/opengl/framebufferobject2/framebufferobject2.pro index 076f98c..094ad80 100644 --- a/examples/opengl/framebufferobject2/framebufferobject2.pro +++ b/examples/opengl/framebufferobject2/framebufferobject2.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES framebufferobject2.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject2 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/framebufferobject2/glwidget.cpp b/examples/opengl/framebufferobject2/glwidget.cpp index 71f46fa..8159d9d 100644 --- a/examples/opengl/framebufferobject2/glwidget.cpp +++ b/examples/opengl/framebufferobject2/glwidget.cpp @@ -208,7 +208,7 @@ void GLWidget::paintGL() for (int y = 0; y < 5; ++y) { for (int x = 0; x < 5; ++x) { glTranslatef(2.0f, 0, 0); - glColor4f(0.8, 0.8, 0.8, 1.0); + glColor4f(0.8f, 0.8f, 0.8f, 1.0f); glDrawArrays(GL_QUADS, 0, 4); } glTranslatef(-10.0f, 2.0f, 0); diff --git a/examples/opengl/grabber/grabber.pro b/examples/opengl/grabber/grabber.pro index 23a0c4a..daa32b3 100644 --- a/examples/opengl/grabber/grabber.pro +++ b/examples/opengl/grabber/grabber.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grabber.pro sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/grabber INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/hellogl/hellogl.pro b/examples/opengl/hellogl/hellogl.pro index 77034cc..6d57c19 100644 --- a/examples/opengl/hellogl/hellogl.pro +++ b/examples/opengl/hellogl/hellogl.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl.pro sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp index 9a2a83e..50a7797 100644 --- a/examples/opengl/hellogl_es2/glwidget.cpp +++ b/examples/opengl/hellogl_es2/glwidget.cpp @@ -266,7 +266,7 @@ void GLWidget::paintGL() QPainter painter; painter.begin(this); - painter.paintEngine()->syncState(); + painter.beginNativePainting(); glClearColor(0.1f, 0.1f, 0.2f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -302,6 +302,8 @@ void GLWidget::paintGL() glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); + painter.endNativePainting(); + if (m_showBubbles) foreach (Bubble *bubble, bubbles) { bubble->drawBubble(&painter); diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro index 7b76d86..567eb7b 100644 --- a/examples/opengl/opengl.pro +++ b/examples/opengl/opengl.pro @@ -28,4 +28,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/opengl INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp index a6e6195..cad591f 100644 --- a/examples/opengl/overpainting/glwidget.cpp +++ b/examples/opengl/overpainting/glwidget.cpp @@ -166,6 +166,11 @@ void GLWidget::paintEvent(QPaintEvent *event) //! [7] //! [8] + glShadeModel(GL_FLAT); + glDisable(GL_CULL_FACE); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_MODELVIEW); glPopMatrix(); //! [8] diff --git a/examples/opengl/overpainting/overpainting.pro b/examples/opengl/overpainting/overpainting.pro index 3603260..10b6bd3 100644 --- a/examples/opengl/overpainting/overpainting.pro +++ b/examples/opengl/overpainting/overpainting.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS overpainting.pro sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/overpainting INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/pbuffers/glwidget.cpp b/examples/opengl/pbuffers/glwidget.cpp index d3f76d7..0073973 100644 --- a/examples/opengl/pbuffers/glwidget.cpp +++ b/examples/opengl/pbuffers/glwidget.cpp @@ -154,7 +154,7 @@ void GLWidget::paintGL() for (int y = 0; y < 5; ++y) { for (int x = 0; x < 5; ++x) { glTranslatef(2.0f, 0, 0); - glColor4f(0.8, 0.8, 0.8, 1.0); + glColor4f(0.8f, 0.8f, 0.8f, 1.0f); glDrawArrays(GL_QUADS, 0, 4); } glTranslatef(-10.0f, 2.0f, 0); diff --git a/examples/opengl/pbuffers/pbuffers.pro b/examples/opengl/pbuffers/pbuffers.pro index 72f20f8..4f7740e 100644 --- a/examples/opengl/pbuffers/pbuffers.pro +++ b/examples/opengl/pbuffers/pbuffers.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES pbuffers.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/pbuffers2/bubbles.svg b/examples/opengl/pbuffers2/bubbles.svg index 65867da..5173012 100644 --- a/examples/opengl/pbuffers2/bubbles.svg +++ b/examples/opengl/pbuffers2/bubbles.svg @@ -72,7 +72,7 @@ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse" cx="0" cy="0" r="100" fx="-50" fy="50"> <stop offset="0%" stop-color="black" stop-opacity="1.0" /> - <stop offset="100%" stop-color="white" stop-opacity="0.0" /> + <stop offset="100%" stop-color="black" stop-opacity="0.0" /> </radialGradient> <!-- Define a shadow for each sphere. --> @@ -91,56 +91,56 @@ <g transform="translate(200,700)"> <use xlink:href="#bubble" fill="url(#blueBubble)" /> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(315,700)"> <g transform="scale(0.5,0.5)"> <use xlink:href="#bubble" fill="url(#redBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(80,700)"> <g transform="scale(0.65,0.65)"> <use xlink:href="#bubble" fill="url(#greenBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(255,700)"> <g transform="scale(0.3,0.3)"> <use xlink:href="#bubble" fill="url(#yellowBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(565,700)"> <g transform="scale(0.4,0.4)"> <use xlink:href="#bubble" fill="url(#blueBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(715,700)"> <g transform="scale(0.6,0.6)"> <use xlink:href="#bubble" fill="url(#redBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(645,700)"> <g transform="scale(0.375,0.375)"> <use xlink:href="#bubble" fill="url(#greenBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(555,700)"> <g transform="scale(0.9,0.9)"> <use xlink:href="#bubble" fill="url(#yellowBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" /> </g> @@ -148,28 +148,28 @@ <g transform="scale(0.5,0.5)"> <use xlink:href="#bubble" fill="url(#blueBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(215,700)"> <g transform="scale(0.45,0.45)"> <use xlink:href="#bubble" fill="url(#redBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(420,700)"> <g transform="scale(0.75,0.75)"> <use xlink:href="#bubble" fill="url(#greenBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(815,700)"> <g transform="scale(0.6,0.6)"> <use xlink:href="#bubble" fill="url(#yellowBubble)" /> </g> - <animateTransform attributeName="transform" type="translate" + <animateTransform attributeName="transform" type="translate" additive="sum" values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" /> </g> @@ -186,7 +186,7 @@ <circle fill="#a6ce39" cx="0" cy="0" r="33" /> <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10 L -11,22 L -1,12 Z" /> - <animateTransform attributeName="transform" type="rotate" values="0; 360" + <animateTransform attributeName="transform" type="rotate" additive="sum" values="0; 360" begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" /> </g> <g transform="translate(200,375)"> diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro index 7f12483..ec718e5 100644 --- a/examples/opengl/pbuffers2/pbuffers2.pro +++ b/examples/opengl/pbuffers2/pbuffers2.pro @@ -20,4 +20,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES pbuffers2.pro *.png *.svg sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers2 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/samplebuffers/samplebuffers.pro b/examples/opengl/samplebuffers/samplebuffers.pro index de09a71..232c1f4 100644 --- a/examples/opengl/samplebuffers/samplebuffers.pro +++ b/examples/opengl/samplebuffers/samplebuffers.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS samplebuffers.pro sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/samplebuffers INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/opengl/textures/textures.pro b/examples/opengl/textures/textures.pro index 086c9ac..8d6cc4e 100644 --- a/examples/opengl/textures/textures.pro +++ b/examples/opengl/textures/textures.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS textures.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/openvg/star/starwidget.cpp b/examples/openvg/star/starwidget.cpp index 1a64fc9..ab11bdb 100644 --- a/examples/openvg/star/starwidget.cpp +++ b/examples/openvg/star/starwidget.cpp @@ -91,7 +91,7 @@ void StarWidget::paintEvent(QPaintEvent *) // Flush the state changes to the OpenVG implementation // and prepare to perform raw OpenVG calls. - painter.paintEngine()->syncState(); + painter.beginNativePainting(); // Cache the path if we haven't already. if (path == VG_INVALID_HANDLE) { @@ -109,7 +109,7 @@ void StarWidget::paintEvent(QPaintEvent *) vgDrawPath(path, VG_FILL_PATH | VG_STROKE_PATH); // Restore normal QPainter operations. - painter.paintEngine()->syncState(); + painter.endNativePainting(); painter.end(); } diff --git a/examples/painting/basicdrawing/basicdrawing.pro b/examples/painting/basicdrawing/basicdrawing.pro index df845d9..ea23706 100644 --- a/examples/painting/basicdrawing/basicdrawing.pro +++ b/examples/painting/basicdrawing/basicdrawing.pro @@ -11,6 +11,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS basicdrawing.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/painting/basicdrawing INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A649
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A649 +} diff --git a/examples/painting/concentriccircles/concentriccircles.pro b/examples/painting/concentriccircles/concentriccircles.pro index bf8398f..a8d2c36 100644 --- a/examples/painting/concentriccircles/concentriccircles.pro +++ b/examples/painting/concentriccircles/concentriccircles.pro @@ -10,6 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS concentriccircles.pro sources.path = $$[QT_INSTALL_EXAMPLES]/painting/concentriccircles INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A64A
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A64A +} diff --git a/examples/painting/fontsampler/fontsampler.pro b/examples/painting/fontsampler/fontsampler.pro index bc7e0a2..1bb2f1d 100644 --- a/examples/painting/fontsampler/fontsampler.pro +++ b/examples/painting/fontsampler/fontsampler.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fontsampler.pro sources.path = $$[QT_INSTALL_EXAMPLES]/painting/fontsampler INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/painting/imagecomposition/imagecomposition.pro b/examples/painting/imagecomposition/imagecomposition.pro index 66fcf6a..fe29a8a 100644 --- a/examples/painting/imagecomposition/imagecomposition.pro +++ b/examples/painting/imagecomposition/imagecomposition.pro @@ -9,6 +9,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES images *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/painting/imagecomposition INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A64B
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A64B +} diff --git a/examples/painting/painterpaths/painterpaths.pro b/examples/painting/painterpaths/painterpaths.pro index fbf2ba9..1d981bb 100644 --- a/examples/painting/painterpaths/painterpaths.pro +++ b/examples/painting/painterpaths/painterpaths.pro @@ -11,6 +11,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS painterpaths.pro sources.path = $$[QT_INSTALL_EXAMPLES]/painting/painterpaths INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A64C +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A64C +} diff --git a/examples/painting/painting.pro b/examples/painting/painting.pro index 59ca54e..229c1be 100644 --- a/examples/painting/painting.pro +++ b/examples/painting/painting.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS painting.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/painting INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/painting/svgviewer/files/bubbles.svg b/examples/painting/svgviewer/files/bubbles.svg index 9fae8cc..5173012 100644 --- a/examples/painting/svgviewer/files/bubbles.svg +++ b/examples/painting/svgviewer/files/bubbles.svg @@ -72,7 +72,7 @@ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse" cx="0" cy="0" r="100" fx="-50" fy="50"> <stop offset="0%" stop-color="black" stop-opacity="1.0" /> - <stop offset="100%" stop-color="white" stop-opacity="0.0" /> + <stop offset="100%" stop-color="black" stop-opacity="0.0" /> </radialGradient> <!-- Define a shadow for each sphere. --> diff --git a/examples/painting/svgviewer/svgviewer.pro b/examples/painting/svgviewer/svgviewer.pro index ea77946..583d51c 100644 --- a/examples/painting/svgviewer/svgviewer.pro +++ b/examples/painting/svgviewer/svgviewer.pro @@ -16,8 +16,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES svgviewer.pro files sources.path = $$[QT_INSTALL_EXAMPLES]/painting/svgviewer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - wince*: { addFiles.sources = files\*.svg addFiles.path = \My Documents @@ -25,6 +23,7 @@ wince*: { } symbian: { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) TARGET.UID3 = 0xA000A64E addFiles.sources = files\*.svg addFiles.path = . diff --git a/examples/painting/transformations/transformations.pro b/examples/painting/transformations/transformations.pro index 6e4fe4f..9e225a4 100644 --- a/examples/painting/transformations/transformations.pro +++ b/examples/painting/transformations/transformations.pro @@ -10,6 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS transformations.pro sources.path = $$[QT_INSTALL_EXAMPLES]/painting/transformations INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A64D
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A64D +} diff --git a/examples/phonon/phonon.pro b/examples/phonon/phonon.pro index 7bb5822..0ddf767 100644 --- a/examples/phonon/phonon.pro +++ b/examples/phonon/phonon.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS phonon.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/phonon INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro index 180571c..c70013d 100644 --- a/examples/qtconcurrent/imagescaling/imagescaling.pro +++ b/examples/qtconcurrent/imagescaling/imagescaling.pro @@ -12,6 +12,6 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro index cc80704..e0b87f4 100644 --- a/examples/qtconcurrent/map/map.pro +++ b/examples/qtconcurrent/map/map.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/map INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtconcurrent/progressdialog/progressdialog.pro b/examples/qtconcurrent/progressdialog/progressdialog.pro index aa6a118..ffdb4c7 100644 --- a/examples/qtconcurrent/progressdialog/progressdialog.pro +++ b/examples/qtconcurrent/progressdialog/progressdialog.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/progressdialog INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro index a30c0bd..1157d25 100644 --- a/examples/qtconcurrent/qtconcurrent.pro +++ b/examples/qtconcurrent/qtconcurrent.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtconcurrent.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro index 58a1375..d312e2b 100644 --- a/examples/qtconcurrent/runfunction/runfunction.pro +++ b/examples/qtconcurrent/runfunction/runfunction.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/runfunction INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro index 581e6c7..8cd0392 100644 --- a/examples/qtconcurrent/wordcount/wordcount.pro +++ b/examples/qtconcurrent/wordcount/wordcount.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/wordcount INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtestlib/qtestlib.pro b/examples/qtestlib/qtestlib.pro index 70115e2..79bed8c 100644 --- a/examples/qtestlib/qtestlib.pro +++ b/examples/qtestlib/qtestlib.pro @@ -7,4 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtestlib.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qtestlib/tutorial1/tutorial1.pro b/examples/qtestlib/tutorial1/tutorial1.pro index 5191a3d..bcce234 100644 --- a/examples/qtestlib/tutorial1/tutorial1.pro +++ b/examples/qtestlib/tutorial1/tutorial1.pro @@ -7,6 +7,7 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial1 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C60B
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C60B +} diff --git a/examples/qtestlib/tutorial2/tutorial2.pro b/examples/qtestlib/tutorial2/tutorial2.pro index ae66cac..bcfe940 100644 --- a/examples/qtestlib/tutorial2/tutorial2.pro +++ b/examples/qtestlib/tutorial2/tutorial2.pro @@ -7,6 +7,7 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial2 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C60C
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C60C +} diff --git a/examples/qtestlib/tutorial3/tutorial3.pro b/examples/qtestlib/tutorial3/tutorial3.pro index 9fdda2a..fed5064 100644 --- a/examples/qtestlib/tutorial3/tutorial3.pro +++ b/examples/qtestlib/tutorial3/tutorial3.pro @@ -7,6 +7,7 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial3 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C60D
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C60D +} diff --git a/examples/qtestlib/tutorial4/tutorial4.pro b/examples/qtestlib/tutorial4/tutorial4.pro index 4cb7bf8..00c2147 100644 --- a/examples/qtestlib/tutorial4/tutorial4.pro +++ b/examples/qtestlib/tutorial4/tutorial4.pro @@ -7,6 +7,7 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial4 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C60E
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C60E +} diff --git a/examples/qtestlib/tutorial5/tutorial5.pro b/examples/qtestlib/tutorial5/tutorial5.pro index f988904..4fdcec9 100644 --- a/examples/qtestlib/tutorial5/tutorial5.pro +++ b/examples/qtestlib/tutorial5/tutorial5.pro @@ -7,6 +7,7 @@ sources.files = $$SOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial5 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C60F
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C60F +} diff --git a/examples/qws/framebuffer/framebuffer.pro b/examples/qws/framebuffer/framebuffer.pro index 0379908..3fd0975 100644 --- a/examples/qws/framebuffer/framebuffer.pro +++ b/examples/qws/framebuffer/framebuffer.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS framebuffer.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qws/framebuffer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qws/mousecalibration/mousecalibration.pro b/examples/qws/mousecalibration/mousecalibration.pro index 6f60b6d..fc1c469 100644 --- a/examples/qws/mousecalibration/mousecalibration.pro +++ b/examples/qws/mousecalibration/mousecalibration.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qws/mousecalibration INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/qws/qws.pro b/examples/qws/qws.pro index 34b1d2c..48c59c1 100644 --- a/examples/qws/qws.pro +++ b/examples/qws/qws.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qws INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/richtext/calendar/calendar.pro b/examples/richtext/calendar/calendar.pro index fb85d96..efb99b4 100644 --- a/examples/richtext/calendar/calendar.pro +++ b/examples/richtext/calendar/calendar.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendar.pro sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/calendar INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro index 3875ea0..dee2855 100644 --- a/examples/richtext/orderform/orderform.pro +++ b/examples/richtext/orderform/orderform.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS orderform.pro sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/orderform INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/richtext/richtext.pro b/examples/richtext/richtext.pro index d48602e..1440de2 100644 --- a/examples/richtext/richtext.pro +++ b/examples/richtext/richtext.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS richtext.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/richtext INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro index 4b90aa3..0574b2d 100644 --- a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro +++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro @@ -10,7 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS syntaxhighlighter.pro ex sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/syntaxhighlighter INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: { addFiles.sources = main.cpp mainwindow.cpp diff --git a/examples/script/calculator/calculator.pro b/examples/script/calculator/calculator.pro index 734078c..6385d7e 100644 --- a/examples/script/calculator/calculator.pro +++ b/examples/script/calculator/calculator.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.js *.ui sources.path = $$[QT_INSTALL_EXAMPLES]/script/calculator INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/script/context2d/context2d.pro b/examples/script/context2d/context2d.pro index be14272..301c227 100644 --- a/examples/script/context2d/context2d.pro +++ b/examples/script/context2d/context2d.pro @@ -22,11 +22,11 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS context2d.pro scripts sources.path = $$[QT_INSTALL_EXAMPLES]/script/context2d INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) symbian:{ + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) TARGET.UID3 = 0xA000C608 TARGET.EPOCHEAPSIZE = 0x200000 0xA00000 contextScripts.path = . contextScripts.sources = scripts DEPLOYMENT += contextScripts -}
\ No newline at end of file +} diff --git a/examples/script/context2d/window.cpp b/examples/script/context2d/window.cpp index d70a4f1..ede36cb 100644 --- a/examples/script/context2d/window.cpp +++ b/examples/script/context2d/window.cpp @@ -66,8 +66,10 @@ static QString scriptsDir() //! [0] Window::Window(QWidget *parent) - : QWidget(parent), - m_debugger(0), m_debugWindow(0) + : QWidget(parent) +#ifndef QT_NO_SCRIPTTOOLS + , m_debugger(0), m_debugWindow(0) +#endif { m_env = new Environment(this); QObject::connect(m_env, SIGNAL(scriptError(QScriptValue)), diff --git a/examples/script/customclass/customclass.pro b/examples/script/customclass/customclass.pro index bb263d2..3302d54 100644 --- a/examples/script/customclass/customclass.pro +++ b/examples/script/customclass/customclass.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.pri sources.path = $$[QT_INSTALL_EXAMPLES]/script/customclass INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/script/defaultprototypes/defaultprototypes.pro b/examples/script/defaultprototypes/defaultprototypes.pro index 21328e6..7cf44d2 100644 --- a/examples/script/defaultprototypes/defaultprototypes.pro +++ b/examples/script/defaultprototypes/defaultprototypes.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.js defaultprototypes.p sources.path = $$[QT_INSTALL_EXAMPLES]/script/defaultprototypes INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/script/helloscript/helloscript.pro b/examples/script/helloscript/helloscript.pro index 5b04f84..850629e 100644 --- a/examples/script/helloscript/helloscript.pro +++ b/examples/script/helloscript/helloscript.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS helloscript.pro sources.path = $$[QT_INSTALL_EXAMPLES]/script/helloscript INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/script/marshal/marshal.pro b/examples/script/marshal/marshal.pro index 69fc578..4a1fc27 100644 --- a/examples/script/marshal/marshal.pro +++ b/examples/script/marshal/marshal.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS marshal.pro sources.path = $$[QT_INSTALL_EXAMPLES]/script/marshal INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/script/qscript/qscript.pro b/examples/script/qscript/qscript.pro index 3c03545..4f33459 100644 --- a/examples/script/qscript/qscript.pro +++ b/examples/script/qscript/qscript.pro @@ -13,4 +13,4 @@ sources.files = $$RESOURCES $$FORMS main.cpp qscript.pro sources.path = $$[QT_INSTALL_EXAMPLES]/script/qscript INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/script/script.pro b/examples/script/script.pro index c5a37ef..5f3d04a 100644 --- a/examples/script/script.pro +++ b/examples/script/script.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS script.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/script INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/sql/cachedtable/cachedtable.pro b/examples/sql/cachedtable/cachedtable.pro index 89e97ae..288ec28 100644 --- a/examples/sql/cachedtable/cachedtable.pro +++ b/examples/sql/cachedtable/cachedtable.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS cachedtable.pro sources.path = $$[QT_INSTALL_EXAMPLES]/sql/cachedtable INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/sql/drilldown/drilldown.pro b/examples/sql/drilldown/drilldown.pro index 1d0714b..b6de511 100644 --- a/examples/sql/drilldown/drilldown.pro +++ b/examples/sql/drilldown/drilldown.pro @@ -15,6 +15,7 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS drilldown.pro *.png *.jpg imag sources.path = $$[QT_INSTALL_EXAMPLES]/sql/drilldown INSTALLS += target sources -symbian:TARGET.UID3 = 0xA000C612 - -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C612 +} diff --git a/examples/sql/masterdetail/masterdetail.pro b/examples/sql/masterdetail/masterdetail.pro index 2363e54..89e7e73 100644 --- a/examples/sql/masterdetail/masterdetail.pro +++ b/examples/sql/masterdetail/masterdetail.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS masterdetail.pro *.xml images sources.path = $$[QT_INSTALL_EXAMPLES]/sql/masterdetail INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/sql/querymodel/querymodel.pro b/examples/sql/querymodel/querymodel.pro index f20898c..32c217d 100644 --- a/examples/sql/querymodel/querymodel.pro +++ b/examples/sql/querymodel/querymodel.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS querymodel.pro sources.path = $$[QT_INSTALL_EXAMPLES]/sql/querymodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.pro b/examples/sql/relationaltablemodel/relationaltablemodel.pro index e57729e..32c04b6 100644 --- a/examples/sql/relationaltablemodel/relationaltablemodel.pro +++ b/examples/sql/relationaltablemodel/relationaltablemodel.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS relationaltablemodel.pro sources.path = $$[QT_INSTALL_EXAMPLES]/sql/relationaltablemodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro index 7bdff69..644e2c7 100644 --- a/examples/sql/sql.pro +++ b/examples/sql/sql.pro @@ -15,4 +15,4 @@ sources.files = connection.h sql.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/sql INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/sql/tablemodel/tablemodel.pro b/examples/sql/tablemodel/tablemodel.pro index 7adf40c..700029c 100644 --- a/examples/sql/tablemodel/tablemodel.pro +++ b/examples/sql/tablemodel/tablemodel.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS tablemodel.pro sources.path = $$[QT_INSTALL_EXAMPLES]/sql/tablemodel INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri new file mode 100644 index 0000000..59c5480 --- /dev/null +++ b/examples/symbianpkgrules.pri @@ -0,0 +1,13 @@ +!symbian: error(Only include this file for Symbian platforms) + +RSS_RULES ="group_name=\"QtExamples\";" + +vendorinfo = \ + "; Localised Vendor name" \ + "%{\"Nokia, Qt\"}" \ + " " \ + "; Unique Vendor name" \ + ":\"Nokia, Qt\"" \ + " " + +default_deployment.pkg_prerules += vendorinfo diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro index cf95ea0..ecbec56 100644 --- a/examples/threads/mandelbrot/mandelbrot.pro +++ b/examples/threads/mandelbrot/mandelbrot.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mandelbrot.pro sources.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/threads/semaphores/semaphores.pro b/examples/threads/semaphores/semaphores.pro index 5331383..85f7311 100644 --- a/examples/threads/semaphores/semaphores.pro +++ b/examples/threads/semaphores/semaphores.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS semaphores.pro sources.path = $$[QT_INSTALL_EXAMPLES]/threads/semaphores INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/threads/threads.pro b/examples/threads/threads.pro index a0e69c8..93d8cc8 100644 --- a/examples/threads/threads.pro +++ b/examples/threads/threads.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS threads.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/threads INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro index 49fe318..b07b413 100644 --- a/examples/threads/waitconditions/waitconditions.pro +++ b/examples/threads/waitconditions/waitconditions.pro @@ -19,4 +19,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS waitconditions.pro sources.path = $$[QT_INSTALL_EXAMPLES]/threads/waitconditions INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/codecs/codecs.pro b/examples/tools/codecs/codecs.pro index 7cc0ae8..0c06997 100644 --- a/examples/tools/codecs/codecs.pro +++ b/examples/tools/codecs/codecs.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS encodedfiles codecs.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/completer/completer.pro b/examples/tools/completer/completer.pro index 4f31454..96d3734 100644 --- a/examples/tools/completer/completer.pro +++ b/examples/tools/completer/completer.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS completer.pro resources sources.path = $$[QT_INSTALL_EXAMPLES]/tools/completer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/customcompleter/customcompleter.pro b/examples/tools/customcompleter/customcompleter.pro index 8a11cf1..5ab7849 100644 --- a/examples/tools/customcompleter/customcompleter.pro +++ b/examples/tools/customcompleter/customcompleter.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customcompleter.pro reso sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/echoplugin/echoplugin.pro b/examples/tools/echoplugin/echoplugin.pro index 6146b49..700e9e0 100644 --- a/examples/tools/echoplugin/echoplugin.pro +++ b/examples/tools/echoplugin/echoplugin.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS echoplugin.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/echoplugin/echowindow/echowindow.pro b/examples/tools/echoplugin/echowindow/echowindow.pro index 142438b..bdf8c41 100644 --- a/examples/tools/echoplugin/echowindow/echowindow.pro +++ b/examples/tools/echoplugin/echowindow/echowindow.pro @@ -17,4 +17,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS echowindow.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/echowindow INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/echoplugin/plugin/plugin.pro b/examples/tools/echoplugin/plugin/plugin.pro index d943425..cfc8a5f 100644 --- a/examples/tools/echoplugin/plugin/plugin.pro +++ b/examples/tools/echoplugin/plugin/plugin.pro @@ -14,6 +14,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/plugin INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) symbian:TARGET.EPOCALLOWDLLDATA = 1 diff --git a/examples/tools/i18n/i18n.pro b/examples/tools/i18n/i18n.pro index a065611..69d7f04 100644 --- a/examples/tools/i18n/i18n.pro +++ b/examples/tools/i18n/i18n.pro @@ -25,4 +25,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES translations i18n.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/i18n INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/inputpanel/inputpanel.pro b/examples/tools/inputpanel/inputpanel.pro new file mode 100644 index 0000000..3b3767f --- /dev/null +++ b/examples/tools/inputpanel/inputpanel.pro @@ -0,0 +1,17 @@ +SOURCES += main.cpp \ + myinputpanel.cpp \ + myinputpanelcontext.cpp + +HEADERS += myinputpanel.h \ + myinputpanelcontext.h + +FORMS += mainform.ui \ + myinputpanelform.ui + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tools/inputpanel +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS inputpanel.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tools/inputpanel +INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/inputpanel/main.cpp b/examples/tools/inputpanel/main.cpp new file mode 100644 index 0000000..2e39883 --- /dev/null +++ b/examples/tools/inputpanel/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui/QApplication> +#include <QtGui/QWidget> + +//! [main] +#include "myinputpanelcontext.h" +#include "ui_mainform.h" + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + MyInputPanelContext *ic = new MyInputPanelContext; + app.setInputContext(ic); + + QWidget widget; + Ui::MainForm form; + form.setupUi(&widget); + widget.show(); + return app.exec(); +} +//! [main] diff --git a/examples/tools/inputpanel/mainform.ui b/examples/tools/inputpanel/mainform.ui new file mode 100644 index 0000000..c16ae31 --- /dev/null +++ b/examples/tools/inputpanel/mainform.ui @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainForm</class> + <widget class="QWidget" name="MainForm"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>140</width> + <height>200</height> + </rect> + </property> + <property name="windowTitle"> + <string>Input Panel Example</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>My age:</string> + </property> + <property name="alignment"> + <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> + </property> + <property name="buddy"> + <cstring>lineEdit</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit"/> + </item> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>My phone number:</string> + </property> + <property name="alignment"> + <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> + </property> + <property name="buddy"> + <cstring>lineEdit_2</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_2"/> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>My gender:</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QRadioButton" name="radioButton"> + <property name="text"> + <string>Male</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="radioButton_2"> + <property name="text"> + <string>Female</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/examples/tools/inputpanel/myinputpanel.cpp b/examples/tools/inputpanel/myinputpanel.cpp new file mode 100644 index 0000000..c44ead8 --- /dev/null +++ b/examples/tools/inputpanel/myinputpanel.cpp @@ -0,0 +1,134 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "myinputpanel.h" + +//! [0] + +MyInputPanel::MyInputPanel() + : QWidget(0, Qt::Tool | Qt::WindowStaysOnTopHint), + lastFocusedWidget(0) +{ + form.setupUi(this); + + connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), + this, SLOT(saveFocusWidget(QWidget *, QWidget *))); + + signalMapper.setMapping(form.panelButton_1, form.panelButton_1); + signalMapper.setMapping(form.panelButton_2, form.panelButton_2); + signalMapper.setMapping(form.panelButton_3, form.panelButton_3); + signalMapper.setMapping(form.panelButton_4, form.panelButton_4); + signalMapper.setMapping(form.panelButton_5, form.panelButton_5); + signalMapper.setMapping(form.panelButton_6, form.panelButton_6); + signalMapper.setMapping(form.panelButton_7, form.panelButton_7); + signalMapper.setMapping(form.panelButton_8, form.panelButton_8); + signalMapper.setMapping(form.panelButton_9, form.panelButton_9); + signalMapper.setMapping(form.panelButton_star, form.panelButton_star); + signalMapper.setMapping(form.panelButton_0, form.panelButton_0); + signalMapper.setMapping(form.panelButton_hash, form.panelButton_hash); + + connect(form.panelButton_1, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_2, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_3, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_4, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_5, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_6, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_7, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_8, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_9, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_star, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_0, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + connect(form.panelButton_hash, SIGNAL(clicked()), + &signalMapper, SLOT(map())); + + connect(&signalMapper, SIGNAL(mapped(QWidget *)), + this, SLOT(buttonClicked(QWidget *))); +} + +//! [0] + +bool MyInputPanel::event(QEvent *e) +{ + switch (e->type()) { +//! [1] + case QEvent::WindowActivate: + if (lastFocusedWidget) + lastFocusedWidget->activateWindow(); + break; +//! [1] + default: + break; + } + + return QWidget::event(e); +} + +//! [2] + +void MyInputPanel::saveFocusWidget(QWidget * /*oldFocus*/, QWidget *newFocus) +{ + if (newFocus != 0 && !this->isAncestorOf(newFocus)) { + lastFocusedWidget = newFocus; + } +} + +//! [2] + +//! [3] + +void MyInputPanel::buttonClicked(QWidget *w) +{ + QChar chr = qvariant_cast<QChar>(w->property("buttonValue")); + emit characterGenerated(chr); +} + +//! [3] diff --git a/examples/tools/inputpanel/myinputpanel.h b/examples/tools/inputpanel/myinputpanel.h new file mode 100644 index 0000000..5f91c05 --- /dev/null +++ b/examples/tools/inputpanel/myinputpanel.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYINPUTPANEL_H +#define MYINPUTPANEL_H + +#include <QtGui> +#include <QtCore> + +#include "ui_myinputpanelform.h" + +//! [0] + +class MyInputPanel : public QWidget +{ + Q_OBJECT + +public: + MyInputPanel(); + +signals: + void characterGenerated(QChar character); + +protected: + bool event(QEvent *e); + +private slots: + void saveFocusWidget(QWidget *oldFocus, QWidget *newFocus); + void buttonClicked(QWidget *w); + +private: + Ui::MyInputPanelForm form; + QWidget *lastFocusedWidget; + QSignalMapper signalMapper; +}; + +//! [0] + +#endif // MYINPUTPANEL_H diff --git a/examples/tools/inputpanel/myinputpanelcontext.cpp b/examples/tools/inputpanel/myinputpanelcontext.cpp new file mode 100644 index 0000000..dc31028 --- /dev/null +++ b/examples/tools/inputpanel/myinputpanelcontext.cpp @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore> + +#include "myinputpanelcontext.h" + +//! [0] + +MyInputPanelContext::MyInputPanelContext() +{ + inputPanel = new MyInputPanel; + connect(inputPanel, SIGNAL(characterGenerated(QChar)), SLOT(sendCharacter(QChar))); +} + +//! [0] + +MyInputPanelContext::~MyInputPanelContext() +{ + delete inputPanel; +} + +//! [1] + +bool MyInputPanelContext::filterEvent(const QEvent* event) +{ + if (event->type() == QEvent::RequestSoftwareInputPanel) { + updatePosition(); + inputPanel->show(); + return true; + } else if (event->type() == QEvent::CloseSoftwareInputPanel) { + inputPanel->hide(); + return true; + } + return false; +} + +//! [1] + +QString MyInputPanelContext::identifierName() +{ + return "MyInputPanelContext"; +} + +void MyInputPanelContext::reset() +{ +} + +bool MyInputPanelContext::isComposing() const +{ + return false; +} + +QString MyInputPanelContext::language() +{ + return "en_US"; +} + +//! [2] + +void MyInputPanelContext::sendCharacter(QChar character) +{ + QPointer<QWidget> w = focusWidget(); + + if (!w) + return; + + QKeyEvent keyPress(QEvent::KeyPress, character.unicode(), Qt::NoModifier, QString(character)); + QApplication::sendEvent(w, &keyPress); + + if (!w) + return; + + QKeyEvent keyRelease(QEvent::KeyPress, character.unicode(), Qt::NoModifier, QString()); + QApplication::sendEvent(w, &keyRelease); +} + +//! [2] + +//! [3] + +void MyInputPanelContext::updatePosition() +{ + QWidget *widget = focusWidget(); + if (!widget) + return; + + QRect widgetRect = widget->rect(); + QPoint panelPos = QPoint(widgetRect.left(), widgetRect.bottom() + 2); + panelPos = widget->mapToGlobal(panelPos); + inputPanel->move(panelPos); +} + +//! [3] diff --git a/examples/tools/inputpanel/myinputpanelcontext.h b/examples/tools/inputpanel/myinputpanelcontext.h new file mode 100644 index 0000000..d711800 --- /dev/null +++ b/examples/tools/inputpanel/myinputpanelcontext.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MYINPUTPANELCONTEXT_H +#define MYINPUTPANELCONTEXT_H + +#include <QtGui/QInputContext> + +#include "myinputpanel.h" + +class MyInputPanel; + +//! [0] + +class MyInputPanelContext : public QInputContext +{ + Q_OBJECT + +public: + MyInputPanelContext(); + ~MyInputPanelContext(); + + bool filterEvent(const QEvent* event); + + QString identifierName(); + QString language(); + + bool isComposing() const; + + void reset(); + +private slots: + void sendCharacter(QChar character); + +private: + void updatePosition(); + +private: + MyInputPanel *inputPanel; +}; + +//! [0] + +#endif // MYINPUTPANELCONTEXT_H diff --git a/examples/tools/inputpanel/myinputpanelform.ui b/examples/tools/inputpanel/myinputpanelform.ui new file mode 100644 index 0000000..fe78442 --- /dev/null +++ b/examples/tools/inputpanel/myinputpanelform.ui @@ -0,0 +1,398 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MyInputPanelForm</class> + <widget class="QWidget" name="MyInputPanelForm"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>167</width> + <height>233</height> + </rect> + </property> + <property name="windowTitle"> + <string>Input Panel</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QPushButton" name="panelButton_1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>1</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>49</unicode> + </char> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="panelButton_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>2</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>50</unicode> + </char> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QPushButton" name="panelButton_3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>3</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>51</unicode> + </char> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QPushButton" name="panelButton_4"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>4</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>52</unicode> + </char> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="panelButton_5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>5</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>53</unicode> + </char> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="panelButton_6"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>6</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>54</unicode> + </char> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QPushButton" name="panelButton_7"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>7</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>55</unicode> + </char> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="panelButton_8"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>8</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>56</unicode> + </char> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QPushButton" name="panelButton_9"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>9</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>57</unicode> + </char> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QPushButton" name="panelButton_star"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>*</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>42</unicode> + </char> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="panelButton_0"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>0</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>48</unicode> + </char> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QPushButton" name="panelButton_hash"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>#</string> + </property> + <property name="buttonValue" stdset="0"> + <char> + <unicode>35</unicode> + </char> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="closeButton"> + <property name="font"> + <font> + <pointsize>8</pointsize> + </font> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>Close</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>closeButton</sender> + <signal>clicked()</signal> + <receiver>MyInputPanelForm</receiver> + <slot>hide()</slot> + <hints> + <hint type="sourcelabel"> + <x>114</x> + <y>209</y> + </hint> + <hint type="destinationlabel"> + <x>83</x> + <y>116</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/examples/tools/plugandpaint/plugandpaint.pro b/examples/tools/plugandpaint/plugandpaint.pro index fef1b86..9616eb8 100644 --- a/examples/tools/plugandpaint/plugandpaint.pro +++ b/examples/tools/plugandpaint/plugandpaint.pro @@ -25,4 +25,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugandpaint.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/plugandpaintplugins/basictools/basictools.pro b/examples/tools/plugandpaintplugins/basictools/basictools.pro index f9cd4a6..0ab9d90 100644 --- a/examples/tools/plugandpaintplugins/basictools/basictools.pro +++ b/examples/tools/plugandpaintplugins/basictools/basictools.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS basictools.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins/basictools INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro index 7fbb6d1..e480dc1 100644 --- a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro +++ b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro @@ -14,6 +14,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extrafilters.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins/extrafilters INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) symbian:TARGET.EPOCALLOWDLLDATA = 1 diff --git a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro index ccc042c..e157b66 100644 --- a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro +++ b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugandpaintplugins.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/regexp/regexp.pro b/examples/tools/regexp/regexp.pro index bbb3fd3..35756da 100644 --- a/examples/tools/regexp/regexp.pro +++ b/examples/tools/regexp/regexp.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS regexp.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/regexp INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/settingseditor/settingseditor.pro b/examples/tools/settingseditor/settingseditor.pro index c6838bc..2ebdfe6 100644 --- a/examples/tools/settingseditor/settingseditor.pro +++ b/examples/tools/settingseditor/settingseditor.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS settingseditor.pro inifi sources.path = $$[QT_INSTALL_EXAMPLES]/tools/settingseditor INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/styleplugin/plugin/plugin.pro b/examples/tools/styleplugin/plugin/plugin.pro index 2a36d51..7cb0c97 100644 --- a/examples/tools/styleplugin/plugin/plugin.pro +++ b/examples/tools/styleplugin/plugin/plugin.pro @@ -20,6 +20,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/plugin INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) symbian:TARGET.EPOCALLOWDLLDATA = 1 diff --git a/examples/tools/styleplugin/styleplugin.pro b/examples/tools/styleplugin/styleplugin.pro index 74f77b5..1b9831e 100644 --- a/examples/tools/styleplugin/styleplugin.pro +++ b/examples/tools/styleplugin/styleplugin.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS styleplugin.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.pro b/examples/tools/styleplugin/stylewindow/stylewindow.pro index df68168..8ed1541 100644 --- a/examples/tools/styleplugin/stylewindow/stylewindow.pro +++ b/examples/tools/styleplugin/stylewindow/stylewindow.pro @@ -16,4 +16,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stylewindow.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/stylewindow INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro index b1509dc..08d44e3 100644 --- a/examples/tools/tools.pro +++ b/examples/tools/tools.pro @@ -5,6 +5,7 @@ SUBDIRS = codecs \ customcompleter \ echoplugin \ i18n \ + inputpanel \ contiguouscache \ plugandpaintplugins \ plugandpaint \ @@ -22,4 +23,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tools.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/tools INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.pro b/examples/tools/treemodelcompleter/treemodelcompleter.pro index ef5c0cb..39c83f3 100644 --- a/examples/tools/treemodelcompleter/treemodelcompleter.pro +++ b/examples/tools/treemodelcompleter/treemodelcompleter.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS treemodelcompleter.pro r sources.path = $$[QT_INSTALL_EXAMPLES]/tools/treemodelcompleter INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tools/undoframework/undoframework.pro b/examples/tools/undoframework/undoframework.pro index f797eb5..5b7b666 100644 --- a/examples/tools/undoframework/undoframework.pro +++ b/examples/tools/undoframework/undoframework.pro @@ -15,4 +15,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS undoframework.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/tools/undoframework INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/addressbook.pro b/examples/tutorials/addressbook/addressbook.pro index 8e98593..70abcbb 100644 --- a/examples/tutorials/addressbook/addressbook.pro +++ b/examples/tutorials/addressbook/addressbook.pro @@ -7,4 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS addressbook.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part1/part1.pro b/examples/tutorials/addressbook/part1/part1.pro index 505f814..03d7f14 100644 --- a/examples/tutorials/addressbook/part1/part1.pro +++ b/examples/tutorials/addressbook/part1/part1.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part2/part2.pro b/examples/tutorials/addressbook/part2/part2.pro index fdc0079..e540b0b 100644 --- a/examples/tutorials/addressbook/part2/part2.pro +++ b/examples/tutorials/addressbook/part2/part2.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part2.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part2 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part3/part3.pro b/examples/tutorials/addressbook/part3/part3.pro index 6e33cb8..35bfac9 100644 --- a/examples/tutorials/addressbook/part3/part3.pro +++ b/examples/tutorials/addressbook/part3/part3.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part3.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part3 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part4/part4.pro b/examples/tutorials/addressbook/part4/part4.pro index 0cfb546..7187d0d 100644 --- a/examples/tutorials/addressbook/part4/part4.pro +++ b/examples/tutorials/addressbook/part4/part4.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part4.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part4 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part5/part5.pro b/examples/tutorials/addressbook/part5/part5.pro index 92e3d51..e7b7199 100644 --- a/examples/tutorials/addressbook/part5/part5.pro +++ b/examples/tutorials/addressbook/part5/part5.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part5.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part5 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part6/part6.pro b/examples/tutorials/addressbook/part6/part6.pro index 1b57b16..f6ba411 100644 --- a/examples/tutorials/addressbook/part6/part6.pro +++ b/examples/tutorials/addressbook/part6/part6.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part6.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part6 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/addressbook/part7/part7.pro b/examples/tutorials/addressbook/part7/part7.pro index fc47fae..d2b089e 100644 --- a/examples/tutorials/addressbook/part7/part7.pro +++ b/examples/tutorials/addressbook/part7/part7.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part7.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part7 INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tutorials/tutorials.pro b/examples/tutorials/tutorials.pro index 427dc03..949fdf6 100644 --- a/examples/tutorials/tutorials.pro +++ b/examples/tutorials/tutorials.pro @@ -7,4 +7,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials INSTALLS += sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/uitools/multipleinheritance/multipleinheritance.pro b/examples/uitools/multipleinheritance/multipleinheritance.pro index 5340ac5..e8f59fb 100644 --- a/examples/uitools/multipleinheritance/multipleinheritance.pro +++ b/examples/uitools/multipleinheritance/multipleinheritance.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/uitools/multipleinheritance INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/uitools/textfinder/textfinder.pro b/examples/uitools/textfinder/textfinder.pro index f4f14e1..91df91d 100644 --- a/examples/uitools/textfinder/textfinder.pro +++ b/examples/uitools/textfinder/textfinder.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro forms sources.path = $$[QT_INSTALL_EXAMPLES]/uitools/textfinder INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/uitools/uitools.pro b/examples/uitools/uitools.pro index 78c15fa..4a643e6 100644 --- a/examples/uitools/uitools.pro +++ b/examples/uitools/uitools.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS uitools.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/uitools INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/video/video.pro b/examples/video/video.pro new file mode 100644 index 0000000..f0b63b6 --- /dev/null +++ b/examples/video/video.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs + +SUBDIRS += \ + videographicsitem \ + videowidget + diff --git a/examples/video/videographicsitem/main.cpp b/examples/video/videographicsitem/main.cpp new file mode 100644 index 0000000..b80ac47 --- /dev/null +++ b/examples/video/videographicsitem/main.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videoplayer.h" + +#include <QtGui/QApplication> + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + VideoPlayer player; + player.show(); + + return app.exec(); +} + diff --git a/examples/video/videographicsitem/videographicsitem.pro b/examples/video/videographicsitem/videographicsitem.pro new file mode 100644 index 0000000..7e0b4c5 --- /dev/null +++ b/examples/video/videographicsitem/videographicsitem.pro @@ -0,0 +1,16 @@ +QT += multimedia + +contains(QT_CONFIG, opengl): QT += opengl + +HEADERS += videoplayer.h \ + videoitem.h + +SOURCES += main.cpp \ + videoplayer.cpp \ + videoitem.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/video/videographicsitem +sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png images +sources.path = $$[QT_INSTALL_EXAMPLES]/video/videographicsitem +INSTALLS += target sources diff --git a/examples/video/videographicsitem/videoitem.cpp b/examples/video/videographicsitem/videoitem.cpp new file mode 100644 index 0000000..6c17d6a --- /dev/null +++ b/examples/video/videographicsitem/videoitem.cpp @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videoitem.h" + +#include <QtMultimedia> + +VideoItem::VideoItem(QGraphicsItem *parent) + : QGraphicsItem(parent) + , imageFormat(QImage::Format_Invalid) + , framePainted(false) +{ +} + +VideoItem::~VideoItem() +{ +} + +QRectF VideoItem::boundingRect() const +{ + return QRectF(QPointF(0,0), surfaceFormat().sizeHint()); +} + +void VideoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + if (currentFrame.map(QAbstractVideoBuffer::ReadOnly)) { + const QTransform oldTransform = painter->transform(); + + if (surfaceFormat().scanLineDirection() == QVideoSurfaceFormat::BottomToTop) { + painter->scale(1, -1); + painter->translate(0, -boundingRect().height()); + } + + painter->drawImage(boundingRect(), QImage( + currentFrame.bits(), + imageSize.width(), + imageSize.height(), + imageFormat)); + + painter->setTransform(oldTransform); + + framePainted = true; + + currentFrame.unmap(); + } +} + +QList<QVideoFrame::PixelFormat> VideoItem::supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType) const +{ + if (handleType == QAbstractVideoBuffer::NoHandle) { + return QList<QVideoFrame::PixelFormat>() + << QVideoFrame::Format_RGB32 + << QVideoFrame::Format_ARGB32 + << QVideoFrame::Format_ARGB32_Premultiplied + << QVideoFrame::Format_RGB565 + << QVideoFrame::Format_RGB555; + } else { + return QList<QVideoFrame::PixelFormat>(); + } +} + +bool VideoItem::start(const QVideoSurfaceFormat &format) +{ + if (isFormatSupported(format)) { + imageFormat = QVideoFrame::equivalentImageFormat(format.pixelFormat()); + imageSize = format.frameSize(); + framePainted = true; + + QAbstractVideoSurface::start(format); + + prepareGeometryChange(); + + return true; + } else { + return false; + } +} + +void VideoItem::stop() +{ + currentFrame = QVideoFrame(); + framePainted = false; + + QAbstractVideoSurface::stop(); +} + +bool VideoItem::present(const QVideoFrame &frame) +{ + if (!framePainted) { + if (!isStarted()) + setError(StoppedError); + + return false; + } else { + currentFrame = frame; + framePainted = false; + + update(); + + return true; + } +} diff --git a/examples/video/videographicsitem/videoitem.h b/examples/video/videographicsitem/videoitem.h new file mode 100644 index 0000000..868cd54 --- /dev/null +++ b/examples/video/videographicsitem/videoitem.h @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VIDEOITEM_H +#define VIDEOITEM_H + +#include <QtMultimedia/QAbstractVideoSurface> +#include <QtGui/QGraphicsItem> + +class VideoItem + : public QAbstractVideoSurface, + public QGraphicsItem +{ + Q_OBJECT +public: + explicit VideoItem(QGraphicsItem *parentItem = 0); + ~VideoItem(); + + QRectF boundingRect() const; + void paint( + QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); + + //video surface + QList<QVideoFrame::PixelFormat> supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; + + bool start(const QVideoSurfaceFormat &format); + void stop(); + bool present(const QVideoFrame &frame); + +private: + QImage::Format imageFormat; + QSize imageSize; + + QVideoFrame currentFrame; + bool framePainted; +}; + +#endif + diff --git a/examples/video/videographicsitem/videoplayer.cpp b/examples/video/videographicsitem/videoplayer.cpp new file mode 100644 index 0000000..85a5527 --- /dev/null +++ b/examples/video/videographicsitem/videoplayer.cpp @@ -0,0 +1,210 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videoplayer.h" +#include "videoitem.h" + +#include <QtMultimedia> + +#ifndef QT_NO_OPENGL +# include <QtOpenGL/QGLWidget> +#endif + +VideoPlayer::VideoPlayer(QWidget *parent, Qt::WindowFlags flags) + : QWidget(parent, flags) + , videoItem(0) + , playButton(0) + , positionSlider(0) +{ + connect(&movie, SIGNAL(stateChanged(QMovie::MovieState)), + this, SLOT(movieStateChanged(QMovie::MovieState))); + connect(&movie, SIGNAL(frameChanged(int)), + this, SLOT(frameChanged(int))); + + videoItem = new VideoItem; + + QGraphicsScene *scene = new QGraphicsScene(this); + QGraphicsView *graphicsView = new QGraphicsView(scene); + +#ifndef QT_NO_OPENGL + graphicsView->setViewport(new QGLWidget); +#endif + + scene->addItem(videoItem); + + QSlider *rotateSlider = new QSlider(Qt::Horizontal); + rotateSlider->setRange(-180, 180); + rotateSlider->setValue(0); + + connect(rotateSlider, SIGNAL(valueChanged(int)), + this, SLOT(rotateVideo(int))); + + QAbstractButton *openButton = new QPushButton(tr("Open...")); + connect(openButton, SIGNAL(clicked()), this, SLOT(openFile())); + + playButton = new QPushButton; + playButton->setEnabled(false); + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + + connect(playButton, SIGNAL(clicked()), + this, SLOT(play())); + + positionSlider = new QSlider(Qt::Horizontal); + positionSlider->setRange(0, 0); + + connect(positionSlider, SIGNAL(sliderMoved(int)), + this, SLOT(setPosition(int))); + + connect(&movie, SIGNAL(frameChanged(int)), + positionSlider, SLOT(setValue(int))); + + QBoxLayout *controlLayout = new QHBoxLayout; + controlLayout->setMargin(0); + controlLayout->addWidget(openButton); + controlLayout->addWidget(playButton); + controlLayout->addWidget(positionSlider); + + QBoxLayout *layout = new QVBoxLayout; + layout->addWidget(graphicsView); + layout->addWidget(rotateSlider); + layout->addLayout(controlLayout); + + setLayout(layout); +} + +VideoPlayer::~VideoPlayer() +{ +} + +void VideoPlayer::openFile() +{ + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + + if (!fileName.isEmpty()) { + if (videoItem->isStarted()) + videoItem->stop(); + + movie.setFileName(fileName); + + playButton->setEnabled(true); + positionSlider->setMaximum(movie.frameCount()); + + movie.jumpToFrame(0); + } +} + +void VideoPlayer::play() +{ + switch(movie.state()) { + case QMovie::NotRunning: + movie.start(); + break; + case QMovie::Paused: + movie.setPaused(false); + break; + case QMovie::Running: + movie.setPaused(true); + break; + } +} + +void VideoPlayer::movieStateChanged(QMovie::MovieState state) +{ + switch(state) { + case QMovie::NotRunning: + case QMovie::Paused: + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + break; + case QMovie::Running: + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause)); + break; + } +} + +void VideoPlayer::frameChanged(int frame) +{ + if (!presentImage(movie.currentImage())) { + movie.stop(); + playButton->setEnabled(false); + positionSlider->setMaximum(0); + } else { + positionSlider->setValue(frame); + } +} + +void VideoPlayer::setPosition(int frame) +{ + movie.jumpToFrame(frame); +} + +void VideoPlayer::rotateVideo(int angle) +{ + //rotate around the center of video element + qreal x = videoItem->boundingRect().width() / 2.0; + qreal y = videoItem->boundingRect().height() / 2.0; + videoItem->setTransform(QTransform().translate(x, y).rotate(angle).translate(-x, -y)); +} + +bool VideoPlayer::presentImage(const QImage &image) +{ + QVideoFrame frame(image); + + if (!frame.isValid()) + return false; + + QVideoSurfaceFormat currentFormat = videoItem->surfaceFormat(); + + if (frame.pixelFormat() != currentFormat.pixelFormat() + || frame.size() != currentFormat.frameSize()) { + QVideoSurfaceFormat format(frame.size(), frame.pixelFormat()); + + if (!videoItem->start(format)) + return false; + } + + if (!videoItem->present(frame)) { + videoItem->stop(); + + return false; + } else { + return true; + } +} diff --git a/examples/video/videographicsitem/videoplayer.h b/examples/video/videographicsitem/videoplayer.h new file mode 100644 index 0000000..246f727 --- /dev/null +++ b/examples/video/videographicsitem/videoplayer.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VIDEOPLAYER_H +#define VIDEOPLAYER_H + +#include <QtGui/QMovie> +#include <QtGui/QWidget> + +QT_BEGIN_NAMESPACE +class QAbstractButton; +class QAbstractVideoSurface; +class QSlider; +QT_END_NAMESPACE + + +class VideoItem; + +class VideoPlayer : public QWidget +{ + Q_OBJECT +public: + VideoPlayer(QWidget *parent = 0, Qt::WindowFlags flags = 0); + ~VideoPlayer(); + + QSize sizeHint() const { return QSize(800, 600); } + +public slots: + void openFile(); + void play(); + +private slots: + void movieStateChanged(QMovie::MovieState state); + void frameChanged(int frame); + void setPosition(int frame); + void rotateVideo(int angle); + +private: + bool presentImage(const QImage &image); + + QMovie movie; + VideoItem *videoItem; + QAbstractButton *playButton; + QSlider *positionSlider; +}; + +#endif + diff --git a/examples/video/videowidget/main.cpp b/examples/video/videowidget/main.cpp new file mode 100644 index 0000000..4fba301 --- /dev/null +++ b/examples/video/videowidget/main.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videoplayer.h" + +#include <QtGui/QApplication> + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + VideoPlayer player; + player.show(); + + return app.exec(); +} diff --git a/examples/video/videowidget/videoplayer.cpp b/examples/video/videowidget/videoplayer.cpp new file mode 100644 index 0000000..2e4c758 --- /dev/null +++ b/examples/video/videowidget/videoplayer.cpp @@ -0,0 +1,183 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videoplayer.h" + +#include "videowidget.h" + +#include <QtMultimedia> + +VideoPlayer::VideoPlayer(QWidget *parent) + : QWidget(parent) + , surface(0) + , playButton(0) + , positionSlider(0) +{ + connect(&movie, SIGNAL(stateChanged(QMovie::MovieState)), + this, SLOT(movieStateChanged(QMovie::MovieState))); + connect(&movie, SIGNAL(frameChanged(int)), + this, SLOT(frameChanged(int))); + + VideoWidget *videoWidget = new VideoWidget; + surface = videoWidget->videoSurface(); + + QAbstractButton *openButton = new QPushButton(tr("Open...")); + connect(openButton, SIGNAL(clicked()), this, SLOT(openFile())); + + playButton = new QPushButton; + playButton->setEnabled(false); + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + + connect(playButton, SIGNAL(clicked()), + this, SLOT(play())); + + positionSlider = new QSlider(Qt::Horizontal); + positionSlider->setRange(0, 0); + + connect(positionSlider, SIGNAL(sliderMoved(int)), + this, SLOT(setPosition(int))); + + connect(&movie, SIGNAL(frameChanged(int)), + positionSlider, SLOT(setValue(int))); + + QBoxLayout *controlLayout = new QHBoxLayout; + controlLayout->setMargin(0); + controlLayout->addWidget(openButton); + controlLayout->addWidget(playButton); + controlLayout->addWidget(positionSlider); + + QBoxLayout *layout = new QVBoxLayout; + layout->addWidget(videoWidget); + layout->addLayout(controlLayout); + + setLayout(layout); +} + +VideoPlayer::~VideoPlayer() +{ +} + +void VideoPlayer::openFile() +{ + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + + if (!fileName.isEmpty()) { + if (surface->isStarted()) + surface->stop(); + + movie.setFileName(fileName); + + playButton->setEnabled(true); + positionSlider->setMaximum(movie.frameCount()); + + movie.jumpToFrame(0); + } +} + +void VideoPlayer::play() +{ + switch(movie.state()) { + case QMovie::NotRunning: + movie.start(); + break; + case QMovie::Paused: + movie.setPaused(false); + break; + case QMovie::Running: + movie.setPaused(true); + break; + } +} + +void VideoPlayer::movieStateChanged(QMovie::MovieState state) +{ + switch(state) { + case QMovie::NotRunning: + case QMovie::Paused: + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + break; + case QMovie::Running: + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause)); + break; + } +} + +void VideoPlayer::frameChanged(int frame) +{ + if (!presentImage(movie.currentImage())) { + movie.stop(); + playButton->setEnabled(false); + positionSlider->setMaximum(0); + } else { + positionSlider->setValue(frame); + } +} + +void VideoPlayer::setPosition(int frame) +{ + movie.jumpToFrame(frame); +} + +bool VideoPlayer::presentImage(const QImage &image) +{ + QVideoFrame frame(image); + + if (!frame.isValid()) + return false; + + QVideoSurfaceFormat currentFormat = surface->surfaceFormat(); + + if (frame.pixelFormat() != currentFormat.pixelFormat() + || frame.size() != currentFormat.frameSize()) { + QVideoSurfaceFormat format(frame.size(), frame.pixelFormat()); + + if (!surface->start(format)) + return false; + } + + if (!surface->present(frame)) { + surface->stop(); + + return false; + } else { + return true; + } +} diff --git a/examples/video/videowidget/videoplayer.h b/examples/video/videowidget/videoplayer.h new file mode 100644 index 0000000..76f3e9e --- /dev/null +++ b/examples/video/videowidget/videoplayer.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VIDEOPLAYER_H +#define VIDEOPLAYER_H + +#include <QtGui/QMovie> +#include <QtGui/QWidget> + +QT_BEGIN_NAMESPACE +class QAbstractButton; +class QAbstractVideoSurface; +class QSlider; +QT_END_NAMESPACE + +class VideoPlayer : public QWidget +{ + Q_OBJECT +public: + VideoPlayer(QWidget *parent = 0); + ~VideoPlayer(); + +public slots: + void openFile(); + void play(); + +private slots: + void movieStateChanged(QMovie::MovieState state); + void frameChanged(int frame); + void setPosition(int frame); + +private: + bool presentImage(const QImage &image); + + QMovie movie; + QAbstractVideoSurface *surface; + QAbstractButton *playButton; + QSlider *positionSlider; +}; + +#endif diff --git a/examples/video/videowidget/videowidget.cpp b/examples/video/videowidget/videowidget.cpp new file mode 100644 index 0000000..b29d2ae --- /dev/null +++ b/examples/video/videowidget/videowidget.cpp @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videowidget.h" + +#include "videowidgetsurface.h" + +#include <QtMultimedia> + +//! [0] +VideoWidget::VideoWidget(QWidget *parent) + : QWidget(parent) + , surface(0) +{ + setAutoFillBackground(false); + setAttribute(Qt::WA_NoSystemBackground, true); + setAttribute(Qt::WA_PaintOnScreen, true); + + QPalette palette = this->palette(); + palette.setColor(QPalette::Background, Qt::black); + setPalette(palette); + + setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + + surface = new VideoWidgetSurface(this); +} +//! [0] + +//! [1] +VideoWidget::~VideoWidget() +{ + delete surface; +} +//! [1] + +//! [2] +QSize VideoWidget::sizeHint() const +{ + return surface->surfaceFormat().sizeHint(); +} +//! [2] + + +//! [3] +void VideoWidget::paintEvent(QPaintEvent *event) +{ + QPainter painter(this); + + if (surface->isStarted()) { + const QRect videoRect = surface->videoRect(); + + if (!videoRect.contains(event->rect())) { + QRegion region = event->region(); + region.subtract(videoRect); + + QBrush brush = palette().background(); + + foreach (const QRect &rect, region.rects()) + painter.fillRect(rect, brush); + } + + surface->paint(&painter); + } else { + painter.fillRect(event->rect(), palette().background()); + } +} +//! [3] + +//! [4] +void VideoWidget::resizeEvent(QResizeEvent *event) +{ + QWidget::resizeEvent(event); + + surface->updateVideoRect(); +} +//! [4] diff --git a/examples/video/videowidget/videowidget.h b/examples/video/videowidget/videowidget.h new file mode 100644 index 0000000..737d32d --- /dev/null +++ b/examples/video/videowidget/videowidget.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VIDEOWIDGET_H +#define VIDEOWIDGET_H + +#include "videowidgetsurface.h" + +#include <QtGui/QWidget> + +QT_BEGIN_NAMESPACE +class QAbstractVideoSurface; +QT_END_NAMESPACE + +class VideoWidgetSurface; + +//! [0] +class VideoWidget : public QWidget +{ + Q_OBJECT +public: + VideoWidget(QWidget *parent = 0); + ~VideoWidget(); + + QAbstractVideoSurface *videoSurface() const { return surface; } + + QSize sizeHint() const; + +protected: + void paintEvent(QPaintEvent *event); + void resizeEvent(QResizeEvent *event); + +private: + VideoWidgetSurface *surface; +}; +//! [0] + +#endif diff --git a/examples/video/videowidget/videowidget.pro b/examples/video/videowidget/videowidget.pro new file mode 100644 index 0000000..a006f2f --- /dev/null +++ b/examples/video/videowidget/videowidget.pro @@ -0,0 +1,14 @@ +TEMPLATE = app + +QT += multimedia + +HEADERS = \ + videoplayer.h \ + videowidget.h \ + videowidgetsurface.h + +SOURCES = \ + main.cpp \ + videoplayer.cpp \ + videowidget.cpp \ + videowidgetsurface.cpp diff --git a/examples/video/videowidget/videowidgetsurface.cpp b/examples/video/videowidget/videowidgetsurface.cpp new file mode 100644 index 0000000..6089b6f --- /dev/null +++ b/examples/video/videowidget/videowidgetsurface.cpp @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videowidgetsurface.h" + +#include <QtMultimedia> + +VideoWidgetSurface::VideoWidgetSurface(QWidget *widget, QObject *parent) + : QAbstractVideoSurface(parent) + , widget(widget) + , imageFormat(QImage::Format_Invalid) +{ +} + +//! [0] +QList<QVideoFrame::PixelFormat> VideoWidgetSurface::supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType) const +{ + if (handleType == QAbstractVideoBuffer::NoHandle) { + return QList<QVideoFrame::PixelFormat>() + << QVideoFrame::Format_RGB32 + << QVideoFrame::Format_ARGB32 + << QVideoFrame::Format_ARGB32_Premultiplied + << QVideoFrame::Format_RGB565 + << QVideoFrame::Format_RGB555; + } else { + return QList<QVideoFrame::PixelFormat>(); + } +} +//! [0] + +//! [1] +bool VideoWidgetSurface::isFormatSupported( + const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const +{ + Q_UNUSED(similar); + + const QImage::Format imageFormat = QVideoFrame::equivalentImageFormat(format.pixelFormat()); + const QSize size = format.frameSize(); + + return imageFormat != QImage::Format_Invalid + && !size.isEmpty() + && format.handleType() == QAbstractVideoBuffer::NoHandle; +} +//! [1] + +//! [2] +bool VideoWidgetSurface::start(const QVideoSurfaceFormat &format) +{ + const QImage::Format imageFormat = QVideoFrame::equivalentImageFormat(format.pixelFormat()); + const QSize size = format.frameSize(); + + if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) { + this->imageFormat = imageFormat; + imageSize = size; + sourceRect = format.viewport(); + + QAbstractVideoSurface::start(format); + + widget->updateGeometry(); + updateVideoRect(); + + return true; + } else { + return false; + } +} +//! [2] + +//! [3] +void VideoWidgetSurface::stop() +{ + currentFrame = QVideoFrame(); + targetRect = QRect(); + + QAbstractVideoSurface::stop(); + + widget->update(); +} +//! [3] + +//! [4] +bool VideoWidgetSurface::present(const QVideoFrame &frame) +{ + if (surfaceFormat().pixelFormat() != frame.pixelFormat() + || surfaceFormat().frameSize() != frame.size()) { + setError(IncorrectFormatError); + stop(); + + return false; + } else { + currentFrame = frame; + + widget->repaint(targetRect); + + return true; + } +} +//! [4] + +//! [5] +void VideoWidgetSurface::updateVideoRect() +{ + QSize size = surfaceFormat().sizeHint(); + size.scale(widget->size().boundedTo(size), Qt::KeepAspectRatio); + + targetRect = QRect(QPoint(0, 0), size); + targetRect.moveCenter(widget->rect().center()); +} +//! [5] + +//! [6] +void VideoWidgetSurface::paint(QPainter *painter) +{ + if (currentFrame.map(QAbstractVideoBuffer::ReadOnly)) { + const QTransform oldTransform = painter->transform(); + + if (surfaceFormat().scanLineDirection() == QVideoSurfaceFormat::BottomToTop) { + painter->scale(1, -1); + painter->translate(0, -widget->height()); + } + + QImage image( + currentFrame.bits(), + currentFrame.width(), + currentFrame.height(), + currentFrame.bytesPerLine(), + imageFormat); + + painter->drawImage(targetRect, image, sourceRect); + + painter->setTransform(oldTransform); + + currentFrame.unmap(); + } +} +//! [6] diff --git a/examples/video/videowidget/videowidgetsurface.h b/examples/video/videowidget/videowidgetsurface.h new file mode 100644 index 0000000..56ba329 --- /dev/null +++ b/examples/video/videowidget/videowidgetsurface.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef VIDEOWIDGETSURFACE_H +#define VIDEOWIDGETSURFACE_H + +#include <QtCore/QRect> +#include <QtGui/QImage> +#include <QtMultimedia/QAbstractVideoSurface> +#include <QtMultimedia/QVideoFrame> + +//! [0] +class VideoWidgetSurface : public QAbstractVideoSurface +{ + Q_OBJECT +public: + VideoWidgetSurface(QWidget *widget, QObject *parent = 0); + + QList<QVideoFrame::PixelFormat> supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; + bool isFormatSupported(const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const; + + bool start(const QVideoSurfaceFormat &format); + void stop(); + + bool present(const QVideoFrame &frame); + + QRect videoRect() const { return targetRect; } + void updateVideoRect(); + + void paint(QPainter *painter); + +private: + QWidget *widget; + QImage::Format imageFormat; + QRect targetRect; + QSize imageSize; + QRect sourceRect; + QVideoFrame currentFrame; +}; +//! [0] + +#endif diff --git a/examples/webkit/formextractor/formextractor.pro b/examples/webkit/formextractor/formextractor.pro index 33e2267..ba9c72f 100644 --- a/examples/webkit/formextractor/formextractor.pro +++ b/examples/webkit/formextractor/formextractor.pro @@ -15,6 +15,7 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro form.html images sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/formextractor INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000CF6D +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000CF6D +} diff --git a/examples/webkit/previewer/previewer.pro b/examples/webkit/previewer/previewer.pro index cc7fb73..c3088a2 100644 --- a/examples/webkit/previewer/previewer.pro +++ b/examples/webkit/previewer/previewer.pro @@ -12,6 +12,7 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/previewer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000CF6F +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000CF6F +} diff --git a/examples/webkit/webkit.pro b/examples/webkit/webkit.pro index 5c954c2..9ad6789 100644 --- a/examples/webkit/webkit.pro +++ b/examples/webkit/webkit.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webkit.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/webkit INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/analogclock/analogclock.pro b/examples/widgets/analogclock/analogclock.pro index 9865a11..50c0a06 100644 --- a/examples/widgets/analogclock/analogclock.pro +++ b/examples/widgets/analogclock/analogclock.pro @@ -8,6 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS analogclock.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/analogclock INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000A64F
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000A64F +} diff --git a/examples/widgets/calculator/calculator.pro b/examples/widgets/calculator/calculator.pro index 178f43e..585ff43 100644 --- a/examples/widgets/calculator/calculator.pro +++ b/examples/widgets/calculator/calculator.pro @@ -10,6 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calculator.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/calculator INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C602
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C602 +} diff --git a/examples/widgets/calendarwidget/calendarwidget.pro b/examples/widgets/calendarwidget/calendarwidget.pro index 63c154b..f6cf21f 100644 --- a/examples/widgets/calendarwidget/calendarwidget.pro +++ b/examples/widgets/calendarwidget/calendarwidget.pro @@ -8,6 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendarwidget.pro resou sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/calendarwidget INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C603
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C603 +} diff --git a/examples/widgets/charactermap/charactermap.pro b/examples/widgets/charactermap/charactermap.pro index 9763287..eea2cb4 100644 --- a/examples/widgets/charactermap/charactermap.pro +++ b/examples/widgets/charactermap/charactermap.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS charactermap.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/charactermap INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/digitalclock/digitalclock.pro b/examples/widgets/digitalclock/digitalclock.pro index b7c8e09..78e9eae 100644 --- a/examples/widgets/digitalclock/digitalclock.pro +++ b/examples/widgets/digitalclock/digitalclock.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS digitalclock.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/digitalclock INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/groupbox/groupbox.pro b/examples/widgets/groupbox/groupbox.pro index 8d09f5f..2757ce1 100644 --- a/examples/widgets/groupbox/groupbox.pro +++ b/examples/widgets/groupbox/groupbox.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS groupbox.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/groupbox INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/icons/icons.pro b/examples/widgets/icons/icons.pro index ea9c848..39c7ab2 100644 --- a/examples/widgets/icons/icons.pro +++ b/examples/widgets/icons/icons.pro @@ -14,7 +14,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS icons.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/icons INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: { imageFiles.sources = images/* diff --git a/examples/widgets/imageviewer/imageviewer.pro b/examples/widgets/imageviewer/imageviewer.pro index 597d95b..c865618 100644 --- a/examples/widgets/imageviewer/imageviewer.pro +++ b/examples/widgets/imageviewer/imageviewer.pro @@ -8,7 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS imageviewer.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/imageviewer INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: { DEPLOYMENT_PLUGIN += qjpeg qmng qgif diff --git a/examples/widgets/lineedits/lineedits.pro b/examples/widgets/lineedits/lineedits.pro index 5347148..409215c 100644 --- a/examples/widgets/lineedits/lineedits.pro +++ b/examples/widgets/lineedits/lineedits.pro @@ -8,6 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS lineedits.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/lineedits INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C604
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C604 +} diff --git a/examples/widgets/movie/movie.pro b/examples/widgets/movie/movie.pro index fe011d2..517fec7 100644 --- a/examples/widgets/movie/movie.pro +++ b/examples/widgets/movie/movie.pro @@ -8,7 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES movie.pro animation.mng sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: { addFiles.sources += *.mng diff --git a/examples/widgets/scribble/scribble.pro b/examples/widgets/scribble/scribble.pro index a9190f7..cf92a25 100644 --- a/examples/widgets/scribble/scribble.pro +++ b/examples/widgets/scribble/scribble.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS scribble.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/scribble INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/shapedclock/shapedclock.pro b/examples/widgets/shapedclock/shapedclock.pro index c4d48f6..bf4ee70 100644 --- a/examples/widgets/shapedclock/shapedclock.pro +++ b/examples/widgets/shapedclock/shapedclock.pro @@ -8,6 +8,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS shapedclock.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/shapedclock INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C605
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C605 +} diff --git a/examples/widgets/sliders/sliders.pro b/examples/widgets/sliders/sliders.pro index 742fc27..fd39a22 100644 --- a/examples/widgets/sliders/sliders.pro +++ b/examples/widgets/sliders/sliders.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS sliders.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/sliders INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/softkeys/softkeys.pro b/examples/widgets/softkeys/softkeys.pro index 9a0feea..6c3271e 100644 --- a/examples/widgets/softkeys/softkeys.pro +++ b/examples/widgets/softkeys/softkeys.pro @@ -9,6 +9,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS softkeys.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/softkeys INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000CF6B +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000CF6B +} diff --git a/examples/widgets/spinboxes/spinboxes.pro b/examples/widgets/spinboxes/spinboxes.pro index b859ab7..129ec81 100644 --- a/examples/widgets/spinboxes/spinboxes.pro +++ b/examples/widgets/spinboxes/spinboxes.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS spinboxes.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/spinboxes INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/styles/styles.pro b/examples/widgets/styles/styles.pro index 8918d21..1228803 100644 --- a/examples/widgets/styles/styles.pro +++ b/examples/widgets/styles/styles.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS styles.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/styles INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/stylesheet/stylesheet.pro b/examples/widgets/stylesheet/stylesheet.pro index 71dfc6d..c67eba3 100644 --- a/examples/widgets/stylesheet/stylesheet.pro +++ b/examples/widgets/stylesheet/stylesheet.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images layouts qss sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/stylesheet INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/tablet/tablet.pro b/examples/widgets/tablet/tablet.pro index ee25888..e135203 100644 --- a/examples/widgets/tablet/tablet.pro +++ b/examples/widgets/tablet/tablet.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tablet.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/tablet INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/tetrix/tetrix.pro b/examples/widgets/tetrix/tetrix.pro index 2223b86..d683f61 100644 --- a/examples/widgets/tetrix/tetrix.pro +++ b/examples/widgets/tetrix/tetrix.pro @@ -12,6 +12,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tetrix.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/tetrix INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C606
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C606 +} diff --git a/examples/widgets/tooltips/tooltips.pro b/examples/widgets/tooltips/tooltips.pro index 0eca4c8..f91abea 100644 --- a/examples/widgets/tooltips/tooltips.pro +++ b/examples/widgets/tooltips/tooltips.pro @@ -11,4 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tooltips.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/tooltips INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/validators/validators.pro b/examples/widgets/validators/validators.pro index d7f9dde..c50b63b 100644 --- a/examples/widgets/validators/validators.pro +++ b/examples/widgets/validators/validators.pro @@ -20,4 +20,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/validators INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro index 399a3ac..d838be0 100644 --- a/examples/widgets/widgets.pro +++ b/examples/widgets/widgets.pro @@ -40,4 +40,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS widgets.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/widgets INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/widgets/wiggly/wiggly.pro b/examples/widgets/wiggly/wiggly.pro index 4240765..857122f 100644 --- a/examples/widgets/wiggly/wiggly.pro +++ b/examples/widgets/wiggly/wiggly.pro @@ -10,6 +10,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wiggly.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/wiggly INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C607
\ No newline at end of file +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C607 +} diff --git a/examples/widgets/windowflags/windowflags.pro b/examples/widgets/windowflags/windowflags.pro index 007c10a..27ce025 100644 --- a/examples/widgets/windowflags/windowflags.pro +++ b/examples/widgets/windowflags/windowflags.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS windowflags.pro sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/windowflags INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro index f38321f..25e21cd 100644 --- a/examples/xml/dombookmarks/dombookmarks.pro +++ b/examples/xml/dombookmarks/dombookmarks.pro @@ -11,7 +11,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dombookmarks.pro *.xbel sources.path = $$[QT_INSTALL_EXAMPLES]/xml/dombookmarks INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) wince*: { addFiles.sources = frank.xbel jennifer.xbel diff --git a/examples/xml/htmlinfo/htmlinfo.pro b/examples/xml/htmlinfo/htmlinfo.pro index d828518..f70fb7d 100644 --- a/examples/xml/htmlinfo/htmlinfo.pro +++ b/examples/xml/htmlinfo/htmlinfo.pro @@ -13,6 +13,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.html htmlinfo.pro sources.path = $$[QT_INSTALL_EXAMPLES]/xml/htmlinfo INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - -symbian:TARGET.UID3 = 0xA000C609 +symbian { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.UID3 = 0xA000C609 +} diff --git a/examples/xml/rsslisting/main.cpp b/examples/xml/rsslisting/main.cpp index 122d34c..0ba932f 100644 --- a/examples/xml/rsslisting/main.cpp +++ b/examples/xml/rsslisting/main.cpp @@ -58,6 +58,7 @@ Provides the main function for the RSS news reader example. int main(int argc, char **argv) { QApplication app(argc, argv); + qWarning("The usage of QHttp is not recommended anymore, please use QNetworkAccessManager."); RSSListing *rsslisting = new RSSListing; rsslisting->show(); return app.exec(); diff --git a/examples/xml/rsslisting/rsslisting.pro b/examples/xml/rsslisting/rsslisting.pro index c0a1ad3..e93cad0 100644 --- a/examples/xml/rsslisting/rsslisting.pro +++ b/examples/xml/rsslisting/rsslisting.pro @@ -8,5 +8,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS rsslisting.pro sources.path = $$[QT_INSTALL_EXAMPLES]/xml/rsslisting INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xml/saxbookmarks/saxbookmarks.pro b/examples/xml/saxbookmarks/saxbookmarks.pro index 3556c11..16ef184 100644 --- a/examples/xml/saxbookmarks/saxbookmarks.pro +++ b/examples/xml/saxbookmarks/saxbookmarks.pro @@ -13,8 +13,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS saxbookmarks.pro *.xbel sources.path = $$[QT_INSTALL_EXAMPLES]/xml/saxbookmarks INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) - wince*: { addFiles.sources = frank.xbel jennifer.xbel addFiles.path = \My Documents @@ -22,8 +20,9 @@ wince*: { } symbian: { + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) TARGET.UID3 = 0xA000C60A addFiles.sources = frank.xbel jennifer.xbel addFiles.path = /data/qt/saxbookmarks DEPLOYMENT += addFiles -}
\ No newline at end of file +} diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro index f16a02e..2b1841f 100644 --- a/examples/xml/streambookmarks/streambookmarks.pro +++ b/examples/xml/streambookmarks/streambookmarks.pro @@ -13,4 +13,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS streambookmarks.pro *.xb sources.path = $$[QT_INSTALL_EXAMPLES]/xml/streambookmarks INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xml/xml.pro b/examples/xml/xml.pro index 2b6415c..0bc6dd9 100644 --- a/examples/xml/xml.pro +++ b/examples/xml/xml.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xml.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/xml INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xml/xmlstreamlint/xmlstreamlint.pro b/examples/xml/xmlstreamlint/xmlstreamlint.pro index 4f97387..6a09f1a 100644 --- a/examples/xml/xmlstreamlint/xmlstreamlint.pro +++ b/examples/xml/xmlstreamlint/xmlstreamlint.pro @@ -9,4 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xmlstreamlint.pro sources.path = $$[QT_INSTALL_EXAMPLES]/xml/xmlstreamlint INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xmlpatterns/filetree/filetree.pro b/examples/xmlpatterns/filetree/filetree.pro index e30f2cf..0238c23 100644 --- a/examples/xmlpatterns/filetree/filetree.pro +++ b/examples/xmlpatterns/filetree/filetree.pro @@ -12,4 +12,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xq *.html sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/filetree INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xmlpatterns/recipes/recipes.pro b/examples/xmlpatterns/recipes/recipes.pro index cee7b6d..f02a018 100644 --- a/examples/xmlpatterns/recipes/recipes.pro +++ b/examples/xmlpatterns/recipes/recipes.pro @@ -10,4 +10,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xq *.html forms files sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/recipes INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp index 9016d52..4b4886b 100644 --- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp +++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp @@ -165,8 +165,7 @@ void MainWindow::resizeEvent(QResizeEvent*) void MainWindow::updateTimeInformation() { - TimeQuery query; - m_times = query.query(m_station.id(), m_lines, QDateTime::currentDateTime()); + m_times = TimeQuery::query(m_station.id(), m_lines, QDateTime::currentDateTime()); update(); } diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp index f3f124a..bf881df 100644 --- a/examples/xmlpatterns/trafficinfo/stationdialog.cpp +++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp @@ -157,8 +157,6 @@ QStringList StationDialog::lineNumbers() const void StationDialog::searchStations() { - StationQuery query; - - m_model->setStations(query.query(m_ui.m_input->text())); + m_model->setStations(StationQuery::query(m_ui.m_input->text())); m_ui.m_view->keyboardSearch(m_ui.m_input->text()); } diff --git a/examples/xmlpatterns/xmlpatterns.pro b/examples/xmlpatterns/xmlpatterns.pro index d5b3498..2ad4798 100644 --- a/examples/xmlpatterns/xmlpatterns.pro +++ b/examples/xmlpatterns/xmlpatterns.pro @@ -14,4 +14,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xmlpatterns.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro b/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro index 0016c41..8520606 100644 --- a/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro +++ b/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro @@ -8,4 +8,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.cpp *.pro *.xq *.html sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/xquery/globalVariables INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/xmlpatterns/xquery/xquery.pro b/examples/xmlpatterns/xquery/xquery.pro index 2a91188..70b215c 100644 --- a/examples/xmlpatterns/xquery/xquery.pro +++ b/examples/xmlpatterns/xquery/xquery.pro @@ -7,4 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xquery.pro sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/xquery INSTALLS += target sources -include($$QT_SOURCE_TREE/examples/examplebase.pri) +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 6de19c3..b3d6a5f 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -36,7 +36,7 @@ INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picki win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt # As order does matter for static libs, we reorder the QT variable here -TMPLIBS = multimedia webkit phonon dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core +TMPLIBS = webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core for(QTLIB, $$list($$TMPLIBS)) { contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB } diff --git a/mkspecs/qws/linux-armv6-g++/qplatformdefs.h b/mkspecs/qws/linux-armv6-g++/qplatformdefs.h index 99e9a27..f5ecc13 100644 --- a/mkspecs/qws/linux-armv6-g++/qplatformdefs.h +++ b/mkspecs/qws/linux-armv6-g++/qplatformdefs.h @@ -1 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "../../linux-g++/qplatformdefs.h" diff --git a/mkspecs/qws/linux-avr32-g++/qplatformdefs.h b/mkspecs/qws/linux-avr32-g++/qplatformdefs.h index 99e9a27..f5ecc13 100644 --- a/mkspecs/qws/linux-avr32-g++/qplatformdefs.h +++ b/mkspecs/qws/linux-avr32-g++/qplatformdefs.h @@ -1 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "../../linux-g++/qplatformdefs.h" diff --git a/mkspecs/qws/linux-sh-g++/qplatformdefs.h b/mkspecs/qws/linux-sh-g++/qplatformdefs.h index 99e9a27..f5ecc13 100644 --- a/mkspecs/qws/linux-sh-g++/qplatformdefs.h +++ b/mkspecs/qws/linux-sh-g++/qplatformdefs.h @@ -1 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "../../linux-g++/qplatformdefs.h" diff --git a/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h b/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h index 99e9a27..f5ecc13 100644 --- a/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h +++ b/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h @@ -1 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "../../linux-g++/qplatformdefs.h" diff --git a/projects.pro b/projects.pro index a1f2dd1..2a6a956 100644 --- a/projects.pro +++ b/projects.pro @@ -157,8 +157,3 @@ false:macx { #mac install location INSTALLS += macdocs } -!win32:contains(QT_CONFIG, qtusagereporter) { - usagereporter.path=$$[QT_INSTALL_BINS] - usagereporter.files=$$QT_BUILD_TREE/bin/qtusagereporter - INSTALLS += usagereporter -} diff --git a/qmake/generators/symbian/epocroot.h b/qmake/generators/symbian/epocroot.h index 02884b1..6ff5e24 100644 --- a/qmake/generators/symbian/epocroot.h +++ b/qmake/generators/symbian/epocroot.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/qmake/main.cpp b/qmake/main.cpp index 3fb79dd..92a00c8 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -98,17 +98,6 @@ int runQMake(int argc, char **argv) return 0; } - // report Qt usage for commercial customers with a "metered license" (currently experimental) -#if QT_EDITION != QT_EDITION_OPENSOURCE - QString reporterPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() - + "qtusagereporter"; -#if defined(Q_OS_WIN) - reporterPath += ".exe"; -#endif - if (QFile::exists(reporterPath)) - system(qPrintable(reporterPath + " qmake")); -#endif - QString oldpwd = qmake_getpwd(); #ifdef Q_WS_WIN if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/"))) diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp index 2c56af7..6ed0145 100644 --- a/src/3rdparty/phonon/ds9/backend.cpp +++ b/src/3rdparty/phonon/ds9/backend.cpp @@ -64,6 +64,11 @@ namespace Phonon ::CoUninitialize(); } + QMutex *Backend::directShowMutex() + { + return &qobject_cast<Backend*>(qt_plugin_instance())->m_directShowMutex; + } + QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args) { switch (c) @@ -131,6 +136,7 @@ namespace Phonon QList<int> Backend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const { + QMutexLocker locker(&m_directShowMutex); QList<int> ret; switch(type) @@ -157,7 +163,7 @@ namespace Phonon while (S_OK == enumMon->Next(1, mon.pparam(), 0)) { LPOLESTR str = 0; mon->GetDisplayName(0,0,&str); - const QString name = QString::fromUtf16((unsigned short*)str); + const QString name = QString::fromWCharArray(str); ComPointer<IMalloc> alloc; ::CoGetMalloc(1, alloc.pparam()); alloc->Free(str); @@ -204,6 +210,7 @@ namespace Phonon QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const { + QMutexLocker locker(&m_directShowMutex); QHash<QByteArray, QVariant> ret; switch (type) { @@ -216,7 +223,7 @@ namespace Phonon LPOLESTR str = 0; HRESULT hr = mon->GetDisplayName(0,0, &str); if (SUCCEEDED(hr)) { - QString name = QString::fromUtf16((unsigned short*)str); + QString name = QString::fromWCharArray(str); ComPointer<IMalloc> alloc; ::CoGetMalloc(1, alloc.pparam()); alloc->Free(str); @@ -231,7 +238,7 @@ namespace Phonon WCHAR name[80]; // 80 is clearly stated in the MSDN doc HRESULT hr = ::DMOGetName(m_audioEffects[index], name); if (SUCCEEDED(hr)) { - ret["name"] = QString::fromUtf16((unsigned short*)name); + ret["name"] = QString::fromWCharArray(name); } } break; diff --git a/src/3rdparty/phonon/ds9/backend.h b/src/3rdparty/phonon/ds9/backend.h index ad638f2..8b020c2 100644 --- a/src/3rdparty/phonon/ds9/backend.h +++ b/src/3rdparty/phonon/ds9/backend.h @@ -23,6 +23,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <phonon/phononnamespace.h> #include <QtCore/QList> +#include <QtCore/QMutex> #include "compointer.h" #include "backendnode.h" @@ -63,6 +64,8 @@ namespace Phonon Filter getAudioOutputFilter(int index) const; + static QMutex *directShowMutex(); + Q_SIGNALS: void objectDescriptionChanged(ObjectDescriptionType); @@ -74,6 +77,7 @@ namespace Phonon }; mutable QVector<AudioMoniker> m_audioOutputs; mutable QVector<CLSID> m_audioEffects; + mutable QMutex m_directShowMutex; }; } } diff --git a/src/3rdparty/phonon/ds9/ds9.desktop b/src/3rdparty/phonon/ds9/ds9.desktop index 370011e..ece3c9c 100644 --- a/src/3rdparty/phonon/ds9/ds9.desktop +++ b/src/3rdparty/phonon/ds9/ds9.desktop @@ -5,7 +5,7 @@ MimeType=application/x-annodex;video/quicktime;video/x-quicktime;audio/x-m4a;app X-KDE-Library=phonon_ds9 X-KDE-PhononBackendInfo-InterfaceVersion=1 X-KDE-PhononBackendInfo-Version=0.1 -X-KDE-PhononBackendInfo-Website=http://www.trolltech.com/ +X-KDE-PhononBackendInfo-Website=http://qt.nokia.com/ InitialPreference=15 Name=DirectShow9 diff --git a/src/3rdparty/phonon/ds9/effect.cpp b/src/3rdparty/phonon/ds9/effect.cpp index 104a3c1..ebe976b 100644 --- a/src/3rdparty/phonon/ds9/effect.cpp +++ b/src/3rdparty/phonon/ds9/effect.cpp @@ -82,7 +82,7 @@ namespace Phonon current += wcslen(current) + 1; //skip the name current += wcslen(current) + 1; //skip the unit for(; *current; current += wcslen(current) + 1) { - values.append( QString::fromUtf16((unsigned short*)current) ); + values.append( QString::fromWCharArray(current) ); } } //FALLTHROUGH @@ -107,7 +107,7 @@ namespace Phonon Phonon::EffectParameter::Hints hint = info.mopCaps == MP_CAPS_CURVE_INVSQUARE ? Phonon::EffectParameter::LogarithmicHint : Phonon::EffectParameter::Hints(0); - const QString n = QString::fromUtf16((unsigned short*)name); + const QString n = QString::fromWCharArray(name); ret.append(Phonon::EffectParameter(i, n, hint, def, min, max, values)); ::CoTaskMemFree(name); //let's free the memory } diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp index a885a69..e0c505c 100644 --- a/src/3rdparty/phonon/ds9/iodevicereader.cpp +++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp @@ -63,7 +63,6 @@ namespace Phonon //for Phonon::StreamInterface void writeData(const QByteArray &data) { - QWriteLocker locker(&m_lock); m_pos += data.size(); m_buffer += data; } @@ -74,54 +73,22 @@ namespace Phonon void setStreamSize(qint64 newSize) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_size = newSize; } - qint64 streamSize() const - { - QReadLocker locker(&m_lock); - return m_size; - } - void setStreamSeekable(bool s) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_seekable = s; } - bool streamSeekable() const - { - QReadLocker locker(&m_lock); - return m_seekable; - } - - void setCurrentPos(qint64 pos) - { - QWriteLocker locker(&m_lock); - m_pos = pos; - seekStream(pos); - m_buffer.clear(); - } - - qint64 currentPos() const - { - QReadLocker locker(&m_lock); - return m_pos; - } - - int currentBufferSize() const - { - QReadLocker locker(&m_lock); - return m_buffer.size(); - } - //virtual pure members //implementation from IAsyncReader STDMETHODIMP Length(LONGLONG *total, LONGLONG *available) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (total) { *total = m_size; } @@ -136,44 +103,42 @@ namespace Phonon HRESULT read(LONGLONG pos, LONG length, BYTE *buffer, LONG *actual) { - QMutexLocker locker(&m_mutexRead); - + Q_ASSERT(!m_mutex.tryLock()); if (m_mediaGraph->isStopping()) { return VFW_E_WRONG_STATE; } - if(streamSize() != 1 && pos + length > streamSize()) { + if(m_size != 1 && pos + length > m_size) { //it tries to read outside of the boundaries return E_FAIL; } - if (currentPos() - currentBufferSize() != pos) { - if (!streamSeekable()) { + if (m_pos - m_buffer.size() != pos) { + if (!m_seekable) { return S_FALSE; } - setCurrentPos(pos); + m_pos = pos; + seekStream(pos); + m_buffer.clear(); } - int oldSize = currentBufferSize(); - while (currentBufferSize() < int(length)) { + int oldSize = m_buffer.size(); + while (m_buffer.size() < int(length)) { needData(); if (m_mediaGraph->isStopping()) { return VFW_E_WRONG_STATE; } - if (oldSize == currentBufferSize()) { + if (oldSize == m_buffer.size()) { break; //we didn't get any data } - oldSize = currentBufferSize(); + oldSize = m_buffer.size(); } - int bytesRead = qMin(currentBufferSize(), int(length)); - { - QWriteLocker locker(&m_lock); - qMemCopy(buffer, m_buffer.data(), bytesRead); - //truncate the buffer - m_buffer = m_buffer.mid(bytesRead); - } + int bytesRead = qMin(m_buffer.size(), int(length)); + qMemCopy(buffer, m_buffer.data(), bytesRead); + //truncate the buffer + m_buffer = m_buffer.mid(bytesRead); if (actual) { *actual = bytesRead; //initialization @@ -189,7 +154,6 @@ namespace Phonon qint64 m_pos; qint64 m_size; - QMutex m_mutexRead; const MediaGraph *m_mediaGraph; }; @@ -203,14 +167,6 @@ namespace Phonon IODeviceReader::~IODeviceReader() { } - - STDMETHODIMP IODeviceReader::Stop() - { - HRESULT hr = QBaseFilter::Stop(); - m_streamReader->enoughData(); //this asks to cancel any blocked call to needData - return hr; - } - } } diff --git a/src/3rdparty/phonon/ds9/iodevicereader.h b/src/3rdparty/phonon/ds9/iodevicereader.h index af4b271..c8b91c3 100644 --- a/src/3rdparty/phonon/ds9/iodevicereader.h +++ b/src/3rdparty/phonon/ds9/iodevicereader.h @@ -41,7 +41,6 @@ namespace Phonon public: IODeviceReader(const MediaSource &source, const MediaGraph *); ~IODeviceReader(); - STDMETHODIMP Stop(); private: StreamReader *m_streamReader; diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp index 7b10176..a467dd7 100644 --- a/src/3rdparty/phonon/ds9/mediagraph.cpp +++ b/src/3rdparty/phonon/ds9/mediagraph.cpp @@ -383,7 +383,8 @@ namespace Phonon #endif if (info.pGraph) { info.pGraph->Release(); - return m_graph->RemoveFilter(filter); + if (info.pGraph == m_graph) + return m_graph->RemoveFilter(filter); } //already removed @@ -681,7 +682,6 @@ namespace Phonon #ifndef QT_NO_PHONON_MEDIACONTROLLER } else if (source.discType() == Phonon::Cd) { m_realSource = Filter(new QAudioCDPlayer); - m_result = m_graph->AddFilter(m_realSource, 0); #endif //QT_NO_PHONON_MEDIACONTROLLER } else { @@ -1008,27 +1008,27 @@ namespace Phonon BSTR str; HRESULT hr = mediaContent->get_AuthorName(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("ARTIST"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("ARTIST"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_Title(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("TITLE"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("TITLE"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_Description(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("DESCRIPTION"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("DESCRIPTION"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_Copyright(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("COPYRIGHT"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("COPYRIGHT"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_MoreInfoText(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("MOREINFO"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("MOREINFO"), QString::fromWCharArray(str)); SysFreeString(str); } } diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index de2078a..e42dff9 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -21,9 +21,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QtCore/QTime> #include <QtCore/QLibrary> -#ifndef Q_CC_MSVC #include <dshow.h> -#endif //Q_CC_MSVC #include <objbase.h> #include <initguid.h> #include <qnetwork.h> @@ -49,7 +47,7 @@ namespace Phonon //first the definition of the WorkerThread class WorkerThread::WorkerThread() - : QThread(), m_currentRenderId(0), m_finished(false), m_currentWorkId(1) + : QThread(), m_finished(false), m_currentWorkId(1) { } @@ -157,6 +155,7 @@ namespace Phonon //we create a new graph w.graph = Graph(CLSID_FilterGraph, IID_IGraphBuilder); w.filter = filter; + w.graph->AddFilter(filter, 0); w.id = m_currentWorkId++; m_queue.enqueue(w); m_waitCondition.set(); @@ -176,31 +175,29 @@ namespace Phonon void WorkerThread::handleTask() { - QMutexLocker locker(&m_mutex); - if (m_finished || m_queue.isEmpty()) { - return; - } + QMutexLocker locker(Backend::directShowMutex()); + { + QMutexLocker locker(&m_mutex); + if (m_finished || m_queue.isEmpty()) { + return; + } - const Work w = m_queue.dequeue(); + m_currentWork = m_queue.dequeue(); - //we ensure to have the wait condition in the right state - if (m_queue.isEmpty()) { - m_waitCondition.reset(); - } else { - m_waitCondition.set(); + //we ensure to have the wait condition in the right state + if (m_queue.isEmpty()) { + m_waitCondition.reset(); + } else { + m_waitCondition.set(); + } } HRESULT hr = S_OK; - { - QMutexLocker locker(&m_currentMutex); - m_currentRender = w.graph; - m_currentRenderId = w.id; - } - if (w.task == ReplaceGraph) { + if (m_currentWork.task == ReplaceGraph) { int index = -1; for(int i = 0; i < FILTER_COUNT; ++i) { - if (m_graphHandle[i].graph == w.oldGraph) { + if (m_graphHandle[i].graph == m_currentWork.oldGraph) { m_graphHandle[i].graph = Graph(); index = i; break; @@ -214,51 +211,39 @@ namespace Phonon //add the new graph HANDLE h; - if (SUCCEEDED(ComPointer<IMediaEvent>(w.graph, IID_IMediaEvent) + if (SUCCEEDED(ComPointer<IMediaEvent>(m_currentWork.graph, IID_IMediaEvent) ->GetEventHandle(reinterpret_cast<OAEVENT*>(&h)))) { - m_graphHandle[index].graph = w.graph; + m_graphHandle[index].graph = m_currentWork.graph; m_graphHandle[index].handle = h; } - } else if (w.task == Render) { - if (w.filter) { + } else if (m_currentWork.task == Render) { + if (m_currentWork.filter) { //let's render pins - w.graph->AddFilter(w.filter, 0); - const QList<OutputPin> outputs = BackendNode::pins(w.filter, PINDIR_OUTPUT); - for (int i = 0; i < outputs.count(); ++i) { - //blocking call - hr = w.graph->Render(outputs.at(i)); - if (FAILED(hr)) { - break; - } + const QList<OutputPin> outputs = BackendNode::pins(m_currentWork.filter, PINDIR_OUTPUT); + for (int i = 0; SUCCEEDED(hr) && i < outputs.count(); ++i) { + hr = m_currentWork.graph->Render(outputs.at(i)); } - } else if (!w.url.isEmpty()) { + } else if (!m_currentWork.url.isEmpty()) { //let's render a url (blocking call) - hr = w.graph->RenderFile(reinterpret_cast<const wchar_t *>(w.url.utf16()), 0); + hr = m_currentWork.graph->RenderFile(reinterpret_cast<const wchar_t *>(m_currentWork.url.utf16()), 0); } if (hr != E_ABORT) { - emit asyncRenderFinished(w.id, hr, w.graph); + emit asyncRenderFinished(m_currentWork.id, hr, m_currentWork.graph); } - } else if (w.task == Seek) { + } else if (m_currentWork.task == Seek) { //that's a seekrequest - ComPointer<IMediaSeeking> mediaSeeking(w.graph, IID_IMediaSeeking); - qint64 newtime = w.time * 10000; + ComPointer<IMediaSeeking> mediaSeeking(m_currentWork.graph, IID_IMediaSeeking); + qint64 newtime = m_currentWork.time * 10000; hr = mediaSeeking->SetPositions(&newtime, AM_SEEKING_AbsolutePositioning, 0, AM_SEEKING_NoPositioning); - qint64 currentTime = -1; - if (SUCCEEDED(hr)) { - hr = mediaSeeking->GetCurrentPosition(¤tTime); - if (SUCCEEDED(hr)) { - currentTime /= 10000; //convert to ms - } - } - emit asyncSeekingFinished(w.id, currentTime); + emit asyncSeekingFinished(m_currentWork.id, newtime / 10000); hr = E_ABORT; //to avoid emitting asyncRenderFinished - } else if (w.task == ChangeState) { + } else if (m_currentWork.task == ChangeState) { //remove useless decoders QList<Filter> unused; - for (int i = 0; i < w.decoders.count(); ++i) { - const Filter &filter = w.decoders.at(i); + for (int i = 0; i < m_currentWork.decoders.count(); ++i) { + const Filter &filter = m_currentWork.decoders.at(i); bool used = false; const QList<OutputPin> pins = BackendNode::pins(filter, PINDIR_OUTPUT); for( int i = 0; i < pins.count(); ++i) { @@ -275,15 +260,15 @@ namespace Phonon //we can get the state for (int i = 0; i < unused.count(); ++i) { //we should remove this filter from the graph - w.graph->RemoveFilter(unused.at(i)); + m_currentWork.graph->RemoveFilter(unused.at(i)); } //we can get the state - ComPointer<IMediaControl> mc(w.graph, IID_IMediaControl); + ComPointer<IMediaControl> mc(m_currentWork.graph, IID_IMediaControl); //we change the state here - switch(w.state) + switch(m_currentWork.state) { case State_Stopped: mc->Stop(); @@ -301,32 +286,27 @@ namespace Phonon if (SUCCEEDED(hr)) { if (s == State_Stopped) { - emit stateReady(w.graph, Phonon::StoppedState); + emit stateReady(m_currentWork.graph, Phonon::StoppedState); } else if (s == State_Paused) { - emit stateReady(w.graph, Phonon::PausedState); + emit stateReady(m_currentWork.graph, Phonon::PausedState); } else /*if (s == State_Running)*/ { - emit stateReady(w.graph, Phonon::PlayingState); + emit stateReady(m_currentWork.graph, Phonon::PlayingState); } } } { - QMutexLocker locker(&m_currentMutex); - m_currentRender = Graph(); - m_currentRenderId = 0; + QMutexLocker locker(&m_mutex); + m_currentWork = Work(); //reinitialize } } void WorkerThread::abortCurrentRender(qint16 renderId) { - { - QMutexLocker locker(&m_currentMutex); - if (m_currentRender && m_currentRenderId == renderId) { - m_currentRender->Abort(); - } - } - QMutexLocker locker(&m_mutex); + if (m_currentWork.id == renderId) { + m_currentWork.graph->Abort(); + } bool found = false; for(int i = 0; !found && i < m_queue.size(); ++i) { const Work &w = m_queue.at(i); @@ -345,9 +325,9 @@ namespace Phonon { QMutexLocker locker(&m_mutex); m_queue.clear(); - if (m_currentRender) { + if (m_currentWork.graph) { //in case we're currently rendering something - m_currentRender->Abort(); + m_currentWork.graph->Abort(); } @@ -835,9 +815,9 @@ namespace Phonon #endif LPAMGETERRORTEXT getErrorText = (LPAMGETERRORTEXT)QLibrary::resolve(QLatin1String("quartz"), "AMGetErrorTextW"); - ushort buffer[MAX_ERROR_TEXT_LEN]; - if (getErrorText && getErrorText(hr, (WCHAR*)buffer, MAX_ERROR_TEXT_LEN)) { - m_errorString = QString::fromUtf16(buffer); + WCHAR buffer[MAX_ERROR_TEXT_LEN]; + if (getErrorText && getErrorText(hr, buffer, MAX_ERROR_TEXT_LEN)) { + m_errorString = QString::fromWCharArray(buffer); } else { m_errorString = QString::fromLatin1("Unknown error"); } diff --git a/src/3rdparty/phonon/ds9/mediaobject.h b/src/3rdparty/phonon/ds9/mediaobject.h index a6beb5f..34aa666 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.h +++ b/src/3rdparty/phonon/ds9/mediaobject.h @@ -114,6 +114,7 @@ namespace Phonon enum Task { + None, Render, Seek, ChangeState, @@ -122,6 +123,7 @@ namespace Phonon struct Work { + Work() : task(None), id(0), time(0) { } Task task; quint16 id; Graph graph; @@ -137,14 +139,12 @@ namespace Phonon }; void handleTask(); - Graph m_currentRender; - qint16 m_currentRenderId; + Work m_currentWork; QQueue<Work> m_queue; bool m_finished; quint16 m_currentWorkId; QWinWaitCondition m_waitCondition; QMutex m_mutex; // mutex for the m_queue, m_finished and m_currentWorkId - QMutex m_currentMutex; //mutex for current renderer and id //this is for WaitForMultipleObjects struct diff --git a/src/3rdparty/phonon/ds9/qasyncreader.cpp b/src/3rdparty/phonon/ds9/qasyncreader.cpp index 68ec1f8..a3f9cda 100644 --- a/src/3rdparty/phonon/ds9/qasyncreader.cpp +++ b/src/3rdparty/phonon/ds9/qasyncreader.cpp @@ -15,8 +15,6 @@ You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#include <QtCore/QFile> - #include "qasyncreader.h" #include "qbasefilter.h" @@ -80,8 +78,7 @@ namespace Phonon STDMETHODIMP QAsyncReader::Request(IMediaSample *sample,DWORD_PTR user) { - QMutexLocker mutexLocker(&m_mutexWait); - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (m_flushing) { return VFW_E_WRONG_STATE; } @@ -93,33 +90,28 @@ namespace Phonon STDMETHODIMP QAsyncReader::WaitForNext(DWORD timeout, IMediaSample **sample, DWORD_PTR *user) { - QMutexLocker locker(&m_mutexWait); + QMutexLocker locker(&m_mutex); if (!sample ||!user) { return E_POINTER; } + //msdn says to return immediately if we're flushing but that doesn't seem to be true + //since it triggers a dead-lock somewhere inside directshow (see task 258830) + *sample = 0; *user = 0; - AsyncRequest r = getNextRequest(); - - if (r.sample == 0) { - //there is no request in the queue - if (isFlushing()) { + if (m_requestQueue.isEmpty()) { + if (m_requestWait.wait(&m_mutex, timeout) == false) { + return VFW_E_TIMEOUT; + } + if (m_requestQueue.isEmpty()) { return VFW_E_WRONG_STATE; - } else { - //First we need to lock the mutex - if (m_requestWait.wait(&m_mutexWait, timeout) == false) { - return VFW_E_TIMEOUT; - } - if (isFlushing()) { - return VFW_E_WRONG_STATE; - } - - r = getNextRequest(); } } + AsyncRequest r = m_requestQueue.dequeue(); + //at this point we're sure to have a request to proceed if (r.sample == 0) { return E_FAIL; @@ -127,14 +119,12 @@ namespace Phonon *sample = r.sample; *user = r.user; - - return SyncReadAligned(r.sample); + return syncReadAlignedUnlocked(r.sample); } STDMETHODIMP QAsyncReader::BeginFlush() { - QMutexLocker mutexLocker(&m_mutexWait); - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = true; m_requestWait.wakeOne(); return S_OK; @@ -142,13 +132,28 @@ namespace Phonon STDMETHODIMP QAsyncReader::EndFlush() { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = false; return S_OK; } STDMETHODIMP QAsyncReader::SyncReadAligned(IMediaSample *sample) { + QMutexLocker locker(&m_mutex); + return syncReadAlignedUnlocked(sample); + } + + STDMETHODIMP QAsyncReader::SyncRead(LONGLONG pos, LONG length, BYTE *buffer) + { + QMutexLocker locker(&m_mutex); + return read(pos, length, buffer, 0); + } + + + STDMETHODIMP QAsyncReader::syncReadAlignedUnlocked(IMediaSample *sample) + { + Q_ASSERT(!m_mutex.tryLock()); + if (!sample) { return E_POINTER; } @@ -175,23 +180,6 @@ namespace Phonon return sample->SetActualDataLength(actual); } - STDMETHODIMP QAsyncReader::SyncRead(LONGLONG pos, LONG length, BYTE *buffer) - { - return read(pos, length, buffer, 0); - } - - - //addition - QAsyncReader::AsyncRequest QAsyncReader::getNextRequest() - { - QWriteLocker locker(&m_lock); - AsyncRequest ret; - if (!m_requestQueue.isEmpty()) { - ret = m_requestQueue.dequeue(); - } - - return ret; - } } } diff --git a/src/3rdparty/phonon/ds9/qasyncreader.h b/src/3rdparty/phonon/ds9/qasyncreader.h index cb789ee..95872f9 100644 --- a/src/3rdparty/phonon/ds9/qasyncreader.h +++ b/src/3rdparty/phonon/ds9/qasyncreader.h @@ -48,11 +48,12 @@ namespace Phonon STDMETHODIMP WaitForNext(DWORD,IMediaSample **,DWORD_PTR *); STDMETHODIMP SyncReadAligned(IMediaSample *); STDMETHODIMP SyncRead(LONGLONG,LONG,BYTE *); - virtual STDMETHODIMP Length(LONGLONG *,LONGLONG *) = 0; + STDMETHODIMP Length(LONGLONG *,LONGLONG *) = 0; STDMETHODIMP BeginFlush(); STDMETHODIMP EndFlush(); protected: + STDMETHODIMP syncReadAlignedUnlocked(IMediaSample *); virtual HRESULT read(LONGLONG pos, LONG length, BYTE *buffer, LONG *actual) = 0; private: @@ -62,9 +63,6 @@ namespace Phonon IMediaSample *sample; DWORD_PTR user; }; - AsyncRequest getNextRequest(); - - QMutex m_mutexWait; QQueue<AsyncRequest> m_requestQueue; QWaitCondition m_requestWait; diff --git a/src/3rdparty/phonon/ds9/qbasefilter.cpp b/src/3rdparty/phonon/ds9/qbasefilter.cpp index c950c41..78b8b8f 100644 --- a/src/3rdparty/phonon/ds9/qbasefilter.cpp +++ b/src/3rdparty/phonon/ds9/qbasefilter.cpp @@ -166,19 +166,19 @@ namespace Phonon const QList<QPin *> QBaseFilter::pins() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_pins; } void QBaseFilter::addPin(QPin *pin) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_pins.append(pin); } void QBaseFilter::removePin(QPin *pin) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_pins.removeAll(pin); } @@ -251,35 +251,35 @@ namespace Phonon STDMETHODIMP QBaseFilter::GetClassID(CLSID *clsid) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); *clsid = m_clsid; return S_OK; } STDMETHODIMP QBaseFilter::Stop() { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_state = State_Stopped; return S_OK; } STDMETHODIMP QBaseFilter::Pause() { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_state = State_Paused; return S_OK; } STDMETHODIMP QBaseFilter::Run(REFERENCE_TIME) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_state = State_Running; return S_OK; } STDMETHODIMP QBaseFilter::GetState(DWORD, FILTER_STATE *state) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!state) { return E_POINTER; } @@ -290,7 +290,7 @@ namespace Phonon STDMETHODIMP QBaseFilter::SetSyncSource(IReferenceClock *clock) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (clock) { clock->AddRef(); } @@ -303,7 +303,7 @@ namespace Phonon STDMETHODIMP QBaseFilter::GetSyncSource(IReferenceClock **clock) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!clock) { return E_POINTER; } @@ -342,7 +342,7 @@ namespace Phonon STDMETHODIMP QBaseFilter::QueryFilterInfo(FILTER_INFO *info ) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!info) { return E_POINTER; } @@ -356,9 +356,9 @@ namespace Phonon STDMETHODIMP QBaseFilter::JoinFilterGraph(IFilterGraph *graph, LPCWSTR name) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_graph = graph; - m_name = QString::fromUtf16((const unsigned short*)name); + m_name = QString::fromWCharArray(name); return S_OK; } diff --git a/src/3rdparty/phonon/ds9/qbasefilter.h b/src/3rdparty/phonon/ds9/qbasefilter.h index 85f1431..a72d6fe 100644 --- a/src/3rdparty/phonon/ds9/qbasefilter.h +++ b/src/3rdparty/phonon/ds9/qbasefilter.h @@ -22,7 +22,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QtCore/QString> #include <QtCore/QList> -#include <QtCore/QReadWriteLock> +#include <QtCore/QMutex> #include <dshow.h> @@ -127,7 +127,7 @@ namespace Phonon IFilterGraph *m_graph; FILTER_STATE m_state; QList<QPin *> m_pins; - mutable QReadWriteLock m_lock; + mutable QMutex m_mutex; }; } } diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp index 865b8af..a21fbe7 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp +++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp @@ -28,8 +28,8 @@ namespace Phonon namespace DS9 { - QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, bool transform) : - QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform) + QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, bool transform, QPin *output) : + QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform), m_output(output) { } @@ -66,11 +66,9 @@ namespace Phonon { //this allows to serialize with Receive calls QMutexLocker locker(&m_mutexReceive); - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *conn = m_outputs.at(i)->connected(); - if (conn) { - conn->EndOfStream(); - } + IPin *conn = m_output ? m_output->connected() : 0; + if (conn) { + conn->EndOfStream(); } return S_OK; } @@ -78,13 +76,11 @@ namespace Phonon STDMETHODIMP QMemInputPin::BeginFlush() { //pass downstream - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *conn = m_outputs.at(i)->connected(); - if (conn) { - conn->BeginFlush(); - } + IPin *conn = m_output ? m_output->connected() : 0; + if (conn) { + conn->BeginFlush(); } - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = true; return S_OK; } @@ -92,22 +88,19 @@ namespace Phonon STDMETHODIMP QMemInputPin::EndFlush() { //pass downstream - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *conn = m_outputs.at(i)->connected(); - if (conn) { - conn->EndFlush(); - } + IPin *conn = m_output ? m_output->connected() : 0; + if (conn) { + conn->EndFlush(); } - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = false; return S_OK; } STDMETHODIMP QMemInputPin::NewSegment(REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { - for(int i = 0; i < m_outputs.count(); ++i) { - m_outputs.at(i)->NewSegment(start, stop, rate); - } + if (m_output) + m_output->NewSegment(start, stop, rate); return S_OK; } @@ -119,14 +112,9 @@ namespace Phonon if (hr == S_OK && mt->majortype != MEDIATYPE_NULL && mt->subtype != MEDIASUBTYPE_NULL && - mt->formattype != GUID_NULL) { - //we tell the output pins that they should connect with this type - for(int i = 0; i < m_outputs.count(); ++i) { - hr = m_outputs.at(i)->setAcceptedMediaType(connectedType()); - if (FAILED(hr)) { - break; - } - } + mt->formattype != GUID_NULL && m_output) { + //we tell the output pin that it should connect with this type + hr = m_output->setAcceptedMediaType(connectedType()); } return hr; } @@ -152,18 +140,15 @@ namespace Phonon } { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_shouldDuplicateSamples = m_transform && readonly; } setMemoryAllocator(alloc); - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *pin = m_outputs.at(i)->connected(); - if (pin) { - ComPointer<IMemInputPin> input(pin, IID_IMemInputPin); - input->NotifyAllocator(alloc, m_shouldDuplicateSamples); - } + if (m_output) { + ComPointer<IMemInputPin> input(m_output, IID_IMemInputPin); + input->NotifyAllocator(alloc, m_shouldDuplicateSamples); } return S_OK; @@ -202,22 +187,18 @@ namespace Phonon } } - for (int i = 0; i < m_outputs.count(); ++i) { - QPin *current = m_outputs.at(i); + if (m_output) { IMediaSample *outSample = m_shouldDuplicateSamples ? - duplicateSampleForOutput(sample, current->memoryAllocator()) + duplicateSampleForOutput(sample, m_output->memoryAllocator()) : sample; if (m_shouldDuplicateSamples) { m_parent->processSample(outSample); } - IPin *pin = current->connected(); - if (pin) { - ComPointer<IMemInputPin> input(pin, IID_IMemInputPin); - if (input) { - input->Receive(outSample); - } + ComPointer<IMemInputPin> input(m_output->connected(), IID_IMemInputPin); + if (input) { + input->Receive(outSample); } if (m_shouldDuplicateSamples) { @@ -248,39 +229,16 @@ namespace Phonon STDMETHODIMP QMemInputPin::ReceiveCanBlock() { - //we test the output to see if they can block - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *input = m_outputs.at(i)->connected(); - if (input) { - ComPointer<IMemInputPin> meminput(input, IID_IMemInputPin); - if (meminput && meminput->ReceiveCanBlock() != S_FALSE) { - return S_OK; - } + //we test the output to see if it can block + if (m_output) { + ComPointer<IMemInputPin> meminput(m_output->connected(), IID_IMemInputPin); + if (meminput && meminput->ReceiveCanBlock() != S_FALSE) { + return S_OK; } } return S_FALSE; } - //addition - //this should be used by the filter to tell its input pins to which output they should route the samples - - void QMemInputPin::addOutput(QPin *output) - { - QWriteLocker locker(&m_lock); - m_outputs += output; - } - - void QMemInputPin::removeOutput(QPin *output) - { - QWriteLocker locker(&m_lock); - m_outputs.removeOne(output); - } - - QList<QPin*> QMemInputPin::outputs() const - { - QReadLocker locker(&m_lock); - return m_outputs; - } ALLOCATOR_PROPERTIES QMemInputPin::getDefaultAllocatorProperties() const { diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.h b/src/3rdparty/phonon/ds9/qmeminputpin.h index c449721..d74c451 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.h +++ b/src/3rdparty/phonon/ds9/qmeminputpin.h @@ -37,7 +37,7 @@ namespace Phonon class QMemInputPin : public QPin, public IMemInputPin { public: - QMemInputPin(QBaseFilter *, const QVector<AM_MEDIA_TYPE> &, bool transform); + QMemInputPin(QBaseFilter *, const QVector<AM_MEDIA_TYPE> &, bool transform, QPin *output); ~QMemInputPin(); //reimplementation from IUnknown @@ -60,18 +60,13 @@ namespace Phonon STDMETHODIMP ReceiveMultiple(IMediaSample **,long,long *); STDMETHODIMP ReceiveCanBlock(); - //addition - void addOutput(QPin *output); - void removeOutput(QPin *output); - QList<QPin*> outputs() const; - private: IMediaSample *duplicateSampleForOutput(IMediaSample *, IMemAllocator *); ALLOCATOR_PROPERTIES getDefaultAllocatorProperties() const; bool m_shouldDuplicateSamples; const bool m_transform; //defines if the pin is transforming the samples - QList<QPin*> m_outputs; + QPin* const m_output; QMutex m_mutexReceive; }; } diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp index d14876b..b4afd10 100644 --- a/src/3rdparty/phonon/ds9/qpin.cpp +++ b/src/3rdparty/phonon/ds9/qpin.cpp @@ -323,7 +323,7 @@ namespace Phonon STDMETHODIMP QPin::ConnectionMediaType(AM_MEDIA_TYPE *type) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!type) { return E_POINTER; } @@ -338,7 +338,6 @@ namespace Phonon STDMETHODIMP QPin::QueryPinInfo(PIN_INFO *info) { - QReadLocker locker(&m_lock); if (!info) { return E_POINTER; } @@ -346,14 +345,12 @@ namespace Phonon info->dir = m_direction; info->pFilter = m_parent; m_parent->AddRef(); - qMemCopy(info->achName, m_name.utf16(), qMin(MAX_FILTER_NAME, m_name.length()+1) *2); - + info->achName[0] = 0; return S_OK; } STDMETHODIMP QPin::QueryDirection(PIN_DIRECTION *dir) { - QReadLocker locker(&m_lock); if (!dir) { return E_POINTER; } @@ -364,20 +361,18 @@ namespace Phonon STDMETHODIMP QPin::QueryId(LPWSTR *id) { - QReadLocker locker(&m_lock); if (!id) { return E_POINTER; } - int nbBytes = (m_name.length()+1)*2; - *id = static_cast<LPWSTR>(::CoTaskMemAlloc(nbBytes)); - qMemCopy(*id, m_name.utf16(), nbBytes); + *id = static_cast<LPWSTR>(::CoTaskMemAlloc(2)); + *id[0] = 0; return S_OK; } STDMETHODIMP QPin::QueryAccept(const AM_MEDIA_TYPE *type) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!type) { return E_POINTER; } @@ -424,7 +419,7 @@ namespace Phonon STDMETHODIMP QPin::NewSegment(REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (m_direction == PINDIR_OUTPUT && m_connected) { //we deliver this downstream m_connected->NewSegment(start, stop, rate); @@ -505,7 +500,7 @@ namespace Phonon void QPin::setConnectedType(const AM_MEDIA_TYPE &type) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); //1st we free memory freeMediaType(m_connectedType); @@ -515,13 +510,13 @@ namespace Phonon const AM_MEDIA_TYPE &QPin::connectedType() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_connectedType; } void QPin::setConnected(IPin *pin) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (pin) { pin->AddRef(); } @@ -533,7 +528,7 @@ namespace Phonon IPin *QPin::connected(bool addref) const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (addref && m_connected) { m_connected->AddRef(); } @@ -542,13 +537,12 @@ namespace Phonon bool QPin::isFlushing() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_flushing; } FILTER_STATE QPin::filterState() const { - QReadLocker locker(&m_lock); FILTER_STATE fstate = State_Stopped; m_parent->GetState(0, &fstate); return fstate; @@ -556,7 +550,7 @@ namespace Phonon QVector<AM_MEDIA_TYPE> QPin::mediaTypes() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_mediaTypes; } @@ -592,7 +586,7 @@ namespace Phonon void QPin::setMemoryAllocator(IMemAllocator *alloc) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (alloc) { alloc->AddRef(); } @@ -604,7 +598,7 @@ namespace Phonon IMemAllocator *QPin::memoryAllocator(bool addref) const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (addref && m_memAlloc) { m_memAlloc->AddRef(); } diff --git a/src/3rdparty/phonon/ds9/qpin.h b/src/3rdparty/phonon/ds9/qpin.h index a3287c4..280ad61 100644 --- a/src/3rdparty/phonon/ds9/qpin.h +++ b/src/3rdparty/phonon/ds9/qpin.h @@ -22,7 +22,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QtCore/QString> #include <QtCore/QVector> -#include <QtCore/QReadWriteLock> +#include <QtCore/QMutex> #include <dshow.h> @@ -85,8 +85,8 @@ namespace Phonon protected: //this can be used by sub-classes - mutable QReadWriteLock m_lock; - QBaseFilter *m_parent; + mutable QMutex m_mutex; + QBaseFilter * const m_parent; bool m_flushing; private: @@ -98,7 +98,6 @@ namespace Phonon const PIN_DIRECTION m_direction; QVector<AM_MEDIA_TYPE> m_mediaTypes; //accepted media types AM_MEDIA_TYPE m_connectedType; - QString m_name; IMemAllocator *m_memAlloc; }; diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp index cf5ce96..82d6235 100644 --- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp +++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp @@ -365,7 +365,7 @@ namespace Phonon { public: VideoRendererSoftPin(VideoRendererSoftFilter *parent) : - QMemInputPin(parent, videoMediaTypes(), false /*no transformation of the samples*/), + QMemInputPin(parent, videoMediaTypes(), false /*no transformation of the samples*/, 0), m_renderer(parent) { } diff --git a/src/3rdparty/phonon/ds9/volumeeffect.cpp b/src/3rdparty/phonon/ds9/volumeeffect.cpp index b9a5fce..a93b074 100644 --- a/src/3rdparty/phonon/ds9/volumeeffect.cpp +++ b/src/3rdparty/phonon/ds9/volumeeffect.cpp @@ -76,7 +76,7 @@ namespace Phonon class VolumeMemInputPin : public QMemInputPin { public: - VolumeMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt) : QMemInputPin(parent, mt, true /*transform*/) + VolumeMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> &mt, QPin *output) : QMemInputPin(parent, mt, true /*transform*/, output) { } @@ -139,8 +139,7 @@ namespace Phonon //then creating the input mt << audioMediaType(); - m_input = new VolumeMemInputPin(this, mt); - m_input->addOutput(m_output); //make the connection here + m_input = new VolumeMemInputPin(this, mt, m_output); } void VolumeEffectFilter::treatOneSamplePerChannel(BYTE **buffer, int sampleSize, int channelCount, int frequency) diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp index 4b943c2..596d89a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp @@ -1261,6 +1261,7 @@ CodeBlock::CodeBlock(ScopeNode* ownerNode) #endif , m_needsFullScopeChain(false) , m_usesEval(false) + , m_usesArguments(false) , m_isNumericCompareFunction(false) , m_codeType(NativeCode) , m_source(0) @@ -1283,6 +1284,7 @@ CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr<SourceP #endif , m_needsFullScopeChain(ownerNode->needsActivation()) , m_usesEval(ownerNode->usesEval()) + , m_usesArguments(ownerNode->usesArguments()) , m_isNumericCompareFunction(false) , m_codeType(codeType) , m_source(sourceProvider) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp index b669dfa..8371229 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp @@ -763,6 +763,7 @@ void JIT::emit_op_debug(Instruction* currentInstruction) stubCall.addArgument(Imm32(currentInstruction[1].u.operand)); stubCall.addArgument(Imm32(currentInstruction[2].u.operand)); stubCall.addArgument(Imm32(currentInstruction[3].u.operand)); + stubCall.addArgument(Imm32(currentInstruction[4].u.operand)); stubCall.call(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 40d2182..2563848 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -58,6 +58,10 @@ #include "SamplingTool.h" #include <stdio.h> +#ifdef QT_BUILD_SCRIPT_LIB +#include "bridge/qscriptobject_p.h" +#endif + using namespace std; namespace JSC { @@ -1470,7 +1474,11 @@ DEFINE_STUB_FUNCTION(JSObject*, op_construct_JSConstruct) structure = asObject(stackFrame.args[3].jsValue())->inheritorID(); else structure = constructor->scope().node()->globalObject()->emptyObjectStructure(); +#ifdef QT_BUILD_SCRIPT_LIB + return new (stackFrame.globalData) QScriptObject(structure); +#else return new (stackFrame.globalData) JSObject(structure); +#endif } DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct) diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.h b/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.h index baed3ba..da58edb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.h @@ -28,6 +28,8 @@ namespace JSC { + QT_USE_NAMESPACE + class SourceCode; class Debugger; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp index f64219c..fa19932 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp @@ -40,6 +40,7 @@ #include <wtf/MathExtras.h> #include <wtf/Vector.h> #include <wtf/unicode/UTF8.h> +#include <wtf/StringExtras.h> #if HAVE(STRING_H) #include <string.h> diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h index 0a53c50..ab64f52 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h @@ -366,12 +366,13 @@ namespace JSC { } #if PLATFORM(QT) - operator QString() const + operator QT_PREPEND_NAMESPACE(QString)() const { + QT_USE_NAMESPACE; return QString(reinterpret_cast<const QChar*>(this->data()), this->size()); } - UString(const QString& str) + UString(const QT_PREPEND_NAMESPACE(QString)& str) { *this = JSC::UString(reinterpret_cast<const UChar*>(str.constData()), str.length()); } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h index 1be7455..d691357 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h @@ -144,7 +144,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann #if ASSERT_DISABLED #define ASSERT(assertion) ((void)0) -#if COMPILER(MSVC7) +#if COMPILER(MSVC7) || COMPILER(WINSCW) #define ASSERT_WITH_MESSAGE(assertion) ((void)0) #else #define ASSERT_WITH_MESSAGE(assertion, ...) ((void)0) @@ -160,7 +160,7 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann CRASH(); \ } \ while (0) -#if COMPILER(MSVC7) +#if COMPILER(MSVC7) || COMPILER(WINSCW) #define ASSERT_WITH_MESSAGE(assertion) ((void)0) #else #define ASSERT_WITH_MESSAGE(assertion, ...) do \ @@ -203,7 +203,7 @@ while (0) /* FATAL */ -#if FATAL_DISABLED && !COMPILER(MSVC7) +#if FATAL_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW) #define FATAL(...) ((void)0) #elif COMPILER(MSVC7) #define FATAL() ((void)0) @@ -216,9 +216,9 @@ while (0) /* LOG_ERROR */ -#if ERROR_DISABLED && !COMPILER(MSVC7) +#if ERROR_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW) #define LOG_ERROR(...) ((void)0) -#elif COMPILER(MSVC7) +#elif COMPILER(MSVC7) || COMPILER(WINSCW) #define LOG_ERROR() ((void)0) #else #define LOG_ERROR(...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__) @@ -226,9 +226,9 @@ while (0) /* LOG */ -#if LOG_DISABLED && !COMPILER(MSVC7) +#if LOG_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW) #define LOG(channel, ...) ((void)0) -#elif COMPILER(MSVC7) +#elif COMPILER(MSVC7) || COMPILER(WINSCW) #define LOG() ((void)0) #else #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) @@ -238,9 +238,9 @@ while (0) /* LOG_VERBOSE */ -#if LOG_DISABLED && !COMPILER(MSVC7) +#if LOG_DISABLED && !COMPILER(MSVC7) && !COMPILER(WINSCW) #define LOG_VERBOSE(channel, ...) ((void)0) -#elif COMPILER(MSVC7) +#elif COMPILER(MSVC7) || COMPILER(WINSCW) #define LOG_VERBOSE(channel) ((void)0) #else #define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index bff770c..e3cb718 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -580,6 +580,7 @@ namespace WTF { }; #if PLATFORM(QT) + QT_USE_NAMESPACE template<typename T> QDataStream& operator<<(QDataStream& stream, const Vector<T>& data) { diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/qt/MainThreadQt.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/qt/MainThreadQt.cpp index 7b2d0f2..0ac2717 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/qt/MainThreadQt.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/qt/MainThreadQt.cpp @@ -37,6 +37,8 @@ namespace WTF { +QT_USE_NAMESPACE + class MainThreadInvoker : public QObject { Q_OBJECT public: diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/qt/ThreadingQt.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/qt/ThreadingQt.cpp index 1fdd2bb..5a84764 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/qt/ThreadingQt.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/qt/ThreadingQt.cpp @@ -41,6 +41,8 @@ namespace WTF { +QT_USE_NAMESPACE + class ThreadPrivate : public QThread { public: ThreadPrivate(ThreadFunction entryPoint, void* data); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h index 1531694..65b3e79 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h @@ -108,6 +108,8 @@ typedef uint32_t UChar32; namespace WTF { namespace Unicode { +QT_USE_NAMESPACE + enum Direction { LeftToRight = QChar::DirL, RightToLeft = QChar::DirR, diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index e4c9d42..621c836 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -1535,9 +1535,10 @@ HRESULT WINAPI QAxClientSite::SetBorderSpace(LPCBORDERWIDTHS pborderwidths) HRESULT WINAPI QAxClientSite::SetActiveObject(IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) { AX_DEBUG(QAxClientSite::SetActiveObject); - - if (pszObjName && widget) - widget->setWindowTitle(QString::fromWCharArray(pszObjName)); + + Q_UNUSED(pszObjName); + // we are ignoring the name of the object, as suggested by MSDN documentation + // for IOleInPlaceUIWindow::SetActiveObject(). if (m_spInPlaceActiveObject) { if (!inPlaceModelessEnabled) diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index efe1fb0..49bd8e9 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -161,7 +161,9 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer) -QUnifiedTimer::QUnifiedTimer() : QObject(), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL), consistentTiming(false) +QUnifiedTimer::QUnifiedTimer() : + QObject(), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL), + currentAnimationIdx(0), consistentTiming(false) { } @@ -200,18 +202,19 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event) } } else if (event->timerId() == animationTimer.timerId()) { const int delta = lastTick - oldLastTick; - for (int i = 0; i < animations.count(); ++i) { - QAbstractAnimation *animation = animations.at(i); + for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) { + QAbstractAnimation *animation = animations.at(currentAnimationIdx); int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime + (animation->direction() == QAbstractAnimation::Forward ? delta : -delta); animation->setCurrentTime(elapsed); } + currentAnimationIdx = 0; } } void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation) { - if (animations.contains(animation) ||animationsToStart.contains(animation)) + if (animations.contains(animation) || animationsToStart.contains(animation)) return; animationsToStart << animation; startStopAnimationTimer.start(0, this); // we delay the check if we should start/stop the global timer @@ -219,8 +222,17 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation) void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation) { - animations.removeAll(animation); - animationsToStart.removeAll(animation); + Q_ASSERT(animations.count(animation) + animationsToStart.count(animation) <= 1); + + int idx = animations.indexOf(animation); + if (idx != -1) { + animations.removeAt(idx); + // this is needed if we unregister an animation while its running + if (idx <= currentAnimationIdx) + --currentAnimationIdx; + } else { + animationsToStart.removeOne(animation); + } startStopAnimationTimer.start(0, this); // we delay the check if we should start/stop the global timer } @@ -247,28 +259,33 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState) } state = newState; - QPointer<QAbstractAnimation> guard(q); + QWeakPointer<QAbstractAnimation> guard(q); - guard->updateState(oldState, newState); + q->updateState(oldState, newState); + if (!guard) + return; //this is to be safe if updateState changes the state if (state == oldState) return; // Notify state change - if (guard) - emit guard->stateChanged(oldState, newState); + emit q->stateChanged(oldState, newState); + if (!guard) + return; - switch (state) - { + switch (state) { case QAbstractAnimation::Paused: case QAbstractAnimation::Running: //this ensures that the value is updated now that the animation is running - if(oldState == QAbstractAnimation::Stopped && guard) - guard->setCurrentTime(currentTime); + if(oldState == QAbstractAnimation::Stopped) { + q->setCurrentTime(currentTime); + if (!guard) + return; + } // Register timer if our parent is not running. - if (state == QAbstractAnimation::Running && guard) { + if (state == QAbstractAnimation::Running) { if (!group || group->state() == QAbstractAnimation::Stopped) { QUnifiedTimer::instance()->registerAnimation(q); } @@ -280,7 +297,10 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState) case QAbstractAnimation::Stopped: // Leave running state. int dura = q->duration(); - if (deleteWhenStopped && guard) + if (!guard) + return; + + if (deleteWhenStopped) q->deleteLater(); QUnifiedTimer::instance()->unregisterAnimation(q); @@ -288,8 +308,7 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState) if (dura == -1 || loopCount < 0 || (oldDirection == QAbstractAnimation::Forward && (oldCurrentTime * (oldCurrentLoop + 1)) == (dura * loopCount)) || (oldDirection == QAbstractAnimation::Backward && oldCurrentTime == 0)) { - if (guard) - emit q->finished(); + emit q->finished(); } break; } diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h index 32189f5..bcd7354 100644 --- a/src/corelib/animation/qabstractanimation_p.h +++ b/src/corelib/animation/qabstractanimation_p.h @@ -141,6 +141,7 @@ private: QTime time; int lastTick; int timingInterval; + int currentAnimationIdx; bool consistentTiming; QList<QAbstractAnimation*> animations, animationsToStart; }; diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index 35d65d0..49862d2 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -92,8 +92,6 @@ #include "qanimationgroup.h" #include "qpropertyanimation_p.h" -#include <QtCore/qmath.h> -#include <QtCore/qmutex.h> #include <private/qmutexpool_p.h> #ifndef QT_NO_ANIMATION @@ -102,50 +100,38 @@ QT_BEGIN_NAMESPACE void QPropertyAnimationPrivate::updateMetaProperty() { - if (!target || propertyName.isEmpty()) + if (!target || propertyName.isEmpty()) { + propertyType = QVariant::Invalid; + propertyIndex = -1; return; - - if (!hasMetaProperty && !property.isValid()) { - const QMetaObject *mo = target->metaObject(); - propertyIndex = mo->indexOfProperty(propertyName); - if (propertyIndex != -1) { - hasMetaProperty = true; - property = mo->property(propertyIndex); - propertyType = property.userType(); - } else { - if (!target->dynamicPropertyNames().contains(propertyName)) - qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData()); - } } - if (property.isValid()) + propertyType = targetValue->property(propertyName).userType(); + propertyIndex = targetValue->metaObject()->indexOfProperty(propertyName); + if (propertyIndex == -1 && !targetValue->dynamicPropertyNames().contains(propertyName)) + qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData()); + + if (propertyType != QVariant::Invalid) convertValues(propertyType); } void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) { - if (!target || state == QAbstractAnimation::Stopped) + if (state == QAbstractAnimation::Stopped) return; - if (hasMetaProperty) { - if (newValue.userType() == propertyType) { - //no conversion is needed, we directly call the QObject::qt_metacall - void *data = const_cast<void*>(newValue.constData()); - target->qt_metacall(QMetaObject::WriteProperty, propertyIndex, &data); - } else { - property.write(target, newValue); - } - } else { - target->setProperty(propertyName.constData(), newValue); + if (!target) { + q_func()->stop(); //the target was destroyed we need to stop the animation + return; } -} -void QPropertyAnimationPrivate::_q_targetDestroyed() -{ - Q_Q(QPropertyAnimation); - //we stop here so that this animation is removed from the global hash - q->stop(); - target = 0; + if (propertyIndex != -1 && newValue.userType() == propertyType) { + //no conversion is needed, we directly call the QObject::qt_metacall + void *data = const_cast<void*>(newValue.constData()); + targetValue->qt_metacall(QMetaObject::WriteProperty, propertyIndex, &data); + } else { + targetValue->setProperty(propertyName.constData(), newValue); + } } /*! @@ -187,14 +173,13 @@ QPropertyAnimation::~QPropertyAnimation() */ QObject *QPropertyAnimation::targetObject() const { - Q_D(const QPropertyAnimation); - return d->target; + return d_func()->target.data(); } void QPropertyAnimation::setTargetObject(QObject *target) { Q_D(QPropertyAnimation); - if (d->target == target) + if (d->targetValue == target) return; if (d->state != QAbstractAnimation::Stopped) { @@ -202,15 +187,7 @@ void QPropertyAnimation::setTargetObject(QObject *target) return; } - //we need to get notified when the target is destroyed - if (d->target) - disconnect(d->target, SIGNAL(destroyed()), this, SLOT(_q_targetDestroyed())); - - if (target) - connect(target, SIGNAL(destroyed()), SLOT(_q_targetDestroyed())); - - d->target = target; - d->hasMetaProperty = false; + d->target = d->targetValue = target; d->updateMetaProperty(); } @@ -236,7 +213,6 @@ void QPropertyAnimation::setPropertyName(const QByteArray &propertyName) } d->propertyName = propertyName; - d->hasMetaProperty = false; d->updateMetaProperty(); } @@ -273,7 +249,7 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState, { Q_D(QPropertyAnimation); - if (!d->target) { + if (!d->target && oldState == Stopped) { qWarning("QPropertyAnimation::updateState: Changing state of an animation without target"); return; } @@ -286,14 +262,16 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState, typedef QPair<QObject *, QByteArray> QPropertyAnimationPair; typedef QHash<QPropertyAnimationPair, QPropertyAnimation*> QPropertyAnimationHash; static QPropertyAnimationHash hash; - QPropertyAnimationPair key(d->target, d->propertyName); + //here we need to use value because we need to know to which pointer + //the animation was referring in case stopped because the target was destroyed + QPropertyAnimationPair key(d->targetValue, d->propertyName); if (newState == Running) { d->updateMetaProperty(); animToStop = hash.value(key, 0); hash.insert(key, this); // update the default start value if (oldState == Stopped) { - d->setDefaultStartEndValue(d->target->property(d->propertyName.constData())); + d->setDefaultStartEndValue(d->targetValue->property(d->propertyName.constData())); //let's check if we have a start value and an end value if (d->direction == Forward && !startValue().isValid() && !d->defaultStartEndValue.isValid()) qWarning("QPropertyAnimation::updateState: starting an animation without start value"); diff --git a/src/corelib/animation/qpropertyanimation.h b/src/corelib/animation/qpropertyanimation.h index e12508d..56fb4b1 100644 --- a/src/corelib/animation/qpropertyanimation.h +++ b/src/corelib/animation/qpropertyanimation.h @@ -76,7 +76,6 @@ protected: void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState); private: - Q_PRIVATE_SLOT(d_func(), void _q_targetDestroyed()) Q_DISABLE_COPY(QPropertyAnimation) Q_DECLARE_PRIVATE(QPropertyAnimation) }; diff --git a/src/corelib/animation/qpropertyanimation_p.h b/src/corelib/animation/qpropertyanimation_p.h index ffa6114..3777aa0 100644 --- a/src/corelib/animation/qpropertyanimation_p.h +++ b/src/corelib/animation/qpropertyanimation_p.h @@ -54,7 +54,6 @@ // #include "qpropertyanimation.h" -#include <QtCore/qmetaobject.h> #include "private/qvariantanimation_p.h" @@ -67,20 +66,18 @@ class QPropertyAnimationPrivate : public QVariantAnimationPrivate Q_DECLARE_PUBLIC(QPropertyAnimation) public: QPropertyAnimationPrivate() - : target(0), propertyType(0), propertyIndex(0), hasMetaProperty(false) + : targetValue(0), propertyType(0), propertyIndex(-1) { } - void _q_targetDestroyed(); - - QObject *target; + QWeakPointer<QObject> target; + //we use targetValue to be able to unregister the target from the global hash + QObject *targetValue; //for the QProperty - QMetaProperty property; int propertyType; int propertyIndex; - bool hasMetaProperty; QByteArray propertyName; void updateProperty(const QVariant &); void updateMetaProperty(); diff --git a/src/corelib/animation/qvariantanimation_p.h b/src/corelib/animation/qvariantanimation_p.h index ce625f1..da120df 100644 --- a/src/corelib/animation/qvariantanimation_p.h +++ b/src/corelib/animation/qvariantanimation_p.h @@ -78,10 +78,7 @@ public: void setDefaultStartEndValue(const QVariant &value); - int duration; - QEasingCurve easing; - QVariantAnimation::KeyValues keyValues; QVariant currentValue; QVariant defaultStartEndValue; @@ -91,6 +88,9 @@ public: QVariantAnimation::KeyValue start, end; } currentInterval; + QEasingCurve easing; + int duration; + QVariantAnimation::KeyValues keyValues; QVariantAnimation::Interpolator interpolator; void setCurrentValueForProgress(const qreal progress); diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index ab9a3ca..97026ad 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -91,7 +91,8 @@ Qt { Q_FLAGS(MatchFlags) Q_FLAGS(KeyboardModifiers MouseButtons) Q_ENUMS(WindowType WindowState WindowModality WidgetAttribute ApplicationAttribute) - Q_FLAGS(WindowFlags WindowStates) + Q_ENUMS(InputMethodHint) + Q_FLAGS(WindowFlags WindowStates InputMethodHints) Q_ENUMS(ConnectionType) #endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN)) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 657e367..134cbcc 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2445,7 +2445,7 @@ \value ImhNone No hints. \value ImhHiddenText Characters should be hidden, as is typically used when entering passwords. This is automatically set when setting QLineEdit::echoMode to \c Password. - \value ImhNumbersOnly Only number input is allowed. + \value ImhDigitsOnly Only number input is allowed. \value ImhUppercaseOnly Only upper case letter input is allowed. \value ImhLowercaseOnly Only lower case letter input is allowed. \value ImhNoAutoUppercase The input method should not try to automatically switch to upper case @@ -2456,6 +2456,9 @@ \value ImhNoPredictiveText Do not use predictive text (i.e. dictionary lookup) while typing. \value ImhDialableCharactersOnly Only characters suitable for phone dialling are allowed. + \omitvalue ImhFormattedNumbersOnly + \omitvalue ImhExclusiveInputMask + \note If several flags ending with \c Only are ORed together, the resulting character set will consist of the union of the specified sets. For instance specifying \c ImhNumbersOnly and \c ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters. diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index a7919d3..ec20e4a 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -46,9 +46,6 @@ #ifndef QT_NO_FSFILEENGINE -#ifndef QT_NO_REGEXP -# include "qregexp.h" -#endif #include "qfile.h" #include "qdir.h" #include "qdatetime.h" @@ -71,7 +68,7 @@ QT_BEGIN_NAMESPACE -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) /*! \internal @@ -409,7 +406,7 @@ bool QFSFileEngine::copy(const QString &newName) QString oldNative(QDir::toNativeSeparators(d->filePath)); TPtrC oldPtr(qt_QString2TPtrC(oldNative)); QFileInfo fi(newName); - QString absoluteNewName = fi.absolutePath() + QDir::separator() + fi.fileName(); + QString absoluteNewName = fi.absoluteFilePath(); QString newNative(QDir::toNativeSeparators(absoluteNewName)); TPtrC newPtr(qt_QString2TPtrC(newNative)); TRAPD (err, @@ -422,8 +419,10 @@ bool QFSFileEngine::copy(const QString &newName) } ) // End TRAP delete fm; + // ### Add error reporting on failure return (err == KErrNone); #else + Q_UNUSED(newName); // ### Add copy code for Unix here setError(QFile::UnspecifiedError, QLatin1String("Not implemented!")); return false; @@ -457,10 +456,9 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con { QString dirName = name; if (createParentDirectories) { -#if defined(Q_OS_SYMBIAN) - dirName = QDir::toNativeSeparators(QDir::cleanPath(dirName)); -#else dirName = QDir::cleanPath(dirName); +#if defined(Q_OS_SYMBIAN) + dirName = QDir::toNativeSeparators(dirName); #endif for(int oldslash = -1, slash=0; slash != -1; oldslash = slash) { slash = dirName.indexOf(QDir::separator(), oldslash+1); @@ -493,10 +491,9 @@ bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) co { QString dirName = name; if (recurseParentDirectories) { -#if defined(Q_OS_SYMBIAN) - dirName = QDir::toNativeSeparators(QDir::cleanPath(dirName)); -#else dirName = QDir::cleanPath(dirName); +#if defined(Q_OS_SYMBIAN) + dirName = QDir::toNativeSeparators(dirName); #endif for(int oldslash = 0, slash=dirName.length(); slash > 0; oldslash = slash) { QByteArray chunk = QFile::encodeName(dirName.left(slash)); @@ -537,12 +534,12 @@ QString QFSFileEngine::currentPath(const QString &) QString result; QT_STATBUF st; #if defined(Q_OS_SYMBIAN) - char currentName[PATH_MAX+1]; - if (::getcwd(currentName, PATH_MAX)) - result = QDir::fromNativeSeparators(QFile::decodeName(QByteArray(currentName))); + char nativeCurrentName[PATH_MAX+1]; + if (::getcwd(nativeCurrentName, PATH_MAX)) + result = QDir::fromNativeSeparators(QFile::decodeName(QByteArray(nativeCurrentName))); if (result.isEmpty()) { # if defined(QT_DEBUG) - qWarning("QDir::currentPath: getcwd() failed"); + qWarning("QFSFileEngine::currentPath: getcwd() failed"); # endif } else #endif @@ -559,7 +556,7 @@ QString QFSFileEngine::currentPath(const QString &) result = QFile::decodeName(QByteArray(currentName)); # if defined(QT_DEBUG) if (result.isNull()) - qWarning("QDir::currentPath: getcwd() failed"); + qWarning("QFSFileEngine::currentPath: getcwd() failed"); # endif #endif } else { @@ -568,10 +565,10 @@ QString QFSFileEngine::currentPath(const QString &) // try to create it (can happen with application private dirs) // Ignore mkdir failures; we want to be consistent with Open C // current path regardless. - ::mkdir(QFile::encodeName(currentName), 0777); + QT_MKDIR(QFile::encodeName(nativeCurrentName), 0777); #else # if defined(QT_DEBUG) - qWarning("QDir::currentPath: stat(\".\") failed"); + qWarning("QFSFileEngine::currentPath: stat(\".\") failed"); # endif #endif } @@ -607,11 +604,14 @@ QString QFSFileEngine::rootPath() QString QFSFileEngine::tempPath() { -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) # ifdef Q_WS_S60 TFileName symbianPath = PathInfo::PhoneMemoryRootPath(); QString temp = QDir::fromNativeSeparators(qt_TDesC2QString(symbianPath)); temp += QLatin1String( "temp/"); + + // Just to verify that folder really exist on hardware + QT_MKDIR(QFile::encodeName(temp), 0777); # else # warning No fallback implementation of QFSFileEngine::tempPath() return QString(); @@ -632,14 +632,16 @@ QFileInfoList QFSFileEngine::drives() RFs rfs = qt_s60GetRFs(); TInt err = rfs.DriveList(driveList); if (err == KErrNone) { + char driveName[] = "A:/"; + for (char i = 0; i < KMaxDrives; i++) { if (driveList[i]) { - ret.append(QString("%1:/").arg(QChar('A' + i))); + driveName[0] = 'A' + i; + ret.append(QFileInfo(QLatin1String(driveName))); } } - } - else { - qWarning("QDir::drives: Getting drives failed"); + } else { + qWarning("QFSFileEngine::drives: Getting drives failed"); } #else ret.append(QFileInfo(rootPath())); @@ -680,22 +682,16 @@ bool QFSFileEnginePrivate::isSymlink() const #if defined(Q_OS_SYMBIAN) static bool _q_isSymbianHidden(const QString &path, bool isDir) { - bool retval = false; RFs rfs = qt_s60GetRFs(); QFileInfo fi(path); QString absPath = fi.absoluteFilePath(); - if (isDir && absPath.at(absPath.size()-1) != QChar('/')) { - absPath += QChar('/'); - } + if (isDir && !absPath.endsWith(QLatin1Char('/'))) + absPath.append(QLatin1Char('/')); QString native(QDir::toNativeSeparators(absPath)); TPtrC ptr(qt_QString2TPtrC(native)); TUint attributes; TInt err = rfs.Att(ptr, attributes); - if (err == KErrNone && (attributes & KEntryAttHidden)) { - retval = true; - } - - return retval; + return (err == KErrNone && (attributes & KEntryAttHidden)); } #endif @@ -805,16 +801,16 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const ret |= ExistsFlag; #if defined(Q_OS_SYMBIAN) if (d->filePath == QLatin1String("/") - || (d->filePath.at(0).isLetter() - && d->filePath.mid(1,d->filePath.length()) == QLatin1String(":/"))) + || (d->filePath.length() == 3 && d->filePath.at(0).isLetter() + && d->filePath.at(1) == QLatin1Char(':') && d->filePath.at(2) == QLatin1Char('/'))) { ret |= RootFlag; - - // In Symbian, all symlinks have hidden attribute for some reason; - // lets make them visible for better compatibility with other platforms. - // If somebody actually wants a hidden link, then they are out of luck. - if (!(ret & RootFlag) && !d->isSymlink()) - if(_q_isSymbianHidden(d->filePath, ret & DirectoryType)) - ret |= HiddenFlag; + } else { + // In Symbian, all symlinks have hidden attribute for some reason; + // lets make them visible for better compatibility with other platforms. + // If somebody actually wants a hidden link, then they are out of luck. + if (!d->isSymlink() && _q_isSymbianHidden(d->filePath, ret & DirectoryType)) + ret |= HiddenFlag; + } #else if (d->filePath == QLatin1String("/")) { ret |= RootFlag; @@ -825,7 +821,7 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const # if !defined(QWS) && defined(Q_OS_MAC) || _q_isMacHidden(d->filePath) # endif - ) { + ) { ret |= HiddenFlag; } } @@ -834,12 +830,12 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const return ret; } -#ifdef Q_OS_SYMBIAN -static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFileEngine *engine, - const QFSFileEnginePrivate * const d) +#if defined(Q_OS_SYMBIAN) +QString QFSFileEngine::fileName(FileName file) const { + Q_D(const QFSFileEngine); const QLatin1Char slashChar('/'); - if(file == QAbstractFileEngine::BaseName) { + if(file == BaseName) { int slash = d->filePath.lastIndexOf(slashChar); if(slash == -1) { int colon = d->filePath.lastIndexOf(QLatin1Char(':')); @@ -848,7 +844,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile return d->filePath; } return d->filePath.mid(slash + 1); - } else if(file == QAbstractFileEngine::PathName) { + } else if(file == PathName) { if(!d->filePath.size()) return d->filePath; @@ -864,7 +860,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile slash++; return d->filePath.left(slash); } - } else if(file == QAbstractFileEngine::AbsoluteName || file == QAbstractFileEngine::AbsolutePathName) { + } else if(file == AbsoluteName || file == AbsolutePathName) { QString ret; if (!isRelativePathSymbian(d->filePath)) { if (d->filePath.size() > 2 && d->filePath.at(1) == QLatin1Char(':') @@ -892,7 +888,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile ret[0] = ret.at(0).toUpper(); } - if (file == QAbstractFileEngine::AbsolutePathName) { + if (file == AbsolutePathName) { int slash = ret.lastIndexOf(slashChar); if (slash < 0) return ret; @@ -902,12 +898,12 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile return ret.left(slash > 0 ? slash : 1); } return ret; - } else if(file == QAbstractFileEngine::CanonicalName || file == QAbstractFileEngine::CanonicalPathName) { - if (!(engine->fileFlags(QAbstractFileEngine::ExistsFlag) & QAbstractFileEngine::ExistsFlag)) + } else if(file == CanonicalName || file == CanonicalPathName) { + if (!(fileFlags(ExistsFlag) & ExistsFlag)) return QString(); - QString ret = QFSFileEnginePrivate::canonicalized(symbianFileName(QAbstractFileEngine::AbsoluteName, engine, d)); - if (!ret.isEmpty() && file == QAbstractFileEngine::CanonicalPathName) { + QString ret = QFSFileEnginePrivate::canonicalized(fileName(AbsoluteName)); + if (file == CanonicalPathName && !ret.isEmpty()) { int slash = ret.lastIndexOf(slashChar); if (slash == -1) ret = QDir::fromNativeSeparators(QDir::currentPath()); @@ -916,7 +912,7 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile ret = ret.left(slash); } return ret; - } else if(file == QAbstractFileEngine::LinkName) { + } else if(file == LinkName) { if (d->isSymlink()) { char s[PATH_MAX+1]; int len = readlink(d->nativeFilePath.constData(), s, PATH_MAX); @@ -939,19 +935,17 @@ static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFile } } return QString(); - } else if(file == QAbstractFileEngine::BundleName) { + } else if(file == BundleName) { return QString(); } return d->filePath; } -#endif + +#else QString QFSFileEngine::fileName(FileName file) const { Q_D(const QFSFileEngine); -#ifdef Q_OS_SYMBIAN - return symbianFileName(file, this, d); -#else if (file == BundleName) { #if !defined(QWS) && defined(Q_OS_MAC) QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath), @@ -1004,7 +998,7 @@ QString QFSFileEngine::fileName(FileName file) const return QString(); QString ret = QFSFileEnginePrivate::canonicalized(fileName(AbsoluteName)); - if (!ret.isEmpty() && file == CanonicalPathName) { + if (file == CanonicalPathName && !ret.isEmpty()) { int slash = ret.lastIndexOf(QLatin1Char('/')); if (slash == -1) ret = QDir::currentPath(); @@ -1085,19 +1079,16 @@ QString QFSFileEngine::fileName(FileName file) const return QString(); } return d->filePath; -#endif // Q_OS_SYMBIAN } +#endif // Q_OS_SYMBIAN bool QFSFileEngine::isRelativePath() const { Q_D(const QFSFileEngine); -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) return isRelativePathSymbian(d->filePath); #else - int len = d->filePath.length(); - if (len == 0) - return true; - return d->filePath[0] != QLatin1Char('/'); + return d->filePath.length() ? d->filePath[0] != QLatin1Char('/') : true; #endif } @@ -1134,9 +1125,7 @@ QString QFSFileEngine::owner(FileOwner own) const if (pw) return QFile::decodeName(QByteArray(pw->pw_name)); } else if (own == OwnerGroup) { -#ifdef Q_OS_SYMBIAN - return QString(); -#endif +#if !defined(Q_OS_SYMBIAN) struct group *gr = 0; #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) size_max = sysconf(_SC_GETGR_R_SIZE_MAX); @@ -1154,12 +1143,12 @@ QString QFSFileEngine::owner(FileOwner own) const || errno != ERANGE) break; } - #else gr = getgrgid(ownerId(own)); #endif if (gr) return QFile::decodeName(QByteArray(gr->gr_name)); +#endif } return QString(); } diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index f1f69e7..4e142a9 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -117,7 +117,15 @@ typedef struct _REPARSE_DATA_BUFFER { } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; # define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer) -# define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384 +# ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE +# define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384 +# endif +# ifndef IO_REPARSE_TAG_SYMLINK +# define IO_REPARSE_TAG_SYMLINK (0xA000000CL) +# endif +# ifndef FSCTL_GET_REPARSE_POINT +# define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) +# endif #endif QT_BEGIN_NAMESPACE @@ -453,6 +461,9 @@ bool QFSFileEnginePrivate::nativeClose() q->setError(QFile::UnspecifiedError, qt_error_string()); ok = false; } +#ifdef Q_USE_DEPRECATED_MAP_API + fileMapHandle = INVALID_HANDLE_VALUE; +#endif fileHandle = INVALID_HANDLE_VALUE; cachedFd = -1; // gets closed by CloseHandle above @@ -1281,6 +1292,8 @@ static QString readSymLink(const QString &link) qFree(rdb); CloseHandle(handle); } +#else + Q_UNUSED(link); #endif // Q_OS_WINCE return result; } @@ -1922,10 +1935,11 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, #ifndef Q_OS_WINCE if (handle == INVALID_HANDLE_VALUE && fh) handle = (HANDLE)_get_osfhandle(QT_FILENO(fh)); -#else - #ifdef Q_USE_DEPRECATED_MAP_API - nativeClose(); +#endif + +#ifdef Q_USE_DEPRECATED_MAP_API if (fileMapHandle == INVALID_HANDLE_VALUE) { + nativeClose(); fileMapHandle = CreateFileForMapping((const wchar_t*)nativeFilePath.constData(), GENERIC_READ | (openMode & QIODevice::WriteOnly ? GENERIC_WRITE : 0), 0, @@ -1935,11 +1949,13 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, NULL); } handle = fileMapHandle; - #endif - if (handle == INVALID_HANDLE_VALUE && fh) - return 0; #endif + if (handle == INVALID_HANDLE_VALUE) { + q->setError(QFile::UnspecifiedError, QLatin1String("No handle on file")); + return 0; + } + // first create the file mapping handle DWORD protection = (openMode & QIODevice::WriteOnly) ? PAGE_READWRITE : PAGE_READONLY; HANDLE mapHandle = ::CreateFileMapping(handle, 0, protection, 0, 0, 0); diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 764304d..f4bf5cc 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1646,7 +1646,8 @@ bool QProcess::waitForBytesWritten(int msecs) has been emitted, or until \a msecs milliseconds have passed. Returns true if the process finished; otherwise returns false (if - the operation timed out or if an error occurred). + the operation timed out, if an error occurred, or if this QProcess + is already finished). This function can operate without an event loop. It is useful when writing non-GUI applications and when performing diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 4c19cbf..de483ed 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -223,7 +223,8 @@ QConfFile::QConfFile(const QString &fileName, bool _userPerms) QConfFile::~QConfFile() { - usedHashFunc()->remove(name); + if (usedHashFunc()) + usedHashFunc()->remove(name); } ParsedSettingsMap QConfFile::mergedKeyMap() const @@ -2117,12 +2118,12 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, Custom types registered using qRegisterMetaType() and qRegisterMetaTypeStreamOperators() can be stored using QSettings. - \section1 Key Syntax + \section1 Section and Key Syntax Setting keys can contain any Unicode characters. The Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To - avoid portability problems, follow these two simple rules: + avoid portability problems, follow these simple rules: \list 1 \o Always refer to the same key using the same case. For example, @@ -2133,7 +2134,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, example, if you have a key called "MainWindow", don't try to save another key as "mainwindow". - \o Do not use slashes ('/' and '\\') in key names; the + \o Do not use slashes ('/' and '\\') in section or key names; the backslash character is used to separate sub keys (see below). On windows '\\' are converted by QSettings to '/', which makes them identical. @@ -3198,8 +3199,8 @@ bool QSettings::isWritable() const Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses - case-sensitive keys. To avoid portability problems, see the \l{Key - Syntax} rules. + case-sensitive keys. To avoid portability problems, see the + \l{Section and Key Syntax} rules. Example: @@ -3233,8 +3234,8 @@ void QSettings::setValue(const QString &key, const QVariant &value) Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses - case-sensitive keys. To avoid portability problems, see the \l{Key - Syntax} rules. + case-sensitive keys. To avoid portability problems, see the + \l{Section and Key Syntax} rules. \sa setValue(), value(), contains() */ @@ -3268,8 +3269,8 @@ void QSettings::remove(const QString &key) Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses - case-sensitive keys. To avoid portability problems, see the \l{Key - Syntax} rules. + case-sensitive keys. To avoid portability problems, see the + \l{Section and Key Syntax} rules. \sa value(), setValue() */ @@ -3330,8 +3331,8 @@ bool QSettings::event(QEvent *event) Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses - case-sensitive keys. To avoid portability problems, see the \l{Key - Syntax} rules. + case-sensitive keys. To avoid portability problems, see the + \l{Section and Key Syntax} rules. Example: diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index 3db0564..adfcf5e 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -514,10 +514,6 @@ QTemporaryFile::QTemporaryFile() { Q_D(QTemporaryFile); d->templateName = QDir::tempPath() + QLatin1String("/qt_temp.XXXXXX"); -#ifdef Q_OS_SYMBIAN - //Just to verify that folder really exist on hardware - fileEngine()->mkdir(QDir::tempPath(), true); -#endif } /*! diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 3b7059b..5e8848b 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -599,6 +599,118 @@ void QAbstractItemModelPrivate::rowsInserted(const QModelIndex &parent, } } +void QAbstractItemModelPrivate::itemsAboutToBeMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation) +{ + Q_Q(QAbstractItemModel); + QVector<QPersistentModelIndexData *> persistent_moved_explicitly; + QVector<QPersistentModelIndexData *> persistent_moved_in_source; + QVector<QPersistentModelIndexData *> persistent_moved_in_destination; + + QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it; + const QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator begin = persistent.indexes.constBegin(); + const QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator end = persistent.indexes.constEnd(); + + const bool sameParent = (srcParent == destinationParent); + const bool movingUp = (srcFirst > destinationChild); + + for ( it = begin; it != end; ++it) { + QPersistentModelIndexData *data = *it; + const QModelIndex &index = data->index; + const QModelIndex &parent = index.parent(); + const bool isSourceIndex = (parent == srcParent); + const bool isDestinationIndex = (parent == destinationParent); + + int childPosition; + if (orientation == Qt::Vertical) + childPosition = index.row(); + else + childPosition = index.column(); + + if (!index.isValid() || !(isSourceIndex || isDestinationIndex ) ) + continue; + + if (!sameParent && isDestinationIndex) { + if (childPosition >= destinationChild) + persistent_moved_in_destination.append(data); + continue; + } + + if (sameParent && movingUp && childPosition < destinationChild) + continue; + + if (sameParent && !movingUp && childPosition < srcFirst ) + continue; + + if (!sameParent && childPosition < srcFirst) + continue; + + if (sameParent && (childPosition > srcLast) && (childPosition >= destinationChild )) + continue; + + if ((childPosition <= srcLast) && (childPosition >= srcFirst)) { + persistent_moved_explicitly.append(data); + } else { + persistent_moved_in_source.append(data); + } + } + persistent.moved.push(persistent_moved_explicitly); + persistent.moved.push(persistent_moved_in_source); + persistent.moved.push(persistent_moved_in_destination); +} + +/*! + \internal + + Moves persistent indexes \a indexes by amount \a change. The change will be either a change in row value or a change in + column value depending on the value of \a orientation. The indexes may also be moved to a different parent if \a parent + differs from the existing parent for the index. +*/ +void QAbstractItemModelPrivate::movePersistentIndexes(QVector<QPersistentModelIndexData *> indexes, int change, const QModelIndex &parent, Qt::Orientation orientation) +{ + QVector<QPersistentModelIndexData *>::const_iterator it; + const QVector<QPersistentModelIndexData *>::const_iterator begin = indexes.constBegin(); + const QVector<QPersistentModelIndexData *>::const_iterator end = indexes.constEnd(); + + for (it = begin; it != end; ++it) + { + QPersistentModelIndexData *data = *it; + + int row = data->index.row(); + int column = data->index.column(); + + if (Qt::Vertical == orientation) + row += change; + else + column += change; + + persistent.indexes.erase(persistent.indexes.find(data->index)); + data->index = q_func()->index(row, column, parent); + if (data->index.isValid()) { + persistent.insertMultiAtEnd(data->index, data); + } else { + qWarning() << "QAbstractItemModel::endMoveRows: Invalid index (" << row << "," << column << ") in model" << q_func(); + } + } +} + +void QAbstractItemModelPrivate::itemsMoved(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation) +{ + QVector<QPersistentModelIndexData *> moved_in_destination = persistent.moved.pop(); + QVector<QPersistentModelIndexData *> moved_in_source = persistent.moved.pop(); + QVector<QPersistentModelIndexData *> moved_explicitly = persistent.moved.pop(); + + const bool sameParent = (sourceParent == destinationParent); + const bool movingUp = (sourceFirst > destinationChild); + + const int explicit_change = (!sameParent || movingUp) ? destinationChild - sourceFirst : destinationChild - sourceLast - 1 ; + const int source_change = (!sameParent || !movingUp) ? -1*(sourceLast - sourceFirst + 1) : sourceLast - sourceFirst + 1 ; + const int destination_change = sourceLast - sourceFirst + 1; + + movePersistentIndexes(moved_explicitly, explicit_change, destinationParent, orientation); + movePersistentIndexes(moved_in_source, source_change, sourceParent, orientation); + movePersistentIndexes(moved_in_destination, destination_change, destinationParent, orientation); +} + void QAbstractItemModelPrivate::rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last) { @@ -1227,7 +1339,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, \endlist - \sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), reset(), + \sa layoutAboutToBeChanged(), dataChanged(), headerDataChanged(), modelReset(), changePersistentIndex() */ @@ -1370,6 +1482,70 @@ QAbstractItemModel::~QAbstractItemModel() */ /*! + \fn void QAbstractItemModel::rowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) + \since 4.6 + + This signal is emitted after rows have been moved within the + model. The items between \a sourceStart and \a sourceEnd + inclusive, under the given \a sourceParent item have been moved to \a destinationParent + starting at the row \a destinationRow. + + \bold{Note:} Components connected to this signal use it to adapt to changes + in the model's dimensions. It can only be emitted by the QAbstractItemModel + implementation, and cannot be explicitly emitted in subclass code. + + \sa beginMoveRows() +*/ + +/*! + \fn void QAbstractItemModel::rowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) + \since 4.6 + + This signal is emitted just before rows are moved within the + model. The items that will be moved are those between \a sourceStart and \a sourceEnd + inclusive, under the given \a sourceParent item. They will be moved to \a destinationParent + starting at the row \a destinationRow. + + \bold{Note:} Components connected to this signal use it to adapt to changes + in the model's dimensions. It can only be emitted by the QAbstractItemModel + implementation, and cannot be explicitly emitted in subclass code. + + \sa beginMoveRows() +*/ + +/*! + \fn void QAbstractItemModel::columnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) + \since 4.6 + + This signal is emitted after columns have been moved within the + model. The items between \a sourceStart and \a sourceEnd + inclusive, under the given \a sourceParent item have been moved to \a destinationParent + starting at the column \a destinationColumn. + + \bold{Note:} Components connected to this signal use it to adapt to changes + in the model's dimensions. It can only be emitted by the QAbstractItemModel + implementation, and cannot be explicitly emitted in subclass code. + + \sa beginMoveRows() +*/ + +/*! + \fn void QAbstractItemModel::columnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) + \since 4.6 + + This signal is emitted just before columns are moved within the + model. The items that will be moved are those between \a sourceStart and \a sourceEnd + inclusive, under the given \a sourceParent item. They will be moved to \a destinationParent + starting at the column \a destinationColumn. + + \bold{Note:} Components connected to this signal use it to adapt to changes + in the model's dimensions. It can only be emitted by the QAbstractItemModel + implementation, and cannot be explicitly emitted in subclass code. + + \sa beginMoveRows() +*/ + +/*! \fn void QAbstractItemModel::columnsInserted(const QModelIndex &parent, int start, int end) This signal is emitted after columns have been inserted into the model. The @@ -2284,6 +2460,116 @@ void QAbstractItemModel::endRemoveRows() } /*! + Returns whether a move operation is valid. + + A move operation is not allowed if it moves a continuous range of rows to a destination within + itself, or if it attempts to move a row to one of its own descendants. + + \internal +*/ +bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int start, int end, const QModelIndex &destinationParent, int destinationStart, Qt::Orientation orientation) +{ + Q_Q(QAbstractItemModel); + // Don't move the range within itself. + if ( ( destinationParent == srcParent ) + && ( destinationStart >= start ) + && ( destinationStart <= end + 1) ) + return false; + + QModelIndex destinationAncestor = destinationParent; + int pos = (Qt::Vertical == orientation) ? destinationAncestor.row() : destinationAncestor.column(); + forever { + if (destinationAncestor == srcParent) { + if (pos >= start && pos <= end) + return false; + break; + } + + if (!destinationAncestor.isValid()) + break; + + pos = (Qt::Vertical == orientation) ? destinationAncestor.row() : destinationAncestor.column(); + destinationAncestor = destinationAncestor.parent(); + } + + return true; +} + +/*! + Begins a row move operation. + + When reimplementing a subclass, this method simplifies moving entities + in your model. This method is responsible for moving persistent indexes + in the model, which you would otherwise be required to do yourself. + + Using beginMoveRows and endMoveRows is an alternative to emitting + layoutAboutToBeChanged and layoutChanged directly along with changePersistentIndexes. + layoutAboutToBeChanged is emitted by this method for compatibility reasons. + + The \a sourceParent index corresponds to the parent from which the + rows are moved; \a sourceFirst and \a sourceLast are the row numbers of the + rows to be moved. The \a destinationParent index corresponds to the parent into which + the rows are moved. The \a destinationRow is the row to which the rows will be moved. + That is, the index at row \a sourceFirst in \a sourceParent will become row \a destinationRow + in \a destinationParent. Its siblings will be moved correspondingly. + + Note that \a sourceParent and \a destinationParent may be the same, in which case you must + ensure that the \a destinationRow is not within the range of \a sourceFirst and \a sourceLast. + You must also ensure that you do not attempt to move a row to one of its own chilren or ancestors. + This method returns false if either condition is true, in which case you should abort your move operation. + + \sa endMoveRows() + + \since 4.6 +*/ +bool QAbstractItemModel::beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) +{ + Q_ASSERT(sourceFirst >= 0); + Q_ASSERT(sourceLast >= sourceFirst); + Q_ASSERT(destinationChild >= 0); + Q_D(QAbstractItemModel); + + if (!d->allowMove(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical)) { + return false; + } + + d->changes.push(QAbstractItemModelPrivate::Change(sourceParent, sourceFirst, sourceLast)); + int destinationLast = destinationChild + (sourceLast - sourceFirst); + d->changes.push(QAbstractItemModelPrivate::Change(destinationParent, destinationChild, destinationLast)); + + d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical); + emit rowsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild); + emit layoutAboutToBeChanged(); + return true; +} + +/*! + Ends a row move operation. + + When implementing a subclass, you must call this + function \e after moving data within the model's underlying data + store. + + layoutChanged is emitted by this method for compatibility reasons. + + \sa beginMoveRows() + + \since 4.6 +*/ +void QAbstractItemModel::endMoveRows() +{ + Q_D(QAbstractItemModel); + + QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); + QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); + + d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Vertical); + + emit rowsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first); + emit layoutChanged(); +} + +/*! Begins a column insertion operation. When reimplementing insertColumns() in a subclass, you must call this @@ -2406,9 +2692,101 @@ void QAbstractItemModel::endRemoveColumns() } /*! + Begins a column move operation. + + When reimplementing a subclass, this method simplifies moving entities + in your model. This method is responsible for moving persistent indexes + in the model, which you would otherwise be required to do yourself. + + Using beginMoveColumns and endMoveColumns is an alternative to emitting + layoutAboutToBeChanged and layoutChanged directly along with changePersistentIndexes. + layoutAboutToBeChanged is emitted by this method for compatibility reasons. + + The \a sourceParent index corresponds to the parent from which the + columns are moved; \a sourceFirst and \a sourceLast are the column numbers of the + columns to be moved. The \a destinationParent index corresponds to the parent into which + the columns are moved. The \a destinationColumn is the column to which the columns will be moved. + That is, the index at column \a sourceFirst in \a sourceParent will become column \a destinationColumn + in \a destinationParent. Its siblings will be moved correspondingly. + + Note that \a sourceParent and \a destinationParent may be the same, in which case you must + ensure that the \a destinationColumn is not within the range of \a sourceFirst and \a sourceLast. + You must also ensure that you do not attempt to move a row to one of its own chilren or ancestors. + This method returns false if either condition is true, in which case you should abort your move operation. + + \sa endMoveColumns() + + \since 4.6 +*/ +bool QAbstractItemModel::beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) +{ + Q_ASSERT(sourceFirst >= 0); + Q_ASSERT(sourceLast >= sourceFirst); + Q_ASSERT(destinationChild >= 0); + Q_D(QAbstractItemModel); + + if (!d->allowMove(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal)) { + return false; + } + + d->changes.push(QAbstractItemModelPrivate::Change(sourceParent, sourceFirst, sourceLast)); + int destinationLast = destinationChild + (sourceLast - sourceFirst); + d->changes.push(QAbstractItemModelPrivate::Change(destinationParent, destinationChild, destinationLast)); + + d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal); + + emit columnsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild); + emit layoutAboutToBeChanged(); + return true; +} + +/*! + Ends a column move operation. + + When implementing a subclass, you must call this + function \e after moving data within the model's underlying data + store. + + layoutChanged is emitted by this method for compatibility reasons. + + \sa beginMoveColumns() + + \since 4.6 +*/ +void QAbstractItemModel::endMoveColumns() +{ + Q_D(QAbstractItemModel); + + QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); + QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); + + d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Horizontal); + + emit columnsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first); + emit layoutChanged(); +} + +/*! Resets the model to its original state in any attached views. - The view to which the model is attached to will be reset as well. + \note Use beginResetModel() and endResetModel() instead whenever possible. + Use this method only if there is no way to call beginResetModel() before invalidating the model. + Otherwise it could lead to unexcpected behaviour, especially when used with proxy models. +*/ +void QAbstractItemModel::reset() +{ + Q_D(QAbstractItemModel); + emit modelAboutToBeReset(); + d->invalidatePersistentIndexes(); + emit modelReset(); +} + +/*! + Begins a model reset operation. + + A reset operation resets the model to its current state in any attached views. + + \note Any views attached to this model will be reset as well. When a model is reset it means that any previous data reported from the model is now invalid and has to be queried for again. This also means that @@ -2418,12 +2796,29 @@ void QAbstractItemModel::endRemoveColumns() call this function rather than emit dataChanged() to inform other components when the underlying data source, or its structure, has changed. - \sa modelAboutToBeReset(), modelReset() + You must call this function before resetting any internal data structures in your model + or proxy model. + + \sa modelAboutToBeReset(), modelReset(), endResetModel() + \since 4.6 */ -void QAbstractItemModel::reset() +void QAbstractItemModel::beginResetModel() { - Q_D(QAbstractItemModel); emit modelAboutToBeReset(); +} + +/*! + Completes a model reset operation. + + You must call this function after resetting any internal data structure in your model + or proxy model. + + \sa beginResetModel() + \since 4.6 +*/ +void QAbstractItemModel::endResetModel() +{ + Q_D(QAbstractItemModel); d->invalidatePersistentIndexes(); emit modelReset(); } @@ -2895,7 +3290,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti This signal is emitted when reset() is called, before the model's internal state (e.g. persistent model indexes) has been invalidated. - \sa reset(), modelReset() + \sa beginResetModel(), modelReset() */ /*! @@ -2905,7 +3300,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti This signal is emitted when reset() is called, after the model's internal state (e.g. persistent model indexes) has been invalidated. - \sa reset(), modelAboutToBeReset() + \sa endResetModel(), modelAboutToBeReset() */ /*! diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/kernel/qabstractitemmodel.h index 00f6cb2..1ca6cbe 100644 --- a/src/corelib/kernel/qabstractitemmodel.h +++ b/src/corelib/kernel/qabstractitemmodel.h @@ -252,6 +252,13 @@ private: // can only be emitted by QAbstractItemModel void modelAboutToBeReset(); void modelReset(); + void rowsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow ); + void rowsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row ); + + void columnsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn ); + void columnsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column ); + + public Q_SLOTS: virtual bool submit(); virtual void revert(); @@ -272,14 +279,23 @@ protected: void beginRemoveRows(const QModelIndex &parent, int first, int last); void endRemoveRows(); + bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow); + void endMoveRows(); + void beginInsertColumns(const QModelIndex &parent, int first, int last); void endInsertColumns(); void beginRemoveColumns(const QModelIndex &parent, int first, int last); void endRemoveColumns(); + bool beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn); + void endMoveColumns(); + void reset(); + void beginResetModel(); + void endResetModel(); + void changePersistentIndex(const QModelIndex &from, const QModelIndex &to); void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to); QModelIndexList persistentIndexList() const; diff --git a/src/corelib/kernel/qabstractitemmodel_p.h b/src/corelib/kernel/qabstractitemmodel_p.h index e81e627..aae3cba 100644 --- a/src/corelib/kernel/qabstractitemmodel_p.h +++ b/src/corelib/kernel/qabstractitemmodel_p.h @@ -80,6 +80,7 @@ class Q_CORE_EXPORT QAbstractItemModelPrivate : public QObjectPrivate public: QAbstractItemModelPrivate() : QObjectPrivate(), supportedDragActions(-1), roleNames(defaultRoleNames()) {} void removePersistentIndexData(QPersistentModelIndexData *data); + void movePersistentIndexes(QVector<QPersistentModelIndexData *> indexes, int change, const QModelIndex &parent, Qt::Orientation orientation); void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last); void rowsInserted(const QModelIndex &parent, int first, int last); void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last); @@ -91,6 +92,10 @@ public: static QAbstractItemModel *staticEmptyModel(); static bool variantLessThan(const QVariant &v1, const QVariant &v2); + void itemsAboutToBeMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation); + void itemsMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation); + bool allowMove(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation); + inline QModelIndex createIndex(int row, int column, void *data = 0) const { return q_func()->createIndex(row, column, data); } @@ -132,6 +137,8 @@ public: Change(const QModelIndex &p, int f, int l) : parent(p), first(f), last(l) {} QModelIndex parent; int first, last; + + bool isValid() { return first >= 0 && last >= 0; } }; QStack<Change> changes; diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h index 6d3616f..a7f71a7 100644 --- a/src/corelib/kernel/qcore_symbian_p.h +++ b/src/corelib/kernel/qcore_symbian_p.h @@ -145,6 +145,9 @@ Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal); Q_CORE_EXPORT RFs& qt_s60GetRFs(); +// Defined in qlocale_symbian.cpp. +Q_CORE_EXPORT QByteArray qt_symbianLocaleName(int code); + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 6d88d92..183809e 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -393,43 +393,61 @@ QString qAppName() application's initialization and finalization, as well as system-wide and application-wide settings. - The command line arguments which QCoreApplication's constructor - should be called with are accessible using arguments(). The - event loop is started with a call to exec(). Long running + \section1 The Event Loop and Event Handling + + The event loop is started with a call to exec(). Long running operations can call processEvents() to keep the application responsive. Some Qt classes, such as QString, can be used without a QCoreApplication object. However, in general, we recommend that you create a QCoreApplication or a QApplication object in your \c - main() function as early as possible. The application will enter - the event loop when exec() is called. exit() will not return - until the event loop exits, e.g., when quit() is called. + main() function as early as possible. exit() will not return + until the event loop exits; e.g., when quit() is called. + + Several static convenience functions are also provided. The + QCoreApplication object is available from instance(). Events can + be sent or posted using sendEvent(), postEvent(), and + sendPostedEvents(). Pending events can be removed with + removePostedEvents() or flushed with flush(). + + The class provides a quit() slot and an aboutToQuit() signal. + + \section1 Application and Library Paths An application has an applicationDirPath() and an - applicationFilePath(). Translation files can be added or removed + applicationFilePath(). Library paths (see QLibrary) can be retrieved + with libraryPaths() and manipulated by setLibraryPaths(), addLibraryPath(), + and removeLibraryPath(). + + \section1 Internationalization and Translations + + Translation files can be added or removed using installTranslator() and removeTranslator(). Application strings can be translated using translate(). The QObject::tr() and QObject::trUtf8() functions are implemented in terms of translate(). - The class provides a quit() slot and an aboutToQuit() signal. + \section1 Accessing Command Line Arguments - Several static convenience functions are also provided. The - QCoreApplication object is available from instance(). Events can - be sent or posted using sendEvent(), postEvent(), and - sendPostedEvents(). Pending events can be removed with - removePostedEvents() or flushed with flush(). Library paths (see - QLibrary) can be retrieved with libraryPaths() and manipulated by - setLibraryPaths(), addLibraryPath(), and removeLibraryPath(). - - On Unix/Linux Qt is configured to use the system local settings by - default. This can cause a conflict when using POSIX functions, for - instance, when converting between data types such as floats and - strings, since the notation may differ between locales. To get - around this problem call the POSIX function setlocale(LC_NUMERIC,"C") - right after initializing QApplication or QCoreApplication to reset - the locale that is used for number formatting to "C"-locale. + The command line arguments which are passed to QCoreApplication's + constructor should be accessed using the arguments() function. + Note that some arguments supplied by the user may have been + processed and removed by QCoreApplication. + + In cases where command line arguments need to be obtained using the + argv() function, you must convert them from the local string encoding + using QString::fromLocal8Bit(). + + \section1 Locale Settings + + On Unix/Linux Qt is configured to use the system locale settings by + default. This can cause a conflict when using POSIX functions, for + instance, when converting between data types such as floats and + strings, since the notation may differ between locales. To get + around this problem, call the POSIX function \c{setlocale(LC_NUMERIC,"C")} + right after initializing QApplication or QCoreApplication to reset + the locale that is used for number formatting to "C"-locale. \sa QApplication, QAbstractEventDispatcher, QEventLoop, {Semaphores Example}, {Wait Conditions Example} @@ -1975,9 +1993,9 @@ char **QCoreApplication::argv() \warning On Unix, this list is built from the argc and argv parameters passed to the constructor in the main() function. The string-data in argv is interpreted using QString::fromLocal8Bit(); hence it is not possible to - pass i.e. Japanese command line arguments on a system that runs in a latin1 - locale. Most modern Unix systems do not have this limitation, as they are - Unicode based. + pass, for example, Japanese command line arguments on a system that runs in a + Latin1 locale. Most modern Unix systems do not have this limitation, as they are + Unicode-based. On NT-based Windows, this limitation does not apply either. On Windows, the arguments() are not built from the contents of argv/argc, as diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index babb89d..75af3e7 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -324,6 +324,7 @@ private: friend class QGraphicsView; friend class QGraphicsViewPrivate; friend class QGraphicsScenePrivate; + friend class QGraphicsWidget; }; class Q_CORE_EXPORT QTimerEvent : public QEvent diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 881e546..daeb0e1 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -238,7 +238,6 @@ void QTimerActiveObject::Run() if (m_timerInfo->interval > 0) { // Start a new timer immediately so that we don't lose time. - iStatus = KRequestPending; SetActive(); m_rTimer.After(iStatus, m_timerInfo->interval*1000); diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 040efc9..1f35c73 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1089,10 +1089,9 @@ QObjectPrivate::Connection::~Connection() \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 4 - (\l QLayoutItem is not a QObject.) - - Consider using qobject_cast<Type *>(object) instead. The method - is both faster and safer. + If you need to determine whether an object is an instance of a particular + class for the purpose of casting it, consider using qobject_cast<Type *>(object) + instead. \sa metaObject(), qobject_cast() */ @@ -2459,7 +2458,7 @@ QObject *QObject::sender() const { Q_D(const QObject); - QMutexLocker(signalSlotLock(this)); + QMutexLocker locker(signalSlotLock(this)); if (!d->currentSender) return 0; @@ -2981,12 +2980,16 @@ void QObject::disconnectNotify(const char *) bool QMetaObject::connect(const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type, int *types) { - const QMetaObject *mo = sender->metaObject(); - while (mo && mo->methodOffset() > signal_index) - mo = mo->superClass(); - int signalOffset, methodOffset; - computeOffsets(mo, &signalOffset, &methodOffset); - signal_index = QMetaObjectPrivate::originalClone(mo, signal_index - methodOffset) + signalOffset; + if (signal_index > 0) { + const QMetaObject *mo = sender->metaObject(); + while (mo && mo->methodOffset() > signal_index) + mo = mo->superClass(); + if (mo) { + int signalOffset, methodOffset; + computeOffsets(mo, &signalOffset, &methodOffset); + signal_index = QMetaObjectPrivate::originalClone(mo, signal_index - methodOffset) + signalOffset; + } + } return QMetaObjectPrivate::connect(sender, signal_index, receiver, method_index, type, types); } @@ -3059,12 +3062,16 @@ bool QMetaObjectPrivate::connect(const QObject *sender, int signal_index, bool QMetaObject::disconnect(const QObject *sender, int signal_index, const QObject *receiver, int method_index) { - const QMetaObject *mo = sender->metaObject(); - while (mo && mo->methodOffset() > signal_index) - mo = mo->superClass(); - int signalOffset, methodOffset; - computeOffsets(mo, &signalOffset, &methodOffset); - signal_index = QMetaObjectPrivate::originalClone(mo, signal_index - methodOffset) + signalOffset; + if (signal_index > 0) { + const QMetaObject *mo = sender->metaObject(); + while (mo && mo->methodOffset() > signal_index) + mo = mo->superClass(); + if (mo) { + int signalOffset, methodOffset; + computeOffsets(mo, &signalOffset, &methodOffset); + signal_index = QMetaObjectPrivate::originalClone(mo, signal_index - methodOffset) + signalOffset; + } + } return QMetaObjectPrivate::disconnect(sender, signal_index, receiver, method_index); } diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 5cf6513..51b3a50 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -436,7 +436,8 @@ Q_GLOBAL_STATIC(LibraryData, libraryData) static LibraryMap *libraryMap() { - return &(libraryData()->libraryMap); + LibraryData *data = libraryData(); + return data ? &data->libraryMap : 0; } QLibraryPrivate::QLibraryPrivate(const QString &canonicalFileName, const QString &version) diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h index 328be16..33e4474 100644 --- a/src/corelib/statemachine/qabstracttransition_p.h +++ b/src/corelib/statemachine/qabstracttransition_p.h @@ -75,7 +75,7 @@ public: static QAbstractTransitionPrivate *get(QAbstractTransition *q); bool callEventTest(QEvent *e); - void callOnTransition(QEvent *e); + virtual void callOnTransition(QEvent *e); QState *sourceState() const; QStateMachine *machine() const; void emitTriggered(); diff --git a/src/corelib/statemachine/qsignalevent.h b/src/corelib/statemachine/qsignalevent.h index 7e5d888..de166f4 100644 --- a/src/corelib/statemachine/qsignalevent.h +++ b/src/corelib/statemachine/qsignalevent.h @@ -70,6 +70,8 @@ private: QObject *m_sender; int m_signalIndex; QList<QVariant> m_arguments; + + friend class QSignalTransitionPrivate; }; #endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index e34448f..fb28c08 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -245,6 +245,23 @@ bool QSignalTransition::event(QEvent *e) return QAbstractTransition::event(e); } +void QSignalTransitionPrivate::callOnTransition(QEvent *e) +{ + Q_Q(QSignalTransition); + + QSignalEvent *se = static_cast<QSignalEvent *>(e); + int savedSignalIndex; + if (e->type() == QEvent::Signal) { + savedSignalIndex = se->m_signalIndex; + se->m_signalIndex = originalSignalIndex; + } + + q->onTransition(e); + + if (e->type() == QEvent::Signal) + se->m_signalIndex = savedSignalIndex; +} + QT_END_NAMESPACE #endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qsignaltransition_p.h b/src/corelib/statemachine/qsignaltransition_p.h index 21082ab..69bbcc9 100644 --- a/src/corelib/statemachine/qsignaltransition_p.h +++ b/src/corelib/statemachine/qsignaltransition_p.h @@ -69,9 +69,12 @@ public: void unregister(); void maybeRegister(); + virtual void callOnTransition(QEvent *e); + QObject *sender; QByteArray signal; int signalIndex; + int originalSignalIndex; }; QT_END_NAMESPACE diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index d6946de..e5bca2c 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -1408,6 +1408,7 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio signal.remove(0, 1); const QMetaObject *meta = sender->metaObject(); int signalIndex = meta->indexOfSignal(signal); + int originalSignalIndex = signalIndex; if (signalIndex == -1) { signalIndex = meta->indexOfSignal(QMetaObject::normalizedSignature(signal)); if (signalIndex == -1) { @@ -1416,6 +1417,11 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio return; } } + // The signal index we actually want to connect to is the one + // that is going to be sent, i.e. the non-cloned original index. + while (meta->method(signalIndex).attributes() & QMetaMethod::Cloned) + --signalIndex; + QVector<int> &connectedSignalIndexes = connections[sender]; if (connectedSignalIndexes.size() <= signalIndex) connectedSignalIndexes.resize(signalIndex+1); @@ -1435,6 +1441,7 @@ void QStateMachinePrivate::registerSignalTransition(QSignalTransition *transitio } ++connectedSignalIndexes[signalIndex]; QSignalTransitionPrivate::get(transition)->signalIndex = signalIndex; + QSignalTransitionPrivate::get(transition)->originalSignalIndex = originalSignalIndex; #ifdef QSTATEMACHINE_DEBUG qDebug() << q << ": added signal transition from" << transition->sourceState() << ": ( sender =" << sender << ", signal =" << signal diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index d954160..1335c30 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -98,12 +98,45 @@ QListData::Data *QListData::detach() * * \internal */ +#if QT_VERSION >= 0x050000 +# error "Remove QListData::detach2(), it is only required for binary compatibility for 4.3.x to 4.5.x" +#endif QListData::Data *QListData::detach2() { Data *x = d; Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + x->alloc * sizeof(void *))); Q_CHECK_PTR(t); + ::memcpy(t, d, DataHeaderSize + d->alloc * sizeof(void *)); + + t->ref = 1; + t->sharable = true; + t->alloc = x->alloc; + if (!t->alloc) { + t->begin = 0; + t->end = 0; + } else { + t->begin = x->begin; + t->end = x->end; + } + d = t; + + return x; +} + +/*! + * Detaches the QListData by reallocating new memory. + * Returns the old (shared) data, it is up to the caller to deref() and free() + * For the new data node_copy needs to be called. + * + * \internal + */ +QListData::Data *QListData::detach3() +{ + Data *x = d; + Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + x->alloc * sizeof(void *))); + Q_CHECK_PTR(t); + t->ref = 1; t->sharable = true; t->alloc = x->alloc; @@ -150,6 +183,9 @@ void **QListData::append() } // ensures that enough space is available to append the list +#if QT_VERSION >= 0x050000 +# error "Remove QListData::append(), it is only required for binary compatibility up to 4.5.x" +#endif void **QListData::append(const QListData& l) { Q_ASSERT(d->ref == 1); @@ -158,6 +194,21 @@ void **QListData::append(const QListData& l) if (n) { if (e + n > d->alloc) realloc(grow(e + l.d->end - l.d->begin)); + ::memcpy(d->array + d->end, l.d->array + l.d->begin, n*sizeof(void*)); + d->end += n; + } + return d->array + e; +} + +// ensures that enough space is available to append the list +void **QListData::append2(const QListData& l) +{ + Q_ASSERT(d->ref == 1); + int e = d->end; + int n = l.d->end - l.d->begin; + if (n) { + if (e + n > d->alloc) + realloc(grow(e + l.d->end - l.d->begin)); d->end += n; } return d->array + e; diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index ab6f7bd..331f448 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -72,13 +72,15 @@ struct Q_CORE_EXPORT QListData { enum { DataHeaderSize = sizeof(Data) - sizeof(void *) }; Data *detach(); // remove in 5.0 - Data *detach2(); + Data *detach2(); // remove in 5.0 + Data *detach3(); void realloc(int alloc); static Data shared_null; Data *d; void **erase(void **xi); void **append(); void **append(const QListData &l); + void **append2(const QListData &l); // remove in 5.0 void **prepend(); void **insert(int i); void remove(int i); @@ -593,7 +595,7 @@ template <typename T> Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper() { Node *n = reinterpret_cast<Node *>(p.begin()); - QListData::Data *x = p.detach2(); + QListData::Data *x = p.detach3(); QT_TRY { node_copy(reinterpret_cast<Node *>(p.begin()), reinterpret_cast<Node *>(p.end()), n); } QT_CATCH(...) { @@ -693,7 +695,7 @@ template <typename T> Q_OUTOFLINE_TEMPLATE QList<T> &QList<T>::operator+=(const QList<T> &l) { detach(); - Node *n = reinterpret_cast<Node *>(p.append(l.p)); + Node *n = reinterpret_cast<Node *>(p.append2(l.p)); QT_TRY{ node_copy(n, reinterpret_cast<Node *>(p.end()), reinterpret_cast<Node *>(l.p.begin())); } QT_CATCH(...) { diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp index a534560..3103ba1 100644 --- a/src/corelib/tools/qlocale_symbian.cpp +++ b/src/corelib/tools/qlocale_symbian.cpp @@ -156,7 +156,7 @@ static const symbianToISO symbian_to_iso_list[] = { /*! Returns ISO name corresponding to the Symbian locale code \a sys_fmt. */ -static QByteArray symbianLocaleName(int code) +QByteArray qt_symbianLocaleName(int code) { //Number of Symbian to ISO locale mappings static const int symbian_to_iso_count @@ -797,7 +797,7 @@ QLocale QSystemLocale::fallbackLocale() const } TLanguage lang = User::Language(); - QString locale = symbianLocaleName(lang); + QString locale = qt_symbianLocaleName(lang); return QLocale(locale); } @@ -853,7 +853,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const case LanguageId: case CountryId: { TLanguage language = User::Language(); - QString locale = symbianLocaleName(language); + QString locale = qt_symbianLocaleName(language); QLocale::Language lang; QLocale::Country cntry; getLangAndCountry(locale, lang, cntry); diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index e913232..9f8e05c 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -93,6 +93,9 @@ void QMapData::continueFreeData(int offset) could be several pointers to this node on different levels. \a offset is an amount of bytes that needs to reserved just before the QMapData::Node structure. + + \internal + \since 4.6 */ QMapData::Node *QMapData::node_create(Node *update[], int offset) { @@ -128,7 +131,6 @@ QMapData::Node *QMapData::node_create(Node *update[], int offset) update[i]->forward[i] = abstractNode; update[i] = abstractNode; } - // update[level+1]=reinterpret_cast<Node *>(this); ++size; return abstractNode; } @@ -191,7 +193,7 @@ void QMapData::dump() update[i] = node->forward[i]; } for (int j = level + 1; j <= topLevel; ++j) - output[j] += QString("---------------"); + output[j] += QLatin1String("---------------"); node = node->forward[0]; } diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h index 7a3ee14..f801366 100644 --- a/src/corelib/tools/qscopedpointer.h +++ b/src/corelib/tools/qscopedpointer.h @@ -166,6 +166,11 @@ public: return oldD; } + inline void swap(QScopedPointer<T, Cleanup> &other) + { + qSwap(d, other.d); + } + typedef T *pointer; protected: @@ -175,6 +180,10 @@ private: Q_DISABLE_COPY(QScopedPointer) }; +template <class T, class Cleanup> +Q_INLINE_TEMPLATE void qSwap(QScopedPointer<T, Cleanup> &p1, QScopedPointer<T, Cleanup> &p2) +{ p1.swap(p2); } + template <typename T, typename Cleanup = QScopedPointerArrayDeleter<T> > class QScopedArrayPointer : public QScopedPointer<T, Cleanup> { diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index a93a638..9be57c5 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -44,6 +44,12 @@ #include <QtCore/qstring.h> +#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) +# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0) +# include <QtCore/qmap.h> +# endif +#endif + #include <string.h> QT_BEGIN_HEADER diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp index 356b14c..ca0147a 100644 --- a/src/dbus/qdbus_symbols.cpp +++ b/src/dbus/qdbus_symbols.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include "qdbus_symbols_p.h" #include <QtCore/qglobal.h> #include <QtCore/qlibrary.h> #include <QtCore/qmutex.h> @@ -53,7 +52,7 @@ void *qdbus_resolve_me(const char *name); static QLibrary *qdbus_libdbus = 0; -static void qdbus_unloadLibDBus() +void qdbus_unloadLibDBus() { delete qdbus_libdbus; qdbus_libdbus = 0; @@ -77,11 +76,8 @@ bool qdbus_loadLibDBus() lib->setFileName(QLatin1String("dbus-1")); for (uint i = 0; i < sizeof(majorversions) / sizeof(majorversions[0]); ++i) { lib->setFileNameAndVersion(lib->fileName(), majorversions[i]); - if (lib->load() && lib->resolve("dbus_connection_open_private")) { - struct Unloader { ~Unloader() { qdbus_unloadLibDBus(); } }; - static Unloader unloader; + if (lib->load() && lib->resolve("dbus_connection_open_private")) return true; - } lib->unload(); } @@ -111,6 +107,8 @@ void *qdbus_resolve_me(const char *name) return ptr; } +Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus) + QT_END_NAMESPACE #endif diff --git a/src/gui/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm index 502827c..41a2566 100644 --- a/src/gui/accessible/qaccessible_mac_cocoa.mm +++ b/src/gui/accessible/qaccessible_mac_cocoa.mm @@ -59,9 +59,9 @@ QT_BEGIN_NAMESPACE //#define MAC_ACCESSIBILTY_DEVELOPER_MODE #ifdef MAC_ACCESSIBILTY_DEVELOPER_MODE -#define MAC_ACCESSIBILTY_DEBUG qDebug +#define MAC_ACCESSIBILTY_DEBUG QT_PREPEND_NAMESPACE(qDebug) #else -#define MAC_ACCESSIBILTY_DEBUG if (0) qDebug +#define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(qDebug) #endif typedef QMap<QAccessible::Role, NSString *> QMacAccessibiltyRoleMap; @@ -195,13 +195,13 @@ QT_END_NAMESPACE - (BOOL)accessibilityIsIgnored { - QAInterface interface = interfaceForView(self); + QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self); return isInterfaceIgnored(interface); } - (NSArray *)accessibilityAttributeNames { - QAInterface interface = interfaceForView(self); + QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self); static NSArray *attributes = nil; if (attributes == nil) { @@ -213,9 +213,10 @@ QT_END_NAMESPACE - (id)accessibilityAttributeValue:(NSString *)attribute { - MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self << QCFString::toQString(reinterpret_cast<CFStringRef>(attribute)); + MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self << + QT_PREPEND_NAMESPACE(QCFString)::toQString(reinterpret_cast<CFStringRef>(attribute)); - QAInterface interface = interfaceForView(self); + QT_PREPEND_NAMESPACE(QAInterface) interface = QT_PREPEND_NAMESPACE(interfaceForView)(self); // Switch on the attribute name and call the appropriate handler function. // Pass the call on to the NSView class for attributes we don't handle. diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index 2c46ae4..bdf0909 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -381,16 +381,12 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) { - if (!pathElements.at(0).contains(QLatin1String(":"))) -#if defined(Q_CC_NOKIAX86) - { - // Workaround for bizarre compiler crash. + if (!pathElements.at(0).contains(QLatin1String(":"))) { + // The reason we express it like this instead of with anonymous, temporary + // variables, is to workaround a compiler crash with Q_CC_NOKIAX86. QString rootPath = QDir(longPath).rootPath(); pathElements.prepend(rootPath); } -#else - pathElements.prepend(QDir(longPath).rootPath()); -#endif if (pathElements.at(0).endsWith(QLatin1Char('/'))) pathElements[0].chop(1); } diff --git a/src/gui/dialogs/qfscompleter_p.h b/src/gui/dialogs/qfscompleter_p.h index 2e5a674..fde7706 100644 --- a/src/gui/dialogs/qfscompleter_p.h +++ b/src/gui/dialogs/qfscompleter_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QCOMPLETOR_P_H -#define QCOMPLETOR_P_H +#ifndef QFSCOMPLETOR_P_H +#define QFSCOMPLETOR_P_H // // W A R N I N G @@ -78,5 +78,5 @@ public: }; #endif // QT_NO_COMPLETER QT_END_NAMESPACE -#endif // QCOMPLETOR_P_H +#endif // QFSCOMPLETOR_P_H diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp index 949922a..5f64698 100644 --- a/src/gui/effects/qgraphicseffect.cpp +++ b/src/gui/effects/qgraphicseffect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,62 +34,69 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ /*! \class QGraphicsEffect - \brief The QGraphicsEffect class is the base class for all graphics effects. + \brief The QGraphicsEffect class is the base class for all graphics + effects. \since 4.6 \ingroup multimedia \ingroup graphicsview-api Effects alter the appearance of elements by hooking into the rendering - pipeline and operating between the source (e.g., a QGraphicsPixmapItem), + pipeline and operating between the source (e.g., a QGraphicsPixmapItem) and the destination device (e.g., QGraphicsView's viewport). Effects can be - disabled by calling setEnabled(); if the effect is disabled, the source is - rendered directly. + disabled by calling setEnabled(false). If effects are disabled, the source + is rendered directly. - If you want to add a visual effect to a QGraphicsItem, you can either use - one of the standard effects, or create your own effect by making a subclass - of QGraphicsEffect. + To add a visual effect to a QGraphicsItem, for example, you can use one of + the standard effects, or alternately, create your own effect by creating a + subclass of QGraphicsEffect. The effect can then be installed on the item + using QGraphicsItem::setGraphicsEffect(). - Qt provides several standard effects, including: + Qt provides the following standard effects: \list - \o QGraphicsGrayScaleEffect - renders the item in shades of gray - \o QGraphicsColorizeEffect - renders the item in shades of any given color - \o QGraphicsPixelizeEffect - pixelizes the item with any pixel size \o QGraphicsBlurEffect - blurs the item by a given radius \o QGraphicsDropShadowEffect - renders a dropshadow behind the item + \o QGraphicsColorizeEffect - renders the item in shades of any given color + \o QGraphicsOpacityEffect - renders the item with an opacity + \o QGraphicsPixelizeEffect - pixelizes the item with any pixel size + \o QGraphicsGrayscaleEffect - renders the item in shades of gray + \o QGraphicsShaderEffect - renders the item with a pixel shader fragment \endlist - If all you want is to add an effect to an item, you should visit the - documentation for the specific effect to learn more about how each effect - can be used. - - If you want to create your own custom effect, you can start by creating a - subclass of QGraphicsEffect (or any of the existing effects), and - reimplement the virtual function draw(). This function is called whenever - the effect needs to redraw. draw() has two arguments: the painter, and a - pointer to the source (QGraphicsEffectSource). The source provides extra - context information, such as a pointer to the item that is rendering the - effect, any cached pixmap data, and the device rect bounds. See the draw() - documentation for more details. You can also get a pointer to the current - source by calling source(). - - If your effect changes, you can call update() to request a redraw. If your - custom effect changes the bounding rectangle of the source (e.g., a radial - glow effect may need to apply an extra margin), you can reimplement the + \img graphicseffect-effects.png + \img graphicseffect-widget.png + + For more information on how to use each effect, refer to the specific + effect's documentation. + + To create your own custom effect, create a subclass of QGraphicsEffect (or + any other existing effects) and reimplement the virtual function draw(). + This function is called whenever the effect needs to redraw. The draw() + function accepts two arguments: the painter and a pointer to the source + (QGraphicsEffectSource). The source provides extra context information, + such as a pointer to the item that is rendering the effect, any cached + pixmap data, or the device rectangle bounds. For more information, refer to + the documenation for draw(). To obtain a pointer to the current source, + simply call source(). + + If your effect changes, use update() to request for a redraw. If your + custom effect changes the bounding rectangle of the source, e.g., a radial + glow effect may need to apply an extra margin, you can reimplement the virtual boundingRectFor() function, and call updateBoundingRect() to notify the framework whenever this rectangle changes. The virtual sourceBoundingRectChanged() function is called to notify the effects that - the source's bounding rectangle has changed (e.g., if the source is a - QGraphicsRectItem, then if the rectangle parameters have changed). + the source's bounding rectangle has changed - e.g., if the source is a + QGraphicsRectItem and its rectangle parameters have changed. - \sa QGraphicsItem::setGraphicsEffect() + \sa QGraphicsItem::setGraphicsEffect(), QWidget::setGraphicsEffect(), + QGraphicsEffectSource */ #include "qgraphicseffect_p.h" @@ -101,53 +108,148 @@ QT_BEGIN_NAMESPACE +/*! + \class QGraphicsEffectSource + \brief The QGraphicsEffectSource class represents the source on which a + QGraphicsEffect is installed on. + \since 4.6 + + When a QGraphicsEffect is installed on a QGraphicsItem, for example, this + class will act as a wrapper around QGraphicsItem. Then, calling update() is + effectively the same as calling QGraphicsItem::update(). + + QGraphicsEffectSource also provides a pixmap() function which creates a + pixmap with the source painted into it. + + \sa QGraphicsItem::setGraphicsEffect(), QWidget::setGraphicsEffect(). +*/ + +/*! + \internal +*/ QGraphicsEffectSource::QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent) : QObject(dd, parent) {} +/*! + Destroys the effect source. +*/ QGraphicsEffectSource::~QGraphicsEffectSource() {} +/*! + Returns the bounds of the current painter's device. + + This function is useful when you want to draw something in device + coordinates and ensure the size of the pixmap is not bigger than the size + of the device. + + Calling QGraphicsEffectSource::pixmap(Qt::DeviceCoordinates) always returns + a pixmap which is bound to the device's size. + + \sa pixmap() +*/ QRect QGraphicsEffectSource::deviceRect() const { return d_func()->deviceRect(); } +/*! + Returns the bounding rectangle of the source mapped to the given \a system. + + \sa draw() +*/ QRectF QGraphicsEffectSource::boundingRect(Qt::CoordinateSystem system) const { return d_func()->boundingRect(system); } +/*! + Returns a pointer to the item if this source is a QGraphicsItem; otherwise + returns 0. + + \sa widget() +*/ const QGraphicsItem *QGraphicsEffectSource::graphicsItem() const { return d_func()->graphicsItem(); } +/*! + Returns a pointer to the widget if this source is a QWidget; otherwise + returns 0. + + \sa graphicsItem() +*/ const QWidget *QGraphicsEffectSource::widget() const { return d_func()->widget(); } +/*! + Returns a pointer to the style options (used when drawing the source) if + available; otherwise returns 0. + + \sa graphicsItem(), widget() +*/ const QStyleOption *QGraphicsEffectSource::styleOption() const { return d_func()->styleOption(); } +/*! + Draws the source using the given \a painter. + + This function should only be called from QGraphicsEffect::draw(). + + For example: + + \snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 0 + + \sa QGraphicsEffect::draw() +*/ void QGraphicsEffectSource::draw(QPainter *painter) { d_func()->draw(painter); } +/*! + Schedules a redraw of the source. Call this function whenever the source + needs to be redrawn. + + \sa QGraphicsEffect::updateBoundingRect(), QWidget::update(), + QGraphicsItem::update(), +*/ void QGraphicsEffectSource::update() { d_func()->update(); } +/*! + Returns true if the source effectively is a pixmap, e.g., a + QGraphicsPixmapItem. + + This function is useful for optimization purposes. For instance, there's no + point in drawing the source in device coordinates to avoid pixmap scaling + if this function returns true - the source pixmap will be scaled anyways. +*/ bool QGraphicsEffectSource::isPixmap() const { return d_func()->isPixmap(); } +/*! + Returns a pixmap with the source painted into it. + + The \a system specifies which coordinate system to be used for the source. + The optional \a offset parameter returns the offset where the pixmap should + be painted at using the current painter. + + The returned pixmap is bound to the current painter's device rectangle when + \a system is Qt::DeviceCoordinates. + + \sa QGraphicsEffect::draw(), boundingRect(), deviceRect() +*/ QPixmap QGraphicsEffectSource::pixmap(Qt::CoordinateSystem system, QPoint *offset) const { return d_func()->pixmap(system, offset); @@ -179,9 +281,9 @@ QGraphicsEffect::~QGraphicsEffect() } /*! - Returns the bounding rectangle for this effect (i.e., the bounding + Returns the bounding rectangle for this effect, i.e., the bounding rectangle of the source, adjusted by any margins applied by the effect - itself). + itself. \sa boundingRectFor(), updateBoundingRect() */ @@ -211,11 +313,13 @@ QRectF QGraphicsEffect::boundingRectFor(const QRectF &rect) const \brief whether the effect is enabled or not. If an effect is disabled, the source will be rendered with as normal, with - no interference from the effect. If the effect is enabled (default), the - source will be rendered with the effect applied. + no interference from the effect. If the effect is enabled, the source will + be rendered with the effect applied. - This property is provided so that you can disable certain effects on slow - platforms, in order to ensure that the user interface is responsive. + This property is enabled by default. + + Using this property, you can disable certain effects on slow platforms, in + order to ensure that the user interface is responsive. */ bool QGraphicsEffect::isEnabled() const { @@ -236,6 +340,15 @@ void QGraphicsEffect::setEnabled(bool enable) } /*! + \fn void QGraphicsEffect::enabledChanged(bool enabled) + + This signal is emitted whenever the effect is enabled or disabled. + The \a enabled parameter holds the effects's new enabled state. + + \sa isEnabled() +*/ + +/*! Returns a pointer to the source, which provides extra context information that can be useful for the effect. @@ -248,7 +361,7 @@ QGraphicsEffectSource *QGraphicsEffect::source() const } /*! - This function notifies the effect framework that the effect's bounding + This function notifies the effect framework when the effect's bounding rectangle has changed. As a custom effect author, you must call this function whenever you change any parameters that will cause the virtual boundingRectFor() function to return a different value. @@ -263,6 +376,39 @@ void QGraphicsEffect::updateBoundingRect() } /*! + \fn virtual void QGraphicsEffect::draw(QPainter *painter, + QGraphicsEffectSource *source) = 0 + + This pure virtual function draws the effect and is called whenever the + source() needs to be drawn. + + Reimplement this function in a QGraphicsEffect subclass to provide the + effect's drawing implementation, using \a painter. The \a source parameter + is provided for convenience; its value is the same as source(). + + For example: + + \snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 1 + + This function should not be called explicitly by the user, since it is + meant for reimplementation purposes only. + + \sa QGraphicsEffectSource +*/ + +/*! + \enum QGraphicsEffect::ChangeFlag + + This enum describes what has changed in QGraphicsEffectSource. + + \value SourceAttached The effect is installed on a source. + \value SourceDetached The effect is uninstalled on a source. + \value SourceBoundingRectChanged The bounding rect of the source has + changed. + \value SourceInvalidated The visual appearance of the source has changed. +*/ + +/*! This virtual function is called by QGraphicsEffect to notify the effect that the source has changed. If the effect applies any cache, then this cache must be purged in order to reflect the new appearance of the source. @@ -274,15 +420,38 @@ void QGraphicsEffect::sourceChanged(ChangeFlags flags) Q_UNUSED(flags); } +/*! + \class QGraphicsGrayscaleEffect + \brief The QGraphicsGrayscaleEffect class provides a grayscale effect. + \since 4.6 + + A grayscale effect renders the source in shades of gray. + + \img graphicseffect-grayscale.png + + \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect, + QGraphicsColorizeEffect, QGraphicsOpacityEffect +*/ + +/*! + Constructs a new QGraphicsGrayscale instance. + The \a parent parameter is passed to QGraphicsEffect's constructor. +*/ QGraphicsGrayscaleEffect::QGraphicsGrayscaleEffect(QObject *parent) : QGraphicsEffect(*new QGraphicsGrayscaleEffectPrivate, parent) { } +/*! + Destroys the effect. +*/ QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect() { } +/*! + \reimp +*/ void QGraphicsGrayscaleEffect::draw(QPainter *painter, QGraphicsEffectSource *source) { Q_D(QGraphicsGrayscaleEffect); @@ -303,31 +472,70 @@ void QGraphicsGrayscaleEffect::draw(QPainter *painter, QGraphicsEffectSource *so } +/*! + \class QGraphicsColorizeEffect + \brief The QGraphicsColorizeEffect class provides a colorize effect. + \since 4.6 + + A colorize effect renders the source with a tint of its color(). The color + can be modified using the setColor() function. + + By default, the color is light blue (QColor(0, 0, 192)). + + \img graphicseffect-colorize.png + + \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect, + QGraphicsGrayscaleEffect, QGraphicsOpacityEffect +*/ + +/*! + Constructs a new QGraphicsColorizeEffect instance. + The \a parent parameter is passed to QGraphicsEffect's constructor. +*/ QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject *parent) : QGraphicsEffect(*new QGraphicsColorizeEffectPrivate, parent) { } +/*! + Destroys the effect. +*/ QGraphicsColorizeEffect::~QGraphicsColorizeEffect() { } +/*! + \property QGraphicsColorizeEffect::color + \brief the color of the effect. + + By default, the color is light blue (QColor(0, 0, 192)). +*/; QColor QGraphicsColorizeEffect::color() const { Q_D(const QGraphicsColorizeEffect); return d->filter->color(); } -void QGraphicsColorizeEffect::setColor(const QColor &c) +void QGraphicsColorizeEffect::setColor(const QColor &color) { Q_D(QGraphicsColorizeEffect); - if (d->filter->color() == c) + if (d->filter->color() == color) return; - d->filter->setColor(c); - emit colorChanged(c); + d->filter->setColor(color); + emit colorChanged(color); } +/*! + \fn void QGraphicsColorizeEffect::colorChanged(const QColor &color) + + This signal is emitted whenever the effect's color changes. + The \a color parameter holds the effect's new color. +*/ + +/*! + \reimp +*/ void QGraphicsColorizeEffect::draw(QPainter *painter, QGraphicsEffectSource *source) { Q_D(QGraphicsColorizeEffect); @@ -347,15 +555,48 @@ void QGraphicsColorizeEffect::draw(QPainter *painter, QGraphicsEffectSource *sou painter->setWorldTransform(restoreTransform); } +/*! + \class QGraphicsPixelizeEffect + \brief The QGraphicsPixelizeEffect class provides a pixelize effect. + \since 4.6 + + A pixelize effect renders the source in lower resolution. This effect is + useful for reducing details, like censorship. The resolution can be + modified using the setPixelSize() function. + + By default, the pixel size is 3. + + \img graphicseffect-pixelize.png + + \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsGrayscaleEffect, + QGraphicsColorizeEffect, QGraphicsOpacityEffect +*/ + +/*! + Constructs a new QGraphicsPixelizeEffect instance. + The \a parent parameter is passed to QGraphicsEffect's constructor. +*/ QGraphicsPixelizeEffect::QGraphicsPixelizeEffect(QObject *parent) : QGraphicsEffect(*new QGraphicsPixelizeEffectPrivate, parent) { } +/*! + Destroys the effect. +*/ QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect() { } +/*! + \property QGraphicsPixelizeEffect::pixelSize + \brief the size of a pixel in the effect. + + Setting the pixel size to 2 means two pixels in the source will be used to + represent one pixel. Using a bigger size results in lower resolution. + + By default, the pixel size is 3. +*/ int QGraphicsPixelizeEffect::pixelSize() const { Q_D(const QGraphicsPixelizeEffect); @@ -372,6 +613,13 @@ void QGraphicsPixelizeEffect::setPixelSize(int size) emit pixelSizeChanged(size); } +/*! + \fn void QGraphicsPixelizeEffect::pixelSizeChanged(int size) + + This signal is emitted whenever the effect's pixel size changes. + The \a size parameter holds the effect's new pixel size. +*/ + static inline void pixelize(QImage *image, int pixelSize) { Q_ASSERT(pixelSize > 0); @@ -393,6 +641,9 @@ static inline void pixelize(QImage *image, int pixelSize) } } +/*! + \reimp +*/ void QGraphicsPixelizeEffect::draw(QPainter *painter, QGraphicsEffectSource *source) { Q_D(QGraphicsPixelizeEffect); @@ -423,15 +674,49 @@ void QGraphicsPixelizeEffect::draw(QPainter *painter, QGraphicsEffectSource *sou painter->setWorldTransform(restoreTransform); } +/*! + \class QGraphicsBlurEffect + \brief The QGraphicsBlurEffect class provides a blur effect. + \since 4.6 + + A blur effect blurs the source. This effect is useful for reducing details, + such as when the source loses focus and you want to draw attention to other + elements. The level of detail can be modified using the setBlurRadius() + function. + + By default, the blur radius is 5 pixels. + + \img graphicseffect-blur.png + + \sa QGraphicsDropShadowEffect, QGraphicsPixelizeEffect, QGraphicsGrayscaleEffect, + QGraphicsColorizeEffect, QGraphicsOpacityEffect +*/ + +/*! + Constructs a new QGraphicsBlurEffect instance. + The \a parent parameter is passed to QGraphicsEffect's constructor. +*/ QGraphicsBlurEffect::QGraphicsBlurEffect(QObject *parent) : QGraphicsEffect(*new QGraphicsBlurEffectPrivate, parent) { } +/*! + Destroys the effect. +*/ QGraphicsBlurEffect::~QGraphicsBlurEffect() { } +/*! + \property QGraphicsBlurEffect::blurRadius + \brief the blur radius of the effect. + + Using a smaller radius results in a sharper appearance, whereas a bigger + radius results in a more blurred appearance. + + By default, the blur radius is 5 pixels. +*/ int QGraphicsBlurEffect::blurRadius() const { Q_D(const QGraphicsBlurEffect); @@ -449,12 +734,25 @@ void QGraphicsBlurEffect::setBlurRadius(int radius) emit blurRadiusChanged(radius); } +/*! + \fn void QGraphicsBlurEffect::blurRadiusChanged(int radius) + + This signal is emitted whenever the effect's blur radius changes. + The \a radius parameter holds the effect's new blur radius. +*/ + +/*! + \reimp +*/ QRectF QGraphicsBlurEffect::boundingRectFor(const QRectF &rect) const { Q_D(const QGraphicsBlurEffect); return d->filter->boundingRectFor(rect); } +/*! + \reimp +*/ void QGraphicsBlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source) { Q_D(QGraphicsBlurEffect); @@ -479,32 +777,86 @@ void QGraphicsBlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source) painter->setWorldTransform(restoreTransform); } +/*! + \class QGraphicsDropShadowEffect + \brief The QGraphicsDropShadowEffect class provides a drop shadow effect. + \since 4.6 + + A drop shadow effect renders the source with a drop shadow. The color of + the drop shadow can be modified using the setColor() function. The drop + shadow offset can be modified using the setOffset() function and the blur + radius of the drop shadow can be changed with the setBlurRadius() + function. + + By default, the drop shadow is a semi-transparent dark gray + (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset + of 8 pixels towards the lower right. + + \img graphicseffect-drop-shadow.png + + \sa QGraphicsBlurEffect, QGraphicsPixelizeEffect, QGraphicsGrayscaleEffect, + QGraphicsColorizeEffect, QGraphicsOpacityEffect +*/ + +/*! + Constructs a new QGraphicsDropShadowEffect instance. + The \a parent parameter is passed to QGraphicsEffect's constructor. +*/ QGraphicsDropShadowEffect::QGraphicsDropShadowEffect(QObject *parent) : QGraphicsEffect(*new QGraphicsDropShadowEffectPrivate, parent) { } +/*! + Destroys the effect. +*/ QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect() { } +/*! + \property QGraphicsDropShadowEffect::offset + \brief the shadow offset in pixels. + + By default, the offset is 8 pixels towards the lower right. + + \sa blurRadius(), color() +*/ QPointF QGraphicsDropShadowEffect::offset() const { Q_D(const QGraphicsDropShadowEffect); return d->filter->offset(); } -void QGraphicsDropShadowEffect::setOffset(const QPointF &ofs) +void QGraphicsDropShadowEffect::setOffset(const QPointF &offset) { Q_D(QGraphicsDropShadowEffect); - if (d->filter->offset() == ofs) + if (d->filter->offset() == offset) return; - d->filter->setOffset(ofs); + d->filter->setOffset(offset); updateBoundingRect(); - emit offsetChanged(ofs); + emit offsetChanged(offset); } +/*! + \fn void QGraphicsDropShadowEffect::offsetChanged(const QPointF &offset) + + This signal is emitted whenever the effect's shadow offset changes. + The \a offset parameter holds the effect's new shadow offset. +*/ + +/*! + \property QGraphicsDropShadowEffect::blurRadius + \brief the blur radius in pixels of the drop shadow. + + Using a smaller radius results in a sharper shadow, whereas using a bigger + radius results in a more blurred shadow. + + By default, the blur radius is 1 pixel. + + \sa color(), offset(). +*/ int QGraphicsDropShadowEffect::blurRadius() const { Q_D(const QGraphicsDropShadowEffect); @@ -522,6 +874,22 @@ void QGraphicsDropShadowEffect::setBlurRadius(int blurRadius) emit blurRadiusChanged(blurRadius); } +/*! + \fn void QGraphicsDropShadowEffect::blurRadiusChanged(int blurRadius) + + This signal is emitted whenever the effect's blur radius changes. + The \a blurRadius parameter holds the effect's new blur radius. +*/ + +/*! + \property QGraphicsDropShadowEffect::color + \brief the color of the drop shadow. + + By default, the drop color is a semi-transparent dark gray + (QColor(63, 63, 63, 180)). + + \sa offset(), blurRadius() +*/ QColor QGraphicsDropShadowEffect::color() const { Q_D(const QGraphicsDropShadowEffect); @@ -538,12 +906,25 @@ void QGraphicsDropShadowEffect::setColor(const QColor &color) emit colorChanged(color); } +/*! + \fn void QGraphicsDropShadowEffect::colorChanged(const QColor &color) + + This signal is emitted whenever the effect's color changes. + The \a color parameter holds the effect's new color. +*/ + +/*! + \reimp +*/ QRectF QGraphicsDropShadowEffect::boundingRectFor(const QRectF &rect) const { Q_D(const QGraphicsDropShadowEffect); return d->filter->boundingRectFor(rect); } +/*! + \reimp +*/ void QGraphicsDropShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *source) { Q_D(QGraphicsDropShadowEffect); @@ -568,5 +949,107 @@ void QGraphicsDropShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *s painter->setWorldTransform(restoreTransform); } +/*! + \class QGraphicsOpacityEffect + \brief The QGraphicsOpacityEffect class provides an opacity effect. + \since 4.6 + + An opacity effect renders the source with an opacity. This effect is useful + for making the source semi-transparent, similar to a fade-in/fade-out + sequence. The opacity can be modified using the setOpacity() function. + + By default, the opacity is 0.7. + + \img graphicseffect-opacity.png + + \sa QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect, + QGraphicsGrayscaleEffect, QGraphicsColorizeEffect +*/ + +/*! + Constructs a new QGraphicsOpacityEffect instance. + The \a parent parameter is passed to QGraphicsEffect's constructor. +*/ +QGraphicsOpacityEffect::QGraphicsOpacityEffect(QObject *parent) + : QGraphicsEffect(*new QGraphicsOpacityEffectPrivate, parent) +{ +} + +/*! + Destroys the effect. +*/ +QGraphicsOpacityEffect::~QGraphicsOpacityEffect() +{ +} + +/*! + \property QGraphicsOpacityEffect::opacity + \brief the opacity of the effect. + + The value should be in the range of 0.0 to 1.0, where 0.0 is + fully transparent and 1.0 is fully opaque. + + By default, the opacity is 0.7. +*/ +qreal QGraphicsOpacityEffect::opacity() const +{ + Q_D(const QGraphicsOpacityEffect); + return d->opacity; +} + +void QGraphicsOpacityEffect::setOpacity(qreal opacity) +{ + Q_D(QGraphicsOpacityEffect); + opacity = qBound(qreal(0.0), opacity, qreal(1.0)); + + if (qFuzzyCompare(d->opacity, opacity)) + return; + + d->opacity = opacity; + emit opacityChanged(opacity); +} + +/*! + \fn void QGraphicsOpacityEffect::opacityChanged(qreal opacity) + + This signal is emitted whenever the effect's opacity changes. + The \a opacity parameter holds the effect's new opacity. +*/ + +/*! + \reimp +*/ +void QGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +{ + Q_D(QGraphicsOpacityEffect); + + // Transparent; nothing to draw. + if (qFuzzyIsNull(d->opacity)) + return; + + // Opaque; draw directly without going through a pixmap. + if (qFuzzyIsNull(d->opacity - 1)) { + source->draw(painter); + return; + } + + painter->save(); + painter->setOpacity(d->opacity); + + QPoint offset; + if (source->isPixmap()) { + // No point in drawing in device coordinates (pixmap will be scaled anyways). + const QPixmap pixmap = source->pixmap(Qt::LogicalCoordinates, &offset); + painter->drawPixmap(offset, pixmap); + } else { + // Draw pixmap in device coordinates to avoid pixmap scaling; + const QPixmap pixmap = source->pixmap(Qt::DeviceCoordinates, &offset); + painter->setWorldTransform(QTransform()); + painter->drawPixmap(offset, pixmap); + } + + painter->restore(); +} + QT_END_NAMESPACE diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h index d4dba4c..fef6531 100644 --- a/src/gui/effects/qgraphicseffect.h +++ b/src/gui/effects/qgraphicseffect.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -137,7 +137,7 @@ private: friend class QWidget; friend class QWidgetPrivate; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsEffect::ChangeFlags); +Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsEffect::ChangeFlags) class QGraphicsGrayscaleEffectPrivate; class Q_GUI_EXPORT QGraphicsGrayscaleEffect: public QGraphicsEffect @@ -269,6 +269,31 @@ private: Q_DISABLE_COPY(QGraphicsDropShadowEffect) }; +class QGraphicsOpacityEffectPrivate; +class Q_GUI_EXPORT QGraphicsOpacityEffect: public QGraphicsEffect +{ + Q_OBJECT + Q_PROPERTY(int opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) +public: + QGraphicsOpacityEffect(QObject *parent = 0); + ~QGraphicsOpacityEffect(); + + qreal opacity() const; + +public Q_SLOTS: + void setOpacity(qreal opacity); + +Q_SIGNALS: + void opacityChanged(qreal opacity); + +protected: + void draw(QPainter *painter, QGraphicsEffectSource *source); + +private: + Q_DECLARE_PRIVATE(QGraphicsOpacityEffect) + Q_DISABLE_COPY(QGraphicsOpacityEffect) +}; + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h index 35f2d40..6ce5cda 100644 --- a/src/gui/effects/qgraphicseffect_p.h +++ b/src/gui/effects/qgraphicseffect_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -160,6 +160,16 @@ public: QPixmapDropShadowFilter *filter; }; +class QGraphicsOpacityEffectPrivate : public QGraphicsEffectPrivate +{ + Q_DECLARE_PUBLIC(QGraphicsOpacityEffect) +public: + QGraphicsOpacityEffectPrivate() : opacity(qreal(0.7)) {} + ~QGraphicsOpacityEffectPrivate() {} + + qreal opacity; +}; + QT_END_NAMESPACE #endif // QGRAPHICSEFFECT_P_H diff --git a/src/gui/embedded/qkbd_defaultmap_qws_p.h b/src/gui/embedded/qkbd_defaultmap_qws_p.h index 2903492..a6c2d25 100644 --- a/src/gui/embedded/qkbd_defaultmap_qws_p.h +++ b/src/gui/embedded/qkbd_defaultmap_qws_p.h @@ -53,6 +53,8 @@ // We mean it. // +// no QT_BEGIN_NAMESPACE, since we include it internally... + const QWSKeyboard::Mapping QWSKbPrivate::s_keymap_default[] = { { 1, 0xffff, 0x01000000, 0x00, 0x00, 0x0000 }, { 2, 0x0031, 0x00000031, 0x00, 0x00, 0x0000 }, diff --git a/src/gui/embedded/qkbd_qws_p.h b/src/gui/embedded/qkbd_qws_p.h index df7ce1b..5af8f7c 100644 --- a/src/gui/embedded/qkbd_qws_p.h +++ b/src/gui/embedded/qkbd_qws_p.h @@ -55,6 +55,8 @@ #include <QDataStream> +QT_BEGIN_NAMESPACE + namespace QWSKeyboard { const quint32 FileMagic = 0x514d4150; // 'QMAP' @@ -127,4 +129,6 @@ inline QDataStream &operator<<(QDataStream &ds, const QWSKeyboard::Composing &c) } #endif // QT_NO_DATASTREAM +QT_END_NAMESPACE + #endif // QWSKEYBOARD_H diff --git a/src/gui/embedded/qkbdqnx_qws.cpp b/src/gui/embedded/qkbdqnx_qws.cpp index 4f0b9de..6e147dd 100644 --- a/src/gui/embedded/qkbdqnx_qws.cpp +++ b/src/gui/embedded/qkbdqnx_qws.cpp @@ -49,6 +49,9 @@ #include "qplatformdefs.h" #include <errno.h> + +QT_BEGIN_NAMESPACE + /*! \class QWSQnxKeyboardHandler \preliminary @@ -229,3 +232,5 @@ void QWSQnxKeyboardHandler::socketActivated() // (on QNX, isPress is not set when the key event is repeated). processKeyEvent(unicode, key, modifiers, isPress || isRepeat, isRepeat); } + +QT_END_NAMESPACE diff --git a/src/gui/embedded/qlock.cpp b/src/gui/embedded/qlock.cpp index c32e9b5..9f2d3b8 100644 --- a/src/gui/embedded/qlock.cpp +++ b/src/gui/embedded/qlock.cpp @@ -41,10 +41,11 @@ #include "qlock_p.h" -QT_BEGIN_NAMESPACE #ifdef QT_NO_QWS_MULTIPROCESS +QT_BEGIN_NAMESPACE + /* no multiprocess - use a dummy */ QLock::QLock(const QString & /*filename*/, char /*id*/, bool /*create*/) @@ -77,6 +78,8 @@ bool QLock::locked() const return data; } +QT_END_NAMESPACE + #else // QT_NO_QWS_MULTIPROCESS #include "qwssignalhandler_p.h" @@ -110,6 +113,9 @@ union semun { #include <private/qcore_unix_p.h> // overrides QT_OPEN + +QT_BEGIN_NAMESPACE + #define MAX_LOCKS 200 // maximum simultaneous read locks class QLockData @@ -324,6 +330,7 @@ bool QLock::locked() const return (data->count > 0); } +QT_END_NAMESPACE + #endif // QT_NO_QWS_MULTIPROCESS -QT_END_NAMESPACE diff --git a/src/gui/embedded/qmousetslib_qws.h b/src/gui/embedded/qmousetslib_qws.h index 4dd39b5..71672f0 100644 --- a/src/gui/embedded/qmousetslib_qws.h +++ b/src/gui/embedded/qmousetslib_qws.h @@ -73,8 +73,8 @@ protected: }; -QT_END_NAMESPACE #endif // QT_NO_QWS_MOUSE_TSLIB +QT_END_NAMESPACE QT_END_HEADER #endif // QMOUSETSLIB_QWS_H diff --git a/src/gui/embedded/qscreen_qws.h b/src/gui/embedded/qscreen_qws.h index 275e83f..307c2fd 100644 --- a/src/gui/embedded/qscreen_qws.h +++ b/src/gui/embedded/qscreen_qws.h @@ -50,6 +50,8 @@ #include <QtGui/qimage.h> #include <QtGui/qregion.h> +struct fb_cmap; + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -169,8 +171,6 @@ private: #endif // QT_NO_QWS_CURSOR -struct fb_cmap; - // A (used) chunk of offscreen memory class QPoolEntry diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp index 69e5808..1679ef2 100644 --- a/src/gui/embedded/qscreenlinuxfb_qws.cpp +++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp @@ -291,8 +291,8 @@ bool QLinuxFbScreen::connect(const QString &displaySpec) d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDONLY); } - fb_fix_screeninfo finfo; - fb_var_screeninfo vinfo; + ::fb_fix_screeninfo finfo; + ::fb_var_screeninfo vinfo; //####################### // Shut up Valgrind memset(&vinfo, 0, sizeof(vinfo)); @@ -429,7 +429,7 @@ bool QLinuxFbScreen::connect(const QString &displaySpec) if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) { screencols= (vinfo.bits_per_pixel==8) ? 256 : 16; int loopc; - fb_cmap startcmap; + ::fb_cmap startcmap; startcmap.start=0; startcmap.len=screencols; startcmap.red=(unsigned short int *) diff --git a/src/gui/embedded/qscreenlinuxfb_qws.h b/src/gui/embedded/qscreenlinuxfb_qws.h index eb47848..e3c712a 100644 --- a/src/gui/embedded/qscreenlinuxfb_qws.h +++ b/src/gui/embedded/qscreenlinuxfb_qws.h @@ -44,6 +44,11 @@ #include <QtGui/qscreen_qws.h> +struct fb_cmap; +struct fb_var_screeninfo; +struct fb_fix_screeninfo; + + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -70,9 +75,6 @@ public: }; -struct fb_cmap; -struct fb_var_screeninfo; -struct fb_fix_screeninfo; class QLinuxFbScreenPrivate; class Q_GUI_EXPORT QLinuxFbScreen : public QScreen diff --git a/src/gui/embedded/qscreenproxy_qws.cpp b/src/gui/embedded/qscreenproxy_qws.cpp index b566dc0..b87fdd1 100644 --- a/src/gui/embedded/qscreenproxy_qws.cpp +++ b/src/gui/embedded/qscreenproxy_qws.cpp @@ -45,6 +45,7 @@ #include <qregexp.h> +QT_BEGIN_NAMESPACE #ifndef QT_NO_QWS_CURSOR /*! @@ -629,4 +630,6 @@ QRegion QProxyScreen::region() const return QScreen::region(); } +QT_END_NAMESPACE + #endif // QT_NO_QWS_PROXYSCREEN diff --git a/src/gui/embedded/qscreenqnx_qws.cpp b/src/gui/embedded/qscreenqnx_qws.cpp index 70f6d6b..77fe13e 100644 --- a/src/gui/embedded/qscreenqnx_qws.cpp +++ b/src/gui/embedded/qscreenqnx_qws.cpp @@ -44,6 +44,8 @@ #include <gf/gf.h> +QT_BEGIN_NAMESPACE + // This struct holds all the pointers to QNX's internals struct QQnxScreenContext { @@ -445,3 +447,4 @@ void QQnxScreen::exposeRegion(QRegion r, int changing) gf_draw_end(d->context); } +QT_END_NAMESPACE diff --git a/src/gui/embedded/qsoundqss_qws.cpp b/src/gui/embedded/qsoundqss_qws.cpp index 2f5f39a..811943a 100644 --- a/src/gui/embedded/qsoundqss_qws.cpp +++ b/src/gui/embedded/qsoundqss_qws.cpp @@ -67,10 +67,10 @@ #include <qdebug.h> -QT_BEGIN_NAMESPACE - extern int errno; +QT_BEGIN_NAMESPACE + #define QT_QWS_SOUND_16BIT 1 // or 0, or undefined for always 0 #define QT_QWS_SOUND_STEREO 1 // or 0, or undefined for always 0 diff --git a/src/gui/embedded/qwsutils_qws.h b/src/gui/embedded/qwsutils_qws.h index 23e0104..fe959ef 100644 --- a/src/gui/embedded/qwsutils_qws.h +++ b/src/gui/embedded/qwsutils_qws.h @@ -44,6 +44,12 @@ #include <QtCore/QIODevice> +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + #ifndef QT_NO_SXE #define QWS_SOCK_BASE QUnixSocket #define QWS_SOCK_SERVER_BASE QUnixSocketServer @@ -58,12 +64,6 @@ class QTcpServer; class QWSSocket; class QWSServerSocket; -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Gui) - /******************************************************************** * * Convenient socket functions diff --git a/src/gui/graphicsview/qgraph_p.h b/src/gui/graphicsview/qgraph_p.h index 7130003..895ee0c 100644 --- a/src/gui/graphicsview/qgraph_p.h +++ b/src/gui/graphicsview/qgraph_p.h @@ -1,3 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QGRAPH_P_H +#define QGRAPH_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/QHash> #include <QtCore/QQueue> #include <QtCore/QString> @@ -100,8 +155,7 @@ public: #endif if (edgeData(first, second)) { #ifdef QT_DEBUG - qWarning(qPrintable(QString::fromAscii("%1-%2 already has an edge") - .arg(first->toString()).arg(second->toString()))); + qWarning("%s-%s already has an edge", qPrintable(first->toString()), qPrintable(second->toString())); #endif } createDirectedEdge(first, second, data); @@ -238,3 +292,5 @@ private: }; QT_END_NAMESPACE + +#endif diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 3c2ea37..95561b7 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -65,8 +65,9 @@ automatically added to the layout, and if items are removed, all their anchors will be automatically removed - \section1 Size Hints and Size Policies in QGraphicsLinearLayout - QGraphicsLinearLayout respects each item's size hints and size policies. However it does + \section1 Size Hints and Size Policies in QGraphicsAnchorLayout + + QGraphicsAnchorLayout respects each item's size hints and size policies. However it does not respect stretch factors currently. This might change in the future, so please refrain from using stretch factors in anchor layout to avoid any future regressions. @@ -83,6 +84,10 @@ QT_BEGIN_NAMESPACE +/*! + Constructs a QGraphicsAnchorLayout instance. \a parent is passed to + QGraphicsLayout's constructor. + */ QGraphicsAnchorLayout::QGraphicsAnchorLayout(QGraphicsLayoutItem *parent) : QGraphicsLayout(*new QGraphicsAnchorLayoutPrivate(), parent) { @@ -90,6 +95,9 @@ QGraphicsAnchorLayout::QGraphicsAnchorLayout(QGraphicsLayoutItem *parent) d->createLayoutEdges(); } +/*! + Destroys the QGraphicsAnchorLayout object. +*/ QGraphicsAnchorLayout::~QGraphicsAnchorLayout() { Q_D(QGraphicsAnchorLayout); @@ -187,32 +195,41 @@ void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem, } /*! - \fn QGraphicsAnchorLayout::addLeftAndRightAnchors(QGraphicsLayoutItem *firstEdge, QGraphicsLayoutItem *secondEdge) + \fn QGraphicsAnchorLayout::addLeftAndRightAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem) + + Anchors the left and right edges of \a firstItem to the same edges of + \a secondItem. This convenience function is equivalent to calling \code - l->addAnchor(firstEdge, Qt::AnchorLeft, secondEdge, Qt::AnchorLeft); - l->addAnchor(firstEdge, Qt::AnchorRight, secondEdge, Qt::AnchorRight); + l->addAnchor(firstItem, Qt::AnchorLeft, secondItem, Qt::AnchorLeft); + l->addAnchor(firstItem, Qt::AnchorRight, secondItem, Qt::AnchorRight); \endcode */ /*! - \fn QGraphicsAnchorLayout::addTopAndBottomAnchors(QGraphicsLayoutItem *firstEdge, QGraphicsLayoutItem *secondEdge) + \fn QGraphicsAnchorLayout::addTopAndBottomAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem) + + Anchors the top and bottom edges of \a firstItem to the same edges of + \a secondItem. This convenience function is equivalent to calling \code - l->addAnchor(firstEdge, Qt::AnchorTop, secondEdge, Qt::AnchorTop); - l->addAnchor(firstEdge, Qt::AnchorBottom, secondEdge, Qt::AnchorBottom); + l->addAnchor(firstItem, Qt::AnchorTop, secondItem, Qt::AnchorTop); + l->addAnchor(firstItem, Qt::AnchorBottom, secondItem, Qt::AnchorBottom); \endcode */ /*! - \fn QGraphicsAnchorLayout::addAllAnchors(QGraphicsLayoutItem *firstEdge, QGraphicsLayoutItem *secondEdge) + \fn QGraphicsAnchorLayout::addAllAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem) + + Anchors all edges (left, right, top and bottom) of \a firstItem to the same edges of + \a secondItem. This convenience function is equivalent to calling \code - l->addLeftAndRightAnchors(firstEdge, secondEdge); - l->addTopAndBottomAnchors(firstEdge, secondEdge); + l->addLeftAndRightAnchors(firstItem, secondItem); + l->addTopAndBottomAnchors(firstItem, secondItem); \endcode */ @@ -228,6 +245,7 @@ void QGraphicsAnchorLayout::setAnchorSpacing(const QGraphicsLayoutItem *firstIte if (!d->setAnchorSize(firstItem, firstEdge, secondItem, secondEdge, &spacing)) { qWarning("setAnchorSpacing: The anchor does not exist."); + return; } invalidate(); } @@ -369,7 +387,12 @@ void QGraphicsAnchorLayout::setGeometry(const QRectF &geom) } /*! + Removes the layout item at \a index without destroying it. Ownership of + the item is transferred to the caller. + Removing an item will also remove any of the anchors associated with it. + + \sa itemAt(), count() */ void QGraphicsAnchorLayout::removeAt(int index) { diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.h b/src/gui/graphicsview/qgraphicsanchorlayout.h index 3de9ae5..4b3dbc6 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 9a34ad5..d4afa5b 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -554,7 +554,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP qDebug("candidate list for sequential simplification:\n[%s]", qPrintable(strPath)); #endif - bool forward; + bool forward = true; AnchorVertex *prev = beforeSequence; int intervalFrom = 0; diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 15a1b44..1ce6ef5 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,11 +34,25 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ +#ifndef QGRAPHICSANCHORLAYOUT_P_H +#define QGRAPHICSANCHORLAYOUT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QGraphicsWidget> #include "qgraphicslayout_p.h" @@ -475,3 +489,5 @@ public: }; QT_END_NAMESPACE + +#endif diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 620f6f4..8860677 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -335,6 +335,13 @@ \value ItemAutoDetectsFocusProxy The item will assign any child that gains input focus as its focus proxy. See also focusProxy(). This flag was introduced in Qt 4.6. + + \value ItemIsPanel. The item is a panel. A panel provides activation and + contained focus handling. Only one panel can be active at a time (see + QGraphicsItem::isActive()). When no panel is active, QGraphicsScene + activates all non-panel items. Window items (i.e., + QGraphicsItem::isWindow() returns true) are panels. This flag was + introduced in Qt 4.6. */ /*! @@ -1363,14 +1370,29 @@ QGraphicsWidget *QGraphicsItem::topLevelWidget() const */ QGraphicsWidget *QGraphicsItem::window() const { - if (isWidget() && static_cast<const QGraphicsWidget *>(this)->isWindow()) - return static_cast<QGraphicsWidget *>(const_cast<QGraphicsItem *>(this)); - if (QGraphicsWidget *parent = parentWidget()) - return parent->window(); + QGraphicsItem *p = panel(); + if (p && p->isWindow()) + return static_cast<QGraphicsWidget *>(p); return 0; } /*! + \since 4.6 + + Returns the item's panel, or 0 if this item does not have a panel. If the + item is a panel, it will return itself. Otherwise it will return the + closest ancestor that is a panel. + + \sa isPanel(), ItemIsPanel +*/ +QGraphicsItem *QGraphicsItem::panel() const +{ + if (d_ptr->flags & ItemIsPanel) + return const_cast<QGraphicsItem *>(this); + return d_ptr->parent ? d_ptr->parent->panel() : 0; +} + +/*! \since 4.6 Return the graphics item cast to a QGraphicsObject, if the class is actually a @@ -1456,6 +1478,17 @@ bool QGraphicsItem::isWindow() const } /*! + \since 4.6 + Returns true if the item is a panel; otherwise returns false. + + \sa QGraphicsItem::panel(), ItemIsPanel +*/ +bool QGraphicsItem::isPanel() const +{ + return d_ptr->flags & ItemIsPanel; +} + +/*! Returns this item's flags. The flags describe what configurable features of the item are enabled and not. For example, if the flags include ItemIsFocusable, the item can accept input focus. @@ -1518,6 +1551,9 @@ static void _q_qgraphicsItemSetFlag(QGraphicsItem *item, QGraphicsItem::Graphics */ void QGraphicsItem::setFlags(GraphicsItemFlags flags) { + if (isWindow()) + flags |= ItemIsPanel; + // Notify change and check for adjustment. if (quint32(d_ptr->flags) == quint32(flags)) return; @@ -1872,16 +1908,16 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo q->ungrabKeyboard(); } if (q_ptr->hasFocus() && scene) { - // Hiding the closest non-window ancestor of the focus item + // Hiding the closest non-panel ancestor of the focus item QGraphicsItem *focusItem = scene->focusItem(); bool clear = true; - if (isWidget && !focusItem->isWindow()) { + if (isWidget && !focusItem->isPanel()) { do { if (focusItem == q_ptr) { clear = !static_cast<QGraphicsWidget *>(q_ptr)->focusNextPrevChild(true); break; } - } while ((focusItem = focusItem->parentWidget()) && !focusItem->isWindow()); + } while ((focusItem = focusItem->parentWidget()) && !focusItem->isPanel()); } if (clear) q_ptr->clearFocus(); @@ -2003,17 +2039,17 @@ void QGraphicsItemPrivate::setEnabledHelper(bool newEnabled, bool explicitly, bo if (scene && scene->mouseGrabberItem() == q_ptr) q_ptr->ungrabMouse(); if (q_ptr->hasFocus()) { - // Disabling the closest non-window ancestor of the focus item + // Disabling the closest non-panel ancestor of the focus item // causes focus to pop to the next item, otherwise it's cleared. QGraphicsItem *focusItem = scene->focusItem(); bool clear = true; - if (isWidget && !focusItem->isWindow() && q_ptr->isAncestorOf(focusItem)) { + if (isWidget && !focusItem->isPanel() && q_ptr->isAncestorOf(focusItem)) { do { if (focusItem == q_ptr) { clear = !static_cast<QGraphicsWidget *>(q_ptr)->focusNextPrevChild(true); break; } - } while ((focusItem = focusItem->parentWidget()) && !focusItem->isWindow()); + } while ((focusItem = focusItem->parentWidget()) && !focusItem->isPanel()); } if (clear) q_ptr->clearFocus(); @@ -2610,12 +2646,33 @@ void QGraphicsItem::setHandlesChildEvents(bool enabled) d_ptr->handlesChildEvents = enabled; d_ptr->updateAncestorFlag(QGraphicsItem::GraphicsItemFlag(-1)); } +/*! + \since 4.6 + Returns true if this item is active; otherwise returns false. + + An item can only be active if the scene is active. An item is active + if it is, or is a descendent of, an active panel. Items in non-active + panels are not active. + + Items that are not part of a panel follow scene activation when the + scene has no active panel. + + Only active items can gain input focus. + + \sa QGraphicsScene::isActive(), QGraphicsScene::activePanel(), panel(), isPanel() +*/ +bool QGraphicsItem::isActive() const +{ + if (!d_ptr->scene || !d_ptr->scene->isActive()) + return false; + return panel() == d_ptr->scene->activePanel(); +} /*! - Returns true if this item or its \l{focusProxy()}{focus proxy} has keyboard - input focus; otherwise, returns false. + Returns true if this item is active, and it or its \l{focusProxy()}{focus + proxy} has keyboard input focus; otherwise, returns false. - \sa focusItem(), setFocus(), QGraphicsScene::setFocusItem() + \sa focusItem(), setFocus(), QGraphicsScene::setFocusItem(), isActive() */ bool QGraphicsItem::hasFocus() const { @@ -2632,9 +2689,10 @@ bool QGraphicsItem::hasFocus() const Only enabled items that set the ItemIsFocusable flag can accept keyboard focus. - If this item is not visible, or not associated with a scene, it will not - gain immediate input focus. However, it will be registered as the preferred - focus item for its subtree of items, should it later become visible. + If this item is not visible, not active, or not associated with a scene, + it will not gain immediate input focus. However, it will be registered as + the preferred focus item for its subtree of items, should it later become + visible. As a result of calling this function, this item will receive a \l{focusInEvent()}{focus in event} with \a focusReason. If another item @@ -2663,8 +2721,8 @@ void QGraphicsItem::setFocus(Qt::FocusReason focusReason) // Update the scene's focus item. if (d_ptr->scene) { - QGraphicsWidget *w = window(); - if (!w || w->isActiveWindow()) { + QGraphicsItem *p = panel(); + if (!p || p->isActive()) { // Visible items immediately gain focus from scene. d_ptr->scene->d_func()->setFocusItemHelper(f, focusReason); } @@ -2674,8 +2732,8 @@ void QGraphicsItem::setFocus(Qt::FocusReason focusReason) /*! Takes keyboard input focus from the item. - If it has focus, a \l{focusOutEvent()}{focus out event} is sent to this item - to tell it that it is about to lose the focus. + If it has focus, a \l{focusOutEvent()}{focus out event} is sent to this + item to tell it that it is about to lose the focus. Only items that set the ItemIsFocusable flag, or widgets that set an appropriate focus policy, can accept keyboard focus. @@ -4770,7 +4828,7 @@ void QGraphicsItemPrivate::setSubFocus() bool hidden = !visible; do { parent->d_func()->subFocusItem = item; - } while (!parent->isWindow() && (parent = parent->d_ptr->parent) && (!hidden || !parent->d_func()->visible)); + } while (!parent->isPanel() && (parent = parent->d_ptr->parent) && (!hidden || !parent->d_func()->visible)); } /*! @@ -4784,7 +4842,7 @@ void QGraphicsItemPrivate::clearSubFocus() if (parent->d_ptr->subFocusItem != q_ptr) break; parent->d_ptr->subFocusItem = 0; - } while (!parent->isWindow() && (parent = parent->d_ptr->parent)); + } while (!parent->isPanel() && (parent = parent->d_ptr->parent)); } /*! @@ -6035,6 +6093,17 @@ bool QGraphicsItem::sceneEvent(QEvent *event) case QEvent::InputMethod: inputMethodEvent(static_cast<QInputMethodEvent *>(event)); break; + case QEvent::WindowActivate: + case QEvent::WindowDeactivate: + // Propagate panel activation. + if (d_ptr->scene) { + for (int i = 0; i < d_ptr->children.size(); ++i) { + QGraphicsItem *child = d_ptr->children.at(i); + if (!(child->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorHandlesChildEvents)) + d_ptr->scene->sendEvent(child, event); + } + } + break; default: return false; } @@ -10440,6 +10509,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag) case QGraphicsItem::ItemAutoDetectsFocusProxy: str = "ItemAutoDetectsFocusProxy"; break; + case QGraphicsItem::ItemIsPanel: + str = "ItemIsPanel"; + break; } debug << str; return debug; @@ -10449,7 +10521,7 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlags flags) { debug << '('; bool f = false; - for (int i = 0; i < 9; ++i) { + for (int i = 0; i < 16; ++i) { if (flags & (1 << i)) { if (f) debug << '|'; diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index 7af7c2f..b23941d 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -104,7 +104,8 @@ public: ItemSendsGeometryChanges = 0x800, ItemAcceptsInputMethod = 0x1000, ItemAutoDetectsFocusProxy = 0x2000, - ItemNegativeZStacksBehindParent = 0x4000 + ItemNegativeZStacksBehindParent = 0x4000, + ItemIsPanel = 0x8000 // NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag. }; Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag) @@ -161,11 +162,13 @@ public: QGraphicsWidget *parentWidget() const; QGraphicsWidget *topLevelWidget() const; QGraphicsWidget *window() const; + QGraphicsItem *panel() const; void setParentItem(QGraphicsItem *parent); QList<QGraphicsItem *> children() const; // ### obsolete QList<QGraphicsItem *> childItems() const; bool isWidget() const; bool isWindow() const; + bool isPanel() const; QGraphicsObject *toGraphicsObject(); const QGraphicsObject *toGraphicsObject() const; @@ -231,6 +234,7 @@ public: bool handlesChildEvents() const; void setHandlesChildEvents(bool enabled); + bool isActive() const; bool hasFocus() const; void setFocus(Qt::FocusReason focusReason = Qt::OtherFocusReason); void clearFocus(); diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 11f6f53..2b897d1 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // @@ -463,7 +463,7 @@ public: // New 32 bits quint32 fullUpdatePending : 1; - quint32 flags : 15; + quint32 flags : 16; quint32 dirtyChildrenBoundingRect : 1; quint32 paintedViewBoundingRectsNeedRepaint : 1; quint32 dirtySceneTransform : 1; @@ -479,7 +479,6 @@ public: quint32 notifyBoundingRectChanged : 1; quint32 notifyInvalidated : 1; quint32 mouseSetsFocus : 1; - quint32 unused : 1; // feel free to use // Optional stacking order int globalStackingOrder; diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp index 58c174c..df6be90 100644 --- a/src/gui/graphicsview/qgraphicslayout.cpp +++ b/src/gui/graphicsview/qgraphicslayout.cpp @@ -390,8 +390,10 @@ void QGraphicsLayout::widgetEvent(QEvent *e) QGraphicsLayout to return a pointer to the item at index \a i. The reimplementation can assume that \a i is valid (i.e., it respects the value of count()). + Together with count(), it is provided as a means of iterating over all items in a layout. - The subclass is free to decide how to store the items. + The subclass is free to decide how to store the items, and the visual arrangement + does not have to be reflected through this function. \sa count(), removeAt() */ diff --git a/src/gui/graphicsview/qgraphicslayout_p.h b/src/gui/graphicsview/qgraphicslayout_p.h index 2ad853b..0e43b55 100644 --- a/src/gui/graphicsview/qgraphicslayout_p.h +++ b/src/gui/graphicsview/qgraphicslayout_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicslayoutitem_p.h b/src/gui/graphicsview/qgraphicslayoutitem_p.h index 5bda3ca..4d9a8c9 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem_p.h +++ b/src/gui/graphicsview/qgraphicslayoutitem_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp index 185780a..1b271e5 100644 --- a/src/gui/graphicsview/qgraphicslinearlayout.cpp +++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp @@ -277,7 +277,7 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item) Q_ASSERT(item); d->fixIndex(&index); d->engine.insertRow(index, d->orientation); - new QGridLayoutItem(&d->engine, item, d->gridRow(index), d->gridColumn(index)); + new QGridLayoutItem(&d->engine, item, d->gridRow(index), d->gridColumn(index), 1, 1, 0, index); invalidate(); } @@ -471,6 +471,7 @@ int QGraphicsLinearLayout::count() const /*! \reimp + When iterating from 0 and up, it will return the items in the visual arranged order. */ QGraphicsLayoutItem *QGraphicsLinearLayout::itemAt(int index) const { diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h index e2be89c..04fe40a 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget_p.h +++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index a819822..7dbc996 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -288,7 +288,8 @@ QGraphicsScenePrivate::QGraphicsScenePrivate() focusItem(0), lastFocusItem(0), tabFocusFirst(0), - activeWindow(0), + activePanel(0), + lastActivePanel(0), activationRefCount(0), lastMouseGrabberItem(0), lastMouseGrabberItemHasImplicitMouseGrab(false), @@ -516,10 +517,12 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) focusItem = 0; if (item == lastFocusItem) lastFocusItem = 0; - if (item == activeWindow) { + if (item == activePanel) { // ### deactivate... - activeWindow = 0; + activePanel = 0; } + if (item == lastActivePanel) + lastActivePanel = 0; // Disable selectionChanged() for individual items ++selectionChanging; @@ -1076,8 +1079,9 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou } // Update window activation. - QGraphicsWidget *newActiveWindow = windowForItem(cachedItemsUnderMouse.value(0)); - if (newActiveWindow != activeWindow) + QGraphicsItem *topItem = cachedItemsUnderMouse.value(0); + QGraphicsWidget *newActiveWindow = topItem ? topItem->window() : 0; + if (newActiveWindow != q->activeWindow()) q->setActiveWindow(newActiveWindow); // Set focus on the topmost enabled item that can take focus. @@ -1112,7 +1116,7 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou // check if the item we are sending to are disabled (before we send the event) bool disabled = !item->isEnabled(); - bool isWindow = item->isWindow(); + bool isPanel = item->isPanel(); if (mouseEvent->type() == QEvent::GraphicsSceneMouseDoubleClick && item != lastMouseGrabberItem && lastMouseGrabberItem) { // If this item is different from the item that received the last @@ -1153,8 +1157,8 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou } ungrabMouse(item, /* itemIsDying = */ dontSendUngrabEvents); - // Don't propagate through windows. - if (isWindow) + // Don't propagate through panels. + if (isPanel) break; } @@ -1176,18 +1180,6 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou } } -QGraphicsWidget *QGraphicsScenePrivate::windowForItem(const QGraphicsItem *item) const -{ - if (!item) - return 0; - do { - if (item->isWidget()) - return static_cast<const QGraphicsWidget *>(item)->window(); - item = item->parentItem(); - } while (item); - return 0; -} - /*! \internal @@ -2234,6 +2226,9 @@ void QGraphicsScene::destroyItemGroup(QGraphicsItemGroup *group) moved to this scene), QGraphicsScene will send an addition notification as the item is removed from its previous scene. + If the item is a panel, the scene is active, and there is no active panel + in the scene, then the item will be activated. + \sa removeItem(), addEllipse(), addLine(), addPath(), addPixmap(), addRect(), addText(), addWidget() */ @@ -2356,9 +2351,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item) // Deliver post-change notification item->itemChange(QGraphicsItem::ItemSceneHasChanged, newSceneVariant); - // Auto-activate the first inactive window if the scene is active. - if (d->activationRefCount > 0 && !d->activeWindow && item->isWindow()) - setActiveWindow(static_cast<QGraphicsWidget *>(item)); + // Auto-activate the first inactive panel if the scene is active. + if (isActive() && !d->activePanel && item->isPanel()) + setActivePanel(item); // Ensure that newly added items that have subfocus set, gain // focus automatically if there isn't a focus item already. @@ -3130,40 +3125,43 @@ bool QGraphicsScene::event(QEvent *event) case QEvent::InputMethod: inputMethodEvent(static_cast<QInputMethodEvent *>(event)); break; - case QEvent::WindowActivate: { + case QEvent::WindowActivate: if (!d->activationRefCount++) { - // Notify all non-window widgets. - foreach (QGraphicsItem *item, items()) { - if (item->isWidget() && item->isVisible() && !item->isWindow() && !item->parentWidget()) { - QEvent event(QEvent::WindowActivate); - QApplication::sendEvent(static_cast<QGraphicsWidget *>(item), &event); + if (d->lastActivePanel) { + // Activate the last panel. + setActivePanel(d->lastActivePanel); + } else if (d->tabFocusFirst && d->tabFocusFirst->isPanel()) { + // Activate the panel of the first item in the tab focus + // chain. + setActivePanel(d->tabFocusFirst); + } else { + // Activate all toplevel items. + QEvent event(QEvent::WindowActivate); + foreach (QGraphicsItem *item, items()) { + if (item->isVisible() && !item->isPanel() && !item->parentItem()) + sendEvent(item, &event); } } - - // Restore window activation. - QGraphicsItem *nextFocusItem = d->focusItem ? d->focusItem : d->lastFocusItem; - if (nextFocusItem && nextFocusItem->window()) - setActiveWindow(static_cast<QGraphicsWidget *>(nextFocusItem)); - else if (d->tabFocusFirst && d->tabFocusFirst->isWindow()) - setActiveWindow(d->tabFocusFirst); } break; - } - case QEvent::WindowDeactivate: { + case QEvent::WindowDeactivate: if (!--d->activationRefCount) { - // Remove window activation. - setActiveWindow(0); - - // Notify all non-window widgets. - foreach (QGraphicsItem *item, items()) { - if (item->isWidget() && item->isVisible() && !item->isWindow() && !item->parentWidget()) { - QEvent event(QEvent::WindowDeactivate); - QApplication::sendEvent(static_cast<QGraphicsWidget *>(item), &event); + if (d->activePanel) { + // Deactivate the active panel (but keep it so we can + // reactivate it later). + QGraphicsItem *lastActivePanel = d->activePanel; + setActivePanel(0); + d->lastActivePanel = lastActivePanel; + } else { + // Activate all toplevel items. + QEvent event(QEvent::WindowDeactivate); + foreach (QGraphicsItem *item, items()) { + if (item->isVisible() && !item->isPanel() && !item->parentItem()) + sendEvent(item, &event); } } } break; - } case QEvent::ApplicationFontChange: { // Resolve the existing scene font. d->resolveFont(); @@ -3526,8 +3524,8 @@ bool QGraphicsScenePrivate::dispatchHoverEvent(QGraphicsSceneHoverEvent *hoverEv QGraphicsItem *commonAncestorItem = (item && !hoverItems.isEmpty()) ? item->commonAncestorItem(hoverItems.last()) : 0; while (commonAncestorItem && !itemAcceptsHoverEvents_helper(commonAncestorItem)) commonAncestorItem = commonAncestorItem->parentItem(); - if (commonAncestorItem && commonAncestorItem->window() != item->window()) { - // The common ancestor isn't in the same window as the two hovered + if (commonAncestorItem && commonAncestorItem->panel() != item->panel()) { + // The common ancestor isn't in the same panel as the two hovered // items. commonAncestorItem = 0; } @@ -3548,8 +3546,8 @@ bool QGraphicsScenePrivate::dispatchHoverEvent(QGraphicsSceneHoverEvent *hoverEv QGraphicsItem *parent = item; while (parent && parent != commonAncestorItem) { parents.prepend(parent); - if (parent->isWindow()) { - // Stop at the window - we don't deliver beyond this point. + if (parent->isPanel()) { + // Stop at the panel - we don't deliver beyond this point. break; } parent = parent->parentItem(); @@ -3626,7 +3624,7 @@ void QGraphicsScene::keyPressEvent(QKeyEvent *keyEvent) // is filtered out, stop propagating it. if (!d->sendEvent(p, keyEvent)) break; - } while (!keyEvent->isAccepted() && !p->isWindow() && (p = p->parentItem())); + } while (!keyEvent->isAccepted() && !p->isPanel() && (p = p->parentItem())); } else { keyEvent->ignore(); } @@ -3656,7 +3654,7 @@ void QGraphicsScene::keyReleaseEvent(QKeyEvent *keyEvent) // is filtered out, stop propagating it. if (!d->sendEvent(p, keyEvent)) break; - } while (!keyEvent->isAccepted() && !p->isWindow() && (p = p->parentItem())); + } while (!keyEvent->isAccepted() && !p->isPanel() && (p = p->parentItem())); } else { keyEvent->ignore(); } @@ -3818,9 +3816,9 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent) wheelEvent->setPos(item->d_ptr->genericMapFromScene(wheelEvent->scenePos(), wheelEvent->widget())); wheelEvent->accept(); - bool isWindow = item->isWindow(); + bool isPanel = item->isPanel(); d->sendEvent(item, wheelEvent); - if (isWindow || wheelEvent->isAccepted()) + if (isPanel || wheelEvent->isAccepted()) break; } } @@ -4879,7 +4877,7 @@ bool QGraphicsScene::focusNextPrevChild(bool next) if (widget->flags() & QGraphicsItem::ItemIsFocusable && widget->isEnabled() && widget->isVisibleTo(0) && (widget->focusPolicy() & Qt::TabFocus) - && (!item || !item->isWindow() || item->isAncestorOf(widget)) + && (!item || !item->isPanel() || item->isAncestorOf(widget)) ) { setFocusItem(widget, next ? Qt::TabFocusReason : Qt::BacktabFocusReason); return true; @@ -5066,84 +5064,150 @@ void QGraphicsScene::setPalette(const QPalette &palette) } /*! - \since 4.4 + \since 4.6 - Returns the current active window, or 0 if there is no window is currently - active. + Returns true if the scene is active (e.g., it's viewed by + at least one QGraphicsView that is active); otherwise returns false. - \sa QGraphicsScene::setActiveWindow() + \sa QGraphicsItem::isActive(), QWidget::isActiveWindow() */ -QGraphicsWidget *QGraphicsScene::activeWindow() const +bool QGraphicsScene::isActive() const { Q_D(const QGraphicsScene); - return d->activeWindow; + return d->activationRefCount > 0; } /*! - \since 4.4 - Activates \a widget, which must be a widget in this scene. You can also - pass 0 for \a widget, in which case QGraphicsScene will deactivate any - currently active window. + \since 4.6 + Returns the current active panel, or 0 if no panel is currently active. - \sa activeWindow(), QGraphicsWidget::isActiveWindow() + \sa QGraphicsScene::setActivePanel() */ -void QGraphicsScene::setActiveWindow(QGraphicsWidget *widget) +QGraphicsItem *QGraphicsScene::activePanel() const +{ + Q_D(const QGraphicsScene); + return d->activePanel; +} + +/*! + \since 4.6 + Activates \a item, which must be an item in this scene. You + can also pass 0 for \a item, in which case QGraphicsScene will + deactivate any currently active panel. + + \sa activePanel(), isActive(), QGraphicsItem::isActive() +*/ +void QGraphicsScene::setActivePanel(QGraphicsItem *item) { Q_D(QGraphicsScene); - if (widget && widget->scene() != this) { - qWarning("QGraphicsScene::setActiveWindow: widget %p must be part of this scene", - widget); + if (item && item->scene() != this) { + qWarning("QGraphicsScene::setActivePanel: item %p must be part of this scene", + item); return; } - // Activate the widget's window. - QGraphicsWidget *window = widget ? widget->window() : 0; - if (window == d->activeWindow) + // Find the item's panel. + QGraphicsItem *panel = item ? item->panel() : 0; + d->lastActivePanel = panel ? d->activePanel : 0; + if (panel == d->activePanel) return; - // Deactivate the last active window. - if (d->activeWindow) { - if (QGraphicsWidget *fw = d->activeWindow->focusWidget()) { + // Deactivate the last active panel. + if (d->activePanel) { + if (QGraphicsItem *fi = d->activePanel->focusItem()) { // Remove focus from the current focus item. - if (fw == focusItem()) + if (fi == focusItem()) setFocusItem(0, Qt::ActiveWindowFocusReason); } QEvent event(QEvent::WindowDeactivate); - QApplication::sendEvent(d->activeWindow, &event); + sendEvent(d->activePanel, &event); + } else if (panel) { + // Deactivate the scene if changing activation to a panel. + QEvent event(QEvent::WindowDeactivate); + foreach (QGraphicsItem *item, items()) { + if (item->isVisible() && !item->isPanel() && !item->parentItem()) + sendEvent(item, &event); + } } // Update activate state. - d->activeWindow = window; + d->activePanel = panel; QEvent event(QEvent::ActivationChange); QApplication::sendEvent(this, &event); // Activate - if (window) { + if (panel) { QEvent event(QEvent::WindowActivate); - QApplication::sendEvent(window, &event); + sendEvent(panel, &event); + // Set focus on the panel's focus item. + if (QGraphicsItem *focusItem = panel->focusItem()) + focusItem->setFocus(Qt::ActiveWindowFocusReason); + } else if (isActive()) { + // Activate the scene + QEvent event(QEvent::WindowActivate); + foreach (QGraphicsItem *item, items()) { + if (item->isVisible() && !item->isPanel() && !item->parentItem()) + sendEvent(item, &event); + } + } +} + +/*! + \since 4.4 + + Returns the current active window, or 0 if there is no window is currently + active. + + \sa QGraphicsScene::setActiveWindow() +*/ +QGraphicsWidget *QGraphicsScene::activeWindow() const +{ + Q_D(const QGraphicsScene); + if (d->activePanel && d->activePanel->isWindow()) + return static_cast<QGraphicsWidget *>(d->activePanel); + return 0; +} + +/*! + \since 4.4 + Activates \a widget, which must be a widget in this scene. You can also + pass 0 for \a widget, in which case QGraphicsScene will deactivate any + currently active window. + + \sa activeWindow(), QGraphicsWidget::isActiveWindow() +*/ +void QGraphicsScene::setActiveWindow(QGraphicsWidget *widget) +{ + if (widget && widget->scene() != this) { + qWarning("QGraphicsScene::setActiveWindow: widget %p must be part of this scene", + widget); + return; + } + + // Activate the widget's panel (all windows are panels). + QGraphicsItem *panel = widget ? widget->panel() : 0; + setActivePanel(panel); + + // Raise + if (panel) { QList<QGraphicsItem *> siblingWindows; - QGraphicsItem *parent = window->parentItem(); + QGraphicsItem *parent = panel->parentItem(); // Raise ### inefficient for toplevels foreach (QGraphicsItem *sibling, parent ? parent->children() : items()) { - if (sibling != window && sibling->isWidget() - && static_cast<QGraphicsWidget *>(sibling)->isWindow()) { + if (sibling != panel && sibling->isWindow()) siblingWindows << sibling; - } } // Find the highest z value. - qreal z = window->zValue(); + qreal z = panel->zValue(); for (int i = 0; i < siblingWindows.size(); ++i) z = qMax(z, siblingWindows.at(i)->zValue()); // This will probably never overflow. const qreal litt = qreal(0.001); - window->setZValue(z + litt); - - if (QGraphicsWidget *focusChild = window->focusWidget()) - focusChild->setFocus(Qt::ActiveWindowFocusReason); + panel->setZValue(z + litt); } } diff --git a/src/gui/graphicsview/qgraphicsscene.h b/src/gui/graphicsview/qgraphicsscene.h index 26cb1c2..9478879 100644 --- a/src/gui/graphicsview/qgraphicsscene.h +++ b/src/gui/graphicsview/qgraphicsscene.h @@ -243,6 +243,9 @@ public: QPalette palette() const; void setPalette(const QPalette &palette); + bool isActive() const; + QGraphicsItem *activePanel() const; + void setActivePanel(QGraphicsItem *item); QGraphicsWidget *activeWindow() const; void setActiveWindow(QGraphicsWidget *widget); diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index 4b8791e..c46c906 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // @@ -129,7 +129,8 @@ public: QGraphicsItem *focusItem; QGraphicsItem *lastFocusItem; QGraphicsWidget *tabFocusFirst; - QGraphicsWidget *activeWindow; + QGraphicsItem *activePanel; + QGraphicsItem *lastActivePanel; int activationRefCount; void setFocusItemHelper(QGraphicsItem *item, Qt::FocusReason focusReason); diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h index 27c499d..5cc8449 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex_p.h @@ -44,8 +44,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp index 3ec14c3..afcc4e1 100644 --- a/src/gui/graphicsview/qgraphicssceneevent.cpp +++ b/src/gui/graphicsview/qgraphicssceneevent.cpp @@ -87,9 +87,11 @@ \since 4.2 \ingroup graphicsview-api - When a QGraphicsView receives a QMouseEvent, it translates it to - a QGraphicsSceneMouseEvent. The event is then forwarded to the - QGraphicsScene associated with the view. + When a QGraphicsView receives a QMouseEvent, it translates it to a + QGraphicsSceneMouseEvent. The event is then forwarded to the + QGraphicsScene associated with the view. If the event is not + handled by the scene, the view may use it, e.g., for the + \l{QGraphicsView::}{DragMode}. In addition to containing the item, scene, and screen coordinates of the event (as pos(), scenePos(), and screenPos()), mouse diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h index d922036..00e5f89 100644 --- a/src/gui/graphicsview/qgraphicssceneindex_p.h +++ b/src/gui/graphicsview/qgraphicssceneindex_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicstransform_p.h b/src/gui/graphicsview/qgraphicstransform_p.h index 2c563e4..c9b95fd 100644 --- a/src/gui/graphicsview/qgraphicstransform_p.h +++ b/src/gui/graphicsview/qgraphicstransform_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index bdf5ddd..a40dfdc 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 157fbe5..40addf6 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -168,6 +168,8 @@ QT_BEGIN_NAMESPACE \sa QGraphicsProxyWidget, QGraphicsItem, {Widgets and Layouts} */ +bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); + /*! Constructs a QGraphicsWidget instance. The optional \a parent argument is passed to QGraphicsItem's constructor. The optional \a wFlags argument @@ -379,6 +381,8 @@ void QGraphicsWidget::setGeometry(const QRectF &rect) QSizeF oldSize = size(); QGraphicsLayoutItem::setGeometry(newGeom); + wd->invalidateCachedClipPathRecursively(); + // Send resize event bool resized = newGeom.size() != oldSize; if (resized) { @@ -1097,7 +1101,11 @@ QVariant QGraphicsWidget::propertyChange(const QString &propertyName, const QVar */ bool QGraphicsWidget::sceneEvent(QEvent *event) { - return QCoreApplication::sendEvent(this, event) || QGraphicsItem::sceneEvent(event); + bool spont = event->spontaneous(); + if (spont ? qt_sendSpontaneousEvent(this, event) : QApplication::sendEvent(this, event)) + return true; + event->spont = spont; + return QGraphicsItem::sceneEvent(event); } /*! @@ -1277,10 +1285,6 @@ bool QGraphicsWidget::event(QEvent *event) case QEvent::WindowActivate: case QEvent::WindowDeactivate: update(); - foreach (QGraphicsItem *child, childItems()) { - if (child->isWidget()) - QApplication::sendEvent(static_cast<QGraphicsWidget *>(child), event); - } break; // Taken from QWidget::event case QEvent::ActivationChange: @@ -1590,6 +1594,8 @@ void QGraphicsWidget::ungrabKeyboardEvent(QEvent *event) /*! Returns the widgets window type. + + \sa windowFlags(), isWindow(), isPanel() */ Qt::WindowType QGraphicsWidget::windowType() const { @@ -1605,6 +1611,13 @@ Qt::WindowType QGraphicsWidget::windowType() const is platform-dependent. By default, this property contains no window flags. + + Windows are panels. If you set the Qt::Window flag, the ItemIsPanel flag + will be set automatically. If you clear the Qt::Window flag, the + ItemIsPanel flag is also cleared. Note that the ItemIsPanel flag can be + set independently of Qt::Window. + + \sa isWindow(), isPanel() */ Qt::WindowFlags QGraphicsWidget::windowFlags() const { @@ -1623,6 +1636,8 @@ void QGraphicsWidget::setWindowFlags(Qt::WindowFlags wFlags) if (!d->setWindowFrameMargins) unsetWindowFrameMargins(); + setFlag(ItemIsPanel, d->windowFlags & Qt::Window); + bool isPopup = (d->windowFlags & Qt::WindowType_Mask) == Qt::Popup; if (d->scene && isVisible() && wasPopup != isPopup) { // Popup state changed; update implicit mouse grab. @@ -1646,7 +1661,7 @@ void QGraphicsWidget::setWindowFlags(Qt::WindowFlags wFlags) The active window is the window that either contains a child widget that currently has input focus, or that itself has input focus. - \sa QGraphicsScene::activeWindow(), QGraphicsScene::setActiveWindow() + \sa QGraphicsScene::activeWindow(), QGraphicsScene::setActiveWindow(), isActive() */ bool QGraphicsWidget::isActiveWindow() const { @@ -1654,7 +1669,7 @@ bool QGraphicsWidget::isActiveWindow() const if (!d->scene) return false; const QGraphicsWidget *w = window(); - return (!w && d->scene->d_func()->activationRefCount) || (w && d->scene->activeWindow() == w); + return (!w && d->scene->isActive()) || (w && d->scene->activeWindow() == w); } /*! diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h index 0e1fe46..1ee79e1 100644 --- a/src/gui/graphicsview/qgraphicswidget_p.h +++ b/src/gui/graphicsview/qgraphicswidget_p.h @@ -47,8 +47,8 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. // // We mean it. // diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index 5ad6ac9..beb9cb0 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -461,7 +461,7 @@ void QGridLayoutRowData::dump(int indent) const QGridLayoutItem::QGridLayoutItem(QGridLayoutEngine *engine, QGraphicsLayoutItem *layoutItem, int row, int column, int rowSpan, int columnSpan, - Qt::Alignment alignment) + Qt::Alignment alignment, int itemAtIndex) : q_engine(engine), q_layoutItem(layoutItem), q_alignment(alignment) { q_firstRows[Hor] = column; @@ -471,7 +471,7 @@ QGridLayoutItem::QGridLayoutItem(QGridLayoutEngine *engine, QGraphicsLayoutItem q_stretches[Hor] = -1; q_stretches[Ver] = -1; - q_engine->addItem(this); + q_engine->insertItem(this, itemAtIndex); } int QGridLayoutItem::firstRow(Qt::Orientation orientation) const @@ -937,11 +937,20 @@ Qt::Alignment QGridLayoutEngine::effectiveAlignment(const QGridLayoutItem *layou return align; } -void QGridLayoutEngine::addItem(QGridLayoutItem *item) +/*! + \internal + The \a index is only used by QGraphicsLinearLayout to ensure that itemAt() reflects the order + of visual arrangement. Strictly speaking it does not have to, but most people expect it to. + (And if it didn't we would have to add itemArrangedAt(int index) or something..) + */ +void QGridLayoutEngine::insertItem(QGridLayoutItem *item, int index) { maybeExpandGrid(item->lastRow(), item->lastColumn()); - q_items.append(item); + if (index == -1) + q_items.append(item); + else + q_items.insert(index, item); for (int i = item->firstRow(); i <= item->lastRow(); ++i) { for (int j = item->firstColumn(); j <= item->lastColumn(); ++j) { @@ -952,6 +961,11 @@ void QGridLayoutEngine::addItem(QGridLayoutItem *item) } } +void QGridLayoutEngine::addItem(QGridLayoutItem *item) +{ + insertItem(item, -1); +} + void QGridLayoutEngine::removeItem(QGridLayoutItem *item) { Q_ASSERT(q_items.contains(item)); diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h index 8f3eb13..aab695a 100644 --- a/src/gui/graphicsview/qgridlayoutengine_p.h +++ b/src/gui/graphicsview/qgridlayoutengine_p.h @@ -267,7 +267,8 @@ class QGridLayoutItem { public: QGridLayoutItem(QGridLayoutEngine *engine, QGraphicsLayoutItem *layoutItem, int row, int column, - int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = 0); + int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = 0, + int itemAtIndex = -1); inline int firstRow() const { return q_firstRows[Ver]; } inline int firstColumn() const { return q_firstRows[Hor]; } @@ -378,6 +379,7 @@ public: Qt::Alignment effectiveAlignment(const QGridLayoutItem *layoutItem) const; + void insertItem(QGridLayoutItem *item, int index); void addItem(QGridLayoutItem *item); void removeItem(QGridLayoutItem *item); QGridLayoutItem *findLayoutItem(QGraphicsLayoutItem *layoutItem) const; diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp index 7fa5ab0..30a7d5d 100644 --- a/src/gui/graphicsview/qsimplex_p.cpp +++ b/src/gui/graphicsview/qsimplex_p.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "qsimplex_p.h" #include <QtCore/qset.h> @@ -252,7 +293,7 @@ int QSimplex::findPivotColumn() int QSimplex::pivotRowForColumn(int column) { - qreal min = 999999999999.0; // ### + qreal min = qreal(999999999999.0); // ### int minIndex = -1; for (int i = 1; i < rows; ++i) { diff --git a/src/gui/graphicsview/qsimplex_p.h b/src/gui/graphicsview/qsimplex_p.h index e3629df..5d32dd3 100644 --- a/src/gui/graphicsview/qsimplex_p.h +++ b/src/gui/graphicsview/qsimplex_p.h @@ -1,19 +1,58 @@ /**************************************************************************** ** -** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the $MODULE$ of the Qt Toolkit. +** This file is part of the QtGui module of the Qt Toolkit. ** -** $TROLLTECH_DUAL_LICENSE$ +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. ** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QSIMPLEX_P_H #define QSIMPLEX_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/qhash.h> #include <QtCore/qpair.h> diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index 1e1c7fd..f273c3c 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -148,11 +148,15 @@ QImage::Format QNativeImage::systemFormat() #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget) + : xshmimg(0), xshmpm(0) { if (!X11->use_mitshm) { - xshmimg = 0; - xshmpm = 0; image = QImage(width, height, format); + // follow good coding practice and set xshminfo attributes, though values not used in this case + xshminfo.readOnly = true; + xshminfo.shmaddr = 0; + xshminfo.shmid = 0; + xshminfo.shmseg = 0; return; } diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 00e78ad..658b8e0 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -832,20 +832,11 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers if (QPixmapCache::find(key, *this)) return true; - QImage image = QImageReader(fileName, format).read(); - if (image.isNull()) - return false; - - QPixmap pm; - if (data->pixelType() == QPixmapData::BitmapType) - pm = QBitmap::fromImage(image, flags); - else - pm = fromImage(image, flags); - if (!pm.isNull()) { - *this = pm; + if (data->fromFile(fileName, format, flags)) { QPixmapCache::insert(key, *this); return true; } + return false; } @@ -870,21 +861,7 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::ImageConversionFlags flags) { - QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buf), len); - QBuffer b(&a); - b.open(QIODevice::ReadOnly); - - QImage image = QImageReader(&b, format).read(); - QPixmap pm; - if (data->pixelType() == QPixmapData::BitmapType) - pm = QBitmap::fromImage(image, flags); - else - pm = fromImage(image, flags); - if (!pm.isNull()) { - *this = pm; - return true; - } - return false; + return data->fromData(buf, len, format, flags); } /*! diff --git a/src/gui/image/qpixmap_qws.cpp b/src/gui/image/qpixmap_qws.cpp index e549900..a6c70a7 100644 --- a/src/gui/image/qpixmap_qws.cpp +++ b/src/gui/image/qpixmap_qws.cpp @@ -48,6 +48,9 @@ #include <private/qdrawhelper_p.h> #include <private/qpixmap_raster_p.h> + +QT_BEGIN_NAMESPACE + QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) { QWidget *widget = QWidget::find(window); @@ -148,3 +151,5 @@ int QPixmap::qwsBytesPerLine() const return 0; } + +QT_END_NAMESPACE diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index b8d6ac1..81071ee 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -82,6 +82,11 @@ QT_BEGIN_NAMESPACE A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of memory. + The \e{Qt Quarterly} article + \l{http://qt.nokia.com/doc/qq/qq12-qpixmapcache.html}{Optimizing + with QPixmapCache} explains how to use QPixmapCache to speed up + applications by caching the results of painting. + \sa QCache, QPixmap */ diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp index 001a930..c8b91db 100644 --- a/src/gui/image/qpixmapdata.cpp +++ b/src/gui/image/qpixmapdata.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qpixmapdata_p.h" +#include <QtCore/qbuffer.h> #include <QtGui/qbitmap.h> #include <QtGui/qimagereader.h> @@ -66,14 +67,44 @@ QPixmapData::~QPixmapData() { } -void QPixmapData::fromFile(const QString &fileName, const char *format, +static QImage makeBitmapCompliantIfNeeded(QPixmapData *d, const QImage &image, Qt::ImageConversionFlags flags) +{ + if (d->pixelType() == QPixmapData::BitmapType) { + QImage img = image.convertToFormat(QImage::Format_MonoLSB, flags); + + // make sure image.color(0) == Qt::color0 (white) + // and image.color(1) == Qt::color1 (black) + const QRgb c0 = QColor(Qt::black).rgb(); + const QRgb c1 = QColor(Qt::white).rgb(); + if (img.color(0) == c0 && img.color(1) == c1) { + img.invertPixels(); + img.setColor(0, c1); + img.setColor(1, c0); + } + return img; + } + + return image; +} + +bool QPixmapData::fromFile(const QString &fileName, const char *format, Qt::ImageConversionFlags flags) { - const QImage image = QImageReader(fileName, format).read(); + QImage image = QImageReader(fileName, format).read(); if (image.isNull()) - return; + return false; + fromImage(makeBitmapCompliantIfNeeded(this, image, flags), flags); + return !isNull(); +} - fromImage(image, flags); +bool QPixmapData::fromData(const uchar *buf, uint len, const char *format, Qt::ImageConversionFlags flags) +{ + QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buf), len); + QBuffer b(&a); + b.open(QIODevice::ReadOnly); + QImage image = QImageReader(&b, format).read(); + fromImage(makeBitmapCompliantIfNeeded(this, image, flags), flags); + return !isNull(); } void QPixmapData::copy(const QPixmapData *data, const QRect &rect) diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h index 70890c0..9040641 100644 --- a/src/gui/image/qpixmapdata_p.h +++ b/src/gui/image/qpixmapdata_p.h @@ -75,8 +75,12 @@ public: virtual void resize(int width, int height) = 0; virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags) = 0; - virtual void fromFile(const QString &filename, const char *format, + + virtual bool fromFile(const QString &filename, const char *format, + Qt::ImageConversionFlags flags); + virtual bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags); + virtual void copy(const QPixmapData *data, const QRect &rect); virtual bool scroll(int dx, int dy, const QRect &rect); diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index bc14b5e..4b2f365 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -580,8 +580,6 @@ Qt::TransformationMode QPixmapBlurFilter::quality() const } /*! - \reimp - \internal */ QRectF QPixmapBlurFilter::boundingRectFor(const QRectF &rect) const @@ -657,8 +655,6 @@ static QImage blurred(const QImage& image, const QRect& rect, int radius) } /*! - \reimp - \internal */ void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap &src, const QRectF &srcRect) const diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 7c7bce3..09eda67 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -44,6 +44,7 @@ #include "qcoefepinputcontext_p.h" #include <qapplication.h> #include <qtextformat.h> +#include <private/qcore_symbian_p.h> #include <fepitfr.h> @@ -139,100 +140,14 @@ void QCoeFepInputContext::widgetDestroyed(QWidget *w) } } -/*! - Definition of struct for mapping Symbian to ISO locale - ### REMOVE - See below. -*/ -struct symbianToISO { - int symbian_language; - char iso_name[8]; -}; - -/*! - Mapping from Symbian to ISO locale - ### REMOVE - This was taken from the preliminary QLocale port to S60, and should be - removed once that is finished. -*/ -static const symbianToISO symbian_to_iso_list[] = { - { ELangEnglish, "en_GB" }, - { ELangFrench, "fr_FR" }, - { ELangGerman, "de_DE" }, - { ELangSpanish, "es_ES" }, - { ELangItalian, "it_IT" }, - { ELangSwedish, "sv_SE" }, - { ELangDanish, "da_DK" }, - { ELangNorwegian, "no_NO" }, - { ELangFinnish, "fi_FI" }, - { ELangAmerican, "en_US" }, - { ELangPortuguese, "pt_PT" }, - { ELangTurkish, "tr_TR" }, - { ELangIcelandic, "is_IS" }, - { ELangRussian, "ru_RU" }, - { ELangHungarian, "hu_HU" }, - { ELangDutch, "nl_NL" }, - { ELangBelgianFlemish, "nl_BE" }, - { ELangCzech, "cs_CZ" }, - { ELangSlovak, "sk_SK" }, - { ELangPolish, "pl_PL" }, - { ELangSlovenian, "sl_SI" }, - { ELangTaiwanChinese, "zh_TW" }, - { ELangHongKongChinese, "zh_HK" }, - { ELangPrcChinese, "zh_CN" }, - { ELangJapanese, "ja_JP" }, - { ELangThai, "th_TH" }, - { ELangArabic, "ar_AE" }, - { ELangTagalog, "tl_PH" }, - { ELangBulgarian, "bg_BG" }, - { ELangCatalan, "ca_ES" }, - { ELangCroatian, "hr_HR" }, - { ELangEstonian, "et_EE" }, - { ELangFarsi, "fa_IR" }, - { ELangCanadianFrench, "fr_CA" }, - { ELangGreek, "el_GR" }, - { ELangHebrew, "he_IL" }, - { ELangHindi, "hi_IN" }, - { ELangIndonesian, "id_ID" }, - { ELangLatvian, "lv_LV" }, - { ELangLithuanian, "lt_LT" }, - { ELangMalay, "ms_MY" }, - { ELangBrazilianPortuguese, "pt_BR" }, - { ELangRomanian, "ro_RO" }, - { ELangSerbian, "sr_YU" }, - { ELangLatinAmericanSpanish, "es" }, - { ELangUkrainian, "uk_UA" }, - { ELangUrdu, "ur_PK" }, // India/Pakistan - { ELangVietnamese, "vi_VN" }, -#ifdef __E32LANG_H__ -// 5.0 - { ELangBasque, "eu_ES" }, - { ELangGalician, "gl_ES" }, -#endif - //{ ELangEnglish_Apac, "en" }, - //{ ELangEnglish_Taiwan, "en_TW" }, - //{ ELangEnglish_HongKong, "en_HK" }, - //{ ELangEnglish_Prc, "en_CN" }, - //{ ELangEnglish_Japan, "en_JP"}, - //{ ELangEnglish_Thailand, "en_TH" }, - //{ ELangMalay_Apac, "ms" } -}; - -/*! - Number of Symbian to ISO locale mappings - ### Remove. - See comment for array above. -*/ -static const int symbian_to_iso_count - = sizeof(symbian_to_iso_list)/sizeof(symbianToISO); - QString QCoeFepInputContext::language() { TLanguage lang = m_fepState->LocalLanguage(); - if (lang < symbian_to_iso_count) { - return QLatin1String(symbian_to_iso_list[lang].iso_name); + const QByteArray localeName = qt_symbianLocaleName(lang); + if (!localeName.isEmpty()) { + return QString::fromLatin1(localeName); } else { - return QLatin1String("C"); + return QString::fromLatin1("C"); } } diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp index 35f1b65..992bc78 100644 --- a/src/gui/inputmethod/qinputcontext.cpp +++ b/src/gui/inputmethod/qinputcontext.cpp @@ -105,25 +105,27 @@ QT_BEGIN_NAMESPACE \header \o Context \o Functions \row \o Receiving information \o - x11FilterEvent(), - filterEvent(), - mouseHandler() + x11FilterEvent(), + filterEvent(), + mouseHandler() \row \o Sending back composed text \o - sendEvent() + sendEvent() \row \o State change notification \o - setFocusWidget(), - reset() + setFocusWidget(), + reset() \row \o Context information \o - identifierName(), - language(), - font(), - isComposing() + identifierName(), + language(), + font(), + isComposing() \endtable + \section1 Licensing Information + \legalese Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved. @@ -154,16 +156,17 @@ QInputContext::~QInputContext() } /*! - \internal Returns the widget that has an input focus for this input - context. Ordinary input methods should not call this function - directly to keep platform independence and flexible configuration - possibility. + context. The return value may differ from holderWidget() if the input context is shared between several text widgets. - \sa setFocusWidget(), holderWidget() + \warning To ensure platform independence and support flexible + configuration of widgets, ordinary input methods should not call + this function directly. + + \sa setFocusWidget() */ QWidget *QInputContext::focusWidget() const { @@ -173,9 +176,9 @@ QWidget *QInputContext::focusWidget() const /*! - \internal - Sets the widget that has an input focus for this input - context. Ordinary input methods must not call this function + Sets the widget that has an input focus for this input context. + + \warning Ordinary input methods must not call this function directly. \sa focusWidget() diff --git a/src/gui/inputmethod/qwininputcontext_p.h b/src/gui/inputmethod/qwininputcontext_p.h index eff223b..767fc33 100644 --- a/src/gui/inputmethod/qwininputcontext_p.h +++ b/src/gui/inputmethod/qwininputcontext_p.h @@ -79,6 +79,7 @@ public: bool startComposition(); bool endComposition(); bool composition(LPARAM lparam); + int reconvertString(RECONVERTSTRING *reconv); static void TranslateMessage(const MSG *msg); static LRESULT DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp index 684f325..d917cb3 100644 --- a/src/gui/inputmethod/qwininputcontext_win.cpp +++ b/src/gui/inputmethod/qwininputcontext_win.cpp @@ -47,6 +47,7 @@ #include "qapplication.h" #include "qevent.h" #include "qtextformat.h" +#include "qtextboundaryfinder.h" //#define Q_IME_DEBUG @@ -810,4 +811,52 @@ QString QWinInputContext::language() return QString(); } +int QWinInputContext::reconvertString(RECONVERTSTRING *reconv) +{ + QWidget *w = focusWidget(); + if(!w) + return -1; + + Q_ASSERT(w->testAttribute(Qt::WA_WState_Created)); + QString surroundingText = qvariant_cast<QString>(w->inputMethodQuery(Qt::ImSurroundingText)); + int memSize = sizeof(RECONVERTSTRING)+(surroundingText.length()+1)*sizeof(ushort); + // If memory is not allocated, return the required size. + if (!reconv) { + if (surroundingText.isEmpty()) + return -1; + else + return memSize; + } + int pos = qvariant_cast<int>(w->inputMethodQuery(Qt::ImCursorPosition)); + // find the word in the surrounding text. + QTextBoundaryFinder bounds(QTextBoundaryFinder::Word, surroundingText); + bounds.setPosition(pos); + if (bounds.isAtBoundary()) { + if (QTextBoundaryFinder::EndWord == bounds.boundaryReasons()) + bounds.toPreviousBoundary(); + } else { + bounds.toPreviousBoundary(); + } + int startPos = bounds.position(); + bounds.toNextBoundary(); + int endPos = bounds.position(); + // select the text, this will be overwritten by following ime events. + QList<QInputMethodEvent::Attribute> attrs; + attrs << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, startPos, endPos-startPos, QVariant()); + QInputMethodEvent e(QString(), attrs); + qt_sendSpontaneousEvent(w, &e); + + reconv->dwSize = memSize; + reconv->dwVersion = 0; + + reconv->dwStrLen = surroundingText.length(); + reconv->dwStrOffset = sizeof(RECONVERTSTRING); + reconv->dwCompStrLen = endPos-startPos; + reconv->dwCompStrOffset = startPos*sizeof(ushort); + reconv->dwTargetStrLen = reconv->dwCompStrLen; + reconv->dwTargetStrOffset = reconv->dwCompStrOffset; + memcpy((char*)(reconv+1), surroundingText.utf16(), surroundingText.length()*sizeof(ushort)); + return memSize; +} + QT_END_NAMESPACE diff --git a/src/gui/inputmethod/qwsinputcontext_qws.cpp b/src/gui/inputmethod/qwsinputcontext_qws.cpp index 5d92e1c..371ff1d 100644 --- a/src/gui/inputmethod/qwsinputcontext_qws.cpp +++ b/src/gui/inputmethod/qwsinputcontext_qws.cpp @@ -111,8 +111,8 @@ void QWSInputContext::setFocusWidget( QWidget *w ) void QWSInputContext::widgetDestroyed(QWidget *w) { - if (w == ::activeWidget) - ::activeWidget = 0; + if (w == QT_PREPEND_NAMESPACE(activeWidget)) + QT_PREPEND_NAMESPACE(activeWidget) = 0; QInputContext::widgetDestroyed(w); } @@ -138,13 +138,13 @@ void QWSInputContext::mouseHandler( int x, QMouseEvent *event) QWidget *QWSInputContext::activeWidget() { - return ::activeWidget; + return QT_PREPEND_NAMESPACE(activeWidget); } bool QWSInputContext::isComposing() const { - return ::activeWidget != 0; + return QT_PREPEND_NAMESPACE(activeWidget) != 0; } bool QWSInputContext::translateIMQueryEvent(QWidget *w, const QWSIMQueryEvent *e) @@ -182,8 +182,8 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e) stream >> preedit; stream >> commit; - if (preedit.isEmpty() && ::activeWidget) - w = ::activeWidget; + if (preedit.isEmpty() && QT_PREPEND_NAMESPACE(activeWidget)) + w = QT_PREPEND_NAMESPACE(activeWidget); QInputContext *qic = w->inputContext(); if (!qic) @@ -213,9 +213,9 @@ bool QWSInputContext::translateIMEvent(QWidget *w, const QWSIMEvent *e) #endif if (preedit.isEmpty()) - ::activeWidget = 0; + QT_PREPEND_NAMESPACE(activeWidget) = 0; else - ::activeWidget = w; + QT_PREPEND_NAMESPACE(activeWidget) = w; QInputMethodEvent ime(preedit, attrs); diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 0671304..ccc57d7 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -908,7 +908,9 @@ QAbstractItemView::SelectionBehavior QAbstractItemView::selectionBehavior() cons /*! Sets the current item to be the item at \a index. - Depending on the current selection mode, the item may also be selected. + + Unless the current selection mode is + \l{QAbstractItemView::}{NoSelection}, the item is also be selected. Note that this function also updates the starting position for any new selections the user performs. @@ -1659,9 +1661,6 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event) EditTrigger trigger = (selectedClicked ? SelectedClicked : NoEditTriggers); bool edited = edit(index, trigger, event); - if (d->selectionModel) - d->selectionModel->select(index, selectionCommand(index, event)); - setState(NoState); if (click) { diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp index 8414460..8eb9e21 100644 --- a/src/gui/itemviews/qitemselectionmodel.cpp +++ b/src/gui/itemviews/qitemselectionmodel.cpp @@ -734,14 +734,15 @@ void QItemSelectionModelPrivate::_q_layoutAboutToBeChanged() if (ranges.isEmpty() && currentSelection.count() == 1) { QItemSelectionRange range = currentSelection.first(); QModelIndex parent = range.parent(); - if (range.top() == 0 + tableRowCount = model->rowCount(parent); + tableColCount = model->columnCount(parent); + if (tableRowCount * tableColCount > 100 + && range.top() == 0 && range.left() == 0 - && range.bottom() == model->rowCount(parent) - 1 - && range.right() == model->columnCount(parent) - 1) { + && range.bottom() == tableRowCount - 1 + && range.right() == tableColCount - 1) { tableSelected = true; tableParent = parent; - tableColCount = model->columnCount(parent); - tableRowCount = model->rowCount(parent); return; } } diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 3e9db3b..de2f493 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -1715,8 +1715,7 @@ QRect QListViewPrivate::mapToViewport(const QRect &rect, bool extend) const QRect result = extend ? commonListView->mapToViewport(rect) : rect; int dx = -q->horizontalOffset(); int dy = -q->verticalOffset(); - result.adjust(dx, dy, dx, dy); - return result; + return result.adjusted(dx, dy, dx, dy); } QModelIndex QListViewPrivate::closestIndex(const QRect &target, @@ -2287,15 +2286,14 @@ QRect QListModeViewBase::mapToViewport(const QRect &rect) const if (isWrapping()) return rect; // If the listview is in "listbox-mode", the items are as wide as the view. + // But we don't shrink the items. QRect result = rect; - QSize vsize = viewport()->size(); - QSize csize = contentsSize; if (flow() == QListView::TopToBottom) { result.setLeft(spacing()); - result.setWidth(qMax(csize.width(), vsize.width()) - 2 * spacing()); + result.setWidth(qMax(rect.width(), qMax(contentsSize.width(), viewport()->width()) - 2 * spacing())); } else { // LeftToRight result.setTop(spacing()); - result.setHeight(qMax(csize.height(), vsize.height()) - 2 * spacing()); + result.setHeight(qMax(rect.height(), qMax(contentsSize.height(), viewport()->height()) - 2 * spacing())); } return result; } diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp index 232b4d2..64f2883 100644 --- a/src/gui/itemviews/qlistwidget.cpp +++ b/src/gui/itemviews/qlistwidget.cpp @@ -1432,7 +1432,8 @@ QListWidgetItem *QListWidget::currentItem() const /*! Sets the current item to \a item. - Depending on the current selection mode, the item may also be selected. + Unless the selection mode is \l{QAbstractItemView::}{NoSelection}, + the item is also be selected. */ void QListWidget::setCurrentItem(QListWidgetItem *item) { diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index d173efe..18fbf7b 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -174,6 +174,7 @@ public: const QModelIndex &source_bottom_right); void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int start, int end); + void _q_sourceAboutToBeReset(); void _q_sourceReset(); void _q_sourceLayoutAboutToBeChanged(); @@ -1148,11 +1149,17 @@ void QSortFilterProxyModelPrivate::_q_sourceHeaderDataChanged(Qt::Orientation or emit q->headerDataChanged(orientation, proxy_start, proxy_end); } +void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset() +{ + Q_Q(QSortFilterProxyModel); + q->beginResetModel(); +} + void QSortFilterProxyModelPrivate::_q_sourceReset() { Q_Q(QSortFilterProxyModel); // All internal structures are deleted in clear() - q->reset(); + q->endResetModel(); update_source_sort_column(); if (dynamic_sortfilter) sort(); @@ -1499,6 +1506,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel) disconnect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_sourceLayoutChanged())); + disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset())); disconnect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset())); QAbstractProxyModel::setSourceModel(sourceModel); @@ -1539,6 +1547,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel) connect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_sourceLayoutChanged())); + connect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset())); connect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset())); d->clear_mapping(); diff --git a/src/gui/itemviews/qsortfilterproxymodel.h b/src/gui/itemviews/qsortfilterproxymodel.h index 12baa19..0314aec 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.h +++ b/src/gui/itemviews/qsortfilterproxymodel.h @@ -177,6 +177,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(const QModelIndex &source_top_left, const QModelIndex &source_bottom_right)) Q_PRIVATE_SLOT(d_func(), void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int start, int end)) + Q_PRIVATE_SLOT(d_func(), void _q_sourceAboutToBeReset()) Q_PRIVATE_SLOT(d_func(), void _q_sourceReset()) Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutAboutToBeChanged()) Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutChanged()) diff --git a/src/gui/itemviews/qtablewidget.cpp b/src/gui/itemviews/qtablewidget.cpp index b04aea2..b7c9703 100644 --- a/src/gui/itemviews/qtablewidget.cpp +++ b/src/gui/itemviews/qtablewidget.cpp @@ -226,6 +226,8 @@ QTableWidgetItem *QTableModel::takeItem(int row, int column) itm->view = 0; itm->d->id = -1; tableItems[i] = 0; + QModelIndex ind = index(itm); + emit dataChanged(ind, ind); } return itm; } @@ -2115,8 +2117,8 @@ QTableWidgetItem *QTableWidget::currentItem() const /*! Sets the current item to \a item. - Depending on the current \l{QAbstractItemView::SelectionMode}{selection mode}, - the item may also be selected. + Unless the selection mode is \l{QAbstractItemView::}{NoSelection}, + the item is also be selected. \sa currentItem(), setCurrentCell() */ diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index b636284..8cc8d6c 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -2784,7 +2784,8 @@ int QTreeWidget::currentColumn() const /*! Sets the current \a item in the tree widget. - Depending on the current selection mode, the item may also be selected. + Unless the selection mode is \l{QAbstractItemView::}{NoSelection}, + the item is also be selected. \sa currentItem(), currentItemChanged() */ diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index c7d06f7..8489817 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -7,6 +7,7 @@ PRECOMPILED_HEADER = kernel/qt_gui_pch.h KERNEL_P= kernel HEADERS += \ kernel/qaction.h \ + kernel/qaction_p.h \ kernel/qactiongroup.h \ kernel/qapplication.h \ kernel/qapplication_p.h \ diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index 00cba04..f5e1f29 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -262,6 +262,11 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map) \c{Info.plist} file in the application's bundle (See \l{Deploying an Application on Mac OS X}). \value PreferencesRole This action should be placed where the "Preferences..." menu item is in the application menu. \value QuitRole This action should be placed where the Quit menu item is in the application menu. + + Setting this value only has effect on items that are in the immediate menus + of the menubar, not the submenus of those menus. For example, if you have + File menu in your menubar and the File menu has a submenu, setting the + MenuRole for the actions in that submenu have no effect. They will never be moved. */ /*! diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index e839617..f7f8ce9 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -264,12 +264,15 @@ typedef struct tagGESTURECONFIG class QPanGesture; class QPinchGesture; +class QSwipeGesture; + struct QStandardGestures { QPanGesture *pan; QPinchGesture *pinch; + QSwipeGesture *swipe; - QStandardGestures() : pan(0), pinch(0) { } + QStandardGestures() : pan(0), pinch(0), swipe(0) { } }; diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index f7a7ab0..5340ae9 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -72,6 +72,7 @@ //#include "qwsregionmanager_qws.h" #include "qwindowsystem_qws.h" #include "private/qwindowsystem_p.h" +#include "qdecorationfactory_qws.h" #include "qwsdisplay_qws.h" #include "private/qwsdisplay_qws_p.h" @@ -122,6 +123,8 @@ #endif #endif +QT_BEGIN_NAMESPACE + #ifndef QT_NO_DIRECTPAINTER class QDirectPainter; extern void qt_directpainter_region(QDirectPainter *dp, const QRegion &alloc, int type); @@ -161,13 +164,9 @@ int qt_servershmid = -1; bool qws_overrideCursor = false; #ifndef QT_NO_QWS_MANAGER -#include "qdecorationfactory_qws.h" extern Q_GUI_EXPORT QWSServer *qwsServer; -QT_BEGIN_NAMESPACE - -QT_USE_NAMESPACE static QDecoration *qws_decoration = 0; #endif @@ -2371,7 +2370,7 @@ void qt_cleanup() QString QApplicationPrivate::appName() const // get application name { - return ::appName; + return QT_PREPEND_NAMESPACE(appName); } /***************************************************************************** diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 12cd879..b92bf03 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -171,6 +171,10 @@ typedef struct tagTOUCHINPUT #include <mywinsock.h> #endif +#ifndef IMR_CONFIRMRECONVERTSTRING +#define IMR_CONFIRMRECONVERTSTRING 0x0005 +#endif + QT_BEGIN_NAMESPACE #ifdef Q_WS_WINCE @@ -323,6 +327,7 @@ extern HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int #define APPCOMMAND_BASS_UP 21 #define APPCOMMAND_TREBLE_DOWN 22 #define APPCOMMAND_TREBLE_UP 23 +#endif // FAPPCOMMAND_MOUSE // New commands from Windows XP (some even Sp1) #ifndef APPCOMMAND_MICROPHONE_VOLUME_MUTE @@ -357,8 +362,6 @@ extern HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int #define APPCOMMAND_MEDIA_CHANNEL_DOWN 52 #endif // APPCOMMAND_MICROPHONE_VOLUME_MUTE -#endif // FAPPCOMMAND_MOUSE - #if (_WIN32_WINNT < 0x0400) // This struct is defined in winuser.h if the _WIN32_WINNT >= 0x0400 -- in the // other cases we have to define it on our own. @@ -2264,7 +2267,26 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam } break; } - + case WM_IME_REQUEST: { + QWidget *fw = QApplication::focusWidget(); + QWinInputContext *im = fw ? qobject_cast<QWinInputContext *>(fw->inputContext()) : 0; + if (fw && im) { + if(wParam == IMR_RECONVERTSTRING) { + int ret = im->reconvertString((RECONVERTSTRING *)lParam); + if (ret == -1) { + result = false; + } else { + return ret; + } + } else if (wParam == IMR_CONFIRMRECONVERTSTRING) { + RETURN(TRUE); + } else { + // in all other cases, call DefWindowProc() + result = false; + } + } + break; + } #ifndef Q_WS_WINCE case WM_CHANGECBCHAIN: case WM_DRAWCLIPBOARD: diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 0d07a02..170224d 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -1915,9 +1915,12 @@ void qt_init(QApplicationPrivate *priv, int, bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) { Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display)); - X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000 - && defaultVisual->green_mask == 0xff00 - && defaultVisual->blue_mask == 0xff); + X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000 + || defaultVisual->red_mask == 0xf800) + && (defaultVisual->green_mask == 0xff00 + || defaultVisual->green_mask == 0x7e0) + && (defaultVisual->blue_mask == 0xff + || defaultVisual->blue_mask == 0x1f)); } } #endif // QT_NO_MITSHM @@ -5401,7 +5404,8 @@ class QSessionManagerPrivate : public QObjectPrivate { public: QSessionManagerPrivate(QSessionManager* mgr, QString& id, QString& key) - : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key), eventLoop(0) {} + : QObjectPrivate(), sm(mgr), sessionId(id), sessionKey(key), + restartHint(QSessionManager::RestartIfRunning), eventLoop(0) {} QSessionManager* sm; QStringList restartCommand; QStringList discardCommand; diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 5a0209d..0a45ce9 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -892,7 +892,7 @@ extern "C" { qNGEvent.gestureType = QNativeGestureEvent::Rotate; NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]]; qNGEvent.position = flipPoint(p).toPoint(); - qNGEvent.percentage = [event rotation]; + qNGEvent.percentage = -[event rotation]; qt_sendSpontaneousEvent(qwidget, &qNGEvent); } @@ -905,7 +905,14 @@ extern "C" { qNGEvent.gestureType = QNativeGestureEvent::Swipe; NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]]; qNGEvent.position = flipPoint(p).toPoint(); - qNGEvent.direction = QSize(-[event deltaX], -[event deltaY]); + if ([event deltaX] == 1) + qNGEvent.angle = 180.0f; + else if ([event deltaX] == -1) + qNGEvent.angle = 0.0f; + else if ([event deltaY] == 1) + qNGEvent.angle = 90.0f; + else if ([event deltaY] == -1) + qNGEvent.angle = 270.0f; qt_sendSpontaneousEvent(qwidget, &qNGEvent); } @@ -976,6 +983,15 @@ extern "C" { return qwidget->focusPolicy() != Qt::NoFocus; } +- (BOOL)resignFirstResponder +{ + // Seems like the following test only triggers if this + // view is inside a QMacNativeWidget: + if (qwidget == QApplication::focusWidget()) + QApplicationPrivate::setFocusWidget(0, Qt::OtherFocusReason); + return YES; +} + - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { Q_UNUSED(isLocal); diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index d93fa2f..443a118 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -59,6 +59,7 @@ QT_FORWARD_DECLARE_CLASS(QWidgetPrivate); QT_FORWARD_DECLARE_CLASS(QWidget); QT_FORWARD_DECLARE_CLASS(QEvent); QT_FORWARD_DECLARE_CLASS(QCocoaDropData); +QT_FORWARD_DECLARE_CLASS(QString); QT_FORWARD_DECLARE_CLASS(QStringList); QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 76d52c7..9626193 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3544,7 +3544,8 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) #endif -/*! \class QTouchEvent +/*! + \class QTouchEvent \brief The QTouchEvent class contains parameters that describe a touch event. \since 4.6 \ingroup events @@ -3556,27 +3557,19 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) Qt::WA_AcceptTouchEvents attribute set and graphics items need to have the \l{QGraphicsItem::setAcceptTouchEvents()}{acceptTouchEvents} attribute set to true. - Note: when using QAbstractScrollArea based widgets, you should enabled the - Qt::WA_AcceptTouchEvents attribute on the scroll area's - \l{QAbstractScrollArea::viewport()}{viewport}. + When using QAbstractScrollArea based widgets, you should enabled the Qt::WA_AcceptTouchEvents + attribute on the scroll area's \l{QAbstractScrollArea::viewport()}{viewport}. - \section1 Event Delivery and Propagation + Similarly to QMouseEvent, Qt automatically grabs each touch point on the first press inside a + widget, and the widget will receive all updates for the touch point until it is released. + Note that it is possible for a widget to receive events for multiple touch points, and that + multiple widgets may be receiving touch events at the same time. + + \section1 Event Handling All touch events are of type QEvent::TouchBegin, QEvent::TouchUpdate, or QEvent::TouchEnd. Reimplement QWidget::event() or QAbstractScrollArea::viewportEvent() for widgets and - QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. By default, - QWidget::event() translates the first non-primary touch point in a QTouchEvent into a - QMouseEvent. This makes it possible to enable touch events on existing widgets that do not - normally handle QTouchEvent. See below for information on some special considerations needed - when doing this. - - QEvent::TouchBegin is the first touch event sent to a widget. The QEvent::TouchBegin event - contains a special accept flag that indicates whether the receiver wants the event. By default, - the event is accepted. You should call ignore() if the touch event is not handled by your - widget. The QEvent::TouchBegin event is propagated up the parent widget chain until a widget - accepts it with accept(), or an event filter consumes it. For QGraphicsItems, the - QEvent::TouchBegin event is propagated to items under the mouse (similar to mouse event - propagation for QGraphicsItems). + QGraphicsItem::sceneEvent() for items in a graphics view to receive touch events. The QEvent::TouchUpdate and QEvent::TouchEnd events are sent to the widget or item that accepted the QEvent::TouchBegin event. If the QEvent::TouchBegin event is not accepted and not @@ -3587,10 +3580,20 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) Information about each touch point can be retrieved using the QTouchEvent::TouchPoint class. The Qt::TouchPointState enum describes the different states that a touch point may have. - Similar to QMouseEvent, Qt automatically grabs each touch point on the first press inside a - widget; the widget will receive all updates for the touch point until it is released. Note that - it is possible for a widget to receive events for multiple touch points, and that multiple - widgets may be receiving touch events at the same time. + \section1 Event Delivery and Propagation + + By default, QWidget::event() translates the first non-primary touch point in a QTouchEvent into + a QMouseEvent. This makes it possible to enable touch events on existing widgets that do not + normally handle QTouchEvent. See below for information on some special considerations needed + when doing this. + + QEvent::TouchBegin is the first touch event sent to a widget. The QEvent::TouchBegin event + contains a special accept flag that indicates whether the receiver wants the event. By default, + the event is accepted. You should call ignore() if the touch event is not handled by your + widget. The QEvent::TouchBegin event is propagated up the parent widget chain until a widget + accepts it with accept(), or an event filter consumes it. For QGraphicsItems, the + QEvent::TouchBegin event is propagated to items under the mouse (similar to mouse event + propagation for QGraphicsItems). \section1 Touch Point Grouping @@ -3604,7 +3607,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \list \i When the first touch point is detected, the destination widget is determined firstly by the - location on screen first and secondly by the propagation rules. + location on screen and secondly by the propagation rules. \i When additional touch points are detected, Qt first looks to see if there are any active touch points on any ancestor or descendent of the widget under the new touch point. If there @@ -3637,17 +3640,17 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents, this gives you great flexibility in designing multi-touch user interfaces. Be aware of the implications. For example, is is possible that the user is moving a QSlider with one finger and - pressing a QPushButton with another. The signals are emitted from these widgets will be + pressing a QPushButton with another. The signals emitted by these widgets will be interleaved. - \i Recursion into the event loop using one of the exec() methods (e.g. QDialog::exec() or + \i Recursion into the event loop using one of the exec() methods (e.g., QDialog::exec() or QMenu::exec()) in a QTouchEvent event handler is not supported. Since there are multiple event recipients, unexpected recursion may cause problems, including but not limited to lost events and unexpected infinite recursion. \i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an - \l{QApplication::activePopupWidget()}{active popup widget}. The behavior of QTouchEvents is - undefined when opening a popup or grabbing the mouse while there are multiple active touch + \l{QApplication::activePopupWidget()}{active pop-up widget}. The behavior of QTouchEvents is + undefined when opening a pop-up or grabbing the mouse while there are multiple active touch points. \endlist diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h index a26f585..11d3138 100644 --- a/src/gui/kernel/qevent_p.h +++ b/src/gui/kernel/qevent_p.h @@ -143,7 +143,7 @@ public: Type gestureType; float percentage; QPoint position; - QSize direction; + float angle; #ifdef Q_WS_WIN ulong sequenceId; quint64 argument; diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp index 9e8de67..2e9514d 100644 --- a/src/gui/kernel/qmime_mac.cpp +++ b/src/gui/kernel/qmime_mac.cpp @@ -68,6 +68,12 @@ #include "qmap.h" #include <private/qt_mac_p.h> + +#ifdef Q_WS_MAC32 +#include <QuickTime/QuickTime.h> +#include <qlibrary.h> +#endif + QT_BEGIN_NAMESPACE extern CGImageRef qt_mac_createCGImageFromQImage(const QImage &img, const QImage **imagePtr = 0); // qpaintengine_mac.cpp @@ -503,9 +509,6 @@ QList<QByteArray> QMacPasteboardMimeHTMLText::convertFromMime(const QString &mim // This can be removed once 10.6 is the minimum (or we have to require 64-bit) whichever comes first. -#include <QuickTime/QuickTime.h> -#include <qlibrary.h> - typedef ComponentResult (*PtrGraphicsImportSetDataHandle)(GraphicsImportComponent, Handle); typedef ComponentResult (*PtrGraphicsImportCreateCGImage)(GraphicsImportComponent, CGImageRef*, UInt32); typedef ComponentResult (*PtrGraphicsExportSetInputCGImage)(GraphicsExportComponent, CGImageRef); @@ -636,7 +639,9 @@ QList<QByteArray> QMacPasteboardMimePict::convertFromMime(const QString &mime, Q DisposeHandle(pic); return ret; } -#endif + + +#endif //Q_WS_MAC32 class QMacPasteboardMimeTiff : public QMacPasteboardMime { public: diff --git a/src/gui/kernel/qsound_qws.cpp b/src/gui/kernel/qsound_qws.cpp index fa32dcd..83e9c5e 100644 --- a/src/gui/kernel/qsound_qws.cpp +++ b/src/gui/kernel/qsound_qws.cpp @@ -53,16 +53,16 @@ #include "qhash.h" #include "qfileinfo.h" -#ifdef MEDIA_SERVER #include "qbytearray.h" #include "quuid.h" #include "qdatastream.h" #include "qcopchannel_qws.h" #include "qbuffer.h" + QT_BEGIN_NAMESPACE -QT_USE_NAMESPACE +#ifdef MEDIA_SERVER #define SERVER_CHANNEL "QPE/MediaServer" diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index d798d32..de6e7c7 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -72,6 +72,7 @@ QWidgetPrivate *qt_widget_private(QWidget *widget); QPanGesture::QPanGesture(QWidget *gestureTarget, QObject *parent) : QGesture(*new QPanGesturePrivate, gestureTarget, parent) { + setObjectName(QLatin1String("QPanGesture")); } void QPanGesturePrivate::setupGestureTarget(QObject *newGestureTarget) @@ -80,16 +81,22 @@ void QPanGesturePrivate::setupGestureTarget(QObject *newGestureTarget) if (gestureTarget && gestureTarget->isWidgetType()) { QWidget *w = static_cast<QWidget*>(gestureTarget.data()); QApplicationPrivate::instance()->widgetGestures[w].pan = 0; -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) qt_widget_private(w)->winSetupGestures(); +#elif defined(Q_WS_MAC) + w->setAttribute(Qt::WA_AcceptTouchEvents, false); + w->setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents, false); #endif } if (newGestureTarget && newGestureTarget->isWidgetType()) { QWidget *w = static_cast<QWidget*>(newGestureTarget); QApplicationPrivate::instance()->widgetGestures[w].pan = q; -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) qt_widget_private(w)->winSetupGestures(); +#elif defined(Q_WS_MAC) + w->setAttribute(Qt::WA_AcceptTouchEvents); + w->setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); #endif } QGesturePrivate::setupGestureTarget(newGestureTarget); @@ -98,15 +105,13 @@ void QPanGesturePrivate::setupGestureTarget(QObject *newGestureTarget) /*! \internal */ bool QPanGesture::event(QEvent *event) { -#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) +#if defined(QT_MAC_USE_COCOA) Q_D(QPanGesture); if (event->type() == QEvent::Timer) { const QTimerEvent *te = static_cast<QTimerEvent *>(event); - if (te->timerId() == d->panFinishedTimer) { - killTimer(d->panFinishedTimer); - d->panFinishedTimer = 0; - d->lastOffset = QSize(0, 0); - updateState(Qt::GestureFinished); + if (te->timerId() == d->singleTouchPanTimer.timerId()) { + d->singleTouchPanTimer.stop(); + updateState(Qt::GestureStarted); } } #endif @@ -164,8 +169,10 @@ bool QPanGesture::eventFilter(QObject *receiver, QEvent *event) /*! \internal */ bool QPanGesture::filterEvent(QEvent *event) { +#if defined(Q_WS_WIN) Q_D(QPanGesture); const QTouchEvent *ev = static_cast<const QTouchEvent*>(event); + if (event->type() == QEvent::TouchBegin) { QTouchEvent::TouchPoint p = ev->touchPoints().at(0); d->lastPosition = p.pos().toPoint(); @@ -197,33 +204,55 @@ bool QPanGesture::filterEvent(QEvent *event) } } } -#ifdef Q_OS_MAC - else if (event->type() == QEvent::Wheel) { - // On Mac, there is really no native panning gesture. Instead, a two - // finger pan is delivered as mouse wheel events. Otoh, on Windows, you - // either get mouse wheel events or pan events. We have decided to make this - // the Qt behaviour as well, meaning that on Mac, wheel - // events will be masked away when listening for pan events. -#ifndef QT_MAC_USE_COCOA - // In Carbon we receive neither touch-, nor pan gesture events. - // So we create pan gestures by converting wheel events. After all, this - // is how things are supposed to work on mac in the first place. - const QWheelEvent *wev = static_cast<const QWheelEvent*>(event); - int offset = wev->delta() / -120; - d->lastOffset = wev->orientation() == Qt::Horizontal ? QSize(offset, 0) : QSize(0, offset); +#elif defined(QT_MAC_USE_COCOA) + // The following implements single touch + // panning on Mac: + Q_D(QPanGesture); + const int panBeginDelay = 300; + const int panBeginRadius = 3; + const QTouchEvent *ev = static_cast<const QTouchEvent*>(event); - if (state() == Qt::NoGesture) { - d->totalOffset = d->lastOffset; - } else { - d->totalOffset += d->lastOffset; + switch (event->type()) { + case QEvent::TouchBegin: { + if (ev->touchPoints().size() == 1) { + d->lastPosition = QCursor::pos(); + d->singleTouchPanTimer.start(panBeginDelay, this); } - - killTimer(d->panFinishedTimer); - d->panFinishedTimer = startTimer(200); - updateState(Qt::GestureUpdated); -#endif - return true; + break;} + case QEvent::TouchEnd: { + if (state() != Qt::NoGesture) + updateState(Qt::GestureFinished); + reset(); + break;} + case QEvent::TouchUpdate: { + if (ev->touchPoints().size() == 1) { + if (state() == Qt::NoGesture) { + // INVARIANT: The singleTouchTimer has still not fired. + // Lets check if the user moved his finger so much from + // the starting point that it makes sense to cancel: + const QPointF startPos = ev->touchPoints().at(0).startPos().toPoint(); + const QPointF p = ev->touchPoints().at(0).pos().toPoint(); + if ((startPos - p).manhattanLength() > panBeginRadius) + reset(); + else + d->lastPosition = QCursor::pos(); + } else { + QPointF mousePos = QCursor::pos(); + QPointF dist = mousePos - d->lastPosition; + d->lastPosition = mousePos; + d->lastOffset = QSizeF(dist.x(), dist.y()); + d->totalOffset += d->lastOffset; + updateState(Qt::GestureUpdated); + } + } else if (state() == Qt::NoGesture) { + reset(); + } + break;} + default: + return false; } +#else + Q_UNUSED(event); #endif return false; } @@ -232,14 +261,14 @@ bool QPanGesture::filterEvent(QEvent *event) void QPanGesture::reset() { Q_D(QPanGesture); - d->lastOffset = d->totalOffset = QSize(); - d->lastPosition = QPoint(); -#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) - if (d->panFinishedTimer) { - killTimer(d->panFinishedTimer); - d->panFinishedTimer = 0; - } + d->lastOffset = d->totalOffset = QSize(0, 0); + d->lastPosition = QPoint(0, 0); + +#if defined(QT_MAC_USE_COCOA) + d->singleTouchPanTimer.stop(); + d->prevMousePos = QPointF(0, 0); #endif + QGesture::reset(); } @@ -248,7 +277,7 @@ void QPanGesture::reset() Specifies a total pan offset since the start of the gesture. */ -QSize QPanGesture::totalOffset() const +QSizeF QPanGesture::totalOffset() const { Q_D(const QPanGesture); return d->totalOffset; @@ -260,12 +289,13 @@ QSize QPanGesture::totalOffset() const Specifies a pan offset since the last time the gesture was triggered. */ -QSize QPanGesture::lastOffset() const +QSizeF QPanGesture::lastOffset() const { Q_D(const QPanGesture); return d->lastOffset; } +////////////////////////////////////////////////////////////////////////////// /*! \class QPinchGesture @@ -285,6 +315,7 @@ QSize QPanGesture::lastOffset() const QPinchGesture::QPinchGesture(QWidget *gestureTarget, QObject *parent) : QGesture(*new QPinchGesturePrivate, gestureTarget, parent) { + setObjectName(QLatin1String("QPinchGesture")); } void QPinchGesturePrivate::setupGestureTarget(QObject *newGestureTarget) @@ -338,12 +369,13 @@ bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event) d->state = Qt::NoGesture; d->scaleFactor = d->lastScaleFactor = 1; d->rotationAngle = d->lastRotationAngle = 0; - d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint(); + d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPointF(); #if defined(Q_WS_WIN) d->initialDistance = 0; #endif return false; case QNativeGestureEvent::Rotate: + d->scaleFactor = 0; d->lastRotationAngle = d->rotationAngle; #if defined(Q_WS_WIN) d->rotationAngle = -1 * GID_ROTATE_ANGLE_FROM_ARGUMENT(ev->argument); @@ -354,6 +386,7 @@ bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event) event->accept(); break; case QNativeGestureEvent::Zoom: + d->rotationAngle = 0; #if defined(Q_WS_WIN) if (d->initialDistance != 0) { d->lastScaleFactor = d->scaleFactor; @@ -402,7 +435,7 @@ void QPinchGesture::reset() Q_D(QPinchGesture); d->scaleFactor = d->lastScaleFactor = 0; d->rotationAngle = d->lastRotationAngle = 0; - d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint(); + d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPointF(); QGesture::reset(); } @@ -452,7 +485,7 @@ qreal QPinchGesture::lastRotationAngle() const Specifies a center point of the gesture. The point can be used as a center point that the object is rotated around. */ -QPoint QPinchGesture::centerPoint() const +QPointF QPinchGesture::centerPoint() const { return d_func()->centerPoint; } @@ -462,7 +495,7 @@ QPoint QPinchGesture::centerPoint() const Specifies a previous center point of the gesture. */ -QPoint QPinchGesture::lastCenterPoint() const +QPointF QPinchGesture::lastCenterPoint() const { return d_func()->lastCenterPoint; } @@ -474,11 +507,117 @@ QPoint QPinchGesture::lastCenterPoint() const startCenterPoint and the centerPoint is the distance at which pinching fingers has shifted. */ -QPoint QPinchGesture::startCenterPoint() const +QPointF QPinchGesture::startCenterPoint() const { return d_func()->startCenterPoint; } +////////////////////////////////////////////////////////////////////////////// + +/*! + \class QSwipeGesture + \since 4.6 + + \brief The QSwipeGesture class represents a swipe gesture, + providing additional information related to swiping. +*/ + +/*! + Creates a new Swipe gesture handler object and marks it as a child of \a + parent. + + On some platform like Windows it's necessary to provide a non-null widget + as \a parent to get native gesture support. +*/ +QSwipeGesture::QSwipeGesture(QWidget *gestureTarget, QObject *parent) + : QGesture(*new QSwipeGesturePrivate, gestureTarget, parent) +{ + setObjectName(QLatin1String("QSwipeGesture")); +} + +void QSwipeGesturePrivate::setupGestureTarget(QObject *newGestureTarget) +{ + Q_Q(QSwipeGesture); + if (gestureTarget && gestureTarget->isWidgetType()) { + QWidget *w = static_cast<QWidget*>(gestureTarget.data()); + QApplicationPrivate::instance()->widgetGestures[w].swipe = 0; +#if defined(Q_WS_WIN) + qt_widget_private(w)->winSetupGestures(); +#endif + } + + if (newGestureTarget && newGestureTarget->isWidgetType()) { + QWidget *w = static_cast<QWidget*>(newGestureTarget); + QApplicationPrivate::instance()->widgetGestures[w].swipe = q; +#if defined(Q_WS_WIN) + qt_widget_private(w)->winSetupGestures(); +#endif + } + QGesturePrivate::setupGestureTarget(newGestureTarget); +} + +qreal QSwipeGesture::swipeAngle() const +{ + Q_D(const QSwipeGesture); + return d->swipeAngle; +} + +QSwipeGesture::SwipeDirection QSwipeGesture::horizontalDirection() const +{ + Q_D(const QSwipeGesture); + if (d->swipeAngle < 0 || d->swipeAngle == 90 || d->swipeAngle == 270) + return QSwipeGesture::NoDirection; + else if (d->swipeAngle < 90 || d->swipeAngle > 270) + return QSwipeGesture::Right; + else + return QSwipeGesture::Left; +} + +QSwipeGesture::SwipeDirection QSwipeGesture::verticalDirection() const +{ + Q_D(const QSwipeGesture); + if (d->swipeAngle <= 0 || d->swipeAngle == 180) + return QSwipeGesture::NoDirection; + else if (d->swipeAngle < 180) + return QSwipeGesture::Up; + else + return QSwipeGesture::Down; +} + +bool QSwipeGesture::eventFilter(QObject *receiver, QEvent *event) +{ + Q_D(QSwipeGesture); + if (receiver->isWidgetType() && event->type() == QEvent::NativeGesture) { + QNativeGestureEvent *ev = static_cast<QNativeGestureEvent*>(event); + switch (ev->gestureType) { + case QNativeGestureEvent::Swipe: + d->swipeAngle = ev->angle; + updateState(Qt::GestureStarted); + updateState(Qt::GestureUpdated); + updateState(Qt::GestureFinished); + break; + default: + return false; + } + return true; + } + return QGesture::eventFilter(receiver, event); +} + +/*! \internal */ +bool QSwipeGesture::filterEvent(QEvent *) +{ + return false; +} + +/*! \internal */ +void QSwipeGesture::reset() +{ + Q_D(QSwipeGesture); + d->swipeAngle = -1; + QGesture::reset(); +} + QT_END_NAMESPACE #include "moc_qstandardgestures.cpp" diff --git a/src/gui/kernel/qstandardgestures.h b/src/gui/kernel/qstandardgestures.h index 0eb9d92..029e6dc 100644 --- a/src/gui/kernel/qstandardgestures.h +++ b/src/gui/kernel/qstandardgestures.h @@ -59,16 +59,16 @@ class Q_GUI_EXPORT QPanGesture : public QGesture Q_OBJECT Q_DECLARE_PRIVATE(QPanGesture) - Q_PROPERTY(QSize totalOffset READ totalOffset) - Q_PROPERTY(QSize lastOffset READ lastOffset) + Q_PROPERTY(QSizeF totalOffset READ totalOffset) + Q_PROPERTY(QSizeF lastOffset READ lastOffset) public: QPanGesture(QWidget *gestureTarget, QObject *parent = 0); bool filterEvent(QEvent *event); - QSize totalOffset() const; - QSize lastOffset() const; + QSizeF totalOffset() const; + QSizeF lastOffset() const; protected: void reset(); @@ -92,9 +92,9 @@ class Q_GUI_EXPORT QPinchGesture : public QGesture Q_PROPERTY(qreal rotationAngle READ rotationAngle) Q_PROPERTY(qreal lastRotationAngle READ lastRotationAngle) - Q_PROPERTY(QPoint startCenterPoint READ startCenterPoint) - Q_PROPERTY(QPoint lastCenterPoint READ lastCenterPoint) - Q_PROPERTY(QPoint centerPoint READ centerPoint) + Q_PROPERTY(QPointF startCenterPoint READ startCenterPoint) + Q_PROPERTY(QPointF lastCenterPoint READ lastCenterPoint) + Q_PROPERTY(QPointF centerPoint READ centerPoint) public: QPinchGesture(QWidget *gestureTarget, QObject *parent = 0); @@ -102,9 +102,9 @@ public: bool filterEvent(QEvent *event); void reset(); - QPoint startCenterPoint() const; - QPoint lastCenterPoint() const; - QPoint centerPoint() const; + QPointF startCenterPoint() const; + QPointF lastCenterPoint() const; + QPointF centerPoint() const; qreal scaleFactor() const; qreal lastScaleFactor() const; @@ -119,6 +119,34 @@ private: friend class QWidget; }; +class QSwipeGesturePrivate; +class Q_GUI_EXPORT QSwipeGesture : public QGesture +{ + Q_OBJECT + Q_ENUMS(SwipeDirection) + + Q_PROPERTY(SwipeDirection horizontalDirection READ horizontalDirection) + Q_PROPERTY(SwipeDirection verticalDirection READ verticalDirection) + Q_PROPERTY(qreal swipeAngle READ swipeAngle) + + Q_DECLARE_PRIVATE(QSwipeGesture) + +public: + enum SwipeDirection { NoDirection, Left, Right, Up, Down }; + QSwipeGesture(QWidget *gestureTarget, QObject *parent = 0); + + bool filterEvent(QEvent *event); + void reset(); + + SwipeDirection horizontalDirection() const; + SwipeDirection verticalDirection() const; + qreal swipeAngle() const; + +private: + bool eventFilter(QObject *receiver, QEvent *event); + + friend class QWidget; +}; QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/kernel/qstandardgestures_p.h b/src/gui/kernel/qstandardgestures_p.h index 5fbcc5d..9829cf0 100644 --- a/src/gui/kernel/qstandardgestures_p.h +++ b/src/gui/kernel/qstandardgestures_p.h @@ -61,6 +61,7 @@ #include "qgesture_p.h" #include "qstandardgestures.h" +#include "qbasictimer.h" QT_BEGIN_NAMESPACE @@ -69,21 +70,15 @@ class QPanGesturePrivate : public QGesturePrivate Q_DECLARE_PUBLIC(QPanGesture) public: - QPanGesturePrivate() - { -#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) - panFinishedTimer = 0; -#endif - } - void setupGestureTarget(QObject *o); - QSize totalOffset; - QSize lastOffset; - QPoint lastPosition; + QSizeF totalOffset; + QSizeF lastOffset; + QPointF lastPosition; -#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) - int panFinishedTimer; +#if defined(QT_MAC_USE_COCOA) + QBasicTimer singleTouchPanTimer; + QPointF prevMousePos; #endif }; @@ -107,14 +102,28 @@ public: qreal lastScaleFactor; qreal rotationAngle; qreal lastRotationAngle; - QPoint startCenterPoint; - QPoint lastCenterPoint; - QPoint centerPoint; + QPointF startCenterPoint; + QPointF lastCenterPoint; + QPointF centerPoint; #ifdef Q_WS_WIN int initialDistance; #endif }; +class QSwipeGesturePrivate : public QGesturePrivate +{ + Q_DECLARE_PUBLIC(QSwipeGesture) + +public: + QSwipeGesturePrivate() + : swipeAngle(-1) + { + } + + void setupGestureTarget(QObject *o); + qreal swipeAngle; +}; + QT_END_NAMESPACE #endif // QSTANDARDGESTURES_P_H diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index bbda469..38b09ee 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -187,6 +187,9 @@ QWidgetPrivate::QWidgetPrivate(int version) , extraPaintEngine(0) , polished(0) , graphicsEffect(0) +#if !defined(QT_NO_IM) + , imHints(Qt::ImhNone) +#endif , inheritedFontResolveMask(0) , inheritedPaletteResolveMask(0) , leftmargin(0) @@ -217,7 +220,6 @@ QWidgetPrivate::QWidgetPrivate(int version) , window_event(0) , qd_hd(0) #endif - ,imHints(Qt::ImhNone) { if (!qApp) { qFatal("QWidget: Must construct a QApplication before a QPaintDevice"); @@ -971,7 +973,10 @@ struct QWidgetExceptionCleaner /* this cleans up when the constructor throws an exception */ static inline void cleanup(QWidget *that, QWidgetPrivate *d) { -#ifndef QT_NO_EXCEPTIONS +#ifdef QT_NO_EXCEPTIONS + Q_UNUSED(that); + Q_UNUSED(d); +#else QWidgetPrivate::allWidgets->remove(that); if (d->focus_next != that) { if (d->focus_next) @@ -4172,6 +4177,10 @@ QPalette::ColorRole QWidget::backgroundRole() const If \a role is QPalette::NoRole, then the widget inherits its parent's background role. + Note that styles are free to choose any color from the palette. + You can modify the palette or set a style sheet if you don't + achieve the result you want with setBackgroundRole(). + \sa backgroundRole(), foregroundRole() */ @@ -4234,6 +4243,10 @@ QPalette::ColorRole QWidget::foregroundRole() const If \a role is QPalette::NoRole, the widget uses a foreground role that contrasts with the background role. + Note that styles are free to choose any color from the palette. + You can modify the palette or set a style sheet if you don't + achieve the result you want with setForegroundRole(). + \sa foregroundRole(), backgroundRole() */ void QWidget::setForegroundRole(QPalette::ColorRole role) @@ -4965,6 +4978,13 @@ void QWidgetPrivate::setSoftKeys_sys(const QList<QAction*> &softkeys) } #endif // !defined(Q_OS_SYMBIAN) +/*! + Returns a pointer to this widget's effect if it has one; otherwise 0. + + \since 4.6 + + \sa setGraphicsEffect() +*/ QGraphicsEffect *QWidget::graphicsEffect() const { Q_D(const QWidget); @@ -4982,6 +5002,8 @@ QGraphicsEffect *QWidget::graphicsEffect() const \note This function will apply the effect on itself and all its children. \since 4.6 + + \sa graphicsEffect() */ void QWidget::setGraphicsEffect(QGraphicsEffect *effect) { @@ -5964,8 +5986,6 @@ bool QWidget::hasFocus() const void QWidget::setFocus(Qt::FocusReason reason) { - Q_D(QWidget); - if (!isEnabled()) return; @@ -6233,6 +6253,10 @@ bool QWidget::isActiveWindow() const if(qt_mac_is_macdrawer(tlw) && tlw->parentWidget() && tlw->parentWidget()->isActiveWindow()) return true; + + extern bool qt_mac_insideKeyWindow(const QWidget *); //qwidget_mac.cpp + if (QApplication::testAttribute(Qt::AA_MacPluginApplication) && qt_mac_insideKeyWindow(tlw)) + return true; #endif if(style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, this)) { if(tlw->windowType() == Qt::Tool && @@ -11822,10 +11846,9 @@ const QList<QAction*>& QWidget::softKeys() const \preliminary \since 4.6 - Sets the softkey \a softkey to this widget's list of softkeys, + Sets the softkey \a softKey to this widget's list of softkeys. Setting 0 as softkey will clear all the existing softkeys set - to the widget - A QWidget can have 0 or more softkeys + to the widget. A QWidget can have 0 or more softkeys. \sa softKeys(), setSoftKeys() */ @@ -11842,8 +11865,8 @@ void QWidget::setSoftKey(QAction *softKey) } /*! - Sets the list of softkeys \a softkeys to this widget's list of softkeys, - A QWidget can have 0 or more softkeys + Sets the list of softkeys \a softKeys to this widget's list of softkeys. + A QWidget can have 0 or more softkeys. \sa softKeys(), setSoftKey() */ diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index ea5a53e..cdf0706 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -301,6 +301,14 @@ bool qt_mac_is_macdrawer(const QWidget *w) return (w && w->parentWidget() && w->windowType() == Qt::Drawer); } +bool qt_mac_insideKeyWindow(const QWidget *w) +{ +#ifdef QT_MAC_USE_COCOA + return [[reinterpret_cast<NSView *>(w->winId()) window] isKeyWindow]; +#endif + return false; +} + bool qt_mac_set_drawer_preferred_edge(QWidget *w, Qt::DockWidgetArea where) //users of Qt for Mac OS X can use this.. { if(!qt_mac_is_macdrawer(w)) @@ -1056,7 +1064,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, break; } qNGEvent.gestureType = QNativeGestureEvent::Rotate; - qNGEvent.percentage = float(amount); + qNGEvent.percentage = float(-amount); break; } case kEventGestureSwipe: { HIPoint swipeDirection; @@ -1066,7 +1074,14 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, break; } qNGEvent.gestureType = QNativeGestureEvent::Swipe; - qNGEvent.direction = QSize(-swipeDirection.x, -swipeDirection.y); + if (swipeDirection.x == 1) + qNGEvent.angle = 180.0f; + else if (swipeDirection.x == -1) + qNGEvent.angle = 0.0f; + else if (swipeDirection.y == 1) + qNGEvent.angle = 90.0f; + else if (swipeDirection.y == -1) + qNGEvent.angle = 270.0f; break; } case kEventGestureMagnify: { CGFloat amount; diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp index bcc9cfd..fa71925 100644 --- a/src/gui/kernel/qwidget_wince.cpp +++ b/src/gui/kernel/qwidget_wince.cpp @@ -316,7 +316,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO if (desktop) { q->setAttribute(Qt::WA_WState_Visible); - } else if (topLevel) { + } else if (topLevel && !q->testAttribute(Qt::WA_DontShowOnScreen)) { RECT cr; GetClientRect(id, &cr); // one cannot trust cr.left and cr.top, use a correction POINT instead diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 36ffcbe..eb87052 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -1450,7 +1450,7 @@ static const qreal inv_dist_to_plane = 1. / 1024.; value of 1024 corresponds to the projection factor used by QTransform::rotate() for the x and y axes. - If \a distToPlane is zero, then the returned QTransform + If \a distanceToPlane is zero, then the returned QTransform is formed by simply dropping the third row and third column of the QMatrix4x4. This is suitable for implementing orthographic projections where the z co-ordinate should diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 0fffaef..4665b66 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -1544,7 +1544,8 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn) // QGLWidget does not support partial updates if: // 1) The context is double buffered // 2) The context is single buffered and auto-fill background is enabled. - const bool noPartialUpdateSupport = (engine && engine->type() == QPaintEngine::OpenGL) + const bool noPartialUpdateSupport = (engine && (engine->type() == QPaintEngine::OpenGL + || engine->type() == QPaintEngine::OpenGL2)) && (usesDoubleBufferedGLContext || q->autoFillBackground()); QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn); diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index b005842..b7179a4 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -389,20 +389,20 @@ void QBrush::init(const QColor &color, Qt::BrushStyle style) { switch(style) { case Qt::NoBrush: - d.data_ptr() = nullBrushInstance(); + d.reset(nullBrushInstance()); d->ref.ref(); if (d->color != color) setColor(color); return; case Qt::TexturePattern: - d.data_ptr() = new QTexturedBrushData; + d.reset(new QTexturedBrushData); break; case Qt::LinearGradientPattern: case Qt::RadialGradientPattern: case Qt::ConicalGradientPattern: - d.data_ptr() = new QGradientBrushData; + d.reset(new QGradientBrushData); break; default: - d.data_ptr() = new QBrushData; + d.reset(new QBrushData); break; } d->ref = 1; @@ -460,7 +460,7 @@ QBrush::QBrush(Qt::BrushStyle style) if (qbrush_check_type(style)) init(Qt::black, style); else { - d.data_ptr() = nullBrushInstance(); + d.reset(nullBrushInstance()); d->ref.ref(); } } @@ -476,7 +476,7 @@ QBrush::QBrush(const QColor &color, Qt::BrushStyle style) if (qbrush_check_type(style)) init(color, style); else { - d.data_ptr() = nullBrushInstance(); + d.reset(nullBrushInstance()); d->ref.ref(); } } @@ -493,7 +493,7 @@ QBrush::QBrush(Qt::GlobalColor color, Qt::BrushStyle style) if (qbrush_check_type(style)) init(color, style); else { - d.data_ptr() = nullBrushInstance(); + d.reset(nullBrushInstance()); d->ref.ref(); } } @@ -625,7 +625,7 @@ void QBrush::detach(Qt::BrushStyle newStyle) QBrush &QBrush::operator=(const QBrush &b) { - if (this == &b) + if (d == b.d) return *this; b.d->ref.ref(); diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index 51b108e..9f9819c 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -137,13 +137,13 @@ private: friend bool Q_GUI_EXPORT qHasPixmapTexture(const QBrush& brush); void detach(Qt::BrushStyle newStyle); void init(const QColor &color, Qt::BrushStyle bs); - QCustomScopedPointer<QBrushData, QBrushDataPointerDeleter> d; + QScopedPointer<QBrushData, QBrushDataPointerDeleter> d; void cleanUp(QBrushData *x); public: inline bool isDetached() const; - typedef QBrushData * DataPtr; - inline DataPtr &data_ptr() { return d.data_ptr(); } + typedef QScopedPointer<QBrushData, QBrushDataPointerDeleter> DataPtr; + inline DataPtr &data_ptr() { return d; } }; inline void QBrush::setColor(Qt::GlobalColor acolor) diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 4e93f04..ef884bd 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -237,6 +237,15 @@ QT_BEGIN_NAMESPACE alpha-channel to feature \l {QColor#Alpha-Blended Drawing}{alpha-blended drawing}. + \section1 The HSL Color Model + + HSL is similar to HSV. Instead of value parameter from HSV, + HSL has the lightness parameter. + The lightness parameter goes from black to color and from color to white. + If you go outside at the night its black or dark gray. At day its colorful but + if you look in a really strong light a things they are going to white and + wash out. + \section1 The CMYK Color Model While the RGB and HSV color models are used for display on @@ -437,6 +446,9 @@ QColor::QColor(Spec spec) case Cmyk: setCmyk(0, 0, 0, 0); break; + case Hsl: + setHsl(0, 0, 0, 0); + break; } } @@ -678,6 +690,113 @@ void QColor::setHsv(int h, int s, int v, int a) } /*! + Sets the contents pointed to by \a h, \a s, \a l, and \a a, to the hue, + saturation, lightness, and alpha-channel (transparency) components of the + color's HSL value. + + These components can be retrieved individually using the hueHslF(), + saturationHslF(), lightnessF() and alphaF() functions. + + \sa setHsl() +*/ +void QColor::getHslF(qreal *h, qreal *s, qreal *l, qreal *a) const +{ + if (!h || !s || !l) + return; + + if (cspec != Invalid && cspec != Hsl) { + toHsl().getHslF(h, s, l, a); + return; + } + + *h = ct.ahsl.hue == USHRT_MAX ? -1.0 : ct.ahsl.hue / 36000.0; + *s = ct.ahsl.saturation / qreal(USHRT_MAX); + *l = ct.ahsl.lightness / qreal(USHRT_MAX); + + if (a) + *a = ct.ahsl.alpha / qreal(USHRT_MAX); +} + +/*! + Sets the contents pointed to by \a h, \a s, \a l, and \a a, to the hue, + saturation, lightness, and alpha-channel (transparency) components of the + color's HSL value. + + These components can be retrieved individually using the hueHsl(), + saturationHsl(), lightness() and alpha() functions. + + \sa setHsl() +*/ +void QColor::getHsl(int *h, int *s, int *l, int *a) const +{ + if (!h || !s || !l) + return; + + if (cspec != Invalid && cspec != Hsl) { + toHsl().getHsl(h, s, l, a); + return; + } + + *h = ct.ahsl.hue == USHRT_MAX ? -1 : ct.ahsl.hue / 100; + *s = ct.ahsl.saturation >> 8; + *l = ct.ahsl.lightness >> 8; + + if (a) + *a = ct.ahsl.alpha >> 8; +} + +/*! + Sets a HSL color lightness; \a h is the hue, \a s is the saturation, \a l is + the lightness and \a a is the alpha component of the HSL color. + + All the values must be in the range 0.0-1.0. + + \sa getHslF(), setHsl() +*/ +void QColor::setHslF(qreal h, qreal s, qreal l, qreal a) +{ + if (((h < 0.0 || h > 1.0) && h != -1.0) + || (s < 0.0 || s > 1.0) + || (l < 0.0 || l > 1.0) + || (a < 0.0 || a > 1.0)) { + qWarning("QColor::setHsvF: HSV parameters out of range"); + return; + } + + cspec = Hsl; + ct.ahsl.alpha = qRound(a * USHRT_MAX); + ct.ahsl.hue = h == -1.0 ? USHRT_MAX : qRound(h * 36000); + ct.ahsl.saturation = qRound(s * USHRT_MAX); + ct.ahsl.lightness = qRound(l * USHRT_MAX); + ct.ahsl.pad = 0; +} + +/*! + Sets a HSL color value; \a h is the hue, \a s is the saturation, \a l is + the lightness and \a a is the alpha component of the HSL color. + + The saturation, value and alpha-channel values must be in the range 0-255, + and the hue value must be greater than -1. + + \sa getHsl(), setHslF() +*/ +void QColor::setHsl(int h, int s, int l, int a) +{ + if (h < -1 || (uint)s > 255 || (uint)l > 255 || (uint)a > 255) { + qWarning("QColor::setHsv: HSV parameters out of range"); + invalidate(); + return; + } + + cspec = Hsl; + ct.ahsl.alpha = a * 0x101; + ct.ahsl.hue = h == -1 ? USHRT_MAX : (h % 360) * 100; + ct.ahsl.saturation = s * 0x101; + ct.ahsl.lightness = l * 0x101; + ct.ahsl.pad = 0; +} + +/*! Sets the contents pointed to by \a r, \a g, \a b, and \a a, to the red, green, blue, and alpha-channel (transparency) components of the color's RGB value. @@ -1082,11 +1201,25 @@ void QColor::setBlueF(qreal blue) /*! Returns the hue color component of this color. - \sa hueF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color + The color is implicitly converted to HSV. + + \sa hsvHue(), hueF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color Model} */ + int QColor::hue() const { + return hsvHue(); +} + +/*! + Returns the hue color component of this color. + + \sa hueF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color + Model} +*/ +int QColor::hsvHue() const +{ if (cspec != Invalid && cspec != Hsv) return toHsv().hue(); return ct.ahsv.hue == USHRT_MAX ? -1 : ct.ahsv.hue / 100; @@ -1095,11 +1228,25 @@ int QColor::hue() const /*! Returns the saturation color component of this color. - \sa saturationF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color + The color is implicitly converted to HSV. + + \sa hsvSaturation(), saturationF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color Model} */ + int QColor::saturation() const { + return hsvSaturation(); +} + +/*! + Returns the saturation color component of this color. + + \sa saturationF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color + Model} +*/ +int QColor::hsvSaturation() const +{ if (cspec != Invalid && cspec != Hsv) return toHsv().saturation(); return ct.ahsv.saturation >> 8; @@ -1121,11 +1268,24 @@ int QColor::value() const /*! Returns the hue color component of this color. - \sa hue(), getHsvF(), {QColor#The HSV Color Model}{The HSV Color + The color is implicitly converted to HSV. + + \sa hsvHueF(), hue(), getHsvF(), {QColor#The HSV Color Model}{The HSV Color Model} */ qreal QColor::hueF() const { + return hsvHueF(); +} + +/*! + Returns the hue color component of this color. + + \sa hue(), getHsvF(), {QColor#The HSV Color Model}{The HSV Color + Model} +*/ +qreal QColor::hsvHueF() const +{ if (cspec != Invalid && cspec != Hsv) return toHsv().hueF(); return ct.ahsv.hue == USHRT_MAX ? -1.0 : ct.ahsv.hue / 36000.0; @@ -1134,11 +1294,24 @@ qreal QColor::hueF() const /*! Returns the saturation color component of this color. - \sa saturation() getHsvF(), {QColor#The HSV Color Model}{The HSV Color + The color is implicitly converted to HSV. + + \sa hsvSaturationF(), saturation() getHsvF(), {QColor#The HSV Color Model}{The HSV Color Model} */ qreal QColor::saturationF() const { + return hsvSaturationF(); +} + +/*! + Returns the saturation color component of this color. + + \sa saturation() getHsvF(), {QColor#The HSV Color Model}{The HSV Color + Model} +*/ +qreal QColor::hsvSaturationF() const +{ if (cspec != Invalid && cspec != Hsv) return toHsv().saturationF(); return ct.ahsv.saturation / qreal(USHRT_MAX); @@ -1158,6 +1331,79 @@ qreal QColor::valueF() const } /*! + Returns the hue color component of this color. + + \sa hueHslF(), getHsl() +*/ +int QColor::hslHue() const +{ + if (cspec != Invalid && cspec != Hsl) + return toHsl().hslHue(); + return ct.ahsl.hue == USHRT_MAX ? -1 : ct.ahsl.hue / 100; +} + +/*! + Returns the saturation color component of this color. + + \sa saturationF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color + Model} +*/ +int QColor::hslSaturation() const +{ + if (cspec != Invalid && cspec != Hsl) + return toHsl().hslSaturation(); + return ct.ahsl.saturation >> 8; +} + +/*! + Returns the lightness color component of this color. + + \sa lightnessF(), getHsl() +*/ +int QColor::lightness() const +{ + if (cspec != Invalid && cspec != Hsl) + return toHsl().lightness(); + return ct.ahsl.lightness >> 8; +} + +/*! + Returns the hue color component of this color. + + \sa hue(), getHslF() +*/ +qreal QColor::hslHueF() const +{ + if (cspec != Invalid && cspec != Hsl) + return toHsl().hslHueF(); + return ct.ahsl.hue == USHRT_MAX ? -1.0 : ct.ahsl.hue / 36000.0; +} + +/*! + Returns the saturation color component of this color. + + \sa saturationHsl() getHslF() +*/ +qreal QColor::hslSaturationF() const +{ + if (cspec != Invalid && cspec != Hsl) + return toHsl().hslSaturationF(); + return ct.ahsl.saturation / qreal(USHRT_MAX); +} + +/*! + Returns the lightness color component of this color. + + \sa value() getHslF() +*/ +qreal QColor::lightnessF() const +{ + if (cspec != Invalid && cspec != Hsl) + return toHsl().lightnessF(); + return ct.ahsl.lightness / qreal(USHRT_MAX); +} + +/*! Returns the cyan color component of this color. \sa cyanF(), getCmyk(), {QColor#The CMYK Color Model}{The CMYK @@ -1337,6 +1583,53 @@ QColor QColor::toRgb() const } break; } + case Hsl: + { + if (ct.ahsl.saturation == 0 || ct.ahsl.hue == USHRT_MAX) { + // achromatic case + color.ct.argb.red = color.ct.argb.green = color.ct.argb.blue = ct.ahsl.lightness; + } else if (ct.ahsl.lightness == 0) { + // lightness 0 + color.ct.argb.red = color.ct.argb.green = color.ct.argb.blue = 0; + } else { + // chromatic case + const qreal h = ct.ahsl.hue == 36000 ? 0 : ct.ahsl.hue / 36000.; + const qreal s = ct.ahsl.saturation / qreal(USHRT_MAX); + const qreal l = ct.ahsl.lightness / qreal(USHRT_MAX); + + qreal temp2; + if (l < qreal(0.5)) + temp2 = l * (qreal(1.0) + s); + else + temp2 = l + s - (l * s); + + const qreal temp1 = (qreal(2.0) * l) - temp2; + qreal temp3[3] = { h + (qreal(1.0) / qreal(3.0)), + h, + h - (qreal(1.0) / qreal(3.0)) }; + + for (int i = 0; i != 3; ++i) { + if (temp3[i] < qreal(0.0)) + temp3[i] += qreal(1.0); + else if (temp3[i] > qreal(1.0)) + temp3[i] -= qreal(1.0); + + const qreal sixtemp3 = temp3[i] * qreal(6.0); + if (sixtemp3 < qreal(1.0)) + color.ct.array[i+1] = qRound((temp1 + (temp2 - temp1) * sixtemp3) * USHRT_MAX); + else if ((temp3[i] * qreal(2.0)) < qreal(1.0)) + color.ct.array[i+1] = qRound(temp2 * USHRT_MAX); + else if ((temp3[i] * qreal(3.0)) < qreal(2.0)) + color.ct.array[i+1] = qRound((temp1 + (temp2 -temp1) * (qreal(2.0) /qreal(3.0) - temp3[i]) * qreal(6.0)) * USHRT_MAX); + else + color.ct.array[i+1] = qRound(temp1 * USHRT_MAX); + } + color.ct.argb.red = color.ct.argb.red == 1 ? 0 : color.ct.argb.red; + color.ct.argb.green = color.ct.argb.green == 1 ? 0 : color.ct.argb.green; + color.ct.argb.blue = color.ct.argb.blue == 1 ? 0 : color.ct.argb.blue; + } + break; + } case Cmyk: { const qreal c = ct.acmyk.cyan / qreal(USHRT_MAX); @@ -1414,6 +1707,62 @@ QColor QColor::toHsv() const } /*! + Creates and returns an HSL QColor based on this color. + + \sa fromHsl(), convertTo(), isValid() +*/ +QColor QColor::toHsl() const +{ + if (!isValid() || cspec == Hsl) + return *this; + + if (cspec != Rgb) + return toRgb().toHsl(); + + QColor color; + color.cspec = Hsl; + color.ct.ahsl.alpha = ct.argb.alpha; + color.ct.ahsl.pad = 0; + + const qreal r = ct.argb.red / qreal(USHRT_MAX); + const qreal g = ct.argb.green / qreal(USHRT_MAX); + const qreal b = ct.argb.blue / qreal(USHRT_MAX); + const qreal max = Q_MAX_3(r, g, b); + const qreal min = Q_MIN_3(r, g, b); + const qreal delta = max - min; + const qreal delta2 = max + min; + const qreal lightness = qreal(0.5) * delta2; + color.ct.ahsl.lightness = qRound(lightness * USHRT_MAX); + if (qFuzzyIsNull(delta)) { + // achromatic case, hue is undefined + color.ct.ahsl.hue = 0; + color.ct.ahsl.saturation = 0; + } else { + // chromatic case + qreal hue = 0; + if (lightness < qreal(0.5)) + color.ct.ahsl.saturation = qRound((delta / delta2) * USHRT_MAX); + else + color.ct.ahsl.saturation = qRound((delta / (qreal(2.0) - delta2)) * USHRT_MAX); + if (qFuzzyCompare(r, max)) { + hue = ((g - b) /delta); + } else if (qFuzzyCompare(g, max)) { + hue = (2.0 + (b - r) / delta); + } else if (qFuzzyCompare(b, max)) { + hue = (4.0 + (r - g) / delta); + } else { + Q_ASSERT_X(false, "QColor::toHsv", "internal error"); + } + hue *= 60.0; + if (hue < 0.0) + hue += 360.0; + color.ct.ahsl.hue = qRound(hue * 100); + } + + return color; +} + +/*! Creates and returns a CMYK QColor based on this color. \sa fromCmyk(), convertTo(), isValid(), {QColor#The CMYK Color @@ -1466,6 +1815,8 @@ QColor QColor::convertTo(QColor::Spec colorSpec) const return toHsv(); case Cmyk: return toCmyk(); + case Hsl: + return toHsl(); case Invalid: break; } @@ -1627,6 +1978,70 @@ QColor QColor::fromHsvF(qreal h, qreal s, qreal v, qreal a) } /*! + Static convenience function that returns a QColor constructed from the HSV + color values, \a h (hue), \a s (saturation), \a l (lightness), and \a a + (alpha-channel, i.e. transparency). + + The value of \a s, \a l, and \a a must all be in the range 0-255; the value + of \a h must be in the range 0-359. + + \sa toHsl(), fromHslF(), isValid() +*/ +QColor QColor::fromHsl(int h, int s, int l, int a) +{ + if (((h < 0 || h >= 360) && h != -1) + || s < 0 || s > 255 + || l < 0 || l > 255 + || a < 0 || a > 255) { + qWarning("QColor::fromHsv: HSV parameters out of range"); + return QColor(); + } + + QColor color; + color.cspec = Hsl; + color.ct.ahsl.alpha = a * 0x101; + color.ct.ahsl.hue = h == -1 ? USHRT_MAX : (h % 360) * 100; + color.ct.ahsl.saturation = s * 0x101; + color.ct.ahsl.lightness = l * 0x101; + color.ct.ahsl.pad = 0; + return color; +} + +/*! + \overload + + Static convenience function that returns a QColor constructed from the HSV + color values, \a h (hue), \a s (saturation), \a l (lightness), and \a a + (alpha-channel, i.e. transparency). + + All the values must be in the range 0.0-1.0. + + \sa toHsl(), fromHsl(), isValid() +*/ +QColor QColor::fromHslF(qreal h, qreal s, qreal l, qreal a) +{ + if (((h < 0.0 || h > 1.0) && h != -1.0) + || (s < 0.0 || s > 1.0) + || (l < 0.0 || l > 1.0) + || (a < 0.0 || a > 1.0)) { + qWarning("QColor::fromHsvF: HSV parameters out of range"); + return QColor(); + } + + QColor color; + color.cspec = Hsl; + color.ct.ahsl.alpha = qRound(a * USHRT_MAX); + color.ct.ahsl.hue = (h == -1.0) ? USHRT_MAX : qRound(h * 36000); + if (color.ct.ahsl.hue == 36000) + color.ct.ahsl.hue = 0; + color.ct.ahsl.saturation = qRound(s * USHRT_MAX); + color.ct.ahsl.lightness = qRound(l * USHRT_MAX); + color.ct.ahsl.pad = 0; + return color; +} + + +/*! Sets the contents pointed to by \a c, \a m, \a y, \a k, and \a a, to the cyan, magenta, yellow, black, and alpha-channel (transparency) components of the color's CMYK value. @@ -1917,14 +2332,26 @@ QColor &QColor::operator=(Qt::GlobalColor color) */ bool QColor::operator==(const QColor &color) const { - return (cspec == color.cspec - && ct.argb.alpha == color.ct.argb.alpha - && ((cspec == QColor::Hsv - && ((ct.argb.red % 36000) == (color.ct.argb.red % 36000))) - || (ct.argb.red == color.ct.argb.red)) - && ct.argb.green == color.ct.argb.green - && ct.argb.blue == color.ct.argb.blue - && ct.argb.pad == color.ct.argb.pad); + if (cspec == Hsl && cspec == color.cspec) { + return (ct.argb.alpha == color.ct.argb.alpha + && ((((ct.ahsl.hue % 36000) == (color.ct.ahsl.hue % 36000))) + || (ct.ahsl.hue == color.ct.ahsl.hue)) + && (qAbs(ct.ahsl.saturation - color.ct.ahsl.saturation) < 50 + || ct.ahsl.lightness == 0 + || color.ct.ahsl.lightness == 0 + || ct.ahsl.lightness == USHRT_MAX + || color.ct.ahsl.lightness == USHRT_MAX) + && (qAbs(ct.ahsl.lightness - color.ct.ahsl.lightness)) < 50); + } else { + return (cspec == color.cspec + && ct.argb.alpha == color.ct.argb.alpha + && (((cspec == QColor::Hsv) + && ((ct.ahsv.hue % 36000) == (color.ct.ahsv.hue % 36000))) + || (ct.ahsv.hue == color.ct.ahsv.hue)) + && ct.argb.green == color.ct.argb.green + && ct.argb.blue == color.ct.argb.blue + && ct.argb.pad == color.ct.argb.pad); + } } /*! @@ -2028,6 +2455,8 @@ QDebug operator<<(QDebug dbg, const QColor &c) else if (c.spec() == QColor::Cmyk) dbg.nospace() << "QColor(ACMYK " << c.alphaF() << ", " << c.cyanF() << ", " << c.magentaF() << ", " << c.yellowF() << ", " << c.blackF()<< ')'; + else if (c.spec() == QColor::Hsl) + dbg.nospace() << "QColor(AHSL " << c.alphaF() << ", " << c.hslHueF() << ", " << c.hslSaturationF() << ", " << c.lightnessF() << ')'; return dbg.space(); #else diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index 1a59029..a5e5210 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -67,7 +67,7 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &); class Q_GUI_EXPORT QColor { public: - enum Spec { Invalid, Rgb, Hsv, Cmyk }; + enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl }; QColor(); QColor(Qt::GlobalColor color); @@ -122,10 +122,14 @@ public: int hue() const; // 0 <= hue < 360 int saturation() const; + int hsvHue() const; // 0 <= hue < 360 + int hsvSaturation() const; int value() const; qreal hueF() const; // 0.0 <= hueF < 360.0 qreal saturationF() const; + qreal hsvHueF() const; // 0.0 <= hueF < 360.0 + qreal hsvSaturationF() const; qreal valueF() const; void getHsv(int *h, int *s, int *v, int *a = 0) const; @@ -150,9 +154,24 @@ public: void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = 0); void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); + int hslHue() const; // 0 <= hue < 360 + int hslSaturation() const; + int lightness() const; + + qreal hslHueF() const; // 0.0 <= hueF < 360.0 + qreal hslSaturationF() const; + qreal lightnessF() const; + + void getHsl(int *h, int *s, int *l, int *a = 0) const; + void setHsl(int h, int s, int l, int a = 255); + + void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = 0) const; + void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0); + QColor toRgb() const; QColor toHsv() const; QColor toCmyk() const; + QColor toHsl() const; QColor convertTo(Spec colorSpec) const; @@ -168,6 +187,9 @@ public: static QColor fromCmyk(int c, int m, int y, int k, int a = 255); static QColor fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); + static QColor fromHsl(int h, int s, int l, int a = 255); + static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0); + QColor light(int f = 150) const; QColor lighter(int f = 150) const; QColor dark(int f = 200) const; @@ -234,6 +256,14 @@ private: ushort yellow; ushort black; } acmyk; + struct { + ushort alpha; + ushort hue; + ushort saturation; + ushort lightness; + ushort pad; + } ahsl; + ushort array[5]; } ct; friend class QColormap; diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 72bb164..5f6e1d6 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -791,7 +791,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen) if(pen_style == Qt::SolidLine) { s->stroker = &d->basicStroker; } else if (pen_style != Qt::NoPen) { - if (!d->dashStroker.data()) + if (!d->dashStroker) d->dashStroker.reset(new QDashStroker(&d->basicStroker)); if (pen.isCosmetic()) { d->dashStroker->setClipRect(d->deviceRect); diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 4353dd9..828b32b 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -62,6 +62,7 @@ #include "private/qstroker_p.h" #include "private/qpainter_p.h" #include "private/qtextureglyphcache_p.h" +#include "private/qoutlinemapper_p.h" #include <stdlib.h> @@ -372,7 +373,7 @@ public: }; -class QClipData { +class Q_GUI_EXPORT QClipData { public: QClipData(int height); ~QClipData(); @@ -479,7 +480,7 @@ private: /******************************************************************************* * QRasterBuffer */ -class QRasterBuffer +class Q_GUI_EXPORT QRasterBuffer { public: QRasterBuffer() : m_width(0), m_height(0), m_buffer(0) { init(); } diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h index cf3aad7..1ba2153 100644 --- a/src/gui/painting/qpaintengineex_p.h +++ b/src/gui/painting/qpaintengineex_p.h @@ -204,6 +204,9 @@ public: virtual void sync() {} + virtual void beginNativePainting() {} + virtual void endNativePainting() {} + virtual QPixmapFilter *createPixmapFilter(int /*type*/) const { return 0; } protected: diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index e1a6e80..699de4d 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1889,6 +1889,45 @@ QPaintEngine *QPainter::paintEngine() const return d->engine; } +/*! + Flushes the painting pipeline and prepares for the user issuing + native painting commands. Must be followed by a call to + endNativePainting(). + + \sa endNativePainting() +*/ +void QPainter::beginNativePainting() +{ + Q_D(QPainter); + if (!d->engine) { + qWarning("QPainter::beginNativePainting: Painter not active"); + return; + } + + if (d->extended) + d->extended->beginNativePainting(); +} + +/*! + Restores the painter after manually issuing native painting commands. + Lets the painter restore any native state that it relies on before + calling any other painter commands. + + \sa beginNativePainting() +*/ +void QPainter::endNativePainting() +{ + Q_D(const QPainter); + if (!d->engine) { + qWarning("QPainter::beginNativePainting: Painter not active"); + return; + } + + if (d->extended) + d->extended->endNativePainting(); + else + d->engine->syncState(); +} /*! Returns the font metrics for the painter if the painter is @@ -7169,7 +7208,8 @@ QPoint QPainter::xFormDev(const QPoint &p) const QRect transformed = painter.xFormDev(rectangle); \newcode QPainter painter(this); - QRect transformed = painter.combinedTransform().inverted(rectangle); + QRegion region = QRegion(rectangle) * painter.combinedTransform().inverted(); + QRect transformed = region.boundingRect(); \endcode */ diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 14d1cf8..1bb97c6 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -423,6 +423,9 @@ public: static QPaintDevice *redirected(const QPaintDevice *device, QPoint *offset = 0); static void restoreRedirected(const QPaintDevice *device); + void beginNativePainting(); + void endNativePainting(); + #ifdef QT3_SUPPORT inline QT3_SUPPORT void setBackgroundColor(const QColor &color) { setBackground(color); } diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index eb8b964..a10c4cd 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1520,12 +1520,6 @@ QList<QPolygonF> QPainterPath::toSubpathPolygons(const QMatrix &matrix) const return toSubpathPolygons(QTransform(matrix)); } -static inline bool rect_intersects(const QRectF &r1, const QRectF &r2) -{ - return qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) - && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom()); -} - /*! Converts the path into a list of polygons using the QTransform \a matrix, and returns the list. @@ -1578,7 +1572,7 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const continue; QRectF cbounds = bounds.at(j); for (int i=0; i<count; ++i) { - if (rect_intersects(cbounds, bounds.at(i))) { + if (cbounds.intersects(bounds.at(i))) { isects[j] << i; } } diff --git a/src/gui/painting/qrasterizer_p.h b/src/gui/painting/qrasterizer_p.h index 487c029..d3d60f1 100644 --- a/src/gui/painting/qrasterizer_p.h +++ b/src/gui/painting/qrasterizer_p.h @@ -65,7 +65,7 @@ struct QSpanData; class QRasterBuffer; class QRasterizerPrivate; -class QRasterizer +class Q_GUI_EXPORT QRasterizer { public: QRasterizer(); diff --git a/src/gui/painting/qregion_win.cpp b/src/gui/painting/qregion_win.cpp index 29ae65f..ecabd6e 100644 --- a/src/gui/painting/qregion_win.cpp +++ b/src/gui/painting/qregion_win.cpp @@ -47,7 +47,6 @@ #include "qregion.h" #include "qt_windows.h" #include "qpainterpath.h" -#include "qguifunctions_wince.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index 7cb65c7..7b52b05 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -147,7 +147,10 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi QRect br = rgn.boundingRect(); #ifndef Q_WS_WINCE - if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) { + if (!qt_widget_private(window())->isOpaque + && window()->testAttribute(Qt::WA_TranslucentBackground) + && (qt_widget_private(window())->data.window_flags & Qt::FramelessWindowHint)) + { QRect r = window()->frameGeometry(); QPoint frameOffset = qt_widget_private(window())->frameStrut().topLeft(); QRect dirtyRect = br.translated(offset + frameOffset); diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index 0a82c9c..426ebfd 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -1499,7 +1499,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o default: break; } - if (QApplication::layoutDirection() == Qt::RightToLeft) { //reverse layout changes the order of Beginning/end + if (toolbar->direction == Qt::RightToLeft) { //reverse layout changes the order of Beginning/end bool tmp = paintLeftBorder; paintRightBorder=paintLeftBorder; paintLeftBorder=tmp; @@ -4323,7 +4323,7 @@ QRect QCleanlooksStyle::subElementRect(SubElement sr, const QStyleOption *opt, c if (verticalTitleBar) { r.adjust(0, 0, 0, -4); } else { - if (QApplication::layoutDirection() == Qt::LeftToRight) + if (opt->direction == Qt::LeftToRight) r.adjust(4, 0, 0, 0); else r.adjust(0, 0, -4, 0); diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index d1bed3e..ee9827e 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -564,7 +564,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->translate(opt->rect.x(), opt->rect.y()); if (opt->state & State_Horizontal) { int x = opt->rect.width() / 3; - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (opt->direction == Qt::RightToLeft) x -= 2; if (opt->rect.height() > 4) { qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4, @@ -870,7 +870,6 @@ int QCommonStylePrivate::lookupToolButtonStyle() const #ifndef QT_NO_ITEMVIEWS - QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItemV4 *option, int role) const { Q_Q(const QCommonStyle); @@ -918,7 +917,7 @@ QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItemV4 *option, in widthUsed = qMax(widthUsed, line.naturalTextWidth()); } textLayout.endLayout(); - const QSize size = QSizeF(widthUsed, height).toSize(); + const QSize size(qCeil(widthUsed), qCeil(height)); return QSize(size.width() + 2 * textMargin, size.height()); } break; @@ -1158,6 +1157,75 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItemV4 *opt, QRe } #endif // QT_NO_ITEMVIEWS + +#ifndef QT_NO_TABBAR +/*! \internal + Compute the textRect and the pixmapRect from the opt rect + + Uses the same computation than in QTabBar::tabSizeHint + */ +void QCommonStylePrivate::tabLayout(const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const +{ + Q_ASSERT(textRect); + Q_ASSERT(iconRect); + QRect tr = opt->rect; + bool verticalTabs = opt->shape == QTabBar::RoundedEast + || opt->shape == QTabBar::RoundedWest + || opt->shape == QTabBar::TriangularEast + || opt->shape == QTabBar::TriangularWest; + if (verticalTabs) + tr.setRect(0, 0, tr.height(), tr.width()); //0, 0 as we will have a translate transform + + int verticalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftVertical, opt, widget); + int horizontalShift = proxyStyle->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, opt, widget); + int hpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; + int vpadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; + if (opt->shape == QTabBar::RoundedSouth || opt->shape == QTabBar::TriangularSouth) + verticalShift = -verticalShift; + tr.adjust(hpadding, vpadding, horizontalShift - hpadding, verticalShift - vpadding); + bool selected = opt->state & QStyle::State_Selected; + if (selected) { + tr.setBottom(tr.bottom() - verticalShift); + tr.setRight(tr.right() - horizontalShift); + } + + // left widget + if (!opt->leftButtonSize.isEmpty()) { + tr.setLeft(tr.left() + 4 + + (verticalTabs ? opt->leftButtonSize.height() : opt->leftButtonSize.width())); + } + // right widget + if (!opt->rightButtonSize.isEmpty()) { + tr.setRight(tr.right() - 4 - + (verticalTabs ? opt->rightButtonSize.height() : opt->rightButtonSize.width())); + } + + // icon + if (!opt->icon.isNull()) { + QSize iconSize = opt->iconSize; + if (!iconSize.isValid()) { + int iconExtent = proxyStyle->pixelMetric(QStyle::PM_SmallIconSize); + iconSize = QSize(iconExtent, iconExtent); + } + QSize tabIconSize = opt->icon.actualSize(iconSize, + (opt->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, + (opt->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off ); + + *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2, + tabIconSize.width(), tabIconSize .height()); + if (!verticalTabs) + *iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect); + tr.setLeft(tr.left() + tabIconSize.width() + 4); + } + + if (!verticalTabs) + tr = proxyStyle->visualRect(opt->direction, opt->rect, tr); + + *textRect = tr; +} +#endif //QT_NO_TABBAR + + /*! \reimp */ @@ -1840,38 +1908,20 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, newY = tr.y() + tr.height(); newRot = -90; } - tr.setRect(0, 0, tr.height(), tr.width()); QTransform m = QTransform::fromTranslate(newX, newY); m.rotate(newRot); p->setTransform(m, true); } - tr = subElementRect(SE_TabBarTabText, opt, widget); + QRect iconRect; + d->tabLayout(&tabV2, widget, &tr, &iconRect); + tr = proxy()->subElementRect(SE_TabBarTabText, opt, widget); //we compute tr twice because the style may override subElementRect if (!tabV2.icon.isNull()) { - QSize iconSize = tabV2.iconSize; - if (!iconSize.isValid()) { - int iconExtent = proxy()->pixelMetric(PM_SmallIconSize); - iconSize = QSize(iconExtent, iconExtent); - } - QSize tabIconSize = tabV2.icon.actualSize(iconSize, - (tabV2.state & State_Enabled) ? QIcon::Normal - : QIcon::Disabled); - QPixmap tabIcon = tabV2.icon.pixmap(iconSize, + QPixmap tabIcon = tabV2.icon.pixmap(tabV2.iconSize, (tabV2.state & State_Enabled) ? QIcon::Normal : QIcon::Disabled, (tabV2.state & State_Selected) ? QIcon::On : QIcon::Off); - - int offset = 4; - int left = opt->rect.left(); - if (tabV2.leftButtonSize.isEmpty()) - offset += 2; - else - left += tabV2.leftButtonSize.width() + (6 + 2) + 2; - QRect iconRect = QRect(left + offset, tr.center().y() - tabIcon.height() / 2, - tabIconSize.width(), tabIconSize.height()); - if (!verticalTabs) - iconRect = visualRect(opt->direction, opt->rect, iconRect); p->drawPixmap(iconRect.x(), iconRect.y(), tabIcon); } @@ -2718,65 +2768,10 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, } break; case SE_TabBarTabText: - // ### consider merging this with CE_TabBarTabLabel if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { - QStyleOptionTabV3 tabV2(*tab); - QRect tr = tabV2.rect; - bool verticalTabs = tabV2.shape == QTabBar::RoundedEast - || tabV2.shape == QTabBar::RoundedWest - || tabV2.shape == QTabBar::TriangularEast - || tabV2.shape == QTabBar::TriangularWest; - if (verticalTabs) - tr.setRect(0, 0, tr.height(), tr.width()); - int verticalShift = pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget); - int horizontalShift = pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget); - int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; - int vpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabVSpace, opt, widget) / 2; - if (tabV2.shape == QTabBar::RoundedSouth || tabV2.shape == QTabBar::TriangularSouth) - verticalShift = -verticalShift; - tr.adjust(hpadding, vpadding, horizontalShift - hpadding, verticalShift - vpadding); - bool selected = tabV2.state & State_Selected; - if (selected) { - tr.setBottom(tr.bottom() - verticalShift); - tr.setRight(tr.right() - horizontalShift); - } - - // left widget - if (!tabV2.leftButtonSize.isEmpty()) { - tr.setLeft(tr.left() + 6 + 2 + - (verticalTabs ? tabV2.leftButtonSize.height() : tabV2.leftButtonSize.width())); - } - - // icon - if (!tabV2.icon.isNull()) { - QSize iconSize = tabV2.iconSize; - if (!iconSize.isValid()) { - int iconExtent = proxy()->pixelMetric(PM_SmallIconSize); - iconSize = QSize(iconExtent, iconExtent); - } - QSize tabIconSize = tabV2.icon.actualSize(iconSize, - (tabV2.state & State_Enabled) ? QIcon::Normal - : QIcon::Disabled); - int offset = 4; - if (tabV2.leftButtonSize.isEmpty()) - offset += 2; - - QRect iconRect = QRect(tr.left() + offset, tr.center().y() - tabIconSize.height() / 2, - tabIconSize.width(), tabIconSize .height()); - if (!verticalTabs) - iconRect = visualRect(opt->direction, opt->rect, iconRect); - tr.setLeft(tr.left() + tabIconSize.width() + offset + 2); - } - - // right widget - if (!tabV2.rightButtonSize.isEmpty()) { - tr.setRight(tr.right() - 6 - 2 - - (verticalTabs ? tabV2.rightButtonSize.height() : tabV2.rightButtonSize.width())); - } - - if (!verticalTabs) - tr = visualRect(opt->direction, opt->rect, tr); - r = tr; + QStyleOptionTabV3 tabV3(*tab); + QRect dummyIconRect; + d->tabLayout(&tabV3, widget, &r, &dummyIconRect); } break; case SE_TabBarTabLeftButton: @@ -2785,6 +2780,8 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, bool selected = tab->state & State_Selected; int verticalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, tab, widget); int horizontalShift = proxy()->pixelMetric(QStyle::PM_TabBarTabShiftHorizontal, tab, widget); + int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2; + hpadding = qMax(hpadding, 4); //workaround KStyle returning 0 because they workaround an old bug in Qt bool verticalTabs = tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedWest @@ -2827,16 +2824,16 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, break; default: if (sr == SE_TabBarTabLeftButton) - r = QRect(6 + tab->rect.x(), midHeight, w, h); + r = QRect(tab->rect.x() + hpadding, midHeight, w, h); else - r = QRect(tab->rect.right() - 6 - w, midHeight, w, h); + r = QRect(tab->rect.right() - w - hpadding, midHeight, w, h); r = visualRect(tab->direction, tab->rect, r); } if (verticalTabs) { if (atTheTop) - r = QRect(midWidth, tr.y() + tab->rect.height() - 6 - h, w, h); + r = QRect(midWidth, tr.y() + tab->rect.height() - hpadding - h, w, h); else - r = QRect(midWidth, tr.y() + 6, w, h); + r = QRect(midWidth, tr.y() + hpadding, w, h); } } @@ -5224,6 +5221,7 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti Q_UNUSED(sp); #else QPixmap pixmap; + const bool rtl = (option && option->direction == Qt::RightToLeft) || !option && QApplication::isRightToLeft(); if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { switch (sp) { @@ -5382,7 +5380,7 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti switch (sp) { #ifndef QT_NO_IMAGEFORMAT_XPM case SP_ToolBarHorizontalExtensionButton: - if (QApplication::layoutDirection() == Qt::RightToLeft) { + if (rtl) { QImage im(tb_extension_arrow_h_xpm); im = im.convertToFormat(QImage::Format_ARGB32).mirrored(true, false); return QPixmap::fromImage(im); @@ -5398,11 +5396,11 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti #ifndef QT_NO_IMAGEFORMAT_PNG case SP_CommandLink: case SP_ArrowForward: - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (rtl) return proxy()->standardPixmap(SP_ArrowLeft, option, widget); return proxy()->standardPixmap(SP_ArrowRight, option, widget); case SP_ArrowBack: - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (rtl) return proxy()->standardPixmap(SP_ArrowRight, option, widget); return proxy()->standardPixmap(SP_ArrowLeft, option, widget); case SP_ArrowLeft: @@ -5513,6 +5511,7 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons const QWidget *widget) const { QIcon icon; + const bool rtl = (option && option->direction == Qt::RightToLeft) || !option && QApplication::isRightToLeft(); if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { switch (standardIcon) { case SP_DirHomeIcon: @@ -5637,11 +5636,11 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons icon = QIcon::fromTheme(QLatin1String("edit-clear")); break; case SP_ArrowForward: - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (rtl) return standardIconImplementation(SP_ArrowLeft, option, widget); return standardIconImplementation(SP_ArrowRight, option, widget); case SP_ArrowBack: - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (rtl) return standardIconImplementation(SP_ArrowRight, option, widget); return standardIconImplementation(SP_ArrowLeft, option, widget); case SP_FileLinkIcon: @@ -5865,11 +5864,11 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-128.png")); break; case SP_ArrowForward: - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (rtl) return standardIconImplementation(SP_ArrowLeft, option, widget); return standardIconImplementation(SP_ArrowRight, option, widget); case SP_ArrowBack: - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (rtl) return standardIconImplementation(SP_ArrowRight, option, widget); return standardIconImplementation(SP_ArrowLeft, option, widget); case SP_ArrowLeft: diff --git a/src/gui/styles/qcommonstyle_p.h b/src/gui/styles/qcommonstyle_p.h index 7e58b37..14f5558 100644 --- a/src/gui/styles/qcommonstyle_p.h +++ b/src/gui/styles/qcommonstyle_p.h @@ -123,6 +123,9 @@ public: #endif mutable QIcon tabBarcloseButtonIcon; int lookupToolButtonStyle() const; +#ifndef QT_NO_TABBAR + void tabLayout(const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const; +#endif }; QT_END_NAMESPACE diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 08b6ad8..905044c 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -5318,16 +5318,23 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op case SC_ComboBoxArrow:{ ret = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi); ret.setX(ret.x() + ret.width()); - ret.setWidth(combo->rect.width() - ret.width() - ret.x()); + ret.setWidth(combo->rect.right() - ret.right()); break; } case SC_ComboBoxListBoxPopup:{ if (combo->editable) { HIRect inner = QMacStylePrivate::comboboxInnerBounds(qt_hirectForQRect(combo->rect), bdi.kind); QRect editRect = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi); - ret.adjust(qRound(inner.origin.x), 0, qRound(inner.origin.x + inner.size.width), editRect.y() + editRect.height() + 2); + const int comboTop = combo->rect.top(); + ret = QRect(qRound(inner.origin.x), + comboTop, + qRound(inner.origin.x - combo->rect.left() + inner.size.width), + editRect.bottom() - comboTop + 2); } else { QRect editRect = QMacStylePrivate::comboboxEditBounds(combo->rect, bdi); - ret.adjust(4 - 11, 1, editRect.width() + 10 + 11, 1); + ret = QRect(combo->rect.x() + 4 - 11, + combo->rect.y() + 1, + editRect.width() + 10 + 11, + 1); } break; } default: diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 04559dc..0c3c2a3 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -3749,7 +3749,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op QPixmap pixmap = comboBox->currentIcon.pixmap(comboBox->iconSize, mode); QRect iconRect(editRect); iconRect.setWidth(comboBox->iconSize.width() + 5); - iconRect = alignedRect(QApplication::layoutDirection(), + iconRect = alignedRect(comboBox->direction, Qt::AlignLeft | Qt::AlignVCenter, iconRect.size(), editRect); painter->fillRect(iconRect, option->palette.brush(QPalette::Base)); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 2a88c9a..b05a1e9 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -426,13 +426,12 @@ QColor QS60StylePrivate::colorFromFrameGraphics(SkinFrameElements frame) const Q_ASSERT(2*frameCornerHeight<32); const QImage frameImage = QS60StylePrivate::frame(frame, QSize(32,32)).toImage(); + Q_ASSERT(frameImage.bytesPerLine() > 0); if (frameImage.isNull()) return Qt::black; const QRgb *pixelRgb = (const QRgb*)frameImage.bits(); const int pixels = frameImage.numBytes()/sizeof(QRgb); - const int bytesPerLine = frameImage.bytesPerLine(); - Q_ASSERT(bytesPerLine); int estimatedRed = 0; int estimatedGreen = 0; diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 8ac811c..7acb3a6 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3196,7 +3196,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC if (subRule.hasDrawable()) { QRect rect = subRule.boxRect(subControlRect(CC_MdiControls, opt, control, w), Margin); subRule.drawRule(p, rect); - QIcon icon = standardIcon(subControlIcon(layoutButton)); + QIcon icon = standardIcon(subControlIcon(layoutButton), opt); icon.paint(p, subRule.contentsRect(rect), Qt::AlignCenter); } else { optCopy.subControls |= control; @@ -3643,9 +3643,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode); QRect iconRect(editRect); iconRect.setWidth(cb->iconSize.width()); - iconRect = alignedRect(QApplication::layoutDirection(), - Qt::AlignLeft | Qt::AlignVCenter, - iconRect.size(), editRect); + iconRect = alignedRect(cb->direction, + Qt::AlignLeft | Qt::AlignVCenter, + iconRect.size(), editRect); drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap); if (cb->direction == Qt::RightToLeft) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index e558844..8097a3d 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -1261,7 +1261,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, p->translate(opt->rect.x(), opt->rect.y()); if (opt->state & State_Horizontal) { int x = opt->rect.width() / 2 - 4; - if (QApplication::layoutDirection() == Qt::RightToLeft) + if (opt->direction == Qt::RightToLeft) x -= 2; if (opt->rect.height() > 4) { qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4, @@ -2312,7 +2312,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai default: break; } - if(QApplication::layoutDirection() == Qt::RightToLeft){ //reverse layout changes the order of Beginning/end + if(opt->direction == Qt::RightToLeft){ //reverse layout changes the order of Beginning/end bool tmp = paintLeftBorder; paintRightBorder=paintLeftBorder; paintLeftBorder=tmp; @@ -2564,7 +2564,7 @@ QRect QWindowsStyle::subElementRect(SubElement sr, const QStyleOption *opt, cons if (verticalTitleBar) { r.adjust(0, 0, 0, -m); } else { - if (QApplication::layoutDirection() == Qt::LeftToRight) + if (opt->direction == Qt::LeftToRight) r.adjust(m, 0, 0, 0); else r.adjust(0, 0, -m, 0); diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 191b71e..e365873 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -2331,7 +2331,7 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op bool hasIcon = (ico.cacheKey() != QApplication::windowIcon().cacheKey()); if (hasIcon) { QPixmap pxIco = ico.pixmap(titleHeight); - if (!verticalTitleBar && QApplication::layoutDirection() == Qt::RightToLeft) + if (!verticalTitleBar && dwOpt->direction == Qt::RightToLeft) p->drawPixmap(rect.width() - titleHeight - pxIco.width(), rect.bottom() - titleHeight - 2, pxIco); else p->drawPixmap(fw, rect.bottom() - titleHeight - 2, pxIco); @@ -2672,11 +2672,8 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo // Draw gripper if there is enough space if (!gripperBounds.isEmpty()) { p->save(); - XPThemeData grippBackground = theme; - grippBackground.partId = flags & State_Horizontal ? SBP_LOWERTRACKHORZ : SBP_LOWERTRACKVERT; theme.rect = gripperBounds; p->setClipRegion(d->region(theme));// Only change inside the region of the gripper - d->drawBackground(grippBackground);// The gutter is the grippers background d->drawBackground(theme); // Transparent gripper ontop of background p->restore(); } diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index e05a502..05dea6e 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -66,9 +66,10 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_QWS_QPF2 -QT_BEGIN_INCLUDE_NAMESPACE #include "qpfutil.cpp" +QT_BEGIN_INCLUDE_NAMESPACE + #if defined(Q_WS_QWS) # include "private/qwscommand_qws_p.h" # include "qwsdisplay_qws.h" diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 25cc4da..7a9d958 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -327,8 +327,10 @@ QFontEngineWin::QFontEngineWin(const QString &name, HFONT _hfont, bool stockFont BOOL res = GetTextMetrics(hdc, &tm); fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH); - if (!res) + if (!res) { qErrnoWarning("QFontEngineWin: GetTextMetrics failed"); + ZeroMemory(&tm, sizeof(TEXTMETRIC)); + } cache_cost = tm.tmHeight * tm.tmAveCharWidth * 2000; getCMap(); @@ -1098,6 +1100,7 @@ extern bool qt_cleartype_enabled; QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin, const QTransform &t, QImage::Format mask_format) { + Q_UNUSED(mask_format) glyph_metrics_t gm = boundingBox(glyph); // printf(" -> for glyph %4x\n", glyph); diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index a795c1f..7b36b9d 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -1994,9 +1994,12 @@ void QTextDocumentLayoutPrivate::positionFloat(QTextFrame *frame, QTextLine *cur } } - if (y + layoutStruct->frameY + fd->size.height > layoutStruct->pageBottom) { + bool frameSpansIntoNextPage = (y + layoutStruct->frameY + fd->size.height > layoutStruct->pageBottom); + if (frameSpansIntoNextPage && fd->size.height <= layoutStruct->pageHeight) { layoutStruct->newPage(); y = layoutStruct->y; + + frameSpansIntoNextPage = false; } y = findY(y, layoutStruct, fd->size.width); @@ -2017,6 +2020,11 @@ void QTextDocumentLayoutPrivate::positionFloat(QTextFrame *frame, QTextLine *cur // qDebug()<< "float positioned at " << fd->position.x << fd->position.y; fd->layoutDirty = false; + + // If the frame is a table, then positioning it will affect the size if it covers more than + // one page, because of page breaks and repeating the header. + if (qobject_cast<QTextTable *>(frame) != 0) + fd->sizeDirty = frameSpansIntoNextPage; } QRectF QTextDocumentLayoutPrivate::layoutFrame(QTextFrame *f, int layoutFrom, int layoutTo, QFixed parentY) @@ -2349,6 +2357,10 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QLayoutStru positionFloat(c); + // If the size was made dirty when the position was set, layout again + if (cd->sizeDirty) + updateRect = layoutFrame(c, layoutFrom, layoutTo); + QRectF frameRect(cd->position.toPointF(), cd->size.toSizeF()); if (frameRect == oldFrameRect && updateRect.isValid()) diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 533a56b..d1adfee 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -51,7 +51,10 @@ #include "qdebug.h" #include "qboxlayout.h" #include "qpainter.h" + +#ifdef Q_WS_WIN #include "qstandardgestures.h" +#endif #include "qabstractscrollarea_p.h" #include <qwidget.h> @@ -159,9 +162,9 @@ QT_BEGIN_NAMESPACE QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate() :hbar(0), vbar(0), vbarpolicy(Qt::ScrollBarAsNeeded), hbarpolicy(Qt::ScrollBarAsNeeded), viewport(0), cornerWidget(0), left(0), top(0), right(0), bottom(0), - xoffset(0), yoffset(0), viewportFilter(0), panGesture(0) + xoffset(0), yoffset(0), viewportFilter(0) #ifdef Q_WS_WIN - , singleFingerPanEnabled(false) + , panGesture(0), singleFingerPanEnabled(false) #endif { } @@ -295,8 +298,10 @@ void QAbstractScrollAreaPrivate::init() q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layoutChildren(); - panGesture = new QPanGesture(q); +#ifdef Q_WS_WIN + panGesture = new QPanGesture(viewport); QObject::connect(panGesture, SIGNAL(triggered()), q, SLOT(_q_gestureTriggered())); +#endif // Q_WS_WIN } #ifdef Q_WS_WIN @@ -547,6 +552,9 @@ void QAbstractScrollArea::setViewport(QWidget *widget) if (isVisible()) d->viewport->show(); QMetaObject::invokeMethod(this, "setupViewport", Q_ARG(QWidget *, widget)); +#ifdef Q_WS_WIN + d->panGesture->setGestureTarget(widget); +#endif delete oldViewport; } } @@ -1339,6 +1347,7 @@ void QAbstractScrollArea::setupViewport(QWidget *viewport) Q_UNUSED(viewport); } +#ifdef Q_WS_WIN void QAbstractScrollAreaPrivate::_q_gestureTriggered() { Q_Q(QAbstractScrollArea); @@ -1347,7 +1356,7 @@ void QAbstractScrollAreaPrivate::_q_gestureTriggered() return; QScrollBar *hBar = q->horizontalScrollBar(); QScrollBar *vBar = q->verticalScrollBar(); - QSize delta = g->lastOffset(); + QSizeF delta = g->lastOffset(); if (!delta.isNull()) { if (QApplication::isRightToLeft()) delta.rwidth() *= -1; @@ -1357,6 +1366,7 @@ void QAbstractScrollAreaPrivate::_q_gestureTriggered() vbar->setValue(newY); } } +#endif QT_END_NAMESPACE diff --git a/src/gui/widgets/qabstractscrollarea.h b/src/gui/widgets/qabstractscrollarea.h index 0a3e9c5..0625458 100644 --- a/src/gui/widgets/qabstractscrollarea.h +++ b/src/gui/widgets/qabstractscrollarea.h @@ -128,7 +128,10 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_hslide(int)) Q_PRIVATE_SLOT(d_func(), void _q_vslide(int)) Q_PRIVATE_SLOT(d_func(), void _q_showOrHideScrollBars()) + +#ifdef Q_WS_WIN Q_PRIVATE_SLOT(d_func(), void _q_gestureTriggered()) +#endif friend class QStyleSheetStyle; friend class QWidgetPrivate; diff --git a/src/gui/widgets/qabstractscrollarea_p.h b/src/gui/widgets/qabstractscrollarea_p.h index 211b7a7..4362ce9 100644 --- a/src/gui/widgets/qabstractscrollarea_p.h +++ b/src/gui/widgets/qabstractscrollarea_p.h @@ -101,9 +101,9 @@ public: { return q_func()->viewportEvent(event); } QScopedPointer<QObject> viewportFilter; - virtual void _q_gestureTriggered(); - QPanGesture *panGesture; #ifdef Q_WS_WIN + QPanGesture *panGesture; + virtual void _q_gestureTriggered(); bool singleFingerPanEnabled; void setSingleFingerPanEnabled(bool on = true); #endif diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 58edfde..52538e0 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -687,9 +687,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) Q_D(QAbstractSlider); e->ignore(); if (e->orientation() != d->orientation && !rect().contains(e->pos())) - { return; - } static qreal offset = 0; static QAbstractSlider *offset_owner = 0; if (offset_owner != this){ diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac.mm b/src/gui/widgets/qcocoatoolbardelegate_mac.mm index 3b58a4e..2ef0ead 100644 --- a/src/gui/widgets/qcocoatoolbardelegate_mac.mm +++ b/src/gui/widgets/qcocoatoolbardelegate_mac.mm @@ -100,7 +100,8 @@ QT_FORWARD_DECLARE_CLASS(QCFString); { Q_UNUSED(flag); Q_UNUSED(nstoolbar); - QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString(itemIdentifier)); + QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value( + QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(itemIdentifier)); NSToolbarItem *item = nil; if (tb) { item = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier]; @@ -112,7 +113,8 @@ QT_FORWARD_DECLARE_CLASS(QCFString); - (void)toolbarWillAddItem:(NSNotification *)notification { NSToolbarItem *item = [[notification userInfo] valueForKey:@"item"]; - QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value(qt_mac_NSStringToQString([item itemIdentifier])); + QToolBar *tb = mainWindowLayout->cocoaItemIDToToolbarHash.value( + QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)([item itemIdentifier])); if (!tb) return; // I can't really do anything about this. [item retain]; diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index bf0d52b..b1e9c79 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -2449,7 +2449,16 @@ void QComboBox::showPopup() && !style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this) && !window()->testAttribute(Qt::WA_DontShowOnScreen)) qScrollEffect(container, scrollDown ? QEffects::DownScroll : QEffects::UpScroll, 150); #endif + +// Don't disable updates on Mac OS X. Windows are displayed immediately on this platform, +// which means that the window will be visible before the call to container->show() returns. +// If updates are disabled at this point we'll miss our chance at painting the popup +// menu before it's shown, causing flicker since the window then displays the standard gray +// background. +#ifndef Q_WS_MAC container->setUpdatesEnabled(false); +#endif + container->raise(); container->show(); container->updateScrollers(); @@ -2460,7 +2469,10 @@ void QComboBox::showPopup() ? QAbstractItemView::PositionAtCenter : QAbstractItemView::EnsureVisible); +#ifndef Q_WS_MAC container->setUpdatesEnabled(updatesEnabled); +#endif + container->update(); #ifdef QT_KEYPAD_NAVIGATION if (QApplication::keypadNavigationEnabled()) diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp index 206221f..fd69f55 100644 --- a/src/gui/widgets/qcommandlinkbutton.cpp +++ b/src/gui/widgets/qcommandlinkbutton.cpp @@ -205,7 +205,9 @@ void QCommandLinkButtonPrivate::init() q->setSizePolicy(policy); q->setIconSize(QSize(20, 20)); - q->setIcon(q->style()->standardIcon(QStyle::SP_CommandLink)); + QStyleOptionButton opt; + q->initStyleOption(&opt); + q->setIcon(q->style()->standardIcon(QStyle::SP_CommandLink, &opt)); } // Calculates the height of the description text based on widget width diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp index 5a9c7e1..d1ebdf4 100644 --- a/src/gui/widgets/qdatetimeedit.cpp +++ b/src/gui/widgets/qdatetimeedit.cpp @@ -1643,7 +1643,6 @@ QDateTimeEditPrivate::QDateTimeEditPrivate() cachedDay = -1; currentSectionIndex = FirstSectionIndex; - layoutDirection = QApplication::layoutDirection(); first.type = FirstSection; last.type = LastSection; none.type = NoSection; diff --git a/src/gui/widgets/qdatetimeedit_p.h b/src/gui/widgets/qdatetimeedit_p.h index 7b29e51..33c09c0 100644 --- a/src/gui/widgets/qdatetimeedit_p.h +++ b/src/gui/widgets/qdatetimeedit_p.h @@ -132,7 +132,6 @@ public: mutable bool cacheGuard; QString defaultDateFormat, defaultTimeFormat, defaultDateTimeFormat, unreversedFormat; - Qt::LayoutDirection layoutDirection; mutable QVariant conflictGuard; bool hasHadFocus, formatExplicitlySet, calendarPopup; QStyle::StateFlag arrowState; diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index 721d990..0db6279 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -78,10 +78,10 @@ class Q_GUI_EXPORT QLineControl : public QObject public: QLineControl(const QString &txt = QString()) - : m_cursor(0), m_preeditCursor(0), m_layoutDirection(Qt::LeftToRight), + : m_cursor(0), m_preeditCursor(0), m_cursorWidth(0), m_layoutDirection(Qt::LeftToRight), m_hideCursor(false), m_separator(0), m_readOnly(0), m_dragEnabled(0), m_echoMode(0), m_textDirty(0), m_selDirty(0), - m_validInput(1), m_blinkPeriod(0), m_blinkTimer(0), m_deleteAllTimer(0), + m_validInput(1), m_blinkStatus(0), m_blinkPeriod(0), m_blinkTimer(0), m_deleteAllTimer(0), m_ascent(0), m_maxLength(32767), m_lastCursorPos(-1), m_tripleClickTimer(0), m_maskData(0), m_modifiedState(0), m_undoState(0), m_selstart(0), m_selend(0), m_passwordEchoEditing(false) @@ -262,10 +262,10 @@ private: uint m_textDirty : 1; uint m_selDirty : 1; uint m_validInput : 1; + uint m_blinkStatus : 1; int m_blinkPeriod; // 0 for non-blinking cursor int m_blinkTimer; int m_deleteAllTimer; - int m_blinkStatus; int m_ascent; int m_maxLength; int m_lastCursorPos; @@ -349,7 +349,7 @@ Q_SIGNALS: protected: virtual void timerEvent(QTimerEvent *event); -private slots: +private Q_SLOTS: void _q_clipboardChanged(); void _q_deleteSelected(); diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 6b73e21..059aaf1 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1395,8 +1395,7 @@ bool QLineEdit::event(QEvent * e) if (e->type() == QEvent::EnterEditFocus) { end(false); d->setCursorVisible(true); - int cft = QApplication::cursorFlashTime(); - d->control->setCursorBlinkPeriod(cft/2); + d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime()); } else if (e->type() == QEvent::LeaveEditFocus) { d->setCursorVisible(false); d->control->setCursorBlinkPeriod(0); @@ -1691,8 +1690,7 @@ void QLineEdit::focusInEvent(QFocusEvent *e) #ifdef QT_KEYPAD_NAVIGATION if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && e->reason() == Qt::PopupFocusReason)){ #endif - int cft = QApplication::cursorFlashTime(); - d->control->setCursorBlinkPeriod(cft/2); + d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime()); QStyleOptionFrameV2 opt; initStyleOption(&opt); if((!hasSelectedText() && d->control->preeditAreaText().isEmpty()) @@ -2004,7 +2002,7 @@ QMenu *QLineEdit::createStandardContextMenu() action = popup->addAction(QLineEdit::tr("Delete")); action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); - connect(action, SIGNAL(triggered()), SLOT(_q_deleteSelected())); + connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected())); popup->addSeparator(); diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h index 03d4376..cd37ad0 100644 --- a/src/gui/widgets/qlineedit.h +++ b/src/gui/widgets/qlineedit.h @@ -267,7 +267,6 @@ private: Q_DISABLE_COPY(QLineEdit) Q_DECLARE_PRIVATE(QLineEdit) Q_PRIVATE_SLOT(d_func(), void _q_handleWindowActivate()) - Q_PRIVATE_SLOT(d_func(), void _q_deleteSelected()) Q_PRIVATE_SLOT(d_func(), void _q_textEdited(const QString &)) Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged(int, int)) #ifndef QT_NO_COMPLETER diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index cec34da..4218630 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -93,10 +93,6 @@ void QLineEditPrivate::_q_completionHighlighted(QString newText) #endif // QT_NO_COMPLETER -void QLineEditPrivate::_q_clipboardChanged() -{ -} - void QLineEditPrivate::_q_handleWindowActivate() { Q_Q(QLineEdit); @@ -104,10 +100,6 @@ void QLineEditPrivate::_q_handleWindowActivate() control->deselect(); } -void QLineEditPrivate::_q_deleteSelected() -{ -} - void QLineEditPrivate::_q_textEdited(const QString &text) { Q_Q(QLineEdit); diff --git a/src/gui/widgets/qlineedit_p.h b/src/gui/widgets/qlineedit_p.h index 3ab10fc..260bc19 100644 --- a/src/gui/widgets/qlineedit_p.h +++ b/src/gui/widgets/qlineedit_p.h @@ -84,6 +84,7 @@ public: ~QLineEditPrivate() { + delete control; } QLineControl *control; @@ -121,9 +122,7 @@ public: QRect adjustedContentsRect() const; - void _q_clipboardChanged(); void _q_handleWindowActivate(); - void _q_deleteSelected(); void _q_textEdited(const QString &); void _q_cursorPositionChanged(int, int); #ifdef QT_KEYPAD_NAVIGATION diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index 529a225..0ea9b56 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -1463,7 +1463,7 @@ void QMainWindowLayout::setGeometry(const QRect &_r) QSize(r.width(), statusbar->heightForWidth(r.width())) .expandedTo(statusbar->minimumSize())); sbr.moveBottom(r.bottom()); - QRect vr = QStyle::visualRect(QApplication::layoutDirection(), _r, sbr); + QRect vr = QStyle::visualRect(parentWidget()->layoutDirection(), _r, sbr); statusbar->setGeometry(vr); r.setBottom(sbr.top() - 1); } diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 69ccae5..4734d22 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -368,7 +368,9 @@ QRect QMenuPrivate::actionRect(QAction *act) const return actionRects.at(index); } +#if defined(Q_WS_MAC) static const qreal MenuFadeTimeInSec = 0.150; +#endif void QMenuPrivate::hideUpToMenuBar() { @@ -1832,7 +1834,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction) if (adjustToDesktop) { //handle popup falling "off screen" - if (QApplication::layoutDirection() == Qt::RightToLeft) { + if (isRightToLeft()) { if(snapToMouse) //position flowing left from the mouse pos.setX(mouse.x()-size.width()); @@ -1870,9 +1872,9 @@ void QMenu::popup(const QPoint &p, QAction *atAction) } setGeometry(QRect(pos, size)); #ifndef QT_NO_EFFECTS - int hGuess = QApplication::layoutDirection() == Qt::RightToLeft ? QEffects::LeftScroll : QEffects::RightScroll; + int hGuess = isRightToLeft() ? QEffects::LeftScroll : QEffects::RightScroll; int vGuess = QEffects::DownScroll; - if (QApplication::layoutDirection() == Qt::RightToLeft) { + if (isRightToLeft()) { if ((snapToMouse && (pos.x() + size.width()/2 > mouse.x())) || (qobject_cast<QMenu*>(d->causedPopup.widget) && pos.x() + size.width()/2 > d->causedPopup.widget->x())) hGuess = QEffects::RightScroll; @@ -2779,6 +2781,8 @@ void QMenu::leaveEvent(QEvent *) d->sloppyAction = 0; if (!d->sloppyRegion.isEmpty()) d->sloppyRegion = QRegion(); + if (!d->activeMenu && d->currentAction) + setActiveAction(0); } /*! diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 8089473..8e28abe 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -607,6 +607,13 @@ static inline void syncNSMenuItemVisiblity(NSMenuItem *menuItem, bool actionVisi [menuItem setHidden:!actionVisibility]; } +static inline void syncNSMenuItemEnabled(NSMenuItem *menuItem, bool enabled) +{ + [menuItem setEnabled:NO]; + [menuItem setEnabled:YES]; + [menuItem setEnabled:enabled]; +} + static inline void syncMenuBarItemsVisiblity(const QMenuBarPrivate::QMacMenuBarPrivate *mac_menubar) { const QList<QMacMenuAction *> &menubarActions = mac_menubar->actionItems; @@ -659,12 +666,12 @@ void qt_mac_set_modal_state_helper_recursive(OSMenuRef menu, OSMenuRef merge, bo // The item should follow what the QAction has. if ([item tag]) { QAction *action = reinterpret_cast<QAction *>([item tag]); - [item setEnabled:action->isEnabled()]; + syncNSMenuItemEnabled(item, action->isEnabled()); } else { - [item setEnabled:YES]; + syncNSMenuItemEnabled(item, YES); } } else { - [item setEnabled:NO]; + syncNSMenuItemEnabled(item, NO); } } } @@ -728,6 +735,9 @@ bool qt_mac_menubar_is_open() void qt_mac_clear_menubar() { + if (QApplication::testAttribute(Qt::AA_MacPluginApplication)) + return; + #ifndef QT_MAC_USE_COCOA MenuRef clear_menu = 0; if (CreateNewMenu(0, 0, &clear_menu) == noErr) { @@ -1361,7 +1371,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action) if (!action->action->icon().isNull() && action->action->isIconVisibleInMenu()) { data.iconType = kMenuIconRefType; - data.iconHandle = (Handle)qt_mac_create_iconref(action->action->icon().pixmap(22, QIcon::Normal)); + data.iconHandle = (Handle)qt_mac_create_iconref(action->action->icon().pixmap(16, QIcon::Normal)); } else { data.iconType = kMenuNoIcon; } @@ -1400,7 +1410,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action) // Cocoa icon NSImage *nsimage = 0; if (!action->action->icon().isNull() && action->action->isIconVisibleInMenu()) { - nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(action->action->icon().pixmap(22, QIcon::Normal))); + nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(action->action->icon().pixmap(16, QIcon::Normal))); } [item setImage:nsimage]; [nsimage release]; @@ -1754,14 +1764,16 @@ void QMenuBarPrivate::macCreateMenuBar(QWidget *parent) { Q_Q(QMenuBar); - static int checkEnv = -1; + static int dontUseNativeMenuBar = -1; // We call the isNativeMenuBar function here - // becasue that will make sure that local overrides + // because that will make sure that local overrides // are dealt with correctly. bool qt_mac_no_native_menubar = !q->isNativeMenuBar(); - if (qt_mac_no_native_menubar == false && checkEnv < 0) { - checkEnv = !qgetenv("QT_MAC_NO_NATIVE_MENUBAR").isEmpty(); - QApplication::instance()->setAttribute(Qt::AA_DontUseNativeMenuBar, checkEnv); + if (qt_mac_no_native_menubar == false && dontUseNativeMenuBar < 0) { + bool isPlugin = QApplication::testAttribute(Qt::AA_MacPluginApplication); + bool environmentSaysNo = !qgetenv("QT_MAC_NO_NATIVE_MENUBAR").isEmpty(); + dontUseNativeMenuBar = isPlugin || environmentSaysNo; + QApplication::instance()->setAttribute(Qt::AA_DontUseNativeMenuBar, dontUseNativeMenuBar); qt_mac_no_native_menubar = !q->isNativeMenuBar(); } if (!qt_mac_no_native_menubar) { diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 82b3769..6633f2a 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -132,7 +132,7 @@ QRect QMenuBarPrivate::menuRect(bool extVisible) const result.adjust(hmargin, 0, -hmargin, 0); if (extVisible) { - if (q->layoutDirection() == Qt::RightToLeft) + if (q->isRightToLeft()) result.setLeft(result.left() + extension->sizeHint().width()); else result.setWidth(result.width() - extension->sizeHint().width()); @@ -140,7 +140,7 @@ QRect QMenuBarPrivate::menuRect(bool extVisible) const if (leftWidget && leftWidget->isVisible()) { QSize sz = leftWidget->sizeHint(); - if (q->layoutDirection() == Qt::RightToLeft) + if (q->isRightToLeft()) result.setRight(result.right() - sz.width()); else result.setLeft(result.left() + sz.width()); @@ -148,7 +148,7 @@ QRect QMenuBarPrivate::menuRect(bool extVisible) const if (rightWidget && rightWidget->isVisible()) { QSize sz = rightWidget->sizeHint(); - if (q->layoutDirection() == Qt::RightToLeft) + if (q->isRightToLeft()) result.setLeft(result.left() + sz.width()); else result.setRight(result.right() - sz.width()); @@ -245,7 +245,7 @@ void QMenuBarPrivate::updateGeometries() pop->addActions(hiddenActions); int vmargin = q->style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, q); - int x = q->layoutDirection() == Qt::RightToLeft + int x = q->isRightToLeft() ? menuRect.left() - extension->sizeHint().width() + 1 : menuRect.right(); extension->setGeometry(x, vmargin, extension->sizeHint().width(), menuRect.height() - vmargin*2); @@ -1695,6 +1695,7 @@ QSize QMenuBar::sizeHint() const ensurePolished(); QSize ret(0, 0); + const_cast<QMenuBarPrivate*>(d)->updateGeometries(); const int hmargin = style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0, this); const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this); int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this); @@ -1750,6 +1751,7 @@ int QMenuBar::heightForWidth(int) const const bool as_gui_menubar = true; #endif + const_cast<QMenuBarPrivate*>(d)->updateGeometries(); int height = 0; const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this); int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this); diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index 20de404..6ac521b 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -66,7 +66,9 @@ #include <qtexttable.h> #include <qvariant.h> +#ifdef Q_WS_WIN #include <qstandardgestures.h> +#endif #include <qinputcontext.h> @@ -377,7 +379,7 @@ void QPlainTextDocumentLayout::layoutBlock(const QTextBlock &block) tl->beginLayout(); qreal availableWidth = d->width; if (availableWidth <= 0) { - availableWidth = INT_MAX; // similar to text edit with pageSize.width == 0 + availableWidth = qreal(INT_MAX); // similar to text edit with pageSize.width == 0 } availableWidth -= 2*margin + extraMargin; while (1) { @@ -573,7 +575,8 @@ QRectF QPlainTextEditControl::blockBoundingRect(const QTextBlock &block) const { if (!block.isValid()) return QRectF(); QRectF r = documentLayout->blockBoundingRect(currentBlock); - while (currentBlockNumber < blockNumber && offset.y() <= 2* textEdit->viewport()->height()) { + int maxVerticalOffset = r.height(); + while (currentBlockNumber < blockNumber && offset.y() - maxVerticalOffset <= 2* textEdit->viewport()->height()) { offset.ry() += r.height(); currentBlock = currentBlock.next(); ++currentBlockNumber; @@ -583,7 +586,7 @@ QRectF QPlainTextEditControl::blockBoundingRect(const QTextBlock &block) const { } r = documentLayout->blockBoundingRect(currentBlock); } - while (currentBlockNumber > blockNumber && offset.y() >= -textEdit->viewport()->height()) { + while (currentBlockNumber > blockNumber && offset.y() + maxVerticalOffset >= -textEdit->viewport()->height()) { currentBlock = currentBlock.previous(); --currentBlockNumber; while (!currentBlock.isVisible()) { @@ -791,8 +794,10 @@ void QPlainTextEditPrivate::init(const QString &txt) viewport->setCursor(Qt::IBeamCursor); #endif originalOffsetY = 0; +#ifdef Q_WS_WIN panGesture = new QPanGesture(q); QObject::connect(panGesture, SIGNAL(triggered()), q, SLOT(_q_gestureTriggered())); +#endif } void QPlainTextEditPrivate::_q_repaintContents(const QRectF &contentsRect) @@ -2917,6 +2922,8 @@ QAbstractTextDocumentLayout::PaintContext QPlainTextEdit::getPaintContext() cons (\a available is true) or unavailable (\a available is false). */ +#ifdef Q_WS_WIN + void QPlainTextEditPrivate::_q_gestureTriggered() { Q_Q(QPlainTextEdit); @@ -2927,7 +2934,7 @@ void QPlainTextEditPrivate::_q_gestureTriggered() QScrollBar *vBar = q->verticalScrollBar(); if (g->state() == Qt::GestureStarted) originalOffsetY = vBar->value(); - QSize totalOffset = g->totalOffset(); + QSizeF totalOffset = g->totalOffset(); if (!totalOffset.isNull()) { if (QApplication::isRightToLeft()) totalOffset.rwidth() *= -1; @@ -2941,6 +2948,8 @@ void QPlainTextEditPrivate::_q_gestureTriggered() } } +#endif + QT_END_NAMESPACE #include "moc_qplaintextedit.cpp" diff --git a/src/gui/widgets/qplaintextedit.h b/src/gui/widgets/qplaintextedit.h index c9652ae..5ec3ed8 100644 --- a/src/gui/widgets/qplaintextedit.h +++ b/src/gui/widgets/qplaintextedit.h @@ -269,7 +269,11 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_adjustScrollbars()) Q_PRIVATE_SLOT(d_func(), void _q_verticalScrollbarActionTriggered(int)) Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged()) + +#ifdef Q_WS_WIN Q_PRIVATE_SLOT(d_func(), void _q_gestureTriggered()) +#endif + friend class QPlainTextEditControl; }; diff --git a/src/gui/widgets/qplaintextedit_p.h b/src/gui/widgets/qplaintextedit_p.h index 608f3cf..e93302c 100644 --- a/src/gui/widgets/qplaintextedit_p.h +++ b/src/gui/widgets/qplaintextedit_p.h @@ -176,12 +176,14 @@ public: #endif void _q_cursorPositionChanged(); - void _q_modificationChanged(bool); - void _q_gestureTriggered(); int originalOffsetY; + +#ifdef Q_WS_WIN + void _q_gestureTriggered(); QPanGesture *panGesture; +#endif }; QT_END_NAMESPACE diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 5166390..531c429 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1293,6 +1293,7 @@ QSize QTabBarPrivate::minimumTabSizeHint(int index) */ QSize QTabBar::tabSizeHint(int index) const { + //Note: this must match with the computations in QCommonStylePrivate::tabLayout Q_D(const QTabBar); if (const QTabBarPrivate::Tab *tab = d->at(index)) { QStyleOptionTabV3 opt; @@ -1309,18 +1310,18 @@ QSize QTabBar::tabSizeHint(int index) const int widgetWidth = 0; int widgetHeight = 0; int padding = 0; - if (opt.leftButtonSize.isValid()) { - padding += 6 + 2; + if (!opt.leftButtonSize.isEmpty()) { + padding += 4; widgetWidth += opt.leftButtonSize.width(); widgetHeight += opt.leftButtonSize.height(); } - if (opt.rightButtonSize.isValid()) { - padding += 6 + 2; + if (!opt.rightButtonSize.isEmpty()) { + padding += 4; widgetWidth += opt.rightButtonSize.width(); widgetHeight += opt.rightButtonSize.height(); } - if (opt.iconSize.isValid()) - padding += 2; + if (!opt.icon.isNull()) + padding += 4; QSize csz; if (verticalTabs(d->shape)) { @@ -1836,7 +1837,8 @@ void QTabBarPrivate::moveTabFinished(int index) } #endif //QT_NO_ANIMATION if (allAnimationsFinished && cleanup) { - movingTab->setVisible(false); // We might not get a mouse release + if(movingTab) + movingTab->setVisible(false); // We might not get a mouse release for (int i = 0; i < tabList.count(); ++i) { tabList[i].dragOffset = 0; } diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index ef0847b..89e6d7a 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -205,7 +205,7 @@ void QToolBarPrivate::initDrag(const QPoint &pos) state->moving = false; state->widgetItem = 0; - if (q->layoutDirection() == Qt::RightToLeft) + if (q->isRightToLeft()) state->pressPos = QPoint(q->width() - state->pressPos.x(), state->pressPos.y()); } @@ -359,7 +359,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event) QPoint pos = event->globalPos(); // if we are right-to-left, we move so as to keep the right edge the same distance // from the mouse - if (q->layoutDirection() == Qt::LeftToRight) + if (q->isLeftToRight()) pos -= state->pressPos; else pos += QPoint(state->pressPos.x() - q->width(), -state->pressPos.y()); @@ -369,14 +369,14 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event) } else if (state->moving) { const QPoint rtl(q->width() - state->pressPos.x(), state->pressPos.y()); //for RTL - const QPoint globalPressPos = q->mapToGlobal(q->layoutDirection() == Qt::RightToLeft ? rtl : state->pressPos); + const QPoint globalPressPos = q->mapToGlobal(q->isRightToLeft() ? rtl : state->pressPos); int pos = 0; QPoint delta = event->globalPos() - globalPressPos; if (orientation == Qt::Vertical) { pos = q->y() + delta.y(); } else { - if (q->layoutDirection() == Qt::RightToLeft) { + if (q->isRightToLeft()) { pos = win->width() - q->width() - q->x() - delta.x(); } else { pos = q->x() + delta.x(); @@ -391,7 +391,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event) void QToolBarPrivate::unplug(const QRect &_r) { Q_Q(QToolBar); - + layout->setExpanded(false, false); QRect r = _r; r.moveTopLeft(q->mapToGlobal(QPoint(0, 0))); setWindowState(true, true, r); diff --git a/src/gui/widgets/qtoolbarextension.cpp b/src/gui/widgets/qtoolbarextension.cpp index 1f1186c..6a70326 100644 --- a/src/gui/widgets/qtoolbarextension.cpp +++ b/src/gui/widgets/qtoolbarextension.cpp @@ -61,10 +61,12 @@ QToolBarExtension::QToolBarExtension(QWidget *parent) void QToolBarExtension::setOrientation(Qt::Orientation o) { + QStyleOption opt; + opt.init(this); if (o == Qt::Horizontal) { - setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton)); + setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton, &opt)); } else { - setIcon(style()->standardIcon(QStyle::SP_ToolBarVerticalExtensionButton)); + setIcon(style()->standardIcon(QStyle::SP_ToolBarVerticalExtensionButton, &opt)); } } diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp index d3c5b4b..1f2ca60 100644 --- a/src/gui/widgets/qtoolbarlayout.cpp +++ b/src/gui/widgets/qtoolbarlayout.cpp @@ -642,7 +642,7 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const return result; } -void QToolBarLayout::setExpanded(bool exp) +void QToolBarLayout::setExpanded(bool exp, bool animated) { if (exp == expanded) return; @@ -665,7 +665,7 @@ void QToolBarLayout::setExpanded(bool exp) layoutActions(rect.size()); } } - layout->layoutState.toolBarAreaLayout.apply(true); + layout->layoutState.toolBarAreaLayout.apply(animated); } } diff --git a/src/gui/widgets/qtoolbarlayout_p.h b/src/gui/widgets/qtoolbarlayout_p.h index fe81d2f..bb40e215 100644 --- a/src/gui/widgets/qtoolbarlayout_p.h +++ b/src/gui/widgets/qtoolbarlayout_p.h @@ -111,8 +111,8 @@ public: void updateMarginAndSpacing(); bool hasExpandFlag() const; -public slots: - void setExpanded(bool b); +public Q_SLOTS: + void setExpanded(bool b, bool animated = true); private: QList<QToolBarItem*> items; diff --git a/src/gui/widgets/qwidgetanimator.cpp b/src/gui/widgets/qwidgetanimator.cpp index beb6be2..972e07b 100644 --- a/src/gui/widgets/qwidgetanimator.cpp +++ b/src/gui/widgets/qwidgetanimator.cpp @@ -93,7 +93,7 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo if (it != m_animation_map.constEnd() && (*it)->endValue().toRect() == final_geometry) return; - QPropertyAnimation *anim = new QPropertyAnimation(widget, "geometry"); + QPropertyAnimation *anim = new QPropertyAnimation(widget, "geometry", widget); anim->setDuration(animate ? 200 : 0); anim->setEasingCurve(QEasingCurve::InOutQuad); anim->setEndValue(final_geometry); diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index f155770..d903f81 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -52,6 +52,8 @@ #include "qaudiodeviceinfo_alsa_p.h" +QT_BEGIN_NAMESPACE + QAudioDeviceInfoPrivate::QAudioDeviceInfoPrivate(QByteArray dev, QAudio::Mode mode) { handle = 0; @@ -391,4 +393,4 @@ QByteArray QAudioDeviceInfoPrivate::defaultOutputDevice() return QByteArray("default"); } - +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h index ca8179f..5f17b71 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h @@ -65,6 +65,8 @@ #include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -109,5 +111,7 @@ private: snd_pcm_hw_params_t *params; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp index 58e7f8b..21b0e9c 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp @@ -55,6 +55,8 @@ #include <mmsystem.h> #include "qaudiodeviceinfo_win32_p.h" +QT_BEGIN_NAMESPACE + // For mingw toolchain mmsystem.h only defines half the defines, so add if needed. #ifndef WAVE_FORMAT_44M08 #define WAVE_FORMAT_44M08 0x00000100 @@ -376,3 +378,4 @@ QByteArray QAudioDeviceInfoPrivate::defaultInputDevice() return QByteArray("default"); } +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.h b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h index 9e0d1ea..f5f575b 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.h +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h @@ -63,6 +63,8 @@ #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -105,4 +107,6 @@ private: QList<QAudioFormat::SampleType> typez; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp index 595c9df..0b3d337 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.cpp +++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp @@ -53,6 +53,8 @@ #include <QtCore/qcoreapplication.h> #include "qaudioinput_alsa_p.h" +QT_BEGIN_NAMESPACE + //#define DEBUG_AUDIO 1 QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device, const QAudioFormat& audioFormat): @@ -686,3 +688,4 @@ void InputPrivate::trigger() emit readyRead(); } +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h index 3f7c85e..400157e 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.h +++ b/src/multimedia/audio/qaudioinput_alsa_p.h @@ -67,6 +67,8 @@ #include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class InputPrivate; class QAudioInputPrivate : public QAbstractAudioInput @@ -148,4 +150,6 @@ private: QAudioInputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp index 6da80ee..fd6984f 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.cpp +++ b/src/multimedia/audio/qaudioinput_win32_p.cpp @@ -53,6 +53,8 @@ #include "qaudioinput_win32_p.h" +QT_BEGIN_NAMESPACE + //#define DEBUG_AUDIO 1 static CRITICAL_SECTION waveInCriticalSection; @@ -539,3 +541,4 @@ void InputPrivate::trigger() emit readyRead(); } +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudioinput_win32_p.h b/src/multimedia/audio/qaudioinput_win32_p.h index 7f7b823..f14ce96 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.h +++ b/src/multimedia/audio/qaudioinput_win32_p.h @@ -68,6 +68,8 @@ #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class QAudioInputPrivate : public QAbstractAudioInput { Q_OBJECT @@ -149,4 +151,6 @@ private: QAudioInputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp index 5997d31..a5ac177 100644 --- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp +++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp @@ -53,6 +53,8 @@ #include <QtCore/qcoreapplication.h> #include "qaudiooutput_alsa_p.h" +QT_BEGIN_NAMESPACE + //#define DEBUG_AUDIO 1 QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat): @@ -704,3 +706,5 @@ qint64 OutputPrivate::writeData(const char* data, qint64 len) return written; } + +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.h b/src/multimedia/audio/qaudiooutput_alsa_p.h index 295927b..068428d 100644 --- a/src/multimedia/audio/qaudiooutput_alsa_p.h +++ b/src/multimedia/audio/qaudiooutput_alsa_p.h @@ -66,6 +66,8 @@ #include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class OutputPrivate; class QAudioOutputPrivate : public QAbstractAudioOutput @@ -156,4 +158,6 @@ private: QAudioOutputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp index bace4a6..99229df 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.cpp +++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp @@ -54,6 +54,8 @@ //#define DEBUG_AUDIO 1 +QT_BEGIN_NAMESPACE + static CRITICAL_SECTION waveOutCriticalSection; QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat): @@ -502,3 +504,5 @@ qint64 OutputPrivate::writeData(const char* data, qint64 len) } return written; } + +QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h index c6c025f..3906d9d 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.h +++ b/src/multimedia/audio/qaudiooutput_win32_p.h @@ -67,6 +67,8 @@ #include <QtMultimedia/qaudioengine.h> +QT_BEGIN_NAMESPACE + class QAudioOutputPrivate : public QAbstractAudioOutput { Q_OBJECT @@ -149,4 +151,6 @@ private: QAudioOutputPrivate *audioDevice; }; +QT_END_NAMESPACE + #endif diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro index 7d38afa..53fcb49 100644 --- a/src/multimedia/multimedia.pro +++ b/src/multimedia/multimedia.pro @@ -1,11 +1,12 @@ -TARGET = QtMultimedia -QPRO_PWD = $$PWD -QT = core -DEFINES += QT_BUILD_MULTIMEDIA_LIB +TARGET = QtMultimedia +QPRO_PWD = $$PWD +QT = core gui -win32-msvc*:QMAKE_LIBS += $$QMAKE_LIBS_CORE +DEFINES += QT_BUILD_MULTIMEDIA_LIB QT_NO_USING_NAMESPACE -unix:QMAKE_PKGCONFIG_REQUIRES = QtCore +unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui include(../qbase.pri) + include(audio/audio.pri) +include(video/video.pri) diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp new file mode 100644 index 0000000..702b9a0 --- /dev/null +++ b/src/multimedia/video/qabstractvideobuffer.cpp @@ -0,0 +1,199 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qabstractvideobuffer_p.h" + +#include <qvariant.h> + +QT_BEGIN_NAMESPACE + +/*! + \class QAbstractVideoBuffer + \brief The QAbstractVideoBuffer class is an abstraction for video data. + \preliminary + \since 4.6 + + The QVideoFrame class makes use of a QAbstractVideoBuffer internally to reference a buffer of + video data. Creating a subclass of QAbstractVideoBuffer will allow you to construct video + frames from preallocated or static buffers. + + The contents of a buffer can be accessed by mapping the buffer to memory using the map() + function which returns a pointer to memory containing the contents of the the video buffer. + The memory returned by map() is released by calling the unmap() function. + + The handle() of a buffer may also be used to manipulate it's contents using type specific APIs. + The type of a buffer's handle is given by the handleType() function. + + \sa QVideoFrame +*/ + +/*! + \enum QAbstractVideoBuffer::HandleType + + Identifies the type of a video buffers handle. + + \value NoHandle The buffer has no handle, its data can only be accessed by mapping the buffer. + \value GLTextureHandle The handle of the buffer is an OpenGL texture ID. + \value UserHandle Start value for user defined handle types. + + \sa handleType() +*/ + +/*! + \enum QAbstractVideoBuffer::MapMode + + Enumerates how a video buffer's data is mapped to memory. + + \value NotMapped The video buffer has is not mapped to memory. + \value ReadOnly The mapped memory is populated with data from the video buffer when mapped, but + the content of the mapped memory may be discarded when unmapped. + \value WriteOnly The mapped memory in unitialized when mapped, and the content will be used to + populate the video buffer when unmapped. + \value ReadWrite The mapped memory is populated with data from the video buffer, and the + video buffer is repopulated with the content of the mapped memory. + + \sa mapMode(), map() +*/ + +/*! + Constructs an abstract video buffer of the given \a type. +*/ + +QAbstractVideoBuffer::QAbstractVideoBuffer(HandleType type) + : d_ptr(new QAbstractVideoBufferPrivate) +{ + Q_D(QAbstractVideoBuffer); + + d->handleType = type; +} + +/*! + \internal +*/ + +QAbstractVideoBuffer::QAbstractVideoBuffer(QAbstractVideoBufferPrivate &dd, HandleType type) + : d_ptr(&dd) +{ + Q_D(QAbstractVideoBuffer); + + d->handleType = type; +} + +/*! + Destroys an abstract video buffer. +*/ + +QAbstractVideoBuffer::~QAbstractVideoBuffer() +{ + delete d_ptr; +} + +/*! + Returns the type of a video buffer's handle. + + \sa handle() +*/ + +QAbstractVideoBuffer::HandleType QAbstractVideoBuffer::handleType() const +{ + return d_func()->handleType; +} + +/*! + \fn QAbstractVideoBuffer::mapMode() const + + Returns the mode a video buffer is mapped in. + + \sa map() +*/ + +/*! + \fn QAbstractVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine) + + Maps the contents of a video buffer to memory. + + The map \a mode indicates whether the contents of the mapped memory should be read from and/or + written to the buffer. If the map mode includes the QAbstractVideoBuffer::ReadOnly flag the + mapped memory will be populated with the content of the video buffer when mapped. If the map + mode includes the QAbstractVideoBuffer::WriteOnly flag the content of the mapped memory will be + persisted in the buffer when unmapped. + + When access to the data is no longer needed be sure to call the unmap() function to release the + mapped memory. + + Returns a pointer to the mapped memory region, or a null pointer if the mapping failed. The + size in bytes of the mapped memory region is returned in \a numBytes, and the line stride in \a + bytesPerLine. + + When access to the data is no longer needed be sure to unmap() the buffer. + + \note Writing to memory that is mapped as read-only is undefined, and may result in changes + to shared data. + + \sa unmap(), mapMode() +*/ + +/*! + \fn QAbstractVideoBuffer::unmap() + + Releases the memory mapped by the map() function + + If the \l {QAbstractVideoBuffer::MapMode}{MapMode} included the QAbstractVideoBuffer::WriteOnly + flag this will persist the current content of the mapped memory to the video frame. + + \sa map() +*/ + +/*! + Returns a type specific handle to the data buffer. + + The type of the handle is given by handleType() function. + + \sa handleType() +*/ + +QVariant QAbstractVideoBuffer::handle() const +{ + return QVariant(); +} + + +QT_END_NAMESPACE diff --git a/src/multimedia/video/qabstractvideobuffer.h b/src/multimedia/video/qabstractvideobuffer.h new file mode 100644 index 0000000..3ffb87a --- /dev/null +++ b/src/multimedia/video/qabstractvideobuffer.h @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QABSTRACTVIDEOBUFFER_H +#define QABSTRACTVIDEOBUFFER_H + +#include <QtCore/qmetatype.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +class QVariant; + +class QAbstractVideoBufferPrivate; + +class Q_MULTIMEDIA_EXPORT QAbstractVideoBuffer +{ +public: + enum HandleType + { + NoHandle, + GLTextureHandle, + UserHandle = 1000 + }; + + enum MapMode + { + NotMapped = 0x00, + ReadOnly = 0x01, + WriteOnly = 0x02, + ReadWrite = ReadOnly | WriteOnly + }; + + QAbstractVideoBuffer(HandleType type); + virtual ~QAbstractVideoBuffer(); + + HandleType handleType() const; + + virtual MapMode mapMode() const = 0; + + virtual uchar *map(MapMode mode, int *numBytes, int *bytesPerLine) = 0; + virtual void unmap() = 0; + + virtual QVariant handle() const; + +protected: + QAbstractVideoBuffer(QAbstractVideoBufferPrivate &dd, HandleType type); + + QAbstractVideoBufferPrivate *d_ptr; + +private: + Q_DECLARE_PRIVATE(QAbstractVideoBuffer) + Q_DISABLE_COPY(QAbstractVideoBuffer) +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QAbstractVideoBuffer::HandleType) +Q_DECLARE_METATYPE(QAbstractVideoBuffer::MapMode) + +QT_END_HEADER + +#endif diff --git a/src/multimedia/video/qabstractvideobuffer_p.h b/src/multimedia/video/qabstractvideobuffer_p.h new file mode 100644 index 0000000..afe22b3 --- /dev/null +++ b/src/multimedia/video/qabstractvideobuffer_p.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QABSTRACTVIDEOBUFFER_P_H +#define QABSTRACTVIDEOBUFFER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtCore/qshareddata.h> +#include <QtMultimedia/qabstractvideobuffer.h> + +QT_BEGIN_NAMESPACE + +class QAbstractVideoBufferPrivate +{ +public: + QAbstractVideoBufferPrivate() + : handleType(QAbstractVideoBuffer::NoHandle) + {} + + QAbstractVideoBuffer::HandleType handleType; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/multimedia/video/qabstractvideosurface.cpp b/src/multimedia/video/qabstractvideosurface.cpp new file mode 100644 index 0000000..5309e57 --- /dev/null +++ b/src/multimedia/video/qabstractvideosurface.cpp @@ -0,0 +1,268 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qabstractvideosurface_p.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QAbstractVideoSurface + \brief The QAbstractVideoSurface class is a base class for video presentation surfaces. + \preliminary + \since 4.6 + + The QAbstractVideoSurface class defines the standard interface that video producers use to + inter-operate with video presentation surfaces. It is not supposed to be instantiated directly. + Instead, you should subclass it to create new video surfaces. + + A video surface presents a continuous stream of identically formatted frames, where the format + of each frame is compatible with a stream format supplied when starting a presentation. + + A list of pixel formats a surface can present is given by the supportedPixelFormats() function, + and the isFormatSupported() function will test if a complete video format is supported. In + some cases when a format is not supported; isFormatSupported() may suggest a similar format. + For example if a surface supports fixed set of resolutions it may suggest the smallest + supported resolution that contains the proposed resolution. + + The start() function takes a supported format and enables a video surface. Once started a + surface will begin displaying the frames it receives in the present() function. Surfaces may + hold a reference to the buffer of a presented video frame until a new frame is presented or + streaming is stopped. The stop() function will disable a surface and a release any video + buffers it holds references to. +*/ + +/*! + \enum QAbstractVideoSurface::Error + This enum describes the errors that may be returned by the error() function. + + \value NoError No error occurred. + \value UnsupportedFormatError A video format was not supported. + \value IncorrectFormatError A video frame was not compatible with the format of the surface. + \value StoppedError The surface has not been started. + \value ResourceError The surface could not allocate some resource. +*/ + +/*! + Constructs a video surface with the given \a parent. +*/ + +QAbstractVideoSurface::QAbstractVideoSurface(QObject *parent) + : QObject(*new QAbstractVideoSurfacePrivate, parent) +{ +} + +/*! + \internal +*/ + +QAbstractVideoSurface::QAbstractVideoSurface(QAbstractVideoSurfacePrivate &dd, QObject *parent) + : QObject(dd, parent) +{ +} + +/*! + Destroys a video surface. +*/ + +QAbstractVideoSurface::~QAbstractVideoSurface() +{ +} + +/*! + \fn QAbstractVideoSurface::supportedPixelFormats(QAbstractVideoBuffer::HandleType type) const + + Returns a list of pixel formats a video surface can present for a given handle \a type. + + The pixel formats returned for the QAbstractVideoBuffer::NoHandle type are valid for any buffer + that can be mapped in read-only mode. + + Types that are first in the list can be assumed to be faster to render. +*/ + +/*! + Tests a video \a format to determine if a surface can accept it. If the format isn't supported + the surface may suggest a \a similar format that is supported. + + Returns true if the format is supported by the surface, and false otherwise. +*/ + +bool QAbstractVideoSurface::isFormatSupported( + const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const +{ + Q_UNUSED(similar); + + return supportedPixelFormats(format.handleType()).contains(format.pixelFormat()); +} + +/*! + \fn QAbstractVideoSurface::supportedFormatsChanged() + + Signals that the set of formats supported by a video surface has changed. + + \sa supportedPixelFormats(), isFormatSupported() +*/ + +/*! + Returns the format of a video surface. +*/ + +QVideoSurfaceFormat QAbstractVideoSurface::surfaceFormat() const +{ + return d_func()->format; +} + +/*! + \fn QAbstractVideoSurface::surfaceFormatChanged(const QVideoSurfaceFormat &format) + + Signals that the configured \a format of a video surface has changed. + + \sa surfaceFormat(), start() +*/ + +/*! + Starts a video surface presenting \a format frames. + + Returns true if the surface was started, and false if an error occurred. + + \sa isStarted(), stop() +*/ + +bool QAbstractVideoSurface::start(const QVideoSurfaceFormat &format) +{ + Q_D(QAbstractVideoSurface); + + bool wasStarted = d->started; + + d->started = true; + d->format = format; + d->error = NoError; + + emit surfaceFormatChanged(d->format); + + if (!wasStarted) + emit startedChanged(true); + + return true; +} + +/*! + Stops a video surface presenting frames and releases any resources acquired in start(). + + \sa isStarted(), start() +*/ + +void QAbstractVideoSurface::stop() +{ + Q_D(QAbstractVideoSurface); + + if (d->started) { + d->format = QVideoSurfaceFormat(); + d->started = false; + + emit startedChanged(false); + emit surfaceFormatChanged(d->format); + } +} + +/*! + Indicates whether a video surface has been started. + + Returns true if the surface has been started, and false otherwise. +*/ + +bool QAbstractVideoSurface::isStarted() const +{ + return d_func()->started; +} + +/*! + \fn QAbstractVideoSurface::startedChanged(bool started) + + Signals that the \a started state of a video surface has changed. + + \sa isStarted(), start(), stop() +*/ + +/*! + \fn QAbstractVideoSurface::present(const QVideoFrame &frame) + + Presents a video \a frame. + + Returns true if the frame was presented, and false if an error occurred. + + Not all surfaces will block until the presentation of a frame has completed. Calling present() + on a non-blocking surface may fail if called before the presentation of a previous frame has + completed. In such cases the surface may not return to a ready state until it's had an + opportunity to process events. + + If present() fails for any other reason the surface will immediately enter the stopped state + and an error() value will be set. + + A video surface must be in the started state for present() to succeed, and the format of the + video frame must be compatible with the current video surface format. + + \sa error() +*/ + +/*! + Returns the last error that occurred. + + If a surface fails to start(), or stops unexpectedly this function can be called to discover + what error occurred. +*/ + +QAbstractVideoSurface::Error QAbstractVideoSurface::error() const +{ + return d_func()->error; +} + +/*! + Sets the value of error() to \a error. +*/ + +void QAbstractVideoSurface::setError(Error error) +{ + Q_D(QAbstractVideoSurface); + + d->error = error; +} + +QT_END_NAMESPACE diff --git a/src/multimedia/video/qabstractvideosurface.h b/src/multimedia/video/qabstractvideosurface.h new file mode 100644 index 0000000..78831f0 --- /dev/null +++ b/src/multimedia/video/qabstractvideosurface.h @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QABSTRACTVIDEOSURFACE_H +#define QABSTRACTVIDEOSURFACE_H + +#include <QtCore/qobject.h> +#include <QtMultimedia/qvideoframe.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +class QRectF; +class QVideoSurfaceFormat; + +class QAbstractVideoSurfacePrivate; + +class Q_MULTIMEDIA_EXPORT QAbstractVideoSurface : public QObject +{ + Q_OBJECT + +public: + enum Error + { + NoError, + UnsupportedFormatError, + IncorrectFormatError, + StoppedError, + ResourceError + }; + + explicit QAbstractVideoSurface(QObject *parent = 0); + ~QAbstractVideoSurface(); + + virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const = 0; + virtual bool isFormatSupported( + const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar = 0) const; + + QVideoSurfaceFormat surfaceFormat() const; + + virtual bool start(const QVideoSurfaceFormat &format); + virtual void stop(); + + bool isStarted() const; + + virtual bool present(const QVideoFrame &frame) = 0; + + Error error() const; + +Q_SIGNALS: + void startedChanged(bool started); + void surfaceFormatChanged(const QVideoSurfaceFormat &format); + void supportedFormatsChanged(); + +protected: + QAbstractVideoSurface(QAbstractVideoSurfacePrivate &dd, QObject *parent); + + void setError(Error error); + +private: + Q_DECLARE_PRIVATE(QAbstractVideoSurface) +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif diff --git a/src/multimedia/video/qabstractvideosurface_p.h b/src/multimedia/video/qabstractvideosurface_p.h new file mode 100644 index 0000000..e401102 --- /dev/null +++ b/src/multimedia/video/qabstractvideosurface_p.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QABSTRACTVIDEOSURFACE_P_H +#define QABSTRACTVIDEOSURFACE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtMultimedia/qabstractvideosurface.h> +#include <QtMultimedia/qvideosurfaceformat.h> +#include <QtCore/private/qobject_p.h> + +QT_BEGIN_NAMESPACE + +class QAbstractVideoSurfacePrivate : public QObjectPrivate +{ +public: + QAbstractVideoSurfacePrivate() + : error(QAbstractVideoSurface::NoError) + , started(false) + { + } + + mutable QAbstractVideoSurface::Error error; + QVideoSurfaceFormat format; + bool started; + +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/multimedia/video/qimagevideobuffer.cpp b/src/multimedia/video/qimagevideobuffer.cpp new file mode 100644 index 0000000..6af0c41 --- /dev/null +++ b/src/multimedia/video/qimagevideobuffer.cpp @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qimagevideobuffer_p.h" + +#include <private/qabstractvideobuffer_p.h> + +#include <qimage.h> +#include <qvariant.h> + +QT_BEGIN_NAMESPACE + +class QImageVideoBufferPrivate : public QAbstractVideoBufferPrivate +{ +public: + QImageVideoBufferPrivate() + : mapMode(QAbstractVideoBuffer::NotMapped) + { + } + + QAbstractVideoBuffer::MapMode mapMode; + QImage image; +}; + +QImageVideoBuffer::QImageVideoBuffer(const QImage &image) + : QAbstractVideoBuffer(*new QImageVideoBufferPrivate, NoHandle) +{ + Q_D(QImageVideoBuffer); + + d->image = image; +} + +QImageVideoBuffer::~QImageVideoBuffer() +{ +} + +QAbstractVideoBuffer::MapMode QImageVideoBuffer::mapMode() const +{ + return d_func()->mapMode; +} + +uchar *QImageVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine) +{ + Q_D(QImageVideoBuffer); + + if (d->mapMode == NotMapped && d->image.bits() && mode != NotMapped) { + d->mapMode = mode; + + if (numBytes) + *numBytes = d->image.numBytes(); + + if (bytesPerLine) + *bytesPerLine = d->image.bytesPerLine(); + + return d->image.bits(); + } else { + return 0; + } +} + +void QImageVideoBuffer::unmap() +{ + Q_D(QImageVideoBuffer); + + d->mapMode = NotMapped; +} + +QT_END_NAMESPACE diff --git a/src/multimedia/video/qimagevideobuffer_p.h b/src/multimedia/video/qimagevideobuffer_p.h new file mode 100644 index 0000000..dcbc0b3 --- /dev/null +++ b/src/multimedia/video/qimagevideobuffer_p.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QIMAGEVIDEOBUFFER_P_H +#define QIMAGEVIDEOBUFFER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtMultimedia/qabstractvideobuffer.h> + +QT_BEGIN_NAMESPACE + +class QImage; + +class QImageVideoBufferPrivate; + +class Q_MULTIMEDIA_EXPORT QImageVideoBuffer : public QAbstractVideoBuffer +{ + Q_DECLARE_PRIVATE(QImageVideoBuffer) +public: + QImageVideoBuffer(const QImage &image); + ~QImageVideoBuffer(); + + MapMode mapMode() const; + + uchar *map(MapMode mode, int *numBytes, int *bytesPerLine); + void unmap(); +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/multimedia/video/qmemoryvideobuffer.cpp b/src/multimedia/video/qmemoryvideobuffer.cpp new file mode 100644 index 0000000..f457820 --- /dev/null +++ b/src/multimedia/video/qmemoryvideobuffer.cpp @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmemoryvideobuffer_p.h" + +#include <private/qabstractvideobuffer_p.h> +#include <qbytearray.h> + +QT_BEGIN_NAMESPACE + +class QMemoryVideoBufferPrivate : public QAbstractVideoBufferPrivate +{ +public: + QMemoryVideoBufferPrivate() + : bytesPerLine(0) + , mapMode(QAbstractVideoBuffer::NotMapped) + { + } + + int bytesPerLine; + QAbstractVideoBuffer::MapMode mapMode; + QByteArray data; +}; + +/*! + \class QMemoryVideoBuffer + \brief The QMemoryVideoBuffer class provides a system memory allocated video data buffer. + \internal + + QMemoryVideoBuffer is the default video buffer for allocating system memory. It may be used to + allocate memory for a QVideoFrame without implementing your own QAbstractVideoBuffer. +*/ + +/*! + Constructs a video buffer with an image stride of \a bytesPerLine from a byte \a array. +*/ +QMemoryVideoBuffer::QMemoryVideoBuffer(const QByteArray &array, int bytesPerLine) + : QAbstractVideoBuffer(*new QMemoryVideoBufferPrivate, NoHandle) +{ + Q_D(QMemoryVideoBuffer); + + d->data = array; + d->bytesPerLine = bytesPerLine; +} + +/*! + Destroys a system memory allocated video buffer. +*/ +QMemoryVideoBuffer::~QMemoryVideoBuffer() +{ +} + +/*! + \reimp +*/ +QAbstractVideoBuffer::MapMode QMemoryVideoBuffer::mapMode() const +{ + return d_func()->mapMode; +} + +/*! + \reimp +*/ +uchar *QMemoryVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine) +{ + Q_D(QMemoryVideoBuffer); + + if (d->mapMode == NotMapped && d->data.data() && mode != NotMapped) { + d->mapMode = mode; + + if (numBytes) + *numBytes = d->data.size(); + + if (bytesPerLine) + *bytesPerLine = d->bytesPerLine; + + return reinterpret_cast<uchar *>(d->data.data()); + } else { + return 0; + } +} + +/*! + \reimp +*/ +void QMemoryVideoBuffer::unmap() +{ + d_func()->mapMode = NotMapped; +} + +QT_END_NAMESPACE diff --git a/src/multimedia/video/qmemoryvideobuffer_p.h b/src/multimedia/video/qmemoryvideobuffer_p.h new file mode 100644 index 0000000..e84c4a1 --- /dev/null +++ b/src/multimedia/video/qmemoryvideobuffer_p.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMEMORYVIDEOBUFFER_P_H +#define QMEMORYVIDEOBUFFER_P_H + +#include <QtMultimedia/qabstractvideobuffer.h> + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +class QMemoryVideoBufferPrivate; + +class Q_MULTIMEDIA_EXPORT QMemoryVideoBuffer : public QAbstractVideoBuffer +{ + Q_DECLARE_PRIVATE(QMemoryVideoBuffer) +public: + QMemoryVideoBuffer(const QByteArray &data, int bytesPerLine); + ~QMemoryVideoBuffer(); + + MapMode mapMode() const; + + uchar *map(MapMode mode, int *numBytes, int *bytesPerLine); + void unmap(); +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp new file mode 100644 index 0000000..c3584b7 --- /dev/null +++ b/src/multimedia/video/qvideoframe.cpp @@ -0,0 +1,742 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qvideoframe.h" + +#include <private/qimagevideobuffer_p.h> +#include <private/qmemoryvideobuffer_p.h> + +#include <qimage.h> +#include <qpair.h> +#include <qsize.h> +#include <qvariant.h> +#include <qvector.h> + +QT_BEGIN_NAMESPACE + +class QVideoFramePrivate : public QSharedData +{ +public: + QVideoFramePrivate() + : startTime(-1) + , endTime(-1) + , data(0) + , numBytes(0) + , bytesPerLine(0) + , pixelFormat(QVideoFrame::Format_Invalid) + , fieldType(QVideoFrame::ProgressiveFrame) + , buffer(0) + { + } + + QVideoFramePrivate(const QSize &size, QVideoFrame::PixelFormat format) + : size(size) + , startTime(-1) + , endTime(-1) + , data(0) + , numBytes(0) + , bytesPerLine(0) + , pixelFormat(format) + , fieldType(QVideoFrame::ProgressiveFrame) + , buffer(0) + { + } + + ~QVideoFramePrivate() + { + delete buffer; + } + + QSize size; + qint64 startTime; + qint64 endTime; + uchar *data; + int numBytes; + int bytesPerLine; + QVideoFrame::PixelFormat pixelFormat; + QVideoFrame::FieldType fieldType; + QAbstractVideoBuffer *buffer; + +private: + Q_DISABLE_COPY(QVideoFramePrivate) +}; + +/*! + \class QVideoFrame + \brief The QVideoFrame class provides a representation of a frame of video data. + \preliminary + \since 4.6 + + A QVideoFrame encapsulates the data of a video frame, and information about the frame. + + The contents of a video frame can be mapped to memory using the map() function. While + mapped the video data can accessed using the bits() function which returns a pointer to a + buffer, the total size of which is given by the numBytes(), and the size of each line is given + by bytesPerLine(). The return value of the handle() function may be used to access frame data + using the internal buffer's native APIs. + + The video data in a QVideoFrame is encapsulated in a QAbstractVideoBuffer. A QVideoFrame + may be constructed from any buffer type by subclassing the QAbstractVideoBuffer class. + + \note QVideoFrame is explicitly shared, any change made to video frame will also apply to any + copies. +*/ + +/*! + \enum QVideoFrame::PixelFormat + + Enumerates video data types. + + \value Format_Invalid + The frame is invalid. + + \value Format_ARGB32 + The frame is stored using a 32-bit ARGB format (0xAARRGGBB). This is equivalent to + QImage::Format_ARGB32. + + \value Format_ARGB32_Premultiplied + The frame stored using a premultiplied 32-bit ARGB format (0xAARRGGBB). This is equivalent + to QImage::Format_ARGB32_Premultiplied. + + \value Format_RGB32 + The frame stored using a 32-bit RGB format (0xffRRGGBB). This is equivalent to + QImage::Format_RGB32 + + \value Format_RGB24 + The frame is stored using a 24-bit RGB format (8-8-8). This is equivalent to + QImage::Format_RGB888 + + \value Format_RGB565 + The frame is stored using a 16-bit RGB format (5-6-5). This is equivalent to + QImage::Format_RGB16. + + \value Format_RGB555 + The frame is stored using a 16-bit RGB format (5-5-5). This is equivalent to + QImage::Format_RGB555. + + \value Format_ARGB8565_Premultiplied + The frame is stored using a 24-bit premultiplied ARGB format (8-6-6-5). + + \value Format_BGRA32 + The frame is stored using a 32-bit ARGB format (0xBBGGRRAA). + + \value Format_BGRA32_Premultiplied + The frame is stored using a premultiplied 32bit BGRA format. + + \value Format_BGR32 + The frame is stored using a 32-bit BGR format (0xBBGGRRff). + + \value Format_BGR24 + The frame is stored using a 24-bit BGR format (0xBBGGRR). + + \value Format_BGR565 + The frame is stored using a 16-bit BGR format (5-6-5). + + \value Format_BGR555 + The frame is stored using a 16-bit BGR format (5-5-5). + + \value Format_BGRA5658_Premultiplied + The frame is stored using a 24-bit premultiplied BGRA format (5-6-5-8). + + \value Format_AYUV444 + The frame is stored using a packed 32-bit AYUV format (0xAAYYUUVV). + + \value Format_AYUV444_Premultiplied + The frame is stored using a packed premultiplied 32-bit AYUV format (0xAAYYUUVV). + + \value Format_YUV444 + The frame is stored using a 24-bit packed YUV format (8-8-8). + + \value Format_YUV420P + The frame is stored using an 8-bit per component planar YUV format with the U and V planes + horizontally and vertically sub-sampled, i.e. the height and width of the U and V planes are + half that of the Y plane. + + \value Format_YV12 + The frame is stored using an 8-bit per component planar YVU format with the V and U planes + horizontally and vertically sub-sampled, i.e. the height and width of the V and U planes are + half that of the Y plane. + + \value Format_UYVY + The frame is stored using an 8-bit per component packed YUV format with the U and V planes + horizontally sub-sampled (U-Y-V-Y), i.e. two horizontally adjacent pixels are stored as a 32-bit + macropixel which has a Y value for each pixel and common U and V values. + + \value Format_YUYV + The frame is stored using an 8-bit per component packed YUV format with the U and V planes + horizontally sub-sampled (Y-U-Y-V), i.e. two horizontally adjacent pixels are stored as a 32-bit + macropixel which has a Y value for each pixel and common U and V values. + + \value Format_NV12 + The frame is stored using an 8-bit per component semi-planar YUV format with a Y plane (Y) + followed by a horizontally and vertically sub-sampled, packed UV plane (U-V). + + \value Format_NV21 + The frame is stored using an 8-bit per component semi-planar YUV format with a Y plane (Y) + followed by a horizontally and vertically sub-sampled, packed VU plane (V-U). + + \value Format_IMC1 + The frame is stored using an 8-bit per component planar YUV format with the U and V planes + horizontally and vertically sub-sampled. This is similar to the Format_YUV420P type, except + that the bytes per line of the U and V planes are padded out to the same stride as the Y plane. + + \value Format_IMC2 + The frame is stored using an 8-bit per component planar YUV format with the U and V planes + horizontally and vertically sub-sampled. This is similar to the Format_YUV420P type, except + that the lines of the U and V planes are interleaved, i.e. each line of U data is followed by a + line of V data creating a single line of the same stride as the Y data. + + \value Format_IMC3 + The frame is stored using an 8-bit per component planar YVU format with the V and U planes + horizontally and vertically sub-sampled. This is similar to the Format_YV12 type, except that + the bytes per line of the V and U planes are padded out to the same stride as the Y plane. + + \value Format_IMC4 + The frame is stored using an 8-bit per component planar YVU format with the V and U planes + horizontally and vertically sub-sampled. This is similar to the Format_YV12 type, except that + the lines of the V and U planes are interleaved, i.e. each line of V data is followed by a line + of U data creating a single line of the same stride as the Y data. + + \value Format_Y8 + The frame is stored using an 8-bit greyscale format. + + \value Format_Y16 + The frame is stored using a 16-bit linear greyscale format. Little endian. + + \value Format_User + Start value for user defined pixel formats. +*/ + +/*! + \enum QVideoFrame::FieldType + + Specifies the field an interlaced video frame belongs to. + + \value ProgressiveFrame The frame is not interlaced. + \value TopField The frame contains a top field. + \value BottomField The frame contains a bottom field. + \value InterlacedFrame The frame contains a merged top and bottom field. +*/ + +/*! + Constructs a null video frame. +*/ + +QVideoFrame::QVideoFrame() + : d(new QVideoFramePrivate) +{ +} + +/*! + Constructs a video frame from a \a buffer of the given pixel \a format and \a size in pixels. + + \note This doesn't increment the reference count of the video buffer. +*/ + +QVideoFrame::QVideoFrame( + QAbstractVideoBuffer *buffer, const QSize &size, PixelFormat format) + : d(new QVideoFramePrivate(size, format)) +{ + d->buffer = buffer; +} + +/*! + Constructs a video frame of the given pixel \a format and \a size in pixels. + + The \a bytesPerLine (stride) is the length of each scan line in bytes, and \a bytes is the total + number of bytes that must be allocated for the frame. +*/ + +QVideoFrame::QVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format) + : d(new QVideoFramePrivate(size, format)) +{ + if (bytes > 0) { + QByteArray data; + data.resize(bytes); + + // Check the memory was successfully allocated. + if (!data.isEmpty()) + d->buffer = new QMemoryVideoBuffer(data, bytesPerLine); + } +} + +/*! + Constructs a video frame from an \a image. + + \note This will construct an invalid video frame if there is no frame type equivalent to the + image format. + + \sa equivalentPixelFormat() +*/ + +QVideoFrame::QVideoFrame(const QImage &image) + : d(new QVideoFramePrivate( + image.size(), equivalentPixelFormat(image.format()))) +{ + if (d->pixelFormat != Format_Invalid) + d->buffer = new QImageVideoBuffer(image); +} + +/*! + Constructs a copy of \a other. +*/ + +QVideoFrame::QVideoFrame(const QVideoFrame &other) + : d(other.d) +{ +} + +/*! + Assigns the contents of \a other to a video frame. +*/ + +QVideoFrame &QVideoFrame::operator =(const QVideoFrame &other) +{ + d = other.d; + + return *this; +} + +/*! + Destroys a video frame. +*/ + +QVideoFrame::~QVideoFrame() +{ +} + +/*! + Identifies whether a video frame is valid. + + An invalid frame has no video buffer associated with it. + + Returns true if the frame is valid, and false if it is not. +*/ + +bool QVideoFrame::isValid() const +{ + return d->buffer != 0; +} + +/*! + Returns the color format of a video frame. +*/ + +QVideoFrame::PixelFormat QVideoFrame::pixelFormat() const +{ + return d->pixelFormat; +} + +/*! + Returns the type of a video frame's handle. +*/ + +QAbstractVideoBuffer::HandleType QVideoFrame::handleType() const +{ + return d->buffer ? d->buffer->handleType() : QAbstractVideoBuffer::NoHandle; +} + +/*! + Returns the size of a video frame. +*/ + +QSize QVideoFrame::size() const +{ + return d->size; +} + +/*! + Returns the width of a video frame. +*/ + +int QVideoFrame::width() const +{ + return d->size.width(); +} + +/*! + Returns the height of a video frame. +*/ + +int QVideoFrame::height() const +{ + return d->size.height(); +} + +/*! + Returns the field an interlaced video frame belongs to. + + If the video is not interlaced this will return WholeFrame. +*/ + +QVideoFrame::FieldType QVideoFrame::fieldType() const +{ + return d->fieldType; +} + +/*! + Sets the \a field an interlaced video frame belongs to. +*/ + +void QVideoFrame::setFieldType(QVideoFrame::FieldType field) +{ + d->fieldType = field; +} + +/*! + Identifies if a video frame's contents are currently mapped to system memory. + + This is a convenience function which checks that the \l {QAbstractVideoBuffer::MapMode}{MapMode} + of the frame is not equal to QAbstractVideoBuffer::NotMapped. + + Returns true if the contents of the video frame are mapped to system memory, and false + otherwise. + + \sa mapMode() QAbstractVideoBuffer::MapMode +*/ + +bool QVideoFrame::isMapped() const +{ + return d->buffer != 0 && d->buffer->mapMode() != QAbstractVideoBuffer::NotMapped; +} + +/*! + Identifies if the mapped contents of a video frame will be persisted when the frame is unmapped. + + This is a convenience function which checks if the \l {QAbstractVideoBuffer::MapMode}{MapMode} + contains the QAbstractVideoBuffer::WriteOnly flag. + + Returns true if the video frame will be updated when unmapped, and false otherwise. + + \note The result of altering the data of a frame that is mapped in read-only mode is undefined. + Depending on the buffer implementation the changes may be persisted, or worse alter a shared + buffer. + + \sa mapMode(), QAbstractVideoBuffer::MapMode +*/ + +bool QVideoFrame::isWritable() const +{ + return d->buffer != 0 && (d->buffer->mapMode() & QAbstractVideoBuffer::WriteOnly); +} + +/*! + Identifies if the mapped contents of a video frame were read from the frame when it was mapped. + + This is a convenience function which checks if the \l {QAbstractVideoBuffer::MapMode}{MapMode} + contains the QAbstractVideoBuffer::WriteOnly flag. + + Returns true if the contents of the mapped memory were read from the video frame, and false + otherwise. + + \sa mapMode(), QAbstractVideoBuffer::MapMode +*/ + +bool QVideoFrame::isReadable() const +{ + return d->buffer != 0 && (d->buffer->mapMode() & QAbstractVideoBuffer::ReadOnly); +} + +/*! + Returns the mode a video frame was mapped to system memory in. + + \sa map(), QAbstractVideoBuffer::MapMode +*/ + +QAbstractVideoBuffer::MapMode QVideoFrame::mapMode() const +{ + return d->buffer != 0 ? d->buffer->mapMode() : QAbstractVideoBuffer::NotMapped; +} + +/*! + Maps the contents of a video frame to memory. + + The map \a mode indicates whether the contents of the mapped memory should be read from and/or + written to the frame. If the map mode includes the QAbstractVideoBuffer::ReadOnly flag the + mapped memory will be populated with the content of the video frame when mapped. If the map + mode inclues the QAbstractVideoBuffer::WriteOnly flag the content of the mapped memory will be + persisted in the frame when unmapped. + + While mapped the contents of a video frame can be accessed directly through the pointer returned + by the bits() function. + + When access to the data is no longer needed be sure to call the unmap() function to release the + mapped memory. + + Returns true if the buffer was mapped to memory in the given \a mode and false otherwise. + + \sa unmap(), mapMode(), bits() +*/ + +bool QVideoFrame::map(QAbstractVideoBuffer::MapMode mode) +{ + if (d->buffer != 0 && d->data == 0) { + Q_ASSERT(d->bytesPerLine == 0); + Q_ASSERT(d->numBytes == 0); + + d->data = d->buffer->map(mode, &d->numBytes, &d->bytesPerLine); + + return d->data != 0; + } + + return false; +} + +/*! + Releases the memory mapped by the map() function. + + If the \l {QAbstractVideoBuffer::MapMode}{MapMode} included the QAbstractVideoBuffer::WriteOnly + flag this will persist the current content of the mapped memory to the video frame. + + \sa map() +*/ + +void QVideoFrame::unmap() +{ + if (d->data != 0) { + d->numBytes = 0; + d->bytesPerLine = 0; + d->data = 0; + + d->buffer->unmap(); + } +} + +/*! + Returns the number of bytes in a scan line. + + \note This is the bytes per line of the first plane only. The bytes per line of subsequent + planes should be calculated as per the frame type. + + This value is only valid while the frame data is \l {map()}{mapped}. + + \sa bits(), map(), numBytes() +*/ + +int QVideoFrame::bytesPerLine() const +{ + return d->bytesPerLine; +} + +/*! + Returns a pointer to the start of the frame data buffer. + + This value is only valid while the frame data is \l {map()}{mapped}. + + \sa map(), numBytes(), bytesPerLine() +*/ + +uchar *QVideoFrame::bits() +{ + return d->data; +} + +/*! + Returns a pointer to the start of the frame data buffer. + + This value is only valid while the frame data is \l {map()}{mapped}. + + \sa map(), numBytes(), bytesPerLine() +*/ + +const uchar *QVideoFrame::bits() const +{ + return d->data; +} + +/*! + Returns the number of bytes occupied by the frame data. + + This value is only valid while the frame data is \l {map()}{mapped}. + + \sa map() +*/ + +int QVideoFrame::numBytes() const +{ + return d->numBytes; +} + +/*! + Returns a type specific handle to a video frame's buffer. + + For an OpenGL texture this would be the texture ID. + + \sa QAbstractVideoBuffer::handle() +*/ + +QVariant QVideoFrame::handle() const +{ + return d->buffer != 0 ? d->buffer->handle() : QVariant(); +} + +/*! + Returns the presentation time when the frame should be displayed. +*/ + +qint64 QVideoFrame::startTime() const +{ + return d->startTime; +} + +/*! + Sets the presentation \a time when the frame should be displayed. +*/ + +void QVideoFrame::setStartTime(qint64 time) +{ + d->startTime = time; +} + +/*! + Returns the presentation time when a frame should stop being displayed. +*/ + +qint64 QVideoFrame::endTime() const +{ + return d->endTime; +} + +/*! + Sets the presentation \a time when a frame should stop being displayed. +*/ + +void QVideoFrame::setEndTime(qint64 time) +{ + d->endTime = time; +} + +/*! + Returns an video pixel format equivalent to an image \a format. If there is no equivalent + format QVideoFrame::InvalidType is returned instead. +*/ + +QVideoFrame::PixelFormat QVideoFrame::equivalentPixelFormat(QImage::Format format) +{ + switch (format) { + case QImage::Format_Invalid: + case QImage::Format_Mono: + case QImage::Format_MonoLSB: + case QImage::Format_Indexed8: + return Format_Invalid; + case QImage::Format_RGB32: + return Format_RGB32; + case QImage::Format_ARGB32: + return Format_ARGB32; + case QImage::Format_ARGB32_Premultiplied: + return Format_ARGB32_Premultiplied; + case QImage::Format_RGB16: + return Format_RGB565; + case QImage::Format_ARGB8565_Premultiplied: + case QImage::Format_RGB666: + case QImage::Format_ARGB6666_Premultiplied: + return Format_Invalid; + case QImage::Format_RGB555: + return Format_RGB555; + case QImage::Format_ARGB8555_Premultiplied: + return Format_Invalid; + case QImage::Format_RGB888: + return Format_RGB24; + case QImage::Format_RGB444: + case QImage::Format_ARGB4444_Premultiplied: + return Format_Invalid; + case QImage::NImageFormats: + return Format_Invalid; + } + return Format_Invalid; +} + +/*! + Returns an image format equivalent to a video frame pixel \a format. If there is no equivalent + format QImage::Format_Invalid is returned instead. +*/ + +QImage::Format QVideoFrame::equivalentImageFormat(PixelFormat format) +{ + switch (format) { + case Format_Invalid: + return QImage::Format_Invalid; + case Format_ARGB32: + return QImage::Format_ARGB32; + case Format_ARGB32_Premultiplied: + return QImage::Format_ARGB32_Premultiplied; + case Format_RGB32: + return QImage::Format_RGB32; + case Format_RGB24: + return QImage::Format_RGB888; + case Format_RGB565: + return QImage::Format_RGB16; + case Format_RGB555: + return QImage::Format_RGB555; + case Format_ARGB8565_Premultiplied: + return QImage::Format_ARGB8565_Premultiplied; + case Format_BGRA32: + case Format_BGRA32_Premultiplied: + case Format_BGR32: + case Format_BGR24: + return QImage::Format_Invalid; + case Format_BGR565: + case Format_BGR555: + case Format_BGRA5658_Premultiplied: + case Format_AYUV444: + case Format_AYUV444_Premultiplied: + case Format_YUV444: + case Format_YUV420P: + case Format_YV12: + case Format_UYVY: + case Format_YUYV: + case Format_NV12: + case Format_NV21: + case Format_IMC1: + case Format_IMC2: + case Format_IMC3: + case Format_IMC4: + case Format_Y8: + case Format_Y16: + return QImage::Format_Invalid; + case Format_User: + return QImage::Format_Invalid; + } + return QImage::Format_Invalid; +} + +QT_END_NAMESPACE + diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h new file mode 100644 index 0000000..5bd9ac3 --- /dev/null +++ b/src/multimedia/video/qvideoframe.h @@ -0,0 +1,169 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QVIDEOFRAME_H +#define QVIDEOFRAME_H + +#include <QtCore/qmetatype.h> +#include <QtCore/qshareddata.h> +#include <QtGui/qimage.h> +#include <QtMultimedia/qabstractvideobuffer.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +class QSize; +class QVariant; + +class QVideoFramePrivate; + +class Q_MULTIMEDIA_EXPORT QVideoFrame +{ +public: + enum FieldType + { + ProgressiveFrame, + TopField, + BottomField, + InterlacedFrame + }; + + enum PixelFormat + { + Format_Invalid, + Format_ARGB32, + Format_ARGB32_Premultiplied, + Format_RGB32, + Format_RGB24, + Format_RGB565, + Format_RGB555, + Format_ARGB8565_Premultiplied, + Format_BGRA32, + Format_BGRA32_Premultiplied, + Format_BGR32, + Format_BGR24, + Format_BGR565, + Format_BGR555, + Format_BGRA5658_Premultiplied, + + Format_AYUV444, + Format_AYUV444_Premultiplied, + Format_YUV444, + Format_YUV420P, + Format_YV12, + Format_UYVY, + Format_YUYV, + Format_NV12, + Format_NV21, + Format_IMC1, + Format_IMC2, + Format_IMC3, + Format_IMC4, + Format_Y8, + Format_Y16, + + Format_User = 1000 + }; + + QVideoFrame(); + QVideoFrame(QAbstractVideoBuffer *buffer, const QSize &size, PixelFormat format); + QVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format); + QVideoFrame(const QImage &image); + QVideoFrame(const QVideoFrame &other); + ~QVideoFrame(); + + QVideoFrame &operator =(const QVideoFrame &other); + + bool isValid() const; + + PixelFormat pixelFormat() const; + + QAbstractVideoBuffer::HandleType handleType() const; + + QSize size() const; + int width() const; + int height() const; + + FieldType fieldType() const; + void setFieldType(FieldType); + + bool isMapped() const; + bool isReadable() const; + bool isWritable() const; + + QAbstractVideoBuffer::MapMode mapMode() const; + + bool map(QAbstractVideoBuffer::MapMode mode); + void unmap(); + + int bytesPerLine() const; + + uchar *bits(); + const uchar *bits() const; + int numBytes() const; + + QVariant handle() const; + + qint64 startTime() const; + void setStartTime(qint64 time); + + qint64 endTime() const; + void setEndTime(qint64 time); + + static PixelFormat equivalentPixelFormat(QImage::Format format); + static QImage::Format equivalentImageFormat(PixelFormat format); + +private: + QExplicitlySharedDataPointer<QVideoFramePrivate> d; +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QVideoFrame::FieldType) +Q_DECLARE_METATYPE(QVideoFrame::PixelFormat) + +QT_END_HEADER + +#endif + diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp new file mode 100644 index 0000000..7e18dda --- /dev/null +++ b/src/multimedia/video/qvideosurfaceformat.cpp @@ -0,0 +1,742 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qvideosurfaceformat.h" + +#include <qdebug.h> +#include <qmetatype.h> +#include <qpair.h> +#include <qvariant.h> +#include <qvector.h> + +QT_BEGIN_NAMESPACE + +class QVideoSurfaceFormatPrivate : public QSharedData +{ +public: + QVideoSurfaceFormatPrivate() + : pixelFormat(QVideoFrame::Format_Invalid) + , handleType(QAbstractVideoBuffer::NoHandle) + , scanLineDirection(QVideoSurfaceFormat::TopToBottom) + , pixelAspectRatio(1, 1) + , yuvColorSpace(QVideoSurfaceFormat::YCbCr_Undefined) + , frameRate(0, 0) + { + } + + QVideoSurfaceFormatPrivate( + const QSize &size, + QVideoFrame::PixelFormat format, + QAbstractVideoBuffer::HandleType type) + : pixelFormat(format) + , handleType(type) + , scanLineDirection(QVideoSurfaceFormat::TopToBottom) + , frameSize(size) + , pixelAspectRatio(1, 1) + , yuvColorSpace(QVideoSurfaceFormat::YCbCr_Undefined) + , viewport(QPoint(0, 0), size) + , frameRate(0, 0) + { + } + + QVideoSurfaceFormatPrivate(const QVideoSurfaceFormatPrivate &other) + : QSharedData(other) + , pixelFormat(other.pixelFormat) + , handleType(other.handleType) + , scanLineDirection(other.scanLineDirection) + , frameSize(other.frameSize) + , pixelAspectRatio(other.pixelAspectRatio) + , yuvColorSpace(other.yuvColorSpace) + , viewport(other.viewport) + , frameRate(other.frameRate) + , propertyNames(other.propertyNames) + , propertyValues(other.propertyValues) + { + } + + bool operator ==(const QVideoSurfaceFormatPrivate &other) const + { + if (pixelFormat == other.pixelFormat + && handleType == other.handleType + && scanLineDirection == other.scanLineDirection + && frameSize == other.frameSize + && pixelAspectRatio == other.pixelAspectRatio + && viewport == other.viewport + && frameRate == other.frameRate + && yuvColorSpace == other.yuvColorSpace + && propertyNames.count() == other.propertyNames.count()) { + for (int i = 0; i < propertyNames.count(); ++i) { + int j = other.propertyNames.indexOf(propertyNames.at(i)); + + if (j == -1 || propertyValues.at(i) != other.propertyValues.at(j)) + return false; + } + return true; + } else { + return false; + } + } + + QVideoFrame::PixelFormat pixelFormat; + QAbstractVideoBuffer::HandleType handleType; + QVideoSurfaceFormat::Direction scanLineDirection; + QSize frameSize; + QSize pixelAspectRatio; + QVideoSurfaceFormat::YuvColorSpace yuvColorSpace; + QRect viewport; + QVideoSurfaceFormat::FrameRate frameRate; + QList<QByteArray> propertyNames; + QList<QVariant> propertyValues; +}; + +/*! + \class QVideoSurfaceFormat + \brief The QVideoSurfaceFormat class specifies the stream format of a video presentation + surface. + \preliminary + \since 4.6 + + A video surface presents a stream of video frames. The surface's format describes the type of + the frames and determines how they should be presented. + + The core properties of a video stream required to setup a video surface are the pixel format + given by pixelFormat(), and the frame dimensions given by frameSize(). + + If the surface is to present frames using a frame's handle a surface format will also include + a handle type which is given by the handleType() function. + + The region of a frame that is actually displayed on a video surface is given by the viewport(). + A stream may have a viewport less than the entire region of a frame to allow for videos smaller + than the nearest optimal size of a video frame. For example the width of a frame may be + extended so that the start of each scan line is eight byte aligned. + + Other common properties are the pixelAspectRatio(), scanLineDirection(), and frameRate(). + Additionally a stream may have some additional type specific properties which are listed by the + dynamicPropertyNames() function and can be accessed using the property(), and setProperty() + functions. +*/ + +/*! + \enum QVideoSurfaceFormat::Direction + + Enumerates the layout direction of video scan lines. + + \value TopToBottom Scan lines are arranged from the top of the frame to the bottom. + \value BottomToTop Scan lines are arranged from the bottom of the frame to the top. +*/ + +/*! + \enum QVideoSurfaceFormat::ViewportMode + + Enumerates the methods for updating the stream viewport when the frame size is changed. + + \value ResetViewport The viewport is reset to cover an entire frame. + \value KeepViewport The viewport is kept within the bounds the frame. +*/ + +/*! + \enum QVideoSurfaceFormat::YuvColorSpace + + Enumerates the YUV color space of video frames. + + \value YCbCr_Undefined + No color space is specified. + + \value YCbCr_BT601 + A Y'CbCr color space defined by ITU-R recommendation BT.601 + with Y value range from 16 to 235, and Cb/Cr range from 16 to 240. + Used in standard definition video. + + \value YCbCr_BT709 + A Y'CbCr color space defined by ITU-R BT.709 with the same values range as YCbCr_BT601. Used + for HDTV. + + \value YCbCr_xvYCC601 + The BT.601 color space with the value range extended to 0 to 255. + It is backward compatibile with BT.601 and uses values outside BT.601 range to represent + wider colors range. + + \value YCbCr_xvYCC709 + The BT.709 color space with the value range extended to 0 to 255. + + \value YCbCr_JPEG + The full range Y'CbCr color space used in JPEG files. +*/ + + +/*! + \typedef QVideoSurfaceFormat::FrameRate + + A pair of integers representing the frame rate of a video stream. + + The first number is the numerator and the second the denominator. +*/ + +/*! + Constructs a null video stream format. +*/ + +QVideoSurfaceFormat::QVideoSurfaceFormat() + : d(new QVideoSurfaceFormatPrivate) +{ +} + +/*! + Contructs a description of stream which receives stream of \a type buffers with given frame + \a size and pixel \a format. +*/ + +QVideoSurfaceFormat::QVideoSurfaceFormat( + const QSize& size, QVideoFrame::PixelFormat format, QAbstractVideoBuffer::HandleType type) + : d(new QVideoSurfaceFormatPrivate(size, format, type)) +{ +} + +/*! + Constructs a copy of \a other. +*/ + +QVideoSurfaceFormat::QVideoSurfaceFormat(const QVideoSurfaceFormat &other) + : d(other.d) +{ +} + +/*! + Assigns the values of \a other to a video stream description. +*/ + +QVideoSurfaceFormat &QVideoSurfaceFormat::operator =(const QVideoSurfaceFormat &other) +{ + d = other.d; + + return *this; +} + +/*! + Destroys a video stream description. +*/ + +QVideoSurfaceFormat::~QVideoSurfaceFormat() +{ +} + +/*! + Identifies if a video surface format has a valid pixel format and frame size. + + Returns true if the format is valid, and false otherwise. +*/ + +bool QVideoSurfaceFormat::isValid() const +{ + return d->pixelFormat == QVideoFrame::Format_Invalid && d->frameSize.isValid(); +} + +/*! + Returns true if \a other is the same as a video format, and false if they are the different. +*/ + +bool QVideoSurfaceFormat::operator ==(const QVideoSurfaceFormat &other) const +{ + return d == other.d || *d == *other.d; +} + +/*! + Returns true if \a other is different to a video format, and false if they are the same. +*/ + +bool QVideoSurfaceFormat::operator !=(const QVideoSurfaceFormat &other) const +{ + return d != other.d && !(*d == *other.d); +} + +/*! + Returns the pixel format of frames in a video stream. +*/ + +QVideoFrame::PixelFormat QVideoSurfaceFormat::pixelFormat() const +{ + return d->pixelFormat; +} + +/*! + Returns the type of handle the surface uses to present the frame data. + + If the handle type is QAbstractVideoBuffer::NoHandle buffers with any handle type are valid + provided they can be \l {QAbstractVideoBuffer::map()}{mapped} with the + QAbstractVideoBuffer::ReadOnly flag. If the handleType() is not QAbstractVideoBuffer::NoHandle + then the handle type of the buffer be the same as that of the surface format. +*/ + +QAbstractVideoBuffer::HandleType QVideoSurfaceFormat::handleType() const +{ + return d->handleType; +} + +/*! + Returns the size of frames in a video stream. + + \sa frameWidth(), frameHeight() +*/ + +QSize QVideoSurfaceFormat::frameSize() const +{ + return d->frameSize; +} + +/*! + Returns the width of frames in a video stream. + + \sa frameSize(), frameHeight() +*/ + +int QVideoSurfaceFormat::frameWidth() const +{ + return d->frameSize.width(); +} + +/*! + Returns the height of frame in a video stream. +*/ + +int QVideoSurfaceFormat::frameHeight() const +{ + return d->frameSize.height(); +} + +/*! + Sets the size of frames in a video stream to \a size. + + The viewport \a mode indicates how the view port should be updated. +*/ + +void QVideoSurfaceFormat::setFrameSize(const QSize &size, ViewportMode mode) +{ + d->frameSize = size; + + switch (mode) { + case ResetViewport: + d->viewport = QRect(QPoint(0, 0), size); + break; + case KeepViewport: + d->viewport = QRect(QPoint(0, 0), size).intersected(d->viewport); + break; + } +} + +/*! + \overload + + Sets the \a width and \a height of frames in a video stream. + + The viewport \a mode indicates how the view port should be updated. +*/ + +void QVideoSurfaceFormat::setFrameSize(int width, int height, ViewportMode mode) +{ + setFrameSize(QSize(width, height), mode); +} + +/*! + Returns the viewport of a video stream. + + The viewport is the region of a video frame that is actually displayed. + + By default the viewport covers an entire frame. +*/ + +QRect QVideoSurfaceFormat::viewport() const +{ + return d->viewport; +} + +/*! + Sets the viewport of a video stream to \a viewport. +*/ + +void QVideoSurfaceFormat::setViewport(const QRect &viewport) +{ + d->viewport = viewport; +} + +/*! + Returns the direction of scan lines. +*/ + +QVideoSurfaceFormat::Direction QVideoSurfaceFormat::scanLineDirection() const +{ + return d->scanLineDirection; +} + +/*! + Sets the \a direction of scan lines. +*/ + +void QVideoSurfaceFormat::setScanLineDirection(Direction direction) +{ + d->scanLineDirection = direction; +} + +/*! + Returns the frame rate of a video stream. + + The frame rate is a rational number represented by a pair of integers. + The first integer is the numerator and the second the denominator. +*/ + +QVideoSurfaceFormat::FrameRate QVideoSurfaceFormat::frameRate() const +{ + return d->frameRate; +} + +/*! + Sets the frame \a rate of a video stream. + + The frame rate is a rational number represented by a pair of integers. + The first integer is the numerator and the second the denominator. +*/ + +void QVideoSurfaceFormat::setFrameRate(const FrameRate &rate) +{ + d->frameRate = rate; +} + +/*! + \overload + + Sets the \a numerator and \a denominator of the frame rate of a video stream. +*/ + +void QVideoSurfaceFormat::setFrameRate(int numerator, int denominator) +{ + d->frameRate = qMakePair(numerator, denominator); +} + +/*! + Returns a video stream's pixel aspect ratio. +*/ + +QSize QVideoSurfaceFormat::pixelAspectRatio() const +{ + return d->pixelAspectRatio; +} + +/*! + Sets a video stream's pixel aspect \a ratio. +*/ + +void QVideoSurfaceFormat::setPixelAspectRatio(const QSize &ratio) +{ + d->pixelAspectRatio = ratio; +} + +/*! + \overload + + Sets the \a horizontal and \a vertical elements of a video stream's pixel aspect ratio. +*/ + +void QVideoSurfaceFormat::setPixelAspectRatio(int horizontal, int vertical) +{ + d->pixelAspectRatio = QSize(horizontal, vertical); +} + +/*! + Returns a YUV color space of a video stream. +*/ + +QVideoSurfaceFormat::YuvColorSpace QVideoSurfaceFormat::yuvColorSpace() const +{ + return d->yuvColorSpace; +} + +/*! + Sets a YUV color \a space of a video stream. + It is only used with raw YUV frame types. +*/ + +void QVideoSurfaceFormat::setYuvColorSpace(QVideoSurfaceFormat::YuvColorSpace space) +{ + d->yuvColorSpace = space; +} + +/*! + Returns a suggested size in pixels for the video stream. + + This is the size of the viewport scaled according to the pixel aspect ratio. +*/ + +QSize QVideoSurfaceFormat::sizeHint() const +{ + QSize size = d->viewport.size(); + + if (d->pixelAspectRatio.height() != 0) + size.setWidth(size.width() * d->pixelAspectRatio.width() / d->pixelAspectRatio.height()); + + return size; +} + +/*! + Returns a list of video format dynamic property names. +*/ + +QList<QByteArray> QVideoSurfaceFormat::propertyNames() const +{ + return (QList<QByteArray>() + << "handleType" + << "pixelFormat" + << "frameSize" + << "frameWidth" + << "viewport" + << "scanLineDirection" + << "frameRate" + << "pixelAspectRatio" + << "sizeHint" + << "yuvColorSpace") + + d->propertyNames; +} + +/*! + Returns the value of the video format's \a name property. +*/ + +QVariant QVideoSurfaceFormat::property(const char *name) const +{ + if (qstrcmp(name, "handleType") == 0) { + return qVariantFromValue(d->handleType); + } else if (qstrcmp(name, "pixelFormat") == 0) { + return qVariantFromValue(d->pixelFormat); + } else if (qstrcmp(name, "handleType") == 0) { + return qVariantFromValue(d->handleType); + } else if (qstrcmp(name, "frameSize") == 0) { + return d->frameSize; + } else if (qstrcmp(name, "frameWidth") == 0) { + return d->frameSize.width(); + } else if (qstrcmp(name, "frameHeight") == 0) { + return d->frameSize.height(); + } else if (qstrcmp(name, "viewport") == 0) { + return d->viewport; + } else if (qstrcmp(name, "scanLineDirection") == 0) { + return qVariantFromValue(d->scanLineDirection); + } else if (qstrcmp(name, "frameRate") == 0) { + return qVariantFromValue(d->frameRate); + } else if (qstrcmp(name, "pixelAspectRatio") == 0) { + return qVariantFromValue(d->pixelAspectRatio); + } else if (qstrcmp(name, "sizeHint") == 0) { + return sizeHint(); + } else if (qstrcmp(name, "yuvColorSpace") == 0) { + return qVariantFromValue(d->yuvColorSpace); + } else { + int id = 0; + for (; id < d->propertyNames.count() && d->propertyNames.at(id) != name; ++id) {} + + return id < d->propertyValues.count() + ? d->propertyValues.at(id) + : QVariant(); + } +} + +/*! + Sets the video format's \a name property to \a value. +*/ + +void QVideoSurfaceFormat::setProperty(const char *name, const QVariant &value) +{ + if (qstrcmp(name, "handleType") == 0) { + // read only. + } else if (qstrcmp(name, "pixelFormat") == 0) { + // read only. + } else if (qstrcmp(name, "frameSize") == 0) { + if (qVariantCanConvert<QSize>(value)) { + d->frameSize = qvariant_cast<QSize>(value); + d->viewport = QRect(QPoint(0, 0), d->frameSize); + } + } else if (qstrcmp(name, "frameWidth") == 0) { + // read only. + } else if (qstrcmp(name, "frameHeight") == 0) { + // read only. + } else if (qstrcmp(name, "viewport") == 0) { + if (qVariantCanConvert<QRect>(value)) + d->viewport = qvariant_cast<QRect>(value); + } else if (qstrcmp(name, "scanLineDirection") == 0) { + if (qVariantCanConvert<Direction>(value)) + d->scanLineDirection = qvariant_cast<Direction>(value); + } else if (qstrcmp(name, "frameRate") == 0) { + if (qVariantCanConvert<FrameRate>(value)) + d->frameRate = qvariant_cast<FrameRate>(value); + } else if (qstrcmp(name, "pixelAspectRatio") == 0) { + if (qVariantCanConvert<QSize>(value)) + d->pixelAspectRatio = qvariant_cast<QSize>(value); + } else if (qstrcmp(name, "sizeHint") == 0) { + // read only. + } else if (qstrcmp(name, "yuvColorSpace") == 0) { + if (qVariantCanConvert<YuvColorSpace>(value)) + d->yuvColorSpace = qvariant_cast<YuvColorSpace>(value); + } else { + int id = 0; + for (; id < d->propertyNames.count() && d->propertyNames.at(id) != name; ++id) {} + + if (id < d->propertyValues.count()) { + if (value.isNull()) { + d->propertyNames.removeAt(id); + d->propertyValues.removeAt(id); + } else { + d->propertyValues[id] = value; + } + } else if (!value.isNull()) { + d->propertyNames.append(QByteArray(name)); + d->propertyValues.append(value); + } + } +} + + +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f) +{ + QString typeName; + switch (f.pixelFormat()) { + case QVideoFrame::Format_Invalid: + typeName = QLatin1String("Format_Invalid"); + break; + case QVideoFrame::Format_ARGB32: + typeName = QLatin1String("Format_ARGB32"); + break; + case QVideoFrame::Format_ARGB32_Premultiplied: + typeName = QLatin1String("Format_ARGB32_Premultiplied"); + break; + case QVideoFrame::Format_RGB32: + typeName = QLatin1String("Format_RGB32"); + break; + case QVideoFrame::Format_RGB24: + typeName = QLatin1String("Format_RGB24"); + break; + case QVideoFrame::Format_RGB565: + typeName = QLatin1String("Format_RGB565"); + break; + case QVideoFrame::Format_RGB555: + typeName = QLatin1String("Format_RGB555"); + break; + case QVideoFrame::Format_ARGB8565_Premultiplied: + typeName = QLatin1String("Format_ARGB8565_Premultiplied"); + break; + case QVideoFrame::Format_BGRA32: + typeName = QLatin1String("Format_BGRA32"); + break; + case QVideoFrame::Format_BGRA32_Premultiplied: + typeName = QLatin1String("Format_BGRA32_Premultiplied"); + break; + case QVideoFrame::Format_BGR32: + typeName = QLatin1String("Format_BGR32"); + break; + case QVideoFrame::Format_BGR24: + typeName = QLatin1String("Format_BGR24"); + break; + case QVideoFrame::Format_BGR565: + typeName = QLatin1String("Format_BGR565"); + break; + case QVideoFrame::Format_BGR555: + typeName = QLatin1String("Format_BGR555"); + break; + case QVideoFrame::Format_BGRA5658_Premultiplied: + typeName = QLatin1String("Format_BGRA5658_Premultiplied"); + break; + case QVideoFrame::Format_AYUV444: + typeName = QLatin1String("Format_AYUV444"); + break; + case QVideoFrame::Format_AYUV444_Premultiplied: + typeName = QLatin1String("Format_AYUV444_Premultiplied"); + break; + case QVideoFrame::Format_YUV444: + typeName = QLatin1String("Format_YUV444"); + break; + case QVideoFrame::Format_YUV420P: + typeName = QLatin1String("Format_YUV420P"); + break; + case QVideoFrame::Format_YV12: + typeName = QLatin1String("Format_YV12"); + break; + case QVideoFrame::Format_UYVY: + typeName = QLatin1String("Format_UYVY"); + break; + case QVideoFrame::Format_YUYV: + typeName = QLatin1String("Format_YUYV"); + break; + case QVideoFrame::Format_NV12: + typeName = QLatin1String("Format_NV12"); + break; + case QVideoFrame::Format_NV21: + typeName = QLatin1String("Format_NV21"); + break; + case QVideoFrame::Format_IMC1: + typeName = QLatin1String("Format_IMC1"); + break; + case QVideoFrame::Format_IMC2: + typeName = QLatin1String("Format_IMC2"); + break; + case QVideoFrame::Format_IMC3: + typeName = QLatin1String("Format_IMC3"); + break; + case QVideoFrame::Format_IMC4: + typeName = QLatin1String("Format_IMC4"); + break; + case QVideoFrame::Format_Y8: + typeName = QLatin1String("Format_Y8"); + break; + case QVideoFrame::Format_Y16: + typeName = QLatin1String("Format_Y16"); + default: + typeName = QString(QLatin1String("UserType(%1)" )).arg(int(f.pixelFormat())); + } + + dbg.nospace() << "QVideoSurfaceFormat(" << typeName; + dbg.nospace() << ", " << f.frameSize(); + dbg.nospace() << ", viewport=" << f.viewport(); + dbg.nospace() << ", pixelAspectRatio=" << f.pixelAspectRatio(); + dbg.nospace() << ")"; + + foreach(const QByteArray& propertyName, f.propertyNames()) + dbg << "\n " << propertyName.data() << " = " << f.property(propertyName.data()); + + return dbg.space(); +} +#endif + +QT_END_NAMESPACE diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h new file mode 100644 index 0000000..72a2452 --- /dev/null +++ b/src/multimedia/video/qvideosurfaceformat.h @@ -0,0 +1,157 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QVIDEOSURFACEFORMAT_H +#define QVIDEOSURFACEFORMAT_H + +#include <QtCore/qlist.h> +#include <QtCore/qpair.h> +#include <QtCore/qshareddata.h> +#include <QtCore/qsize.h> +#include <QtGui/qimage.h> +#include <QtMultimedia/qvideoframe.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +class QDebug; + +class QVideoSurfaceFormatPrivate; + +class Q_MULTIMEDIA_EXPORT QVideoSurfaceFormat +{ +public: + enum Direction + { + TopToBottom, + BottomToTop + }; + + enum ViewportMode + { + ResetViewport, + KeepViewport + }; + + enum YuvColorSpace + { + YCbCr_Undefined, + YCbCr_BT601, + YCbCr_BT709, + YCbCr_xvYCC601, + YCbCr_xvYCC709, + YCbCr_JPEG, +#ifndef qdoc + YCbCr_CustomMatrix +#endif + }; + + typedef QPair<int, int> FrameRate; + + QVideoSurfaceFormat(); + QVideoSurfaceFormat( + const QSize &size, + QVideoFrame::PixelFormat pixelFormat, + QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle); + QVideoSurfaceFormat(const QVideoSurfaceFormat &format); + ~QVideoSurfaceFormat(); + + QVideoSurfaceFormat &operator =(const QVideoSurfaceFormat &format); + + bool operator ==(const QVideoSurfaceFormat &format) const; + bool operator !=(const QVideoSurfaceFormat &format) const; + + bool isValid() const; + + QVideoFrame::PixelFormat pixelFormat() const; + QAbstractVideoBuffer::HandleType handleType() const; + + QSize frameSize() const; + void setFrameSize(const QSize &size, ViewportMode mode = ResetViewport); + void setFrameSize(int width, int height, ViewportMode mode = ResetViewport); + + int frameWidth() const; + int frameHeight() const; + + QRect viewport() const; + void setViewport(const QRect &viewport); + + Direction scanLineDirection() const; + void setScanLineDirection(Direction direction); + + FrameRate frameRate() const; + void setFrameRate(const FrameRate &rate); + void setFrameRate(int numerator, int denominator = 1); + + QSize pixelAspectRatio() const; + void setPixelAspectRatio(const QSize &ratio); + void setPixelAspectRatio(int width, int height); + + YuvColorSpace yuvColorSpace() const; + void setYuvColorSpace(YuvColorSpace colorSpace); + + QSize sizeHint() const; + + QList<QByteArray> propertyNames() const; + QVariant property(const char *name) const; + void setProperty(const char *name, const QVariant &value); + +private: + QSharedDataPointer<QVideoSurfaceFormatPrivate> d; +}; + +#ifndef QT_NO_DEBUG_STREAM +Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QVideoSurfaceFormat &); +#endif + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QVideoSurfaceFormat::FrameRate); +Q_DECLARE_METATYPE(QVideoSurfaceFormat::Direction) +Q_DECLARE_METATYPE(QVideoSurfaceFormat::YuvColorSpace) + +QT_END_HEADER + +#endif + diff --git a/src/multimedia/video/video.pri b/src/multimedia/video/video.pri new file mode 100644 index 0000000..0547a4c --- /dev/null +++ b/src/multimedia/video/video.pri @@ -0,0 +1,21 @@ + +INCLUDEPATH += $$PWD + +HEADERS += \ + $$PWD/qabstractvideobuffer.h \ + $$PWD/qabstractvideobuffer_p.h \ + $$PWD/qabstractvideosurface.h \ + $$PWD/qabstractvideosurface_p.h \ + $$PWD/qimagevideobuffer_p.h \ + $$PWD/qmemoryvideobuffer_p.h \ + $$PWD/qvideoframe.h \ + $$PWD/qvideosurfaceformat.h + +SOURCES += \ + $$PWD/qabstractvideobuffer.cpp \ + $$PWD/qabstractvideosurface.cpp \ + $$PWD/qimagevideobuffer.cpp \ + $$PWD/qmemoryvideobuffer.cpp \ + $$PWD/qvideoframe.cpp \ + $$PWD/qvideosurfaceformat.cpp + diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 7b5a6e2..b111bec 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -65,7 +65,11 @@ QT_BEGIN_NAMESPACE +#ifdef Q_OS_SYMBIAN +const int QHttpNetworkConnectionPrivate::defaultChannelCount = 3; +#else const int QHttpNetworkConnectionPrivate::defaultChannelCount = 6; +#endif // the maximum amount of requests that might be pipelined into a socket // from what was suggested, 3 seems to be OK @@ -125,30 +129,6 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const return 0; } -bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (channels[i].state & QHttpNetworkConnectionChannel::BusyState); -} - -bool QHttpNetworkConnectionPrivate::isSocketWriting(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WritingState)); -} - -bool QHttpNetworkConnectionPrivate::isSocketWaiting(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WaitingState)); -} - -bool QHttpNetworkConnectionPrivate::isSocketReading(QAbstractSocket *socket) const -{ - int i = indexOf(socket); - return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::ReadingState)); -} - qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailable(const QHttpNetworkReply &reply) const { return reply.d_func()->responseData.byteAmount(); @@ -623,7 +603,7 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply) for (int i = 0; i < channelCount; ++i) { if (channels[i].reply == reply) { channels[i].reply = 0; - if (reply->d_func()->connectionCloseEnabled()) + if (reply->d_func()->isConnectionCloseEnabled()) channels[i].close(); QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); return; @@ -670,7 +650,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() for (int i = 0; i < channelCount; ++i) { QAbstractSocket *chSocket = channels[i].socket; // send the request using the idle socket - if (!isSocketBusy(chSocket)) { + if (!channels[i].isSocketBusy()) { socket = chSocket; break; } diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 9d2c13f..92b758e 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -165,10 +165,6 @@ public: enum { ChunkSize = 4096 }; int indexOf(QAbstractSocket *socket) const; - bool isSocketBusy(QAbstractSocket *socket) const; - bool isSocketWriting(QAbstractSocket *socket) const; - bool isSocketWaiting(QAbstractSocket *socket) const; - bool isSocketReading(QAbstractSocket *socket) const; QHttpNetworkReply *queueRequest(const QHttpNetworkRequest &request); void requeueRequest(const HttpMessagePair &pair); // e.g. after pipeline broke diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 9d78c55..d880f60 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -524,7 +524,7 @@ void QHttpNetworkConnectionChannel::allDone() handleStatus(); // ### at this point there should be no more data on the socket // close if server requested - if (reply->d_func()->connectionCloseEnabled()) + if (reply->d_func()->isConnectionCloseEnabled()) close(); // queue the finished signal, this is required since we might send new requests from // slot connected to it. The socket will not fire readyRead signal, if we are already @@ -539,7 +539,7 @@ void QHttpNetworkConnectionChannel::allDone() // move next from pipeline to current request if (!alreadyPipelinedRequests.isEmpty()) { - if (resendCurrent || reply->d_func()->connectionCloseEnabled() || socket->state() != QAbstractSocket::ConnectedState) { + if (resendCurrent || reply->d_func()->isConnectionCloseEnabled() || socket->state() != QAbstractSocket::ConnectedState) { // move the pipelined ones back to the main queue requeueCurrentlyPipelinedRequests(); } else { @@ -584,7 +584,7 @@ void QHttpNetworkConnectionChannel::detectPipeliningSupport() // check for HTTP/1.1 && (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1) // check for not having connection close - && (!reply->d_func()->connectionCloseEnabled()) + && (!reply->d_func()->isConnectionCloseEnabled()) // check if it is still connected && (socket->state() == QAbstractSocket::ConnectedState) ) { @@ -705,10 +705,30 @@ void QHttpNetworkConnectionChannel::closeAndResendCurrentRequest() QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection); } +bool QHttpNetworkConnectionChannel::isSocketBusy() const +{ + return (state & QHttpNetworkConnectionChannel::BusyState); +} + +bool QHttpNetworkConnectionChannel::isSocketWriting() const +{ + return (state & QHttpNetworkConnectionChannel::WritingState); +} + +bool QHttpNetworkConnectionChannel::isSocketWaiting() const +{ + return (state & QHttpNetworkConnectionChannel::WaitingState); +} + +bool QHttpNetworkConnectionChannel::isSocketReading() const +{ + return (state & QHttpNetworkConnectionChannel::ReadingState); +} + //private slots void QHttpNetworkConnectionChannel::_q_readyRead() { - if (connection->d_func()->isSocketWaiting(socket) || connection->d_func()->isSocketReading(socket)) { + if (isSocketWaiting() || isSocketReading()) { state = QHttpNetworkConnectionChannel::ReadingState; if (reply) receiveReply(); @@ -719,7 +739,7 @@ void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes) { Q_UNUSED(bytes); // bytes have been written to the socket. write even more of them :) - if (connection->d_func()->isSocketWriting(socket)) + if (isSocketWriting()) sendRequest(); // otherwise we do nothing } @@ -727,7 +747,7 @@ void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes) void QHttpNetworkConnectionChannel::_q_disconnected() { // read the available data before closing - if (connection->d_func()->isSocketWaiting(socket) || connection->d_func()->isSocketReading(socket)) { + if (isSocketWaiting() || isSocketReading()) { state = QHttpNetworkConnectionChannel::ReadingState; if (reply) receiveReply(); diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index 220b72c..687ba47 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -160,6 +160,11 @@ public: void eatWhitespace(); + bool isSocketBusy() const; + bool isSocketWriting() const; + bool isSocketWaiting() const; + bool isSocketReading() const; + protected slots: void _q_bytesWritten(qint64 bytes); // proceed sending void _q_readyRead(); // pending data to read diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index ba429fd..ea2018d 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -196,7 +196,8 @@ bool QHttpNetworkReply::isPipeliningUsed() const QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl) : QHttpNetworkHeaderPrivate(newUrl), state(NothingDoneState), statusCode(100), majorVersion(0), minorVersion(0), bodyLength(0), contentRead(0), totalProgress(0), - chunkedTransferEncoding(0), + chunkedTransferEncoding(false), + connectionCloseEnabled(true), currentChunkSize(0), currentChunkRead(0), connection(0), initInflate(false), autoDecompress(false), responseData(), requestIsPrepared(false) ,pipeliningUsed(false) @@ -216,6 +217,7 @@ void QHttpNetworkReplyPrivate::clear() totalProgress = 0; currentChunkSize = 0; currentChunkRead = 0; + connectionCloseEnabled = true; connection = 0; #ifndef QT_NO_COMPRESS if (initInflate) @@ -510,6 +512,13 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket) // cache isChunked() since it is called often chunkedTransferEncoding = headerField("transfer-encoding").toLower().contains("chunked"); + + // cache isConnectionCloseEnabled since it is called often + QByteArray connectionHeaderField = headerField("connection"); + // check for explicit indication of close or the implicit connection close of HTTP/1.0 + connectionCloseEnabled = (connectionHeaderField.toLower().contains("close") || + headerField("proxy-connection").toLower().contains("close")) || + (majorVersion == 1 && minorVersion == 0 && connectionHeaderField.isEmpty()); } return bytes; } @@ -553,10 +562,9 @@ bool QHttpNetworkReplyPrivate::isChunked() return chunkedTransferEncoding; } -bool QHttpNetworkReplyPrivate::connectionCloseEnabled() +bool QHttpNetworkReplyPrivate::isConnectionCloseEnabled() { - return (headerField("connection").toLower().contains("close") || - headerField("proxy-connection").toLower().contains("close")); + return connectionCloseEnabled; } // note this function can only be used for non-chunked, non-compressed with diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h index 8d4d724..cfc1523 100644 --- a/src/network/access/qhttpnetworkreply_p.h +++ b/src/network/access/qhttpnetworkreply_p.h @@ -185,7 +185,7 @@ public: qint64 bytesAvailable() const; bool isChunked(); - bool connectionCloseEnabled(); + bool isConnectionCloseEnabled(); bool isGzipped(); #ifndef QT_NO_COMPRESS bool gzipCheckHeader(QByteArray &content, int &pos); @@ -212,6 +212,7 @@ public: qint64 totalProgress; QByteArray fragment; // used for header, status, chunk header etc, not for reply data bool chunkedTransferEncoding; + bool connectionCloseEnabled; qint64 currentChunkSize; qint64 currentChunkRead; QPointer<QHttpNetworkConnection> connection; diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index 30f16da..faf04da 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -951,6 +951,12 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo if (hop_by_hop) continue; + // Do not copy over the Date header because it will be + // different for every request and therefore cause a re-write to + // the disk when a 304 is received inside replyHeaderChanged() + if (header == "date") + continue; + // Don't store Warning 1xx headers if (header == "warning") { QByteArray v = rawHeader(header); diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 347fb72..4fcf740 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -1282,8 +1282,9 @@ void QAbstractSocket::connectToHostImplementation(const QString &hostName, quint (int) openMode); #endif - if (d->state == ConnectedState || d->state == ConnectingState || d->state == ClosingState) { - qWarning("QAbstractSocket::connectToHost() called when already connecting/connected to \"%s\"", qPrintable(hostName)); + if (d->state == ConnectedState || d->state == ConnectingState + || d->state == ClosingState || d->state == HostLookupState) { + qWarning("QAbstractSocket::connectToHost() called when already looking up or connecting/connected to \"%s\"", qPrintable(hostName)); return; } diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index a09b8c43..8d855b1 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -381,7 +381,7 @@ QMultiMap<QSsl::AlternateNameEntryType, QString> QSslCertificate::alternateSubje } const char *altNameStr = reinterpret_cast<const char *>(q_ASN1_STRING_data(genName->d.ia5)); - const QString altName = QLatin1String(QByteArray(altNameStr, len)); + const QString altName = QString::fromLatin1(altNameStr, len); if (genName->type == GEN_DNS) result.insert(QSsl::DnsEntry, altName); else if (genName->type == GEN_EMAIL) diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index cdbcb86..94f1006 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -683,7 +683,16 @@ void QSslSocket::close() #ifdef QSSLSOCKET_DEBUG qDebug() << "QSslSocket::close()"; #endif + Q_D(QSslSocket); QTcpSocket::close(); + + // must be cleared, reading/writing not possible on closed socket: + d->readBuffer.clear(); + d->writeBuffer.clear(); + // for QTcpSocket this is already done because it uses the readBuffer/writeBuffer + // if the QIODevice it is based on + // ### FIXME QSslSocket should probably do similar instead of having + // its own readBuffer/writeBuffer } /*! @@ -1288,10 +1297,8 @@ QList<QSslCertificate> QSslSocket::defaultCaCertificates() } /*! - Returns the system default CA certificate database for your - system. This database is normally found in a standard place for - your system. If it is not found there, Qt will provide its own - default CA certificate database. The CA certificate database + This function provides a default CA certificate database + shipped together with Qt. The CA certificate database returned by this function is used to initialize the database returned by defaultCaCertificates(). You can replace that database with your own with setDefaultCaCertificates(). diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index 8f9a6a9..425b877 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -98,7 +98,7 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc case QPainterPath::MoveToElement: // qDebug("element[%d] is a MoveToElement", i); vertexArrayStops.append(vertexArray.size()); - vertexArray.add(points[i]); // Add the moveTo as a new vertex + lineToArray(points[i].x(), points[i].y()); // Add the moveTo as a new vertex break; case QPainterPath::LineToElement: // qDebug("element[%d] is a LineToElement", i); diff --git a/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp b/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp index a82caa0..9a729f9 100644 --- a/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp +++ b/src/opengl/gl2paintengineex/qglcustomshaderstage.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -44,6 +44,8 @@ #include "qpaintengineex_opengl2_p.h" #include <private/qpainter_p.h> +QT_BEGIN_NAMESPACE + class QGLCustomShaderStagePrivate { public: @@ -121,3 +123,5 @@ void QGLCustomShaderStage::setSource(const QByteArray& s) Q_D(QGLCustomShaderStage); d->m_source = s; } + +QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h b/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h index 70e9ff0..5392643 100644 --- a/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h +++ b/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h @@ -34,11 +34,14 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ +#ifndef QGL_CUSTOM_SHADER_STAGE_H +#define QGL_CUSTOM_SHADER_STAGE_H + // // W A R N I N G // ------------- @@ -50,9 +53,6 @@ // We mean it. // -#ifndef QGL_CUSTOM_SHADER_STAGE_H -#define QGL_CUSTOM_SHADER_STAGE_H - #include <QGLShaderProgram> QT_BEGIN_HEADER diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index 795c8b0..e6b1994 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -161,7 +161,7 @@ QGLEngineShaderManager::QGLEngineShaderManager(QGLContext* context) #if defined(QT_DEBUG) // Check that all the elements have been filled: for (int i = 0; i < TotalShaderCount; ++i) { - if (i != CustomImageSrcFragmentShader && qglEngineShaderSourceCode[i] == 0) { + if (qglEngineShaderSourceCode[i] == 0) { int enumIndex = staticMetaObject.indexOfEnumerator("ShaderName"); QMetaEnum m = staticMetaObject.enumerator(enumIndex); diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index 1ee75df..ace6b63 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -209,7 +209,7 @@ (QGLCustomShaderStage). The shader will implement a pre-defined method name which Qt's fragment pipeline will call: - lowp vec4 customShader(sampler2d src, vec2 srcCoords) + lowp vec4 customShader(lowp sampler2d imageTexture, highp vec2 textureCoords) The provided src and srcCoords parameters can be used to sample from the source image. @@ -361,7 +361,6 @@ public: MainFragmentShader, ImageSrcFragmentShader, - CustomSrcFragmentShader, ImageSrcWithPatternFragmentShader, NonPremultipliedImageSrcFragmentShader, CustomImageSrcFragmentShader, diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index cf930f3..c8e85ab 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -73,8 +73,8 @@ static const char* const qglslMainVertexShader = "\ }"; static const char* const qglslMainWithTexCoordsVertexShader = "\ - attribute mediump vec2 textureCoordArray; \ - varying mediump vec2 textureCoords; \ + attribute highp vec2 textureCoordArray; \ + varying highp vec2 textureCoords; \ uniform highp float depth;\ void setPosition();\ void main(void) \ @@ -105,9 +105,9 @@ static const char* const qglslPositionWithPatternBrushVertexShader = "\ attribute highp vec4 vertexCoordsArray; \ uniform highp mat4 pmvMatrix; \ uniform mediump vec2 halfViewportSize; \ - uniform mediump vec2 invertedTextureSize; \ - uniform mediump mat3 brushTransform; \ - varying mediump vec2 patternTexCoords; \ + uniform highp vec2 invertedTextureSize; \ + uniform highp mat3 brushTransform; \ + varying highp vec2 patternTexCoords; \ void setPosition(void) { \ gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ @@ -124,9 +124,9 @@ static const char* const qglslAffinePositionWithPatternBrushVertexShader = qglslPositionWithPatternBrushVertexShader; static const char* const qglslPatternBrushSrcFragmentShader = "\ - uniform sampler2D brushTexture;\ + uniform lowp sampler2D brushTexture;\ uniform lowp vec4 patternColor; \ - varying mediump vec2 patternTexCoords;\ + varying highp vec2 patternTexCoords;\ lowp vec4 srcPixel() { \ return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \ }\n"; @@ -139,7 +139,7 @@ static const char* const qglslPositionWithLinearGradientBrushVertexShader = "\ uniform mediump vec2 halfViewportSize; \ uniform highp vec3 linearData; \ uniform highp mat3 brushTransform; \ - varying mediump float index ; \ + varying mediump float index; \ void setPosition() { \ gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ @@ -155,7 +155,7 @@ static const char* const qglslAffinePositionWithLinearGradientBrushVertexShader = qglslPositionWithLinearGradientBrushVertexShader; static const char* const qglslLinearGradientBrushSrcFragmentShader = "\ - uniform sampler2D brushTexture; \ + uniform lowp sampler2D brushTexture; \ varying mediump float index; \ lowp vec4 srcPixel() { \ mediump vec2 val = vec2(index, 0.5); \ @@ -187,7 +187,7 @@ static const char* const qglslAffinePositionWithConicalGradientBrushVertexShader static const char* const qglslConicalGradientBrushSrcFragmentShader = "\n\ #define INVERSE_2PI 0.1591549430918953358 \n\ - uniform sampler2D brushTexture; \n\ + uniform lowp sampler2D brushTexture; \n\ uniform mediump float angle; \ varying highp vec2 A; \ lowp vec4 srcPixel() { \ @@ -226,7 +226,7 @@ static const char* const qglslAffinePositionWithRadialGradientBrushVertexShader = qglslPositionWithRadialGradientBrushVertexShader; static const char* const qglslRadialGradientBrushSrcFragmentShader = "\ - uniform sampler2D brushTexture; \ + uniform lowp sampler2D brushTexture; \ uniform highp float fmp2_m_radius2; \ uniform highp float inverse_2_fmp2_m_radius2; \ varying highp float b; \ @@ -243,9 +243,9 @@ static const char* const qglslPositionWithTextureBrushVertexShader = "\ attribute highp vec4 vertexCoordsArray; \ uniform highp mat4 pmvMatrix; \ uniform mediump vec2 halfViewportSize; \ - uniform mediump vec2 invertedTextureSize; \ - uniform mediump mat3 brushTransform; \ - varying mediump vec2 brushTextureCoords; \ + uniform highp vec2 invertedTextureSize; \ + uniform highp mat3 brushTransform; \ + varying highp vec2 brushTextureCoords; \ void setPosition(void) { \ gl_Position = pmvMatrix * vertexCoordsArray;\ gl_Position.xy = gl_Position.xy / gl_Position.w; \ @@ -255,23 +255,22 @@ static const char* const qglslPositionWithTextureBrushVertexShader = "\ gl_Position.xy = gl_Position.xy * invertedHTexCoordsZ; \ gl_Position.w = invertedHTexCoordsZ; \ brushTextureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \ - brushTextureCoords.y = -brushTextureCoords.y; \ }"; static const char* const qglslAffinePositionWithTextureBrushVertexShader = qglslPositionWithTextureBrushVertexShader; static const char* const qglslTextureBrushSrcFragmentShader = "\ - varying mediump vec2 brushTextureCoords; \ - uniform sampler2D brushTexture; \ + varying highp vec2 brushTextureCoords; \ + uniform lowp sampler2D brushTexture; \ lowp vec4 srcPixel() { \ return texture2D(brushTexture, brushTextureCoords); \ }"; static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\ - varying mediump vec2 brushTextureCoords; \ + varying highp vec2 brushTextureCoords; \ uniform lowp vec4 patternColor; \ - uniform sampler2D brushTexture; \ + uniform lowp sampler2D brushTexture; \ lowp vec4 srcPixel() { \ return patternColor * (1.0 - texture2D(brushTexture, brushTextureCoords).r); \ }"; @@ -284,16 +283,16 @@ static const char* const qglslSolidBrushSrcFragmentShader = "\ }"; static const char* const qglslImageSrcFragmentShader = "\ - varying mediump vec2 textureCoords; \ - uniform sampler2D imageTexture; \ + varying highp vec2 textureCoords; \ + uniform lowp sampler2D imageTexture; \ lowp vec4 srcPixel() { \ return texture2D(imageTexture, textureCoords); \ }"; static const char* const qglslCustomSrcFragmentShader = "\ varying highp vec2 textureCoords; \ - uniform sampler2D imageTexture; \ - lowp vec4 customShader(sampler2D texture, vec2 coords); \ + uniform lowp sampler2D imageTexture; \ + lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \ lowp vec4 srcPixel() { \ return customShader(imageTexture, textureCoords); \ }"; @@ -301,14 +300,14 @@ static const char* const qglslCustomSrcFragmentShader = "\ static const char* const qglslImageSrcWithPatternFragmentShader = "\ varying highp vec2 textureCoords; \ uniform lowp vec4 patternColor; \ - uniform sampler2D imageTexture; \ + uniform lowp sampler2D imageTexture; \ lowp vec4 srcPixel() { \ return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \ }\n"; static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\ varying highp vec2 textureCoords; \ - uniform sampler2D imageTexture; \ + uniform lowp sampler2D imageTexture; \ lowp vec4 srcPixel() { \ lowp vec4 sample = texture2D(imageTexture, textureCoords); \ sample.rgb = sample.rgb * sample.a; \ @@ -383,7 +382,7 @@ static const char* const qglslMainFragmentShader = "\ static const char* const qglslMaskFragmentShader = "\ varying highp vec2 textureCoords;\ - uniform sampler2D maskTexture;\ + uniform lowp sampler2D maskTexture;\ lowp vec4 applyMask(lowp vec4 src) \ {\ lowp vec4 mask = texture2D(maskTexture, textureCoords); \ diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 7a3fa56..cc9b014 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -376,6 +376,7 @@ void QGL2PaintEngineExPrivate::useSimpleShader() void QGL2PaintEngineExPrivate::updateBrushTexture() { + Q_Q(QGL2PaintEngineEx); // qDebug("QGL2PaintEngineExPrivate::updateBrushTexture()"); Qt::BrushStyle style = currentBrush->style(); @@ -384,8 +385,8 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() QImage texImage = qt_imageForBrush(style, false); glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); - ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, true); - updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, true); + ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, true, QGLContext::InternalBindOption); + updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); } else if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern) { // Gradiant brush: All the gradiants use the same texture @@ -400,18 +401,18 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() glBindTexture(GL_TEXTURE_2D, texId); if (g->spread() == QGradient::RepeatSpread || g->type() == QGradient::ConicalGradient) - updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, true); + updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); else if (g->spread() == QGradient::ReflectSpread) - updateTextureFilter(GL_TEXTURE_2D, GL_MIRRORED_REPEAT_IBM, true); + updateTextureFilter(GL_TEXTURE_2D, GL_MIRRORED_REPEAT_IBM, q->state()->renderHints & QPainter::SmoothPixmapTransform); else - updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, true); + updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform); } else if (style == Qt::TexturePattern) { const QPixmap& texPixmap = currentBrush->texture(); glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); - ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, true); - updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, true); + ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); + updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); } brushTextureDirty = false; } @@ -666,7 +667,7 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s GLfloat dx = 1.0 / textureSize.width(); GLfloat dy = 1.0 / textureSize.height(); - QGLRect srcTextureRect(src.left*dx, 1.0 - src.top*dy, src.right*dx, 1.0 - src.bottom*dy); + QGLRect srcTextureRect(src.left*dx, src.top*dy, src.right*dx, src.bottom*dy); setCoords(staticVertexCoordinateArray, dest); setCoords(staticTextureCoordinateArray, srcTextureRect); @@ -674,7 +675,7 @@ void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& s glDrawArrays(GL_TRIANGLE_FAN, 0, 4); } -void QGL2PaintEngineEx::sync() +void QGL2PaintEngineEx::beginNativePainting() { Q_D(QGL2PaintEngineEx); ensureActive(); @@ -708,15 +709,25 @@ void QGL2PaintEngineEx::sync() #endif d->lastTexture = GLuint(-1); + d->resetGLState(); + + d->needsSync = true; +} +void QGL2PaintEngineExPrivate::resetGLState() +{ glDisable(GL_BLEND); glActiveTexture(GL_TEXTURE0); - glDisable(GL_DEPTH_TEST); + glDisable(GL_SCISSOR_TEST); glDepthFunc(GL_LESS); glDepthMask(true); glClearDepth(1); +} +void QGL2PaintEngineEx::endNativePainting() +{ + Q_D(QGL2PaintEngineEx); d->needsSync = true; } @@ -1073,6 +1084,7 @@ void QGL2PaintEngineEx::renderHintsChanged() Q_D(QGL2PaintEngineEx); d->lastTexture = GLuint(-1); + d->brushTextureDirty = true; // qDebug("QGL2PaintEngineEx::renderHintsChanged() not implemented!"); } @@ -1091,16 +1103,17 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c QGLContext *ctx = d->ctx; glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); - QGLTexture *texture = ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA, true, true); + QGLTexture *texture = + ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); - GLfloat top = texture->yInverted ? (pixmap.height() - src.top()) : src.top(); - GLfloat bottom = texture->yInverted ? (pixmap.height() - src.bottom()) : src.bottom(); + GLfloat top = texture->options & QGLContext::InvertedYBindOption ? (pixmap.height() - src.top()) : src.top(); + GLfloat bottom = texture->options & QGLContext::InvertedYBindOption ? (pixmap.height() - src.bottom()) : src.bottom(); QGLRect srcRect(src.left(), top, src.right(), bottom); bool isBitmap = pixmap.isQBitmap(); bool isOpaque = !isBitmap && !pixmap.hasAlphaChannel(); - d->updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, + d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, state()->renderHints & QPainter::SmoothPixmapTransform, texture->id); d->drawTexture(dest, srcRect, pixmap.size(), isOpaque, isBitmap); } @@ -1114,10 +1127,10 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const QGLContext *ctx = d->ctx; glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); - QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, true); + QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); GLuint id = texture->id; - d->updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, + d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, state()->renderHints & QPainter::SmoothPixmapTransform, id); d->drawTexture(dest, src, image.size(), !image.hasAlphaChannel()); } @@ -1132,7 +1145,7 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); glBindTexture(GL_TEXTURE_2D, textureId); - d->updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, + d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, state()->renderHints & QPainter::SmoothPixmapTransform, textureId); d->drawTexture(dest, src, size, false); } @@ -1355,6 +1368,8 @@ bool QGL2PaintEngineEx::end() d->drawable.doneCurrent(); d->ctx->d_ptr->active_engine = 0; + d->resetGLState(); + return false; } @@ -1498,7 +1513,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) if (op == Qt::ReplaceClip && !d->hasClipOperations()) op = Qt::IntersectClip; - if (!path.isEmpty() && op == Qt::IntersectClip && (path.hints() & QVectorPath::RectangleHint)) { + if (!path.isEmpty() && op == Qt::IntersectClip && (path.shape() == QVectorPath::RectangleHint)) { const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); QRectF rect(points[0], points[2]); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 7b734e3..66e7a51 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -133,7 +133,9 @@ public: inline const QOpenGL2PaintEngineState *state() const { return static_cast<const QOpenGL2PaintEngineState *>(QPaintEngineEx::state()); } - virtual void sync(); + + void beginNativePainting(); + void endNativePainting(); const QGLContext* context(); @@ -168,6 +170,7 @@ public: void setBrush(const QBrush* brush); void transferMode(EngineMode newMode); + void resetGLState(); // fill, drawOutline, drawTexture & drawCachedGlyphs are the rendering entry points: void fill(const QVectorPath &path); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 57ef70c..8cf3b45 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1443,7 +1443,7 @@ bool QGLTextureCache::remove(QGLContext* ctx, GLuint textureId) for (int i = 0; i < keys.size(); ++i) { QGLTexture *tex = m_cache.object(keys.at(i)); if (tex->id == textureId && tex->context == ctx) { - tex->clean = true; // forces a glDeleteTextures() call + tex->options |= QGLContext::MemoryManagedBindOption; // forces a glDeleteTextures() call m_cache.remove(keys.at(i)); return true; } @@ -1479,7 +1479,7 @@ void QGLTextureCache::imageCleanupHook(qint64 cacheKey) if (qApp->thread() != QThread::currentThread()) return; QGLTexture *texture = instance()->getTexture(cacheKey); - if (texture && texture->clean) + if (texture && texture->options & QGLContext::MemoryManagedBindOption) instance()->remove(cacheKey); } @@ -1490,7 +1490,7 @@ void QGLTextureCache::pixmapCleanupHook(QPixmap* pixmap) if (qApp->thread() == QThread::currentThread()) { const qint64 cacheKey = pixmap->cacheKey(); QGLTexture *texture = instance()->getTexture(cacheKey); - if (texture && texture->clean) + if (texture && texture->options & QGLContext::MemoryManagedBindOption) instance()->remove(cacheKey); } #if defined(Q_WS_X11) @@ -1578,6 +1578,39 @@ Q_OPENGL_EXPORT QGLShareRegister* qgl_share_reg() Please note that QGLContext is not thread safe. */ +/*! + \enum QGLContext::BindOption + A set of options to decide how to bind a texture using bindTexture(). + + \value NoBindOption Don't do anything, pass the texture straight + thru. + + \value InvertedYBindOption Specifies that the texture should be flipped + over the X axis so that the texture coordinate 0,0 corresponds to + the top left corner. Inverting the texture implies a deep copy + prior to upload. + + \value MipmapBindOption Specifies that bindTexture should try + to generate mipmaps. If the GL implementation supports the \c + GL_SGIS_generate_mipmap extension, mipmaps will be automatically + generated for the texture. Mipmap generation is only supported for + the \c GL_TEXTURE_2D target. + + \value PremultipliedAlphaBindOption Specifies that the image should be + uploaded with premultiplied alpha and does a conversion accordingly. + + \value LinearFilteringBindOption Specifies that the texture filtering + should be set to GL_LINEAR. Default is GL_NEAREST. If mipmap is + also enabled, filtering will be set to GL_LINEAR_MIPMAP_LINEAR. + + \value DefaultBindOption In Qt 4.5 and earlier, bindTexture() + would mirror the image and automatically generate mipmaps. This + option helps preserve this default behavior. + + \omitvalue MemoryManagedBindOption + + \omitvalue InternalBindOption +*/ /*! \obsolete @@ -1880,7 +1913,8 @@ QImage QGLContextPrivate::convertToGLFormat(const QImage &image, bool force_prem } /*! \internal */ -QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, GLint format, bool clean) +QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, GLint format, + QGLContext::BindOptions options) { const qint64 key = image.cacheKey(); QGLTexture *texture = textureCacheLookup(key, target); @@ -1890,7 +1924,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G } if (!texture) - texture = bindTexture(image, target, format, key, clean); + texture = bindTexture(image, target, format, key, options); // NOTE: bindTexture(const QImage&, GLenum, GLint, const qint64, bool) should never return null Q_ASSERT(texture); @@ -1900,68 +1934,128 @@ QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G return texture; } +// #define QGL_BIND_TEXTURE_DEBUG + QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, GLint format, - const qint64 key, bool clean) + const qint64 key, QGLContext::BindOptions options) { Q_Q(QGLContext); - QGLContext *ctx = q; - - // the GL_BGRA format is only present in GL version >= 1.2 - GLenum texture_format = (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_2) - ? GL_BGRA : GL_RGBA; +#ifdef QGL_BIND_TEXTURE_DEBUG + printf("QGLContextPrivate::bindTexture(), imageSize=(%d,%d), format=%x, options=%x\n", + image.width(), image.height(), format, int(options)); +#endif // Scale the pixmap if needed. GL textures needs to have the // dimensions 2^n+2(border) x 2^m+2(border), unless we're using GL // 2.0 or use the GL_TEXTURE_RECTANGLE texture target int tx_w = qt_next_power_of_two(image.width()); int tx_h = qt_next_power_of_two(image.height()); - bool scale = false; QImage img = image; if (( !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) && !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0) ) && (target == GL_TEXTURE_2D && (tx_w != image.width() || tx_h != image.height()))) { - scale = true; + img = img.scaled(tx_w, tx_h); +#ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - upscaled to %dx%d\n", tx_w, tx_h); +#endif } + GLuint filtering = options & QGLContext::LinearFilteringBindOption ? GL_LINEAR : GL_NEAREST; + GLuint tx_id; glGenTextures(1, &tx_id); glBindTexture(target, tx_id); - glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameterf(target, GL_TEXTURE_MAG_FILTER, filtering); + if (glFormat.directRendering() && QGLExtensions::glExtensions & QGLExtensions::GenerateMipmap - && target == GL_TEXTURE_2D && !clean) + && target == GL_TEXTURE_2D + && options & QGLContext::MipmapBindOption) { +#ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - generating mipmaps\n"); +#endif glHint(GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST); #ifndef QT_OPENGL_ES glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); #else glTexParameterf(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); #endif - glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); + glTexParameterf(target, GL_TEXTURE_MIN_FILTER, options & QGLContext::LinearFilteringBindOption + ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_NEAREST); } else { - glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameterf(target, GL_TEXTURE_MIN_FILTER, filtering); } QImage::Format target_format = img.format(); - // Note: the clean param is only true when a texture is bound - // from the QOpenGLPaintEngine - in that case we have to force - // a premultiplied texture format - if (clean || img.format() != QImage::Format_ARGB32) - target_format = QImage::Format_ARGB32_Premultiplied; - if (img.format() != target_format) - img = img.convertToFormat(target_format); + bool premul = options & QGLContext::PremultipliedAlphaBindOption; + GLenum texture_format = QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_2 + ? GL_BGRA : GL_RGBA; + GLuint pixel_type = GL_UNSIGNED_BYTE; + + switch (target_format) { + case QImage::Format_ARGB32: + if (premul) { + img = img.convertToFormat(target_format = QImage::Format_ARGB32_Premultiplied); +#ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - converting ARGB32 -> ARGB32_Premultiplied \n"); +#endif + } + break; + case QImage::Format_ARGB32_Premultiplied: + if (!premul) { + img = img.convertToFormat(target_format = QImage::Format_ARGB32); +#ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - converting ARGB32_Premultiplied -> ARGB32\n"); +#endif + } + break; + case QImage::Format_RGB16: + pixel_type = GL_UNSIGNED_SHORT_5_6_5; + texture_format = GL_RGB; + break; + case QImage::Format_RGB32: + if (format == GL_RGBA) + format = GL_RGB; + break; - QImage tx(scale ? QSize(tx_w, tx_h) : img.size(), target_format); - convertToGLFormatHelper(tx, img, texture_format); - glTexImage2D(target, 0, format, tx.width(), tx.height(), 0, texture_format, - GL_UNSIGNED_BYTE, tx.bits()); + default: + if (img.hasAlphaChannel()) { + img = img.convertToFormat(premul + ? QImage::Format_ARGB32_Premultiplied + : QImage::Format_ARGB32); +#ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - converting to 32-bit alpha format\n"); +#endif + } else { + img = img.convertToFormat(QImage::Format_RGB32); +#ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - converting to 32-bit\n"); +#endif + } + } + + if (options & QGLContext::InvertedYBindOption) { + int ipl = img.bytesPerLine() / 4; + int h = img.height(); + for (int y=0; y<h/2; ++y) { + int *a = (int *) img.scanLine(y); + int *b = (int *) img.scanLine(h - y - 1); + for (int x=0; x<ipl; ++x) + qSwap(a[x], b[x]); + } + } + + const QImage &constRef = img; // to avoid detach in bits()... + glTexImage2D(target, 0, format, img.width(), img.height(), 0, texture_format, + pixel_type, constRef.bits()); // this assumes the size of a texture is always smaller than the max cache size int cost = img.width()*img.height()*4/1024; - QGLTexture *texture = new QGLTexture(q, tx_id, target, clean, false); + QGLTexture *texture = new QGLTexture(q, tx_id, target, options); QGLTextureCache::instance()->insert(q, key, texture, cost); return texture; } @@ -1980,7 +2074,7 @@ QGLTexture *QGLContextPrivate::textureCacheLookup(const qint64 key, GLenum targe /*! \internal */ -QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, bool clean, bool canInvert) +QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, QGLContext::BindOptions options) { Q_Q(QGLContext); QPixmapData *pd = pixmap.pixmapData(); @@ -2005,9 +2099,9 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, #if defined(Q_WS_X11) // Try to use texture_from_pixmap if (pd->classId() == QPixmapData::X11Class) { - texture = bindTextureFromNativePixmap(pd, key, canInvert); + texture = bindTextureFromNativePixmap(pd, key, options); if (texture) { - texture->clean = clean; + texture->options |= QGLContext::MemoryManagedBindOption; texture->boundPixmap = pd; boundPixmaps.insert(pd, QPixmap(pixmap)); } @@ -2015,7 +2109,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, #endif if (!texture) - texture = bindTexture(pixmap.toImage(), target, format, key, clean); + texture = bindTexture(pixmap.toImage(), target, format, key, options); // NOTE: bindTexture(const QImage&, GLenum, GLint, const qint64, bool) should never return null Q_ASSERT(texture); @@ -2061,6 +2155,20 @@ int QGLContextPrivate::maxTextureSize() } /*! + Generates and binds a 2D GL texture to the current context, based + on \a image. The generated texture id is returned and can be used in + later \c glBindTexture() calls. + + \overload +*/ +GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format) +{ + Q_D(QGLContext); + QGLTexture *texture = d->bindTexture(image, target, format, false, DefaultBindOption); + return texture->id; +} + +/*! Generates and binds a 2D GL texture to the current context, based on \a image. The generated texture id is returned and can be used in later \c glBindTexture() calls. @@ -2069,12 +2177,10 @@ int QGLContextPrivate::maxTextureSize() target is \c GL_TEXTURE_2D. The \a format parameter sets the internal format for the - texture. The default format is \c GL_RGBA8. + texture. The default format is \c GL_RGBA. - If the GL implementation supports the \c GL_SGIS_generate_mipmap - extension, mipmaps will be automatically generated for the - texture. Mipmap generation is only supported for the \c - GL_TEXTURE_2D target. + The binding \a options are a set of options used to decide how to + bind the texture to the context. The texture that is generated is cached, so multiple calls to bindTexture() with the same QImage will return the same texture @@ -2085,10 +2191,10 @@ int QGLContextPrivate::maxTextureSize() \sa deleteTexture() */ -GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format) +GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format, BindOptions options) { Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, target, format, false); + QGLTexture *texture = d->bindTexture(image, target, format, false, options); return texture->id; } @@ -2097,7 +2203,16 @@ GLuint QGLContext::bindTexture(const QImage &image, GLenum target, GLint format) GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format) { Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), false); + QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), false, DefaultBindOption); + return texture->id; +} + +/*! \internal */ +GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format, + BindOptions options) +{ + Q_D(QGLContext); + QGLTexture *texture = d->bindTexture(image, GLenum(target), GLint(format), false, options); return texture->id; } #endif @@ -2109,7 +2224,20 @@ GLuint QGLContext::bindTexture(const QImage &image, QMacCompatGLenum target, QMa GLuint QGLContext::bindTexture(const QPixmap &pixmap, GLenum target, GLint format) { Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(pixmap, target, format, false, false); + QGLTexture *texture = d->bindTexture(pixmap, target, format, DefaultBindOption); + return texture->id; +} + +/*! + \overload + + Generates and binds a 2D GL texture to the current context, based + on \a pixmap. +*/ +GLuint QGLContext::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, BindOptions options) +{ + Q_D(QGLContext); + QGLTexture *texture = d->bindTexture(pixmap, target, format, options); return texture->id; } @@ -2118,7 +2246,15 @@ GLuint QGLContext::bindTexture(const QPixmap &pixmap, GLenum target, GLint forma GLuint QGLContext::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format) { Q_D(QGLContext); - QGLTexture *texture = d->bindTexture(pixmap, GLenum(target), GLint(format), false, false); + QGLTexture *texture = d->bindTexture(pixmap, GLenum(target), GLint(format), DefaultBindOption); + return texture->id; +} +/*! \internal */ +GLuint QGLContext::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format, + BindOptions options) +{ + Q_D(QGLContext); + QGLTexture *texture = d->bindTexture(pixmap, GLenum(target), GLint(format), options); return texture->id; } #endif @@ -4118,15 +4254,35 @@ bool QGLWidget::autoBufferSwap() const GLuint QGLWidget::bindTexture(const QImage &image, GLenum target, GLint format) { Q_D(QGLWidget); - return d->glcx->bindTexture(image, target, format); + return d->glcx->bindTexture(image, target, format, QGLContext::DefaultBindOption); } +/*! + \overload + + The binding \a options are a set of options used to decide how to + bind the texture to the context. + */ +GLuint QGLWidget::bindTexture(const QImage &image, GLenum target, GLint format, QGLContext::BindOptions options) +{ + Q_D(QGLWidget); + return d->glcx->bindTexture(image, target, format, options); +} + + #ifdef Q_MAC_COMPAT_GL_FUNCTIONS /*! \internal */ GLuint QGLWidget::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format) { Q_D(QGLWidget); - return d->glcx->bindTexture(image, GLenum(target), GLint(format)); + return d->glcx->bindTexture(image, GLenum(target), GLint(format), QGLContext::DefaultBindOption); +} + +GLuint QGLWidget::bindTexture(const QImage &image, QMacCompatGLenum target, QMacCompatGLint format, + QGLContext::BindOptions options) +{ + Q_D(QGLWidget); + return d->glcx->bindTexture(image, GLenum(target), GLint(format), options); } #endif @@ -4139,7 +4295,23 @@ GLuint QGLWidget::bindTexture(const QImage &image, QMacCompatGLenum target, QMac GLuint QGLWidget::bindTexture(const QPixmap &pixmap, GLenum target, GLint format) { Q_D(QGLWidget); - return d->glcx->bindTexture(pixmap, target, format); + return d->glcx->bindTexture(pixmap, target, format, QGLContext::DefaultBindOption); +} + +/*! + \overload + + Generates and binds a 2D GL texture to the current context, based + on \a pixmap. The generated texture id is returned and can be used in + + The binding \a options are a set of options used to decide how to + bind the texture to the context. + */ +GLuint QGLWidget::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, + QGLContext::BindOptions options) +{ + Q_D(QGLWidget); + return d->glcx->bindTexture(pixmap, target, format, options); } #ifdef Q_MAC_COMPAT_GL_FUNCTIONS @@ -4147,7 +4319,14 @@ GLuint QGLWidget::bindTexture(const QPixmap &pixmap, GLenum target, GLint format GLuint QGLWidget::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format) { Q_D(QGLWidget); - return d->glcx->bindTexture(pixmap, target, format); + return d->glcx->bindTexture(pixmap, target, format, QGLContext::DefaultBindOption); +} + +GLuint QGLWidget::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, QMacCompatGLint format, + QGLContext::BindOptions options) +{ + Q_D(QGLWidget); + return d->glcx->bindTexture(pixmap, target, format, options); } #endif @@ -4568,34 +4747,37 @@ QGLFormat QGLDrawable::format() const return QGLFormat(); } -GLuint QGLDrawable::bindTexture(const QImage &image, GLenum target, GLint format) +GLuint QGLDrawable::bindTexture(const QImage &image, GLenum target, GLint format, + QGLContext::BindOptions options) { QGLTexture *texture = 0; + options |= QGLContext::MemoryManagedBindOption; if (widget) - texture = widget->d_func()->glcx->d_func()->bindTexture(image, target, format, true); + texture = widget->d_func()->glcx->d_func()->bindTexture(image, target, format, options); else if (buffer) - texture = buffer->d_func()->qctx->d_func()->bindTexture(image, target, format, true); + texture = buffer->d_func()->qctx->d_func()->bindTexture(image, target, format, options); else if (fbo && QGLContext::currentContext()) - texture = const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(image, target, format, true); + texture = const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(image, target, format, options); #if defined(Q_WS_QWS) || (!defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)) else if (wsurf) - texture = wsurf->context()->d_func()->bindTexture(image, target, format, true); + texture = wsurf->context()->d_func()->bindTexture(image, target, format, options); #endif return texture->id; } -GLuint QGLDrawable::bindTexture(const QPixmap &pixmap, GLenum target, GLint format) +GLuint QGLDrawable::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, + QGLContext::BindOptions options) { QGLTexture *texture = 0; if (widget) - texture = widget->d_func()->glcx->d_func()->bindTexture(pixmap, target, format, true, true); + texture = widget->d_func()->glcx->d_func()->bindTexture(pixmap, target, format, options); else if (buffer) - texture = buffer->d_func()->qctx->d_func()->bindTexture(pixmap, target, format, true, true); + texture = buffer->d_func()->qctx->d_func()->bindTexture(pixmap, target, format, options); else if (fbo && QGLContext::currentContext()) - texture = const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(pixmap, target, format, true, true); + texture = const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(pixmap, target, format, options); #if defined(Q_WS_QWS) || (!defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)) else if (wsurf) - texture = wsurf->context()->d_func()->bindTexture(pixmap, target, format, true, true); + texture = wsurf->context()->d_func()->bindTexture(pixmap, target, format, options); #endif return texture->id; } diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 678bbb7..13ad668 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -288,6 +288,25 @@ public: virtual void swapBuffers() const; + enum BindOption { + NoBindOption = 0x0000, + InvertedYBindOption = 0x0001, + MipmapBindOption = 0x0002, + PremultipliedAlphaBindOption = 0x0004, + LinearFilteringBindOption = 0x0008, + + MemoryManagedBindOption = 0x1000, // internal flag + + DefaultBindOption = LinearFilteringBindOption | InvertedYBindOption | MipmapBindOption, + InternalBindOption = MemoryManagedBindOption | PremultipliedAlphaBindOption + }; + Q_DECLARE_FLAGS(BindOptions, BindOption) + + GLuint bindTexture(const QImage &image, GLenum target, GLint format, + BindOptions options); + GLuint bindTexture(const QPixmap &pixmap, GLenum target, GLint format, + BindOptions options); + GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA); GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, @@ -304,6 +323,10 @@ public: QMacCompatGLint format = GL_RGBA); GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum = GL_TEXTURE_2D, QMacCompatGLint format = GL_RGBA); + GLuint bindTexture(const QImage &image, QMacCompatGLenum, QMacCompatGLint format, + BindOptions); + GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum, QMacCompatGLint format, + BindOptions); void deleteTexture(QMacCompatGLuint tx_id); @@ -446,10 +469,16 @@ public: const QFont & fnt = QFont(), int listBase = 2000); QPaintEngine *paintEngine() const; + GLuint bindTexture(const QImage &image, GLenum target, GLint format, + QGLContext::BindOptions options); + GLuint bindTexture(const QPixmap &pixmap, GLenum target, GLint format, + QGLContext::BindOptions options); + GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA); GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA); + GLuint bindTexture(const QString &fileName); void deleteTexture(GLuint tx_id); @@ -462,6 +491,10 @@ public: QMacCompatGLint format = GL_RGBA); GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum = GL_TEXTURE_2D, QMacCompatGLint format = GL_RGBA); + GLuint bindTexture(const QImage &image, QMacCompatGLenum, QMacCompatGLint format, + QGLContext::BindOptions); + GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum, QMacCompatGLint format, + QGLContext::BindOptions); void deleteTexture(QMacCompatGLuint tx_id); diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index ab040ed..6905199 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -208,10 +208,12 @@ class QGLContextPrivate public: explicit QGLContextPrivate(QGLContext *context) : internal_context(false), q_ptr(context) {groupResources = new QGLContextGroupResources;} ~QGLContextPrivate() {if (!groupResources->refs.deref()) delete groupResources;} - QGLTexture *bindTexture(const QImage &image, GLenum target, GLint format, bool clean); + QGLTexture *bindTexture(const QImage &image, GLenum target, GLint format, + QGLContext::BindOptions options); QGLTexture *bindTexture(const QImage &image, GLenum target, GLint format, const qint64 key, - bool clean = false); - QGLTexture *bindTexture(const QPixmap &pixmap, GLenum target, GLint format, bool clean, bool canInvert = false); + QGLContext::BindOptions options); + QGLTexture *bindTexture(const QPixmap &pixmap, GLenum target, GLint format, + QGLContext::BindOptions options); QGLTexture *textureCacheLookup(const qint64 key, GLenum target); void init(QPaintDevice *dev, const QGLFormat &format); QImage convertToGLFormat(const QImage &image, bool force_premul, GLenum texture_format); @@ -241,7 +243,8 @@ public: quint32 gpm; int screen; QHash<QPixmapData*, QPixmap> boundPixmaps; - QGLTexture *bindTextureFromNativePixmap(QPixmapData*, const qint64 key, bool canInvert); + QGLTexture *bindTextureFromNativePixmap(QPixmapData*, const qint64 key, + QGLContext::BindOptions options); static void destroyGlSurfaceForPixmap(QPixmapData*); static void unbindPixmapFromTexture(QPixmapData*); #endif @@ -319,8 +322,10 @@ public: void doneCurrent(); QSize size() const; QGLFormat format() const; - GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA); - GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA); + GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA, + QGLContext::BindOptions = QGLContext::InternalBindOption); + GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA, + QGLContext::BindOptions = QGLContext::InternalBindOption); QColor backgroundColor() const; QGLContext *context() const; bool autoFillBackground() const; @@ -404,15 +409,18 @@ extern Q_OPENGL_EXPORT QGLShareRegister* qgl_share_reg(); class QGLTexture { public: QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, - bool _clean = false, bool _yInverted = false) - : context(ctx), id(tx_id), target(tx_target), clean(_clean), yInverted(_yInverted) + QGLContext::BindOptions opt = QGLContext::DefaultBindOption) + : context(ctx), + id(tx_id), + target(tx_target), + options(opt) #if defined(Q_WS_X11) - , boundPixmap(0) + , boundPixmap(0) #endif {} ~QGLTexture() { - if (clean) { + if (options & QGLContext::MemoryManagedBindOption) { QGLContext *current = const_cast<QGLContext *>(QGLContext::currentContext()); QGLContext *ctx = const_cast<QGLContext *>(context); Q_ASSERT(ctx); @@ -436,8 +444,9 @@ public: QGLContext *context; GLuint id; GLenum target; - bool clean; - bool yInverted; // NOTE: Y-Inverted textures are for internal use only! + + QGLContext::BindOptions options; + #if defined(Q_WS_X11) QPixmapData* boundPixmap; #endif diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index dccdf63..aca60bc 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -1599,7 +1599,8 @@ bool qt_resolveTextureFromPixmap() #endif //defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) -QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, const qint64 key, bool canInvert) +QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, const qint64 key, + QGLContext::BindOptions options) { #if !defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX) return 0; @@ -1632,7 +1633,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, con GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, // QGLContext::bindTexture() can't return an inverted texture, but QPainter::drawPixmap() can: - GLX_Y_INVERTED_EXT, canInvert ? GLX_DONT_CARE : False, + GLX_Y_INVERTED_EXT, options & QGLContext::InvertedYBindOption ? GLX_DONT_CARE : False, XNone }; configList = glXChooseFBConfig(x11Info.display(), x11Info.screen(), configAttribs, &configCount); @@ -1693,9 +1694,10 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, con glBindTexture(GL_TEXTURE_2D, textureId); - QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, canInvert, false); - texture->yInverted = (hasAlpha && RGBAConfigInverted) || (!hasAlpha && RGBConfigInverted); - if (texture->yInverted) + if (!((hasAlpha && RGBAConfigInverted) || (!hasAlpha && RGBConfigInverted))); + options &= ~QGLContext::InvertedYBindOption; + QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, options); + if (texture->options & QGLContext::InvertedYBindOption) pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture; // We assume the cost of bound pixmaps is zero diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 7452c92..b982a19 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -494,6 +494,10 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons { Q_Q(QGLContext); + // The EGL texture_from_pixmap has no facility to invert the y coordinate + if (!canInvert) + return 0; + Q_ASSERT(pd->classId() == QPixmapData::X11Class); static bool checkedForTFP = false; diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h index b03fdfa..a5f83a5 100644 --- a/src/opengl/qglextensions_p.h +++ b/src/opengl/qglextensions_p.h @@ -410,6 +410,14 @@ struct QGLExtensionFuncs #define GL_BGRA 0x80E1 #endif +#ifndef GL_RGB16 +#define GL_RGB16 32852 +#endif + +#ifndef GL_UNSIGNED_SHORT_5_6_5 +#define GL_UNSIGNED_SHORT_5_6_5 33635 +#endif + #ifndef GL_MULTISAMPLE #define GL_MULTISAMPLE 0x809D #endif diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 29f6440..0913606 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE void QGLPixmapFilterBase::bindTexture(const QPixmap &src) const { - const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(src, GL_TEXTURE_2D, GL_RGBA, true, false); + const_cast<QGLContext *>(QGLContext::currentContext())->d_func()->bindTexture(src, GL_TEXTURE_2D, GL_RGBA, QGLContext::BindOptions(QGLContext::DefaultBindOption | QGLContext::MemoryManagedBindOption)); } void QGLPixmapFilterBase::drawImpl(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF& source) const @@ -338,7 +338,6 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QGL2PaintEngineEx *engine = static_cast<QGL2PaintEngineEx *>(painter->paintEngine()); - engine->syncState(); painter->save(); // ensure GL_LINEAR filtering is used @@ -418,7 +417,7 @@ QByteArray QGLPixmapBlurFilter::generateBlurShader(int radius, bool gaussianBlur source.append("uniform highp vec4 clip;\n"); } - source.append("mediump vec4 customShader(sampler2D src, vec2 srcCoords) {\n"); + source.append("lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords) {\n"); QVector<qreal> sampleOffsets; QVector<qreal> weights; diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index f8bffd3..b07fb3b 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -104,7 +104,7 @@ QT_BEGIN_NAMESPACE on desktop systems. The programmer should restrict themselves to just features that are present in GLSL/ES, and avoid standard variable names that only work on the desktop. - + \section1 Simple shader example \code @@ -199,8 +199,11 @@ QT_BEGIN_NAMESPACE \value VertexShader Vertex shader written in the OpenGL Shading Language (GLSL). \value FragmentShader Fragment shader written in the OpenGL Shading Language (GLSL). + \value PartialVertexShader Partial vertex shader that will be concatenated with all other partial vertex shaders at link time. \value PartialFragmentShader Partial fragment shader that will be concatenated with all other partial fragment shaders at link time. + + \omitvalue PartialShader */ #ifndef GL_FRAGMENT_SHADER @@ -251,8 +254,7 @@ public: , shader(0) , shaderType(type) , compiled(false) - , isPartial(type == QGLShader::PartialVertexShader || - type == QGLShader::PartialFragmentShader) + , isPartial((type & QGLShader::PartialShader) != 0) , hasPartialSource(false) { } @@ -348,31 +350,6 @@ QGLShader::QGLShader(QGLShader::ShaderType type, QObject *parent) } /*! - Constructs a new QGLShader object from the source code in \a fileName - and attaches it to \a parent. If the filename ends in \c{.fsh}, - it is assumed to be a fragment shader, otherwise it is assumed to - be a vertex shader (normally the extension is \c{.vsh} for vertex shaders). - If the shader could not be loaded, then isCompiled() will return false. - - The shader will be associated with the current QGLContext. - - \sa isCompiled() -*/ -QGLShader::QGLShader(const QString& fileName, QObject *parent) - : QObject(parent) -{ - if (fileName.endsWith(QLatin1String(".fsh"), Qt::CaseInsensitive)) - d = new QGLShaderPrivate(QGLShader::FragmentShader, QGLContext::currentContext()); - else - d = new QGLShaderPrivate(QGLShader::VertexShader, QGLContext::currentContext()); - if (d->create() && !compileFile(fileName)) { - if (d->shader) - glDeleteShader(d->shader); - d->shader = 0; - } -} - -/*! Constructs a new QGLShader object of the specified \a type from the source code in \a fileName and attaches it to \a parent. If the shader could not be loaded, then isCompiled() will return false. @@ -413,31 +390,6 @@ QGLShader::QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObj } /*! - Constructs a new QGLShader object from the source code in \a fileName - and attaches it to \a parent. If the filename ends in \c{.fsh}, - it is assumed to be a fragment shader, otherwise it is assumed to - be a vertex shader (normally the extension is \c{.vsh} for vertex shaders). - If the shader could not be loaded, then isCompiled() will return false. - - The shader will be associated with \a context. - - \sa isCompiled() -*/ -QGLShader::QGLShader(const QString& fileName, const QGLContext *context, QObject *parent) - : QObject(parent) -{ - if (fileName.endsWith(QLatin1String(".fsh"), Qt::CaseInsensitive)) - d = new QGLShaderPrivate(QGLShader::FragmentShader, context); - else - d = new QGLShaderPrivate(QGLShader::VertexShader, context); - if (d->create() && !compileFile(fileName)) { - if (d->shader) - glDeleteShader(d->shader); - d->shader = 0; - } -} - -/*! Constructs a new QGLShader object of the specified \a type from the source code in \a fileName and attaches it to \a parent. If the shader could not be loaded, then isCompiled() will return false. @@ -489,6 +441,16 @@ static const char qualifierDefines[] = "#define highp\n"; #endif +// The "highp" qualifier doesn't exist in fragment shaders +// on all ES platforms. When it doesn't exist, use "mediump". +#ifdef QT_OPENGL_ES +#define QGL_REDEFINE_HIGHP 1 +static const char redefineHighp[] = + "#ifndef GL_FRAGMENT_PRECISION_HIGH\n" + "#define highp mediump\n" + "#endif\n"; +#endif + /*! Sets the \a source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise. @@ -511,6 +473,11 @@ bool QGLShader::compile(const char *source) #ifdef QGL_DEFINE_QUALIFIERS src.append(qualifierDefines); #endif +#ifdef QGL_REDEFINE_HIGHP + if (d->shaderType == FragmentShader || + d->shaderType == PartialFragmentShader) + src.append(redefineHighp); +#endif src.append(source); glShaderSource(d->shader, src.size(), src.data(), 0); return d->compile(this); @@ -917,6 +884,33 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QString& sour } /*! + Compiles the contents of \a fileName as a shader of the specified + \a type and adds it to this shader program. Returns true if + compilation was successful, false otherwise. The compilation errors + and warnings will be made available via log(). + + This function is intended to be a short-cut for quickly + adding vertex and fragment shaders to a shader program without + creating an instance of QGLShader first. + + \sa addShader() +*/ +bool QGLShaderProgram::addShaderFromFile + (QGLShader::ShaderType type, const QString& fileName) +{ + if (!init()) + return false; + QGLShader *shader = new QGLShader(type, this); + if (!shader->compileFile(fileName)) { + d->log = shader->log(); + delete shader; + return false; + } + d->anonShaders.append(shader); + return addShader(shader); +} + +/*! Removes \a shader from this shader program. The object is not deleted. \sa addShader(), link(), removeAllShaders() @@ -2983,6 +2977,7 @@ bool QGLShaderProgram::hasShaderPrograms(const QGLContext *context) #endif } + #endif QT_END_NAMESPACE diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h index c5295eb..d747679 100644 --- a/src/opengl/qglshaderprogram.h +++ b/src/opengl/qglshaderprogram.h @@ -63,19 +63,21 @@ class Q_OPENGL_EXPORT QGLShader : public QObject { Q_OBJECT public: - enum ShaderType + enum ShaderTypeBits { - VertexShader, - FragmentShader, - PartialVertexShader, - PartialFragmentShader + VertexShader = 0x0001, + FragmentShader = 0x0002, + + PartialShader = 0x1000, + + PartialVertexShader = PartialShader | VertexShader, + PartialFragmentShader = PartialShader | FragmentShader }; + Q_DECLARE_FLAGS(ShaderType, ShaderTypeBits) explicit QGLShader(QGLShader::ShaderType type, QObject *parent = 0); - explicit QGLShader(const QString& fileName, QObject *parent = 0); QGLShader(const QString& fileName, QGLShader::ShaderType type, QObject *parent = 0); QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0); - QGLShader(const QString& fileName, const QGLContext *context, QObject *parent = 0); QGLShader(const QString& fileName, QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0); virtual ~QGLShader(); @@ -106,6 +108,9 @@ private: Q_DISABLE_COPY(QGLShader) }; +Q_DECLARE_OPERATORS_FOR_FLAGS(QGLShader::ShaderType) + + class QGLShaderProgramPrivate; class Q_OPENGL_EXPORT QGLShaderProgram : public QObject @@ -123,6 +128,7 @@ public: bool addShader(QGLShader::ShaderType type, const char *source); bool addShader(QGLShader::ShaderType type, const QByteArray& source); bool addShader(QGLShader::ShaderType type, const QString& source); + bool addShaderFromFile(QGLShader::ShaderType type, const QString& fileName); void removeAllShaders(); diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp index e8741b5..293413c 100644 --- a/src/opengl/qgraphicsshadereffect.cpp +++ b/src/opengl/qgraphicsshadereffect.cpp @@ -1,9 +1,9 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -51,8 +51,6 @@ QT_BEGIN_NAMESPACE -#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW - /*! \class QGraphicsShaderEffect \brief The QGraphicsShaderEffect class is the base class for creating @@ -63,7 +61,9 @@ QT_BEGIN_NAMESPACE The specific effect is defined by a fragment of GLSL source code supplied to setPixelShaderFragment(). This source code must define a - function called \c{srcPixel()} that returns the source pixel value + function with the signature + \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)} + that returns the source pixel value to use in the paint engine's shader program. The shader fragment is linked with the regular shader code used by the GL2 paint engine to construct a complete QGLShaderProgram. @@ -74,10 +74,8 @@ QT_BEGIN_NAMESPACE \code static char const colorizeShaderCode[] = - "varying highp vec2 textureCoords;\n" - "uniform sampler2D imageTexture;\n" "uniform lowp vec4 effectColor;\n" - "lowp vec4 srcPixel() {\n" + "lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n" " vec4 src = texture2D(imageTexture, textureCoords);\n" " float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n" " vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n" @@ -126,13 +124,11 @@ QT_BEGIN_NAMESPACE the drawItem() method will draw its item argument directly with no effect applied. - \sa QGrapicsEffect + \sa QGraphicsEffect */ static const char qglslDefaultImageFragmentShader[] = "\ - varying highp vec2 textureCoords; \ - uniform sampler2D imageTexture; \ - lowp vec4 srcPixel() { \ + lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) { \ return texture2D(imageTexture, textureCoords); \ }\n"; @@ -216,15 +212,14 @@ QByteArray QGraphicsShaderEffect::pixelShaderFragment() const Sets the source code for the pixel shader fragment for this shader effect to \a code. - The \a code must define a GLSL function called \c{srcPixel()} + The \a code must define a GLSL function with the signature + \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)} that returns the source pixel value to use in the paint engine's shader program. The following is the default pixel shader fragment, which draws a pixmap with no effect applied: \code - varying highp vec2 textureCoords; - uniform sampler2D imageTexture; - lowp vec4 srcPixel() { + lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) { return texture2D(imageTexture, textureCoords); } \endcode @@ -316,6 +311,4 @@ void QGraphicsShaderEffect::setUniforms(QGLShaderProgram *program) Q_UNUSED(program); } -#endif // QT_NO_GRAPHICSVIEW - QT_END_NAMESPACE diff --git a/src/opengl/qgraphicsshadereffect.h b/src/opengl/qgraphicsshadereffect.h index 1612431..672973b 100644 --- a/src/opengl/qgraphicsshadereffect.h +++ b/src/opengl/qgraphicsshadereffect.h @@ -1,9 +1,9 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,8 +50,6 @@ QT_BEGIN_NAMESPACE QT_MODULE(OpenGL) -#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW - class QGLShaderProgram; class QGLCustomShaderEffectStage; class QGraphicsShaderEffectPrivate; @@ -78,8 +76,6 @@ private: friend class QGLCustomShaderEffectStage; }; -#endif // QT_NO_GRAPHICSVIEW - QT_END_NAMESPACE QT_END_HEADER diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 9434adf..ac41ab0 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -4351,13 +4351,6 @@ void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con GLdouble tc_w = r.width()/pm.width(); GLdouble tc_h = r.height()/pm.height(); - // Rotate the texture so that it is aligned correctly and the - // wrapping is done correctly - glMatrixMode(GL_TEXTURE); - glPushMatrix(); - glRotatef(180.0, 0.0, 1.0, 0.0); - glRotatef(180.0, 0.0, 0.0, 1.0); - q_vertexType vertexArray[4*2]; q_vertexType texCoordArray[4*2]; @@ -4376,7 +4369,6 @@ void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, con glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); - glPopMatrix(); glDisable(GL_TEXTURE_2D); #ifndef QT_OPENGL_ES @@ -4433,13 +4425,13 @@ void QOpenGLPaintEngine::drawTextureRect(int tx_width, int tx_height, const QRec if (target == GL_TEXTURE_2D) { x1 = sr.x() / tx_width; x2 = x1 + sr.width() / tx_width; - y1 = 1.0 - (sr.bottom() / tx_height); - y2 = 1.0 - (sr.y() / tx_height); + y1 = 1 - (sr.bottom() / tx_height); + y2 = 1 - (sr.y() / tx_height); } else { x1 = sr.x(); x2 = sr.right(); - y1 = tx_height - sr.bottom(); - y2 = tx_height - sr.y(); + y1 = sr.bottom(); + y2 = sr.y(); } q_vertexType vertexArray[4*2]; diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index a441a23..c193f12 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -108,7 +108,6 @@ QGLFramebufferObject *QGLFramebufferObjectPool::acquire(const QSize &requestSize if (sz != fboSize) { delete candidate; - qDebug() << "Resizing fbo in pool:" << sz; candidate = new QGLFramebufferObject(sz, requestFormat); } @@ -117,7 +116,6 @@ QGLFramebufferObject *QGLFramebufferObjectPool::acquire(const QSize &requestSize } if (!chosen) { - qDebug() << "Creating new fbo in pool:" << requestSize; chosen = new QGLFramebufferObject(requestSize, requestFormat); } @@ -273,7 +271,7 @@ void QGLPixmapData::ensureCreated() const m_source = QImage(); } - m_texture.clean = false; + m_texture.options &= ~QGLContext::MemoryManagedBindOption; } QGLFramebufferObject *QGLPixmapData::fbo() const diff --git a/src/opengl/util/fragmentprograms_p.h b/src/opengl/util/fragmentprograms_p.h index 9451eda..6decaca 100644 --- a/src/opengl/util/fragmentprograms_p.h +++ b/src/opengl/util/fragmentprograms_p.h @@ -1,57 +1,6 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtOpenGL module 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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ #ifndef FRAGMENTPROGRAMS_H #define FRAGMENTPROGRAMS_H -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - enum FragmentVariable { VAR_BRUSH_TEXTURE, VAR_LINEAR, @@ -71,7 +20,7 @@ enum FragmentVariable { VAR_FMP2_M_RADIUS2, VAR_FMP, VAR_INV_MATRIX_M0, - VAR_ANGLE + VAR_ANGLE, }; enum FragmentBrushType { @@ -80,7 +29,7 @@ enum FragmentBrushType { FRAGMENT_PROGRAM_BRUSH_CONICAL, FRAGMENT_PROGRAM_BRUSH_LINEAR, FRAGMENT_PROGRAM_BRUSH_TEXTURE, - FRAGMENT_PROGRAM_BRUSH_PATTERN + FRAGMENT_PROGRAM_BRUSH_PATTERN, }; enum FragmentCompositionModeType { @@ -109,12 +58,12 @@ enum FragmentCompositionModeType { COMPOSITION_MODES_DIFFERENCE_NOMASK, COMPOSITION_MODES_EXCLUSION_NOMASK, COMPOSITION_MODE_BLEND_MODE_MASK, - COMPOSITION_MODE_BLEND_MODE_NOMASK + COMPOSITION_MODE_BLEND_MODE_NOMASK, }; enum FragmentMaskType { FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA, - FRAGMENT_PROGRAM_MASK_ELLIPSE_AA + FRAGMENT_PROGRAM_MASK_ELLIPSE_AA, }; static const unsigned int num_fragment_variables = 19; @@ -133,55 +82,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA = "TEMP R4;\n" "ADD R4.x, fragment.position, c[0];\n" "ADD R0.y, fragment.position, -c[0].x;\n" - "MAX R2.x, R0.y, fragment.texcoord[0].y;\n" + "MAX R3.w, fragment.texcoord[0].y, R0.y;\n" "ADD R0.x, fragment.position.y, c[0];\n" - "MIN R2.y, R0.x, fragment.texcoord[0].x;\n" - "ADD R3.x, fragment.position, -c[0];\n" + "MIN R3.z, R0.x, fragment.texcoord[0].x;\n" + "ADD R2.z, fragment.position.x, -c[0].x;\n" + "MOV R0.yw, R3.w;\n" + "MOV R0.xz, R3.z;\n" + "MAD R1, fragment.texcoord[1].xxzz, R0, fragment.texcoord[1].yyww;\n" + "MAD R1.zw, fragment.position.x, c[0].y, -R1;\n" + "MOV R0.z, R1.x;\n" + "MOV R0.w, R1.z;\n" + "MOV R0.y, R1.w;\n" + "MOV R0.x, R1.y;\n" + "MIN R2.xy, R0.zwzw, R0;\n" + "SGE R1.xy, R0, R0.zwzw;\n" "ADD R1.zw, -fragment.texcoord[0], -fragment.texcoord[0];\n" - "MOV R3.y, R4.x;\n" - "MOV R0.yw, R2.x;\n" - "MOV R0.xz, R2.y;\n" - "MAD R0, fragment.texcoord[1].xxzz, R0, fragment.texcoord[1].yyww;\n" - "MAD R1.xy, fragment.position.x, c[0].y, -R0.zwzw;\n" - "MOV R0.w, R1.x;\n" - "MOV R1.x, R0.y;\n" - "MOV R0.z, R0.x;\n" - "SGE R2.zw, R1.xyxy, R0;\n" - "MAX R0.xy, R0.zwzw, R1;\n" - "MIN R0.zw, R0, R1.xyxy;\n" - "MAD R2.zw, R2, R1, fragment.texcoord[0];\n" - "ADD R1, R3.xyxy, -R0.zzww;\n" - "MAD R1, R1, R2.zzww, R2.x;\n" - "ADD R3.zw, R0.xyxy, R0;\n" - "ADD R3.y, R2, -R2.x;\n" - "ADD R2.zw, R1.xyyw, -R2.x;\n" - "ADD R4.zw, R4.x, -R0;\n" - "MUL R2.zw, R4, R2;\n" - "ADD R4.zw, R1.xyyw, R1.xyxz;\n" - "ADD R1.xz, R2.y, -R1;\n" - "MAD R2.zw, -R2, c[0].x, R3.y;\n" - "MAD R3.zw, R3, c[0].x, -R3.x;\n" - "MAD R3.zw, R3, R3.y, -R2;\n" - "ADD R1.y, R4.x, -R3.x;\n" - "MAD R4.zw, -R4, c[0].x, R2.y;\n" - "MUL R4.zw, R4, R1.y;\n" - "ADD R1.yw, R0.xxzy, -R3.x;\n" - "MUL R1.xy, R1.xzzw, R1.ywzw;\n" - "MAD R1.zw, R1.xyxy, c[0].x, -R4;\n" - "SGE R1.xy, R4.x, R0;\n" - "MUL R1.zw, R1.xyxy, R1;\n" - "MAD R1.xy, R1, R3.zwzw, R2.zwzw;\n" - "SGE R2.zw, R3.x, R0;\n" - "ADD R1.zw, R4, R1;\n" - "ADD R1.zw, R1, -R1.xyxy;\n" - "MAD R1.xy, R2.zwzw, R1.zwzw, R1;\n" - "ADD R1.xy, R1, -R3.y;\n" - "SGE R0.zw, R4.x, R0;\n" - "MAD R0.zw, R0, R1.xyxy, R3.y;\n" - "SGE R0.xy, R0, R3.x;\n" + "MAX R0.xy, R0.zwzw, R0;\n" + "MAD R3.xy, R1, R1.zwzw, fragment.texcoord[0].zwzw;\n" + "MOV R2.w, R4.x;\n" + "ADD R1, -R2.xxyy, R2.zwzw;\n" + "MAD R1, R1, R3.xxyy, R3.w;\n" + "ADD R3.xy, R1.ywzw, R1.xzzw;\n" + "ADD R4.zw, R3.z, -R1.xyxz;\n" + "ADD R1.zw, -R3.w, R1.xyyw;\n" + "ADD R1.xy, R4.x, -R2;\n" + "MUL R1.xy, R1, R1.zwzw;\n" + "MAD R3.xy, -R3, c[0].x, R3.z;\n" + "ADD R2.w, R4.x, -R2.z;\n" + "MUL R0.zw, R3.xyxy, R2.w;\n" + "ADD R2.w, R3.z, -R3;\n" + "ADD R3.xy, -R2.z, R0;\n" + "MUL R3.xy, R4.zwzw, R3;\n" + "ADD R4.zw, R2.xyxy, R0.xyxy;\n" + "MAD R1.zw, R4, c[0].x, -R2.z;\n" + "MAD R1.xy, -R1, c[0].x, R2.w;\n" + "MAD R4.zw, R2.w, R1, -R1.xyxy;\n" + "SGE R1.zw, R4.x, R0.xyxy;\n" + "MAD R3.xy, R3, c[0].x, -R0.zwzw;\n" + "MAD R1.xy, R1.zwzw, R4.zwzw, R1;\n" + "MAD R0.zw, R1, R3.xyxy, R0;\n" + "ADD R1.zw, R0, -R1.xyxy;\n" + "SGE R0.zw, R2.z, R2.xyxy;\n" + "MAD R0.zw, R0, R1, R1.xyxy;\n" + "ADD R0.zw, -R2.w, R0;\n" + "SGE R1.xy, R4.x, R2;\n" + "MAD R0.zw, R1.xyxy, R0, R2.w;\n" + "SGE R0.xy, R0, R2.z;\n" "MUL R0.xy, R0.zwzw, R0;\n" - "ADD R0.x, R3.y, -R0;\n" - "SGE R0.z, R2.y, R2.x;\n" + "ADD R0.x, R2.w, -R0;\n" + "SGE R0.z, R3, R3.w;\n" "ADD R0.x, R0, -R0.y;\n" "MUL result.color, R0.x, R0.z;\n" "END\n" @@ -195,20 +144,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_ELLIPSE_AA = "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R1.xyz, R0.y, c[2];\n" - "MAD R0.xyz, R0.x, c[1], R1;\n" - "ADD R0.xyz, R0, c[3];\n" + "ADD R0.xy, fragment.position, c[3];\n" + "MUL R1.xyz, R0.y, c[1];\n" + "MAD R0.xyz, R0.x, c[0], R1;\n" + "ADD R0.xyz, R0, c[2];\n" "RCP R2.z, R0.z;\n" - "MUL R0.zw, R0.xyxy, R2.z;\n" - "MUL R2.xy, R0.zwzw, fragment.texcoord[0];\n" - "MOV R1.xy, c[1];\n" - "MOV R1.zw, c[2].xyxy;\n" - "MOV R0.x, c[1].z;\n" - "MOV R0.y, c[2].z;\n" - "MAD R0, -R0.xyxy, R0.zzww, R1.xzyw;\n" + "MUL R1.zw, R0.xyxy, R2.z;\n" + "MUL R2.xy, R1.zwzw, fragment.texcoord[0];\n" + "MOV R1.x, c[0].z;\n" + "MOV R1.y, c[1].z;\n" + "MOV R0.xy, c[0];\n" + "MOV R0.zw, c[1].xyxy;\n" + "MAD R0, R1.zzww, -R1.xyxy, R0.xzyw;\n" "MUL R1.xy, R2, fragment.texcoord[0];\n" - "MUL R0, R0, R2.z;\n" + "MUL R0, R2.z, R0;\n" "MUL R1.xy, R1, c[4].x;\n" "MUL R1.zw, R1.xyxy, R0.xyxz;\n" "MUL R0.xy, R1, R0.ywzw;\n" @@ -230,36 +179,34 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_ELLIPSE_AA = static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SIMPLE_PORTER_DUFF = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "MUL R0.xyz, R1, c[6].y;\n" - "MUL R2.xyz, R0, fragment.color.primary.w;\n" - "MUL R0.xyz, fragment.color.primary, c[6].x;\n" - "MAD R2.xyz, R0, R1.w, R2;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "ADD R0.w, -R1, c[4].x;\n" - "MUL R0.xyz, fragment.color.primary, c[5].y;\n" - "MAD R2.xyz, R0, R0.w, R2;\n" - "MUL R0.xyz, R1, c[5].z;\n" - "ADD R0.w, -fragment.color.primary, c[4].x;\n" - "MAD R2.xyz, R0, R0.w, R2;\n" - "ADD R0.y, -R1.w, c[4].x;\n" - "MUL R0.x, fragment.color.primary.w, R1.w;\n" - "MUL R0.y, fragment.color.primary.w, R0;\n" - "MUL R0.z, R1.w, R0.w;\n" - "DP3 R2.w, R0, c[5];\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.xyz, R0, c[0].y;\n" + "MUL R2.xyz, fragment.color.primary.w, R1;\n" + "MUL R1.xyz, fragment.color.primary, c[0].x;\n" + "MAD R2.xyz, R0.w, R1, R2;\n" + "ADD R3.xy, fragment.position, c[4];\n" + "ADD R1.w, -R0, c[6].x;\n" + "MUL R1.xyz, fragment.color.primary, c[1].y;\n" + "MAD R2.xyz, R1.w, R1, R2;\n" + "MUL R1.xyz, R0, c[1].z;\n" + "ADD R2.w, -fragment.color.primary, c[6].x;\n" + "MAD R2.xyz, R2.w, R1, R2;\n" + "MUL R1.z, R0.w, R2.w;\n" + "MUL R1.x, fragment.color.primary.w, R0.w;\n" + "MUL R1.y, fragment.color.primary.w, R1.w;\n" + "DP3 R2.w, R1, c[1];\n" + "MUL R3.xy, R3, c[2];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[5];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -270,21 +217,21 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "ADD R0.x, -R1.w, c[4];\n" - "MUL R0.xyz, fragment.color.primary, R0.x;\n" - "MAD R0.xyz, fragment.color.primary, R1, R0;\n" - "ADD R0.w, -fragment.color.primary, c[4].x;\n" - "MAD R2.xyz, R1, R0.w, R0;\n" - "ADD R0.z, fragment.color.primary.w, R1.w;\n" - "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, fragment.position, c[1];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R1.x, -R0.w, c[4];\n" + "MUL R1.xyz, fragment.color.primary, R1.x;\n" + "MAD R1.xyz, fragment.color.primary, R0, R1;\n" + "ADD R1.w, -fragment.color.primary, c[4].x;\n" + "MAD R2.xyz, R0, R1.w, R1;\n" + "ADD R1.z, fragment.color.primary.w, R0.w;\n" + "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[3];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -294,16 +241,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "ADD R2, fragment.color.primary, R1;\n" - "MUL R0.xy, R0, c[1];\n" - "MAD R2, -fragment.color.primary, R1, R2;\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, fragment.position, c[1];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R1.xy, fragment.position, c[2];\n" + "ADD R2, fragment.color.primary, R0;\n" + "MUL R1.xy, R1, c[0];\n" + "MAD R2, -fragment.color.primary, R0, R2;\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[3];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -315,7 +262,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xy, fragment.position, c[3];\n" + "MUL R0.xy, fragment.position, c[1];\n" "TEX R1, R0, texture[0], 2D;\n" "ADD R0.w, -R1, c[4].y;\n" "MUL R3.xyz, fragment.color.primary, R0.w;\n" @@ -336,11 +283,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "MAD R2.xyz, R0, R3, R2;\n" "ADD R0.z, fragment.color.primary.w, R1.w;\n" "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[2];\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[3];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -352,23 +299,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "MUL R2.xyz, R1, fragment.color.primary.w;\n" - "MUL R0.xyz, fragment.color.primary, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "ADD R0.w, -R1, c[4].x;\n" - "MAD R0.xyz, fragment.color.primary, R0.w, R0;\n" - "ADD R0.w, -fragment.color.primary, c[4].x;\n" - "MAD R2.xyz, R1, R0.w, R0;\n" - "ADD R0.z, fragment.color.primary.w, R1.w;\n" - "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, fragment.position, c[1];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R2.xyz, fragment.color.primary.w, R0;\n" + "MUL R1.xyz, fragment.color.primary, R0.w;\n" + "MIN R1.xyz, R1, R2;\n" + "ADD R1.w, -R0, c[4].x;\n" + "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" + "ADD R1.w, -fragment.color.primary, c[4].x;\n" + "MAD R2.xyz, R0, R1.w, R1;\n" + "ADD R1.z, fragment.color.primary.w, R0.w;\n" + "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[3];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -379,35 +326,35 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "MUL R2.xyz, R1, fragment.color.primary.w;\n" - "MUL R0.xyz, fragment.color.primary, R1.w;\n" - "MAX R0.xyz, R0, R2;\n" - "ADD R0.w, -R1, c[4].x;\n" - "MAD R0.xyz, fragment.color.primary, R0.w, R0;\n" - "ADD R0.w, -fragment.color.primary, c[4].x;\n" - "MAD R2.xyz, R1, R0.w, R0;\n" - "ADD R0.z, fragment.color.primary.w, R1.w;\n" - "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, fragment.position, c[1];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R2.xyz, fragment.color.primary.w, R0;\n" + "MUL R1.xyz, fragment.color.primary, R0.w;\n" + "MAX R1.xyz, R1, R2;\n" + "ADD R1.w, -R0, c[4].x;\n" + "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" + "ADD R1.w, -fragment.color.primary, c[4].x;\n" + "MAD R2.xyz, R0, R1.w, R1;\n" + "ADD R1.z, fragment.color.primary.w, R0.w;\n" + "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[3];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORDODGE = "!!ARBfp1.0\n" "PARAM c[5] = { program.local[0..3],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xy, fragment.position, c[3];\n" + "MUL R0.xy, fragment.position, c[1];\n" "TEX R0, R0, texture[0], 2D;\n" "ADD R1.y, -fragment.color.primary.w, c[4].x;\n" "MAX R1.x, fragment.color.primary.w, c[4].y;\n" @@ -417,7 +364,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "RCP R1.x, R1.x;\n" "MAD R1.xyz, -fragment.color.primary, R1.x, c[4].x;\n" "MAX R1.xyz, R1, c[4].y;\n" - "MUL R2.xyz, R0, fragment.color.primary.w;\n" + "MUL R2.xyz, fragment.color.primary.w, R0;\n" "MUL R1.w, fragment.color.primary, R0;\n" "RCP R1.x, R1.x;\n" "RCP R1.y, R1.y;\n" @@ -430,11 +377,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "MAD R2.xyz, R2, R3, R1;\n" "ADD R1.z, fragment.color.primary.w, R0.w;\n" "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[3];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -442,29 +389,28 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORBURN = "!!ARBfp1.0\n" "PARAM c[5] = { program.local[0..3],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xy, fragment.position, c[3];\n" + "MUL R0.xy, fragment.position, c[1];\n" "TEX R0, R0, texture[0], 2D;\n" "ADD R1.w, -R0, c[4].x;\n" - "MUL R1.xyz, R0, fragment.color.primary.w;\n" + "MUL R1.xyz, fragment.color.primary.w, R0;\n" "MAD R2.xyz, fragment.color.primary, R0.w, R1;\n" "MAD R1.xyz, -fragment.color.primary.w, R0.w, R2;\n" "MUL R3.xyz, fragment.color.primary.w, R1;\n" "MAX R1.xyz, fragment.color.primary, c[4].y;\n" + "ADD R2.w, -fragment.color.primary, c[4].x;\n" "MUL R4.xyz, fragment.color.primary, R1.w;\n" "RCP R1.x, R1.x;\n" "RCP R1.y, R1.y;\n" "RCP R1.z, R1.z;\n" "MAD R3.xyz, R3, R1, R4;\n" - "ADD R2.w, -fragment.color.primary, c[4].x;\n" "MUL R1.xyz, R0, R2.w;\n" "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" - "ADD R2.w, -fragment.color.primary, c[4].x;\n" "MAD R3.xyz, R0, R2.w, R3;\n" "MUL R1.w, fragment.color.primary, R0;\n" "ADD R3.xyz, R3, -R1;\n" @@ -472,11 +418,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "MAD R2.xyz, R2, R3, R1;\n" "ADD R1.z, fragment.color.primary.w, R0.w;\n" "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[3];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -489,7 +435,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xy, fragment.position, c[3];\n" + "MUL R0.xy, fragment.position, c[1];\n" "TEX R1, R0, texture[0], 2D;\n" "ADD R0.w, -R1, c[4].y;\n" "MUL R3.xyz, fragment.color.primary, R0.w;\n" @@ -510,11 +456,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "MAD R2.xyz, R0, R3, R2;\n" "ADD R0.z, fragment.color.primary.w, R1.w;\n" "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[2];\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[3];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -522,58 +468,56 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..3],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xy, fragment.position, c[3];\n" + "MUL R0.xy, fragment.position, c[1];\n" "TEX R0, R0, texture[0], 2D;\n" "MAX R1.x, R0.w, c[4].y;\n" "RCP R1.w, R1.x;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R1.xyz, -R2, c[4].w;\n" + "MUL R1.xyz, -R2, c[5].x;\n" "RSQ R2.w, R2.x;\n" - "ADD R4.xyz, R1, c[5].x;\n" + "ADD R4.xyz, R1, c[4].w;\n" "MAD R1.xyz, -R0, R1.w, c[4].x;\n" "RSQ R2.z, R2.z;\n" "RSQ R2.y, R2.y;\n" "RCP R2.x, R2.w;\n" "RCP R2.z, R2.z;\n" "RCP R2.y, R2.y;\n" - "MAD R5.xyz, R2, R0.w, -R0;\n" + "MAD R5.xyz, R0.w, R2, -R0;\n" "MAD R2.xyz, fragment.color.primary, c[4].z, -fragment.color.primary.w;\n" "MUL R3.xyz, R1, R2;\n" "MAD R3.xyz, -R3, R4, fragment.color.primary.w;\n" "MUL R4.xyz, R5, R2;\n" "MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n" - "MAD R5.xyz, R0, fragment.color.primary.w, R4;\n" "MUL R3.xyz, R0, R3;\n" - "MUL R4.xyz, R0, c[4].w;\n" - "ADD R5.xyz, R5, -R3;\n" - "SGE R4.xyz, R4, R0.w;\n" - "MUL R4.xyz, R4, R5;\n" - "ADD R2.xyz, R3, R4;\n" + "MAD R4.xyz, fragment.color.primary.w, R0, R4;\n" + "ADD R5.xyz, R4, -R3;\n" + "MUL R4.xyz, R0, c[5].x;\n" + "SGE R2.xyz, R4, R0.w;\n" + "MAD R2.xyz, R2, R5, R3;\n" "MUL R1.xyz, R0, R1;\n" "MUL R3.xyz, fragment.color.primary, c[4].z;\n" "ADD R2.xyz, R2, -R1;\n" "SGE R3.xyz, R3, fragment.color.primary.w;\n" - "MUL R2.xyz, R3, R2;\n" - "ADD R1.xyz, R1, R2;\n" + "MAD R1.xyz, R3, R2, R1;\n" "ADD R1.w, -R0, c[4].x;\n" "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" "ADD R1.w, -fragment.color.primary, c[4].x;\n" "MAD R2.xyz, R0, R1.w, R1;\n" "ADD R1.z, fragment.color.primary.w, R0.w;\n" "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[3];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -586,77 +530,75 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "MUL R2.xyz, R1, fragment.color.primary.w;\n" - "MUL R0.xyz, fragment.color.primary, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "ADD R3.xyz, fragment.color.primary, R1;\n" - "MAD R2.xyz, -R0, c[4].x, R3;\n" - "ADD R0.z, fragment.color.primary.w, R1.w;\n" - "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, fragment.position, c[1];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R1.xyz, fragment.color.primary, R0;\n" + "MUL R3.xyz, fragment.color.primary.w, R0;\n" + "MUL R2.xyz, fragment.color.primary, R0.w;\n" + "MIN R2.xyz, R2, R3;\n" + "MAD R2.xyz, -R2, c[4].x, R1;\n" + "ADD R1.z, fragment.color.primary.w, R0.w;\n" + "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[3];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_EXCLUSION = "!!ARBfp1.0\n" "PARAM c[5] = { program.local[0..3],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xy, fragment.position, c[3];\n" - "TEX R1, R0, texture[0], 2D;\n" - "MUL R0.xyz, R1, fragment.color.primary.w;\n" - "MAD R2.xyz, fragment.color.primary, R1.w, R0;\n" - "MUL R0.xyz, fragment.color.primary, R1;\n" - "MAD R0.xyz, -R0, c[4].y, R2;\n" - "ADD R0.w, -R1, c[4].x;\n" - "MAD R0.xyz, fragment.color.primary, R0.w, R0;\n" - "ADD R0.w, -fragment.color.primary, c[4].x;\n" - "MAD R2.xyz, R1, R0.w, R0;\n" - "ADD R0.z, fragment.color.primary.w, R1.w;\n" - "MAD R2.w, -fragment.color.primary, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, fragment.position, c[1];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.xyz, fragment.color.primary.w, R0;\n" + "MAD R2.xyz, fragment.color.primary, R0.w, R1;\n" + "MUL R1.xyz, fragment.color.primary, R0;\n" + "MAD R1.xyz, -R1, c[4].x, R2;\n" + "ADD R1.w, -R0, c[4].y;\n" + "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" + "ADD R1.w, -fragment.color.primary, c[4].y;\n" + "MAD R2.xyz, R0, R1.w, R1;\n" + "ADD R1.z, fragment.color.primary.w, R0.w;\n" + "MAD R2.w, -fragment.color.primary, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[2];\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[3];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK = "!!ARBfp1.0\n" - "PARAM c[4] = { program.local[0],\n" - " { 1 },\n" - " program.local[2..3] };\n" + "PARAM c[4] = { program.local[0..2],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xy, fragment.position, c[0];\n" + "MUL R0.xy, fragment.position, c[2];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R1.xyz, R0, c[3].y;\n" - "MUL R2.xyz, R1, fragment.color.primary.w;\n" - "MUL R1.xyz, fragment.color.primary, c[3].x;\n" - "MAD R2.xyz, R1, R0.w, R2;\n" - "MUL R0.xyz, R0, c[2].z;\n" - "ADD R1.w, -R0, c[1].x;\n" - "MUL R1.xyz, fragment.color.primary, c[2].y;\n" - "MAD R1.xyz, R1, R1.w, R2;\n" - "ADD R1.w, -fragment.color.primary, c[1].x;\n" - "MAD result.color.xyz, R0, R1.w, R1;\n" - "ADD R0.y, -R0.w, c[1].x;\n" + "MUL R1.xyz, R0, c[0].y;\n" + "MUL R2.xyz, fragment.color.primary.w, R1;\n" + "MUL R1.xyz, fragment.color.primary, c[0].x;\n" + "MAD R2.xyz, R0.w, R1, R2;\n" + "MUL R0.xyz, R0, c[1].z;\n" + "ADD R1.w, -R0, c[3].x;\n" + "MUL R1.xyz, fragment.color.primary, c[1].y;\n" + "MAD R1.xyz, R1.w, R1, R2;\n" + "ADD R2.x, -fragment.color.primary.w, c[3];\n" + "MAD result.color.xyz, R2.x, R0, R1;\n" "MUL R0.x, fragment.color.primary.w, R0.w;\n" - "MUL R0.z, R0.w, R1.w;\n" - "MUL R0.y, fragment.color.primary.w, R0;\n" - "DP3 result.color.w, R0, c[2];\n" + "MUL R0.z, R0.w, R2.x;\n" + "MUL R0.y, fragment.color.primary.w, R1.w;\n" + "DP3 result.color.w, R0, c[1];\n" "END\n" ; @@ -732,7 +674,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R2;\n" "MUL R0.xy, fragment.position, c[0];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R2.xyz, R0, fragment.color.primary.w;\n" + "MUL R2.xyz, fragment.color.primary.w, R0;\n" "MUL R1.xyz, fragment.color.primary, R0.w;\n" "MIN R1.xyz, R1, R2;\n" "ADD R1.w, -R0, c[1].x;\n" @@ -753,7 +695,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R2;\n" "MUL R0.xy, fragment.position, c[0];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R2.xyz, R0, fragment.color.primary.w;\n" + "MUL R2.xyz, fragment.color.primary.w, R0;\n" "MUL R1.xyz, fragment.color.primary, R0.w;\n" "MAX R1.xyz, R1, R2;\n" "ADD R1.w, -R0, c[1].x;\n" @@ -768,7 +710,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORDODGE_NOMASK = "!!ARBfp1.0\n" "PARAM c[2] = { program.local[0],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -782,7 +724,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" "MAD R2.xyz, -fragment.color.primary, R2.x, c[1].x;\n" "MAX R2.xyz, R2, c[1].y;\n" - "MUL R0.xyz, R0, fragment.color.primary.w;\n" + "MUL R0.xyz, fragment.color.primary.w, R0;\n" "MUL R1.w, fragment.color.primary, R0;\n" "RCP R2.x, R2.x;\n" "RCP R2.y, R2.y;\n" @@ -801,7 +743,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_COLORBURN_NOMASK = "!!ARBfp1.0\n" "PARAM c[2] = { program.local[0],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -809,7 +751,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R4;\n" "MUL R0.xy, fragment.position, c[0];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R1.xyz, R0, fragment.color.primary.w;\n" + "MUL R1.xyz, fragment.color.primary.w, R0;\n" "MAD R2.xyz, fragment.color.primary, R0.w, R1;\n" "MAD R1.xyz, -fragment.color.primary.w, R0.w, R2;\n" "MUL R3.xyz, fragment.color.primary.w, R1;\n" @@ -822,7 +764,6 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "RCP R1.z, R1.z;\n" "MAD R1.xyz, R3, R1, R4;\n" "MUL R3.xyz, R0, R2.w;\n" - "ADD R2.w, -fragment.color.primary, c[1].x;\n" "MAD R0.xyz, R0, R2.w, R1;\n" "MAD R1.xyz, fragment.color.primary, R1.w, R3;\n" "MUL R1.w, fragment.color.primary, R0;\n" @@ -869,8 +810,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT_NOMASK = "!!ARBfp1.0\n" "PARAM c[3] = { program.local[0],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -882,8 +823,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "MAX R1.x, R0.w, c[1].y;\n" "RCP R1.w, R1.x;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R1.xyz, -R2, c[1].w;\n" - "ADD R4.xyz, R1, c[2].x;\n" + "MUL R1.xyz, -R2, c[2].x;\n" + "ADD R4.xyz, R1, c[1].w;\n" "MAD R1.xyz, -R0, R1.w, c[1].x;\n" "RSQ R2.w, R2.x;\n" "RSQ R2.z, R2.z;\n" @@ -891,25 +832,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "RCP R2.x, R2.w;\n" "RCP R2.z, R2.z;\n" "RCP R2.y, R2.y;\n" - "MAD R5.xyz, R2, R0.w, -R0;\n" + "MAD R5.xyz, R0.w, R2, -R0;\n" "MAD R2.xyz, fragment.color.primary, c[1].z, -fragment.color.primary.w;\n" "MUL R3.xyz, R1, R2;\n" "MAD R3.xyz, -R3, R4, fragment.color.primary.w;\n" "MUL R4.xyz, R5, R2;\n" "MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n" - "MAD R5.xyz, R0, fragment.color.primary.w, R4;\n" "MUL R3.xyz, R0, R3;\n" - "MUL R4.xyz, R0, c[1].w;\n" - "ADD R5.xyz, R5, -R3;\n" - "SGE R4.xyz, R4, R0.w;\n" - "MUL R4.xyz, R4, R5;\n" - "ADD R2.xyz, R3, R4;\n" + "MAD R4.xyz, fragment.color.primary.w, R0, R4;\n" + "ADD R5.xyz, R4, -R3;\n" + "MUL R4.xyz, R0, c[2].x;\n" + "SGE R2.xyz, R4, R0.w;\n" + "MAD R2.xyz, R2, R5, R3;\n" "MUL R1.xyz, R0, R1;\n" "MUL R3.xyz, fragment.color.primary, c[1].z;\n" "ADD R2.xyz, R2, -R1;\n" "SGE R3.xyz, R3, fragment.color.primary.w;\n" - "MUL R2.xyz, R3, R2;\n" - "ADD R1.xyz, R1, R2;\n" + "MAD R1.xyz, R3, R2, R1;\n" "ADD R1.w, -R0, c[1].x;\n" "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" "ADD R1.w, fragment.color.primary, R0;\n" @@ -928,7 +867,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "TEMP R2;\n" "MUL R0.xy, fragment.position, c[0];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R2.xyz, R0, fragment.color.primary.w;\n" + "MUL R2.xyz, fragment.color.primary.w, R0;\n" "MUL R1.xyz, fragment.color.primary, R0.w;\n" "ADD R1.w, fragment.color.primary, R0;\n" "MIN R1.xyz, R1, R2;\n" @@ -941,20 +880,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_EXCLUSION_NOMASK = "!!ARBfp1.0\n" "PARAM c[2] = { program.local[0],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "MUL R0.xy, fragment.position, c[0];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R1.xyz, R0, fragment.color.primary.w;\n" + "MUL R1.xyz, fragment.color.primary.w, R0;\n" "MAD R2.xyz, fragment.color.primary, R0.w, R1;\n" "MUL R1.xyz, fragment.color.primary, R0;\n" - "MAD R1.xyz, -R1, c[1].y, R2;\n" - "ADD R1.w, -R0, c[1].x;\n" + "MAD R1.xyz, -R1, c[1].x, R2;\n" + "ADD R1.w, -R0, c[1].y;\n" "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n" "ADD R1.w, fragment.color.primary, R0;\n" - "ADD R2.x, -fragment.color.primary.w, c[1];\n" + "ADD R2.x, -fragment.color.primary.w, c[1].y;\n" "MAD result.color.xyz, R0, R2.x, R1;\n" "MAD result.color.w, -fragment.color.primary, R0, R1;\n" "END\n" @@ -964,8 +903,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE "!!ARBfp1.0\n" "PARAM c[3] = { program.local[0..2] };\n" "TEMP R0;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[1];\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[0], 2D;\n" "DP4 R0.x, R0, c[2];\n" "MUL result.color, fragment.color.primary, R0.x;\n" @@ -974,359 +913,351 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE_BLEND_MODE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[1] = { program.local[0] };\n" "MOV result.color, fragment.color.primary;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF = "!!ARBfp1.0\n" - "PARAM c[12] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..11] };\n" + "PARAM c[12] = { program.local[0..10],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" "ADD R0.z, R0, R0.w;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "RSQ R0.z, R0.y;\n" - "RCP R0.z, R0.z;\n" - "ADD R0.x, -R0, R0.z;\n" - "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, c[7].x;\n" - "MUL R0.y, c[8].x, R0;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.x, R0, R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, c[11].y;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[11].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "ADD R2.w, -R1, c[7].z;\n" - "MUL R0.xyz, R0, c[10].y;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "MUL R0.xyz, R1, c[10].z;\n" - "ADD R3.z, -R0.w, c[7];\n" - "MAD R2.xyz, R0, R3.z, R2;\n" - "MUL R0.y, R0.w, R2.w;\n" - "MUL R0.x, R0.w, R1.w;\n" - "MUL R0.z, R1.w, R3;\n" - "DP3 R2.w, R0, c[10];\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.x, c[11].x;\n" + "MUL R0.z, R0, c[11].y;\n" + "MAD R0.x, R0.y, R0.y, -R0.z;\n" + "RSQ R0.x, R0.x;\n" + "RCP R0.z, R0.x;\n" + "ADD R1.x, -R0.y, R0.z;\n" + "MOV R0.x, c[11];\n" + "MUL R0.z, R0.x, c[1].x;\n" + "RCP R1.y, R0.z;\n" + "MUL R0.xy, fragment.position, c[8];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.x, R1, R1.y;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R2.xyz, R0, c[5].y;\n" + "MUL R3.xyz, R1.w, R2;\n" + "MUL R2.xyz, R1, c[5].x;\n" + "MAD R2.xyz, R0.w, R2, R3;\n" + "ADD R3.xy, fragment.position, c[9];\n" + "ADD R2.w, -R0, c[11].z;\n" + "MUL R1.xyz, R1, c[6].y;\n" + "MAD R2.xyz, R2.w, R1, R2;\n" + "MUL R1.xyz, R0, c[6].z;\n" + "ADD R3.z, -R1.w, c[11];\n" + "MAD R2.xyz, R3.z, R1, R2;\n" + "MUL R1.y, R1.w, R2.w;\n" + "MUL R1.x, R1.w, R0.w;\n" + "MUL R1.z, R0.w, R3;\n" + "DP3 R2.w, R1, c[6];\n" + "MUL R3.xy, R3, c[7];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[10];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_MULTIPLY = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.z, R0.y;\n" - "ADD R0.x, -R0, R0.z;\n" - "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, c[7].x;\n" - "MUL R0.y, c[8].x, R0;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.x, R0, R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R2.x, -R1.w, c[7].z;\n" - "MUL R2.xyz, R0, R2.x;\n" - "MAD R0.xyz, R0, R1, R2;\n" - "ADD R2.x, -R0.w, c[7].z;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.x, c[9].x;\n" + "MUL R0.z, R0, c[9].y;\n" + "MAD R0.x, R0.y, R0.y, -R0.z;\n" + "RSQ R0.x, R0.x;\n" + "RCP R0.z, R0.x;\n" + "ADD R1.x, -R0.y, R0.z;\n" + "MOV R0.x, c[9];\n" + "MUL R0.z, R0.x, c[1].x;\n" + "RCP R1.y, R0.z;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.x, R1, R1.y;\n" + "TEX R1, R1, texture[2], 1D;\n" + "ADD R2.x, -R0.w, c[9].z;\n" + "MUL R2.xyz, R1, R2.x;\n" + "MAD R1.xyz, R1, R0, R2;\n" + "ADD R2.x, -R1.w, c[9].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, R1, c[5];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SCREEN = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" - "ADD R3.xy, fragment.position, c[0];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.z, -R0, c[1].x;\n" + "ADD R3.xy, fragment.position, c[7];\n" + "MUL R0.y, R0.z, c[9];\n" + "MUL R0.x, R0, c[9];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[9].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R2, R0, R1;\n" - "MAD R2, -R0, R1, R2;\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.z, R0.x, R0.y;\n" + "TEX R1, R0.z, texture[2], 1D;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R2, R1, R0;\n" + "MAD R2, -R1, R0, R2;\n" + "MUL R3.xy, R3, c[5];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_OVERLAY = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R1.xy, fragment.position, c[6];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.y, R0.z, c[9];\n" + "MUL R0.x, R0, c[9];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[9].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" - "ADD R2.w, -R1, c[7].z;\n" + "ADD R2.w, -R1, c[9].z;\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[7].x;\n" + "MUL R2.xyz, R2, c[9].x;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MUL R3.xyz, R0, R1;\n" "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].z;\n" - "MAD R3.xyz, R3, c[7].x, R4;\n" + "ADD R2.x, -R0.w, c[9].z;\n" + "MAD R3.xyz, R3, c[9].x, R4;\n" "MAD R3.xyz, R1, R2.x, R3;\n" "MAD R0.xyz, R1, R2.x, R0;\n" - "MUL R2.xyz, R1, c[7].x;\n" + "MUL R2.xyz, R1, c[9].x;\n" "ADD R0.xyz, R0, -R3;\n" "SGE R2.xyz, R2, R1.w;\n" "MAD R2.xyz, R2, R0, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, R0, c[5];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[8];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DARKEN = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" - "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.x, c[9].x;\n" + "MUL R0.z, R0, c[9].y;\n" + "MAD R0.x, R0.y, R0.y, -R0.z;\n" + "RSQ R0.z, R0.x;\n" + "MOV R0.x, c[9];\n" + "MUL R0.x, R0, c[1];\n" + "RCP R0.z, R0.z;\n" + "ADD R0.z, -R0.y, R0;\n" + "RCP R0.w, R0.x;\n" + "MUL R1.x, R0.z, R0.w;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[7].z;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].z;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[9].z;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[9].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, R1, c[5];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_LIGHTEN = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" - "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.x, c[9].x;\n" + "MUL R0.z, R0, c[9].y;\n" + "MAD R0.x, R0.y, R0.y, -R0.z;\n" + "RSQ R0.z, R0.x;\n" + "MOV R0.x, c[9];\n" + "MUL R0.x, R0, c[1];\n" + "RCP R0.z, R0.z;\n" + "ADD R0.z, -R0.y, R0;\n" + "RCP R0.w, R0.x;\n" + "MUL R1.x, R0.z, R0.w;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[7].z;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].z;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[9].z;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[9].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, R1, c[5];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORDODGE = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1, 1e-06 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[9];\n" + "MUL R0.x, R0, c[9];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[9].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" - "MAX R1.x, R0.w, c[7].w;\n" + "MAX R1.x, R0.w, c[9].w;\n" "RCP R1.x, R1.x;\n" - "MAD R1.xyz, -R0, R1.x, c[7].z;\n" - "MAX R2.xyz, R1, c[7].w;\n" - "MUL R1.xy, fragment.position, c[9];\n" + "MAD R1.xyz, -R0, R1.x, c[9].z;\n" + "MAX R2.xyz, R1, c[9].w;\n" + "MUL R1.xy, fragment.position, c[6];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R0, c[7].z;\n" + "ADD R2.w, -R0, c[9].z;\n" "MUL R3.xyz, R1, R2.w;\n" - "ADD R2.w, -R1, c[7].z;\n" + "ADD R2.w, -R1, c[9].z;\n" "MAD R4.xyz, R0, R2.w, R3;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MUL R2.w, R0, R1;\n" "MAD R0.xyz, R0, R1.w, R3;\n" "SGE R0.xyz, R0, R2.w;\n" @@ -1339,57 +1270,56 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD "MAD R2.xyz, R0, R4, R2;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, R0, c[5];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[8];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORBURN = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1, 9.9999997e-06 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[9];\n" + "MUL R0.x, R0, c[9];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MOV R0.y, c[9].x;\n" + "MUL R0.y, R0, c[1].x;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" "MUL R4.xyz, R0.w, R2;\n" - "MAX R2.xyz, R0, c[7].w;\n" - "ADD R2.w, -R1, c[7].z;\n" + "MAX R2.xyz, R0, c[9].w;\n" + "ADD R2.w, -R1, c[9].z;\n" "MUL R5.xyz, R0, R2.w;\n" - "ADD R3.w, -R0, c[7].z;\n" + "ADD R3.w, -R0, c[9].z;\n" "RCP R2.x, R2.x;\n" "RCP R2.y, R2.y;\n" "RCP R2.z, R2.z;\n" @@ -1403,60 +1333,59 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD "MAD R2.xyz, R3, R2, R0;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, R0, c[5];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[8];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_HARDLIGHT = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R1.xy, fragment.position, c[6];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.y, R0.z, c[9];\n" + "MUL R0.x, R0, c[9];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[9].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" - "ADD R2.w, -R1, c[7].z;\n" + "ADD R2.w, -R1, c[9].z;\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[7].x;\n" + "MUL R2.xyz, R2, c[9].x;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MAD R2.xyz, R0, R2.w, R2;\n" "MUL R3.xyz, R0, R1;\n" - "ADD R2.w, -R0, c[7].z;\n" - "MAD R3.xyz, R3, c[7].x, R4;\n" - "MUL R0.xyz, R0, c[7].x;\n" + "ADD R2.w, -R0, c[9].z;\n" + "MAD R3.xyz, R3, c[9].x, R4;\n" + "MUL R0.xyz, R0, c[9].x;\n" "SGE R0.xyz, R0, R0.w;\n" "MAD R3.xyz, R1, R2.w, R3;\n" "MAD R2.xyz, R1, R2.w, R2;\n" @@ -1464,21 +1393,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD "MAD R2.xyz, R0, R2, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, R0, c[5];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[8];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SOFTLIGHT = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..6],\n" - " { 2, 4, 1, 9.9999997e-06 },\n" - " program.local[8..9],\n" - " { 8, 3 } };\n" + "PARAM c[11] = { program.local[0..8],\n" + " { 2, 4, 1, 9.9999997e-006 },\n" + " { 3, 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -1486,259 +1414,252 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[7];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[9];\n" + "MUL R0.x, R0, c[9];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MAX R0.z, R1.w, c[7].w;\n" - "RCP R2.w, R0.z;\n" - "MUL R2.xyz, R1, R2.w;\n" - "MUL R6.xyz, -R2, c[10].x;\n" - "MAD R3.xyz, -R1, R2.w, c[7].z;\n" + "MOV R0.z, c[9].x;\n" + "MUL R1.y, R0.z, c[1].x;\n" "RSQ R0.y, R0.y;\n" "RCP R0.y, R0.y;\n" - "ADD R0.x, -R0, R0.y;\n" - "MOV R0.y, c[7].x;\n" - "MUL R0.y, c[8].x, R0;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.x, R0, R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MAD R4.xyz, R0, c[7].x, -R0.w;\n" + "ADD R1.x, -R0, R0.y;\n" + "RCP R1.y, R1.y;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MAX R1.z, R0.w, c[9].w;\n" + "RCP R2.w, R1.z;\n" + "MUL R2.xyz, R0, R2.w;\n" + "MAD R6.xyz, -R2, c[10].y, c[10].x;\n" + "MAD R3.xyz, -R0, R2.w, c[9].z;\n" + "RSQ R2.w, R2.x;\n" + "RCP R2.x, R2.w;\n" + "MUL R1.x, R1, R1.y;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MAD R4.xyz, R1, c[9].x, -R1.w;\n" "MUL R5.xyz, R3, R4;\n" - "MAD R3.xyz, -R3, R4, R0.w;\n" - "ADD R6.xyz, R6, c[10].y;\n" - "RSQ R2.x, R2.x;\n" + "MAD R5.xyz, -R5, R6, R1.w;\n" + "MAD R3.xyz, -R3, R4, R1.w;\n" "RSQ R2.z, R2.z;\n" "RSQ R2.y, R2.y;\n" - "MAD R5.xyz, -R5, R6, R0.w;\n" - "MUL R3.xyz, R1, R3;\n" - "ADD R2.w, -R1, c[7].z;\n" - "RCP R2.x, R2.x;\n" + "MUL R5.xyz, R0, R5;\n" + "MUL R3.xyz, R0, R3;\n" + "ADD R2.w, -R0, c[9].z;\n" "RCP R2.z, R2.z;\n" "RCP R2.y, R2.y;\n" - "MAD R2.xyz, R2, R1.w, -R1;\n" - "MUL R6.xyz, R2, R4;\n" - "MUL R2.xyz, R1, R5;\n" - "MAD R6.xyz, R1, R0.w, R6;\n" - "MUL R4.xyz, R0, c[7].x;\n" - "MUL R5.xyz, R1, c[10].x;\n" - "ADD R6.xyz, R6, -R2;\n" - "SGE R5.xyz, R5, R1.w;\n" - "MUL R5.xyz, R5, R6;\n" - "ADD R2.xyz, R2, R5;\n" - "SGE R4.xyz, R4, R0.w;\n" + "MAD R2.xyz, R0.w, R2, -R0;\n" + "MUL R2.xyz, R2, R4;\n" + "MAD R2.xyz, R1.w, R0, R2;\n" + "ADD R6.xyz, R2, -R5;\n" + "MUL R4.xyz, R1, c[9].x;\n" + "MUL R2.xyz, R0, c[10].y;\n" + "SGE R2.xyz, R2, R0.w;\n" + "MAD R2.xyz, R2, R6, R5;\n" + "SGE R4.xyz, R4, R1.w;\n" "ADD R2.xyz, R2, -R3;\n" - "MUL R2.xyz, R4, R2;\n" - "ADD R2.xyz, R3, R2;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].z;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MAD R2.xyz, R4, R2, R3;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[9].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, R1, c[5];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DIFFERENCE = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" "ADD R0.z, R0, R0.w;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "RSQ R0.z, R0.y;\n" - "RCP R0.z, R0.z;\n" - "ADD R0.x, -R0, R0.z;\n" - "MUL R0.zw, fragment.position.xyxy, c[9].xyxy;\n" - "MOV R0.y, c[7].x;\n" - "MUL R0.y, c[8].x, R0;\n" - "RCP R0.y, R0.y;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R3.xyz, R0, R1;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MUL R0.xyz, R0, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "MAD R2.xyz, -R0, c[7].x, R3;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.x, c[9].x;\n" + "MUL R0.z, R0, c[9].y;\n" + "MAD R0.x, R0.y, R0.y, -R0.z;\n" + "RSQ R0.z, R0.x;\n" + "MOV R0.x, c[9];\n" + "MUL R0.x, R0, c[1];\n" + "RCP R0.z, R0.z;\n" + "ADD R0.z, -R0.y, R0;\n" + "RCP R0.w, R0.x;\n" + "MUL R1.x, R0.z, R0.w;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "ADD R2.xyz, R1, R0;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R1.xyz, R1, R0.w;\n" + "MIN R1.xyz, R1, R3;\n" + "MAD R2.xyz, -R1, c[9].x, R2;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, R1, c[5];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_EXCLUSION = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..6],\n" - " { 2, 4, 1 },\n" - " program.local[8..9] };\n" + "PARAM c[10] = { program.local[0..8],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[6];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[8].x, -R0;\n" - "MUL R0.y, R0.z, c[7];\n" - "MUL R0.x, R0, c[7];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[7].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[8].x, R0;\n" - "MUL R1.xy, fragment.position, c[9];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" - "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MAD R3.xyz, R0, R1.w, R2;\n" - "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[7].x, R3;\n" - "ADD R2.w, -R1, c[7].z;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].z;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.x, c[9].x;\n" + "MUL R0.z, R0, c[9].y;\n" + "MAD R0.x, R0.y, R0.y, -R0.z;\n" + "RSQ R0.z, R0.x;\n" + "MOV R0.x, c[9];\n" + "MUL R0.x, R0, c[1];\n" + "RCP R0.z, R0.z;\n" + "ADD R0.z, -R0.y, R0;\n" + "RCP R0.w, R0.x;\n" + "MUL R1.x, R0.z, R0.w;\n" + "MUL R0.xy, fragment.position, c[6];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R2.xyz, R1.w, R0;\n" + "MAD R3.xyz, R1, R0.w, R2;\n" + "MUL R2.xyz, R1, R0;\n" + "MAD R2.xyz, -R2, c[9].x, R3;\n" + "ADD R2.w, -R0, c[9].z;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[9].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, R1, c[5];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[8];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK = "!!ARBfp1.0\n" - "PARAM c[9] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..8] };\n" + "PARAM c[9] = { program.local[0..7],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" - "MUL R0.xy, R0, c[3];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[8];\n" + "MUL R0.x, R0, c[8];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "RSQ R0.z, R0.y;\n" - "RCP R0.z, R0.z;\n" + "RSQ R0.y, R0.y;\n" + "RCP R0.z, R0.y;\n" "ADD R0.x, -R0, R0.z;\n" - "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" + "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R2.xyz, R1, c[8].y;\n" - "MOV R0.y, c[4].x;\n" - "MUL R0.y, c[5].x, R0;\n" + "MUL R2.xyz, R1, c[5].y;\n" + "MOV R0.y, c[8].x;\n" + "MUL R0.y, R0, c[1].x;\n" "RCP R0.y, R0.y;\n" "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[8].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R2.w, -R1, c[4].z;\n" - "MUL R0.xyz, R0, c[7].y;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[4].z;\n" - "MUL R1.xyz, R1, c[7].z;\n" - "MAD result.color.xyz, R1, R2.x, R0;\n" + "MUL R3.xyz, R0.w, R2;\n" + "MUL R2.xyz, R0, c[5].x;\n" + "MAD R2.xyz, R1.w, R2, R3;\n" + "ADD R2.w, -R1, c[8].z;\n" + "MUL R0.xyz, R0, c[6].y;\n" + "MAD R0.xyz, R2.w, R0, R2;\n" + "ADD R2.x, -R0.w, c[8].z;\n" + "MUL R1.xyz, R1, c[6].z;\n" + "MAD result.color.xyz, R2.x, R1, R0;\n" "MUL R0.x, R0.w, R1.w;\n" "MUL R0.z, R1.w, R2.x;\n" "MUL R0.y, R0.w, R2.w;\n" - "DP3 result.color.w, R0, c[7];\n" + "DP3 result.color.w, R0, c[6];\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_MULTIPLY_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" "RSQ R0.y, R0.y;\n" "RCP R0.z, R0.y;\n" "ADD R0.x, -R0, R0.z;\n" - "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, c[4].x;\n" - "MUL R0.y, c[5].x, R0;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" "RCP R0.y, R0.y;\n" "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "ADD R2.x, -R1.w, c[4].z;\n" + "ADD R2.x, -R1.w, c[6].z;\n" "MUL R2.xyz, R0, R2.x;\n" "MAD R0.xyz, R0, R1, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].z;\n" + "ADD R2.y, -R0.w, c[6].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -1746,31 +1667,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SCREEN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" "ADD R0.z, R0, R0.w;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" "ADD R0.x, -R0, R0.z;\n" - "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" - "MOV R0.y, c[4].x;\n" - "MUL R0.y, c[5].x, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" "RCP R0.y, R0.y;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" "MUL R0.x, R0, R0.y;\n" @@ -1782,50 +1702,49 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_OVERLAY_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[6].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[4].z;\n" - "MUL R2.xyz, R2, c[4].x;\n" + "ADD R2.w, -R1, c[6].z;\n" + "MUL R2.xyz, R2, c[6].x;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MAD R2.xyz, R0, R2.w, R2;\n" "MUL R3.xyz, R0, R2.w;\n" "MUL R0.xyz, R0, R1;\n" - "ADD R2.w, -R0, c[4].z;\n" - "MAD R0.xyz, R0, c[4].x, R3;\n" + "ADD R2.w, -R0, c[6].z;\n" + "MAD R0.xyz, R0, c[6].x, R3;\n" "MAD R0.xyz, R1, R2.w, R0;\n" "MAD R2.xyz, R1, R2.w, R2;\n" - "MUL R1.xyz, R1, c[4].x;\n" + "MUL R1.xyz, R1, c[6].x;\n" "ADD R2.w, R0, R1;\n" "ADD R2.xyz, R2, -R0;\n" "SGE R1.xyz, R1, R1.w;\n" @@ -1836,43 +1755,42 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DARKEN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[4].z;\n" + "ADD R2.w, -R1, c[6].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].z;\n" + "ADD R2.y, -R0.w, c[6].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -1880,43 +1798,42 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_LIGHTEN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[4].z;\n" + "ADD R2.w, -R1, c[6].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].z;\n" + "ADD R2.y, -R0.w, c[6].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -1924,45 +1841,44 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORDODGE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1, 1e-06 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[6].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MAX R1.x, R0.w, c[4].w;\n" + "MAX R1.x, R0.w, c[6].w;\n" "RCP R1.x, R1.x;\n" - "MAD R1.xyz, -R0, R1.x, c[4].z;\n" - "MAX R2.xyz, R1, c[4].w;\n" - "MUL R1.xy, fragment.position, c[6];\n" + "MAD R1.xyz, -R0, R1.x, c[6].z;\n" + "MAX R2.xyz, R1, c[6].w;\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R0, c[4].z;\n" + "ADD R2.w, -R0, c[6].z;\n" "MUL R3.xyz, R1, R2.w;\n" - "ADD R2.w, -R1, c[4].z;\n" + "ADD R2.w, -R1, c[6].z;\n" "MAD R3.xyz, R0, R2.w, R3;\n" - "MUL R1.xyz, R1, R0.w;\n" + "MUL R1.xyz, R0.w, R1;\n" "MAD R0.xyz, R0, R1.w, R1;\n" "MUL R2.w, R0, R1;\n" "RCP R2.x, R2.x;\n" @@ -1980,46 +1896,45 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_COLORBURN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1, 9.9999997e-06 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" - "ADD R2.w, -R1, c[4].z;\n" + "ADD R2.w, -R1, c[6].z;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" "MUL R4.xyz, R0.w, R2;\n" - "MAX R2.xyz, R0, c[4].w;\n" + "MAX R2.xyz, R0, c[6].w;\n" "MUL R5.xyz, R0, R2.w;\n" - "ADD R3.w, -R0, c[4].z;\n" + "ADD R3.w, -R0, c[6].z;\n" "RCP R2.x, R2.x;\n" "RCP R2.y, R2.y;\n" "RCP R2.z, R2.z;\n" @@ -2038,50 +1953,49 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_HARDLIGHT_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[6].x;\n" + "RSQ R0.z, R0.z;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" + "ADD R0.x, -R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "ADD R2.w, -R1, c[4].z;\n" + "ADD R2.w, -R1, c[6].z;\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[4].x;\n" + "MUL R2.xyz, R2, c[6].x;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MUL R3.xyz, R0, R1;\n" "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R2.w, -R0, c[4].z;\n" - "MUL R0.xyz, R0, c[4].x;\n" + "ADD R2.w, -R0, c[6].z;\n" + "MUL R0.xyz, R0, c[6].x;\n" "MAD R2.xyz, R1, R2.w, R2;\n" - "MAD R3.xyz, R3, c[4].x, R4;\n" + "MAD R3.xyz, R3, c[6].x, R4;\n" "MAD R1.xyz, R1, R2.w, R3;\n" "ADD R2.w, R0, R1;\n" "ADD R2.xyz, R2, -R1;\n" @@ -2093,10 +2007,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_SOFTLIGHT_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..3],\n" - " { 2, 4, 1, 9.9999997e-06 },\n" - " program.local[5..6],\n" - " { 8, 3 } };\n" + "PARAM c[8] = { program.local[0..5],\n" + " { 2, 4, 1, 9.9999997e-006 },\n" + " { 3, 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -2104,64 +2017,61 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MAX R0.z, R1.w, c[4].w;\n" + "MAX R0.z, R1.w, c[6].w;\n" "RCP R2.w, R0.z;\n" "MUL R2.xyz, R1, R2.w;\n" - "MUL R6.xyz, -R2, c[7].x;\n" - "MAD R3.xyz, -R1, R2.w, c[4].z;\n" + "MAD R6.xyz, -R2, c[7].y, c[7].x;\n" + "MAD R3.xyz, -R1, R2.w, c[6].z;\n" + "RSQ R2.w, R2.x;\n" + "RCP R2.x, R2.w;\n" "RSQ R0.y, R0.y;\n" "RCP R0.y, R0.y;\n" "ADD R0.x, -R0, R0.y;\n" - "MOV R0.y, c[4].x;\n" - "MUL R0.y, c[5].x, R0;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" "RCP R0.y, R0.y;\n" "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MAD R4.xyz, R0, c[4].x, -R0.w;\n" + "MAD R4.xyz, R0, c[6].x, -R0.w;\n" "MUL R5.xyz, R3, R4;\n" + "MAD R5.xyz, -R5, R6, R0.w;\n" "MAD R3.xyz, -R3, R4, R0.w;\n" - "ADD R6.xyz, R6, c[7].y;\n" - "RSQ R2.x, R2.x;\n" "RSQ R2.z, R2.z;\n" "RSQ R2.y, R2.y;\n" - "MAD R5.xyz, -R5, R6, R0.w;\n" + "MUL R5.xyz, R1, R5;\n" "MUL R3.xyz, R1, R3;\n" - "RCP R2.x, R2.x;\n" "RCP R2.z, R2.z;\n" "RCP R2.y, R2.y;\n" - "MAD R2.xyz, R2, R1.w, -R1;\n" - "MUL R6.xyz, R2, R4;\n" - "MUL R2.xyz, R1, R5;\n" - "MUL R4.xyz, R0, c[4].x;\n" - "MAD R6.xyz, R1, R0.w, R6;\n" - "MUL R5.xyz, R1, c[7].x;\n" - "ADD R6.xyz, R6, -R2;\n" - "SGE R5.xyz, R5, R1.w;\n" - "MUL R5.xyz, R5, R6;\n" - "ADD R2.xyz, R2, R5;\n" + "MAD R2.xyz, R1.w, R2, -R1;\n" + "MUL R2.xyz, R2, R4;\n" + "MAD R2.xyz, R0.w, R1, R2;\n" + "ADD R6.xyz, R2, -R5;\n" + "MUL R4.xyz, R0, c[6].x;\n" + "MUL R2.xyz, R1, c[7].y;\n" + "SGE R2.xyz, R2, R1.w;\n" + "MAD R2.xyz, R2, R6, R5;\n" "ADD R2.xyz, R2, -R3;\n" "SGE R4.xyz, R4, R0.w;\n" - "MUL R2.xyz, R4, R2;\n" - "ADD R2.xyz, R3, R2;\n" - "ADD R2.w, -R1, c[4].z;\n" + "MAD R2.xyz, R4, R2, R3;\n" + "ADD R2.w, -R1, c[6].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].z;\n" + "ADD R2.y, -R0.w, c[6].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -2169,86 +2079,84 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_DIFFERENCE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" + "RCP R0.y, R0.y;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "ADD R0.xyz, R0, R1;\n" "MIN R2.xyz, R2, R3;\n" "ADD R1.x, R0.w, R1.w;\n" - "MAD result.color.xyz, -R2, c[4].x, R0;\n" + "MAD result.color.xyz, -R2, c[6].x, R0;\n" "MAD result.color.w, -R0, R1, R1.x;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODES_EXCLUSION_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..3],\n" - " { 2, 4, 1 },\n" - " program.local[5..6] };\n" + "PARAM c[7] = { program.local[0..5],\n" + " { 2, 4, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" "ADD R0.z, R0, R0.w;\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[6];\n" + "MUL R0.x, R0, c[6];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "RCP R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "MUL R1.xy, fragment.position, c[6];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R0.x, -R0, R0.y;\n" + "RSQ R0.z, R0.y;\n" "RCP R0.z, R0.z;\n" - "MUL R0.x, R0, R0.z;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MOV R0.y, c[6].x;\n" + "MUL R0.y, R0, c[1].x;\n" + "RCP R0.y, R0.y;\n" + "MUL R0.x, R0, R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[4].x, R3;\n" - "ADD R2.w, -R1, c[4].z;\n" + "MAD R2.xyz, -R2, c[6].x, R3;\n" + "ADD R2.w, -R1, c[6].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].z;\n" + "ADD R2.y, -R0.w, c[6].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -2256,35 +2164,34 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODE_BLEND_MODE_MASK = "!!ARBfp1.0\n" - "PARAM c[9] = { program.local[0..3],\n" - " { 2, 4 },\n" - " program.local[5..8] };\n" + "PARAM c[9] = { program.local[0..7],\n" + " { 2, 4 } };\n" "TEMP R0;\n" "TEMP R1;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.z, R0, R0.w;\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[8];\n" + "MUL R0.x, R0, c[8];\n" "MAD R0.y, R0.x, R0.x, -R0;\n" "RSQ R0.y, R0.y;\n" "RCP R0.y, R0.y;\n" "ADD R1.x, -R0, R0.y;\n" - "MOV R0.z, c[4].x;\n" - "MUL R0.z, c[5].x, R0;\n" + "MOV R0.z, c[8].x;\n" + "MUL R0.z, R0, c[1].x;\n" "RCP R1.y, R0.z;\n" "ADD R0.xy, fragment.position, c[6];\n" - "MUL R0.xy, R0, c[7];\n" + "MUL R0.xy, R0, c[5];\n" "TEX R0, R0, texture[0], 2D;\n" "MUL R1.x, R1, R1.y;\n" - "DP4 R1.y, R0, c[8];\n" + "DP4 R1.y, R0, c[7];\n" "TEX R0, R1, texture[1], 1D;\n" "MUL result.color, R0, R1.y;\n" "END\n" @@ -2292,480 +2199,479 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MODE_BLEND_MODE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[6] = { program.local[0..3],\n" - " { 2, 4 },\n" - " program.local[5] };\n" + "PARAM c[6] = { program.local[0..4],\n" + " { 2, 4 } };\n" "TEMP R0;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[3];\n" + "MAD R0.xyz, fragment.position.x, c[2], R0;\n" + "ADD R0.xyz, R0, c[4];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.xyxy;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" "ADD R0.z, R0, R0.w;\n" - "MUL R0.z, c[5].x, -R0;\n" - "MUL R0.y, R0.z, c[4];\n" - "MUL R0.x, R0, c[4];\n" - "MAD R0.y, R0.x, R0.x, -R0;\n" - "MOV R0.z, c[4].x;\n" - "RSQ R0.y, R0.y;\n" - "MUL R0.z, c[5].x, R0;\n" - "RCP R0.y, R0.y;\n" + "MUL R0.z, -R0, c[1].x;\n" + "MUL R0.y, R0.z, c[5];\n" + "MUL R0.x, R0, c[5];\n" + "MAD R0.z, R0.x, R0.x, -R0.y;\n" + "MOV R0.y, c[5].x;\n" + "RSQ R0.z, R0.z;\n" + "MUL R0.y, R0, c[1].x;\n" "RCP R0.z, R0.z;\n" - "ADD R0.x, -R0, R0.y;\n" - "MUL R0.x, R0, R0.z;\n" + "RCP R0.y, R0.y;\n" + "ADD R0.x, -R0, R0.z;\n" + "MUL R0.x, R0, R0.y;\n" "TEX result.color, R0, texture[0], 1D;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF = "!!ARBfp1.0\n" - "PARAM c[13] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494 },\n" - " program.local[10..12] };\n" + "PARAM c[13] = { program.local[0..9],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, c[12].y;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[12].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "ADD R2.w, -R1, c[7];\n" - "MUL R0.xyz, R0, c[11].y;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "MUL R0.xyz, R1, c[11].z;\n" - "ADD R3.z, -R0.w, c[7].w;\n" - "MAD R2.xyz, R0, R3.z, R2;\n" - "MUL R0.y, R0.w, R2.w;\n" - "MUL R0.x, R0.w, R1.w;\n" - "MUL R0.z, R1.w, R3;\n" - "DP3 R2.w, R0, c[11];\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[10].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[11].x, c[11].y;\n" + "MAD R1.z, R1, R1.y, -c[11];\n" + "MAD R1.z, R1, R1.y, c[11].w;\n" + "MAD R1.z, R1, R1.y, -c[12].x;\n" + "MAD R1.y, R1.z, R1, c[12];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[10].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[10].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R1.x, R0, c[10];\n" + "FLR R1.y, R1.x;\n" + "MUL R0.xy, fragment.position, c[7];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R1.x, R1, -R1.y;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R2.xyz, R0, c[4].y;\n" + "MUL R3.xyz, R1.w, R2;\n" + "MUL R2.xyz, R1, c[4].x;\n" + "MAD R2.xyz, R0.w, R2, R3;\n" + "ADD R3.xy, fragment.position, c[8];\n" + "ADD R2.w, -R0, c[12].z;\n" + "MUL R1.xyz, R1, c[5].y;\n" + "MAD R2.xyz, R2.w, R1, R2;\n" + "MUL R1.xyz, R0, c[5].z;\n" + "ADD R3.z, -R1.w, c[12];\n" + "MAD R2.xyz, R3.z, R1, R2;\n" + "MUL R1.y, R1.w, R2.w;\n" + "MUL R1.x, R1.w, R0.w;\n" + "MUL R1.z, R0.w, R3;\n" + "DP3 R2.w, R1, c[5];\n" + "MUL R3.xy, R3, c[6];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[9];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_MULTIPLY = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R2.x, -R1.w, c[7].w;\n" - "MUL R2.xyz, R0, R2.x;\n" - "MAD R0.xyz, R0, R1, R2;\n" - "ADD R2.x, -R0.w, c[7].w;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R1.x, R0, c[8];\n" + "FLR R1.y, R1.x;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R1.x, R1, -R1.y;\n" + "TEX R1, R1, texture[2], 1D;\n" + "ADD R2.x, -R0.w, c[10].z;\n" + "MUL R2.xyz, R1, R2.x;\n" + "MAD R1.xyz, R1, R0, R2;\n" + "ADD R2.x, -R1.w, c[10].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SCREEN = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" + "ADD R3.xy, fragment.position, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[8];\n" "FLR R0.y, R0.x;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R2, R0, R1;\n" - "MAD R2, -R0, R1, R2;\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R0.z, R0.x, -R0.y;\n" + "TEX R1, R0.z, texture[2], 1D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R2, R1, R0;\n" + "MAD R2, -R1, R0, R2;\n" + "MUL R3.xy, R3, c[4];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_OVERLAY = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 2 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R1, c[7];\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[8].y, c[8];\n" + "MAD R1.z, R1, R1.y, -c[8].w;\n" + "MAD R1.z, R1, R1.y, c[9].x;\n" + "MAD R1.z, R1, R1.y, -c[9].y;\n" + "MAD R1.y, R1.z, R1, c[9].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[9].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[10].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[10].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" + "MUL R1.xy, fragment.position, c[5];\n" + "TEX R1, R1, texture[0], 2D;\n" + "ADD R2.w, -R1, c[10];\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[9].y;\n" + "MUL R2.xyz, R2, c[10].z;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MUL R3.xyz, R0, R1;\n" "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].w;\n" - "MAD R3.xyz, R3, c[9].y, R4;\n" + "ADD R2.x, -R0.w, c[10].w;\n" + "MAD R3.xyz, R3, c[10].z, R4;\n" "MAD R3.xyz, R1, R2.x, R3;\n" "MAD R0.xyz, R1, R2.x, R0;\n" - "MUL R2.xyz, R1, c[9].y;\n" + "MUL R2.xyz, R1, c[10].z;\n" "ADD R0.xyz, R0, -R3;\n" "SGE R2.xyz, R2, R1.w;\n" "MAD R2.xyz, R2, R0, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DARKEN = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.z, R0.x, c[8].x;\n" + "FLR R0.w, R0.z;\n" + "ADD R1.x, R0.z, -R0.w;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[7];\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].w;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[10].z;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[10].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_LIGHTEN = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.z, R0.x, c[8].x;\n" + "FLR R0.w, R0.z;\n" + "ADD R1.x, R0.z, -R0.w;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[7];\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].w;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[10].z;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[10].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORDODGE = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 1e-06 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[8].y, c[8];\n" + "MAD R1.z, R1, R1.y, -c[8].w;\n" + "MAD R1.z, R1, R1.y, c[9].x;\n" + "MAD R1.z, R1, R1.y, -c[9].y;\n" + "MAD R1.y, R1.z, R1, c[9].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[9].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[10].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[10].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" - "MAX R1.x, R0.w, c[9].y;\n" + "MAX R1.x, R0.w, c[10].w;\n" "RCP R1.x, R1.x;\n" - "MAD R1.xyz, -R0, R1.x, c[7].w;\n" - "MAX R2.xyz, R1, c[9].y;\n" - "MUL R1.xy, fragment.position, c[10];\n" + "MAD R1.xyz, -R0, R1.x, c[10].z;\n" + "MAX R2.xyz, R1, c[10].w;\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R0, c[7];\n" + "ADD R2.w, -R0, c[10].z;\n" "MUL R3.xyz, R1, R2.w;\n" - "ADD R2.w, -R1, c[7];\n" + "ADD R2.w, -R1, c[10].z;\n" "MAD R4.xyz, R0, R2.w, R3;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MUL R2.w, R0, R1;\n" "MAD R0.xyz, R0, R1.w, R3;\n" "SGE R0.xyz, R0, R2.w;\n" @@ -2778,70 +2684,70 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO "MAD R2.xyz, R0, R4, R2;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORBURN = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 9.9999997e-06 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R1, c[7];\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[8].y, c[8];\n" + "MAD R1.z, R1, R1.y, -c[8].w;\n" + "MAD R1.z, R1, R1.y, c[9].x;\n" + "MAD R1.z, R1, R1.y, -c[9].y;\n" + "MAD R1.y, R1.z, R1, c[9].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[9].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[10].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[10].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" "MUL R4.xyz, R0.w, R2;\n" - "MAX R2.xyz, R0, c[9].y;\n" - "ADD R3.w, -R0, c[7];\n" + "MAX R2.xyz, R0, c[10].w;\n" + "ADD R2.w, -R1, c[10].z;\n" + "ADD R3.w, -R0, c[10].z;\n" "MUL R5.xyz, R0, R2.w;\n" "RCP R2.x, R2.x;\n" "RCP R2.y, R2.y;\n" @@ -2856,74 +2762,74 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO "MAD R2.xyz, R3, R2, R0;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_HARDLIGHT = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 2 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R1, c[7];\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[8].y, c[8];\n" + "MAD R1.z, R1, R1.y, -c[8].w;\n" + "MAD R1.z, R1, R1.y, c[9].x;\n" + "MAD R1.z, R1, R1.y, -c[9].y;\n" + "MAD R1.y, R1.z, R1, c[9].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[9].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[10].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[10].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[2], 1D;\n" + "MUL R1.xy, fragment.position, c[5];\n" + "TEX R1, R1, texture[0], 2D;\n" + "ADD R2.w, -R1, c[10];\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[9].y;\n" + "MUL R2.xyz, R2, c[10].z;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MAD R2.xyz, R0, R2.w, R2;\n" "MUL R3.xyz, R0, R1;\n" - "ADD R2.w, -R0, c[7];\n" - "MAD R3.xyz, R3, c[9].y, R4;\n" - "MUL R0.xyz, R0, c[9].y;\n" + "ADD R2.w, -R0, c[10];\n" + "MAD R3.xyz, R3, c[10].z, R4;\n" + "MUL R0.xyz, R0, c[10].z;\n" "SGE R0.xyz, R0, R0.w;\n" "MAD R3.xyz, R1, R2.w, R3;\n" "MAD R2.xyz, R1, R2.w, R2;\n" @@ -2931,24 +2837,22 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO "MAD R2.xyz, R0, R2, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT = "!!ARBfp1.0\n" - "PARAM c[12] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 9.9999997e-06, 2, 8 },\n" - " program.local[10],\n" - " { 3 } };\n" + "PARAM c[12] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1, 9.9999997e-006 },\n" + " { 2, 3, 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -2956,326 +2860,325 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MOV R1.x, c[7].y;\n" - "MUL R0.w, R0.z, R0.z;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "MAX R0.z, R1.w, c[9].y;\n" - "RCP R2.w, R0.z;\n" - "MUL R2.xyz, R1, R2.w;\n" - "RSQ R3.w, R2.x;\n" - "RSQ R4.y, R2.z;\n" - "RCP R4.x, R3.w;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MAD R3.xyz, R0, c[9].z, -R0.w;\n" - "RSQ R3.w, R2.y;\n" - "RCP R4.z, R4.y;\n" - "RCP R4.y, R3.w;\n" - "MAD R4.xyz, R4, R1.w, -R1;\n" - "MUL R6.xyz, R4, R3;\n" - "MUL R4.xyz, -R2, c[9].w;\n" - "MAD R2.xyz, -R1, R2.w, c[7].w;\n" - "ADD R5.xyz, R4, c[11].x;\n" - "MUL R4.xyz, R2, R3;\n" - "MAD R4.xyz, -R4, R5, R0.w;\n" - "MAD R2.xyz, -R2, R3, R0.w;\n" - "MAD R5.xyz, R1, R0.w, R6;\n" - "MUL R4.xyz, R1, R4;\n" - "MUL R6.xyz, R1, c[9].w;\n" - "ADD R5.xyz, R5, -R4;\n" - "SGE R6.xyz, R6, R1.w;\n" - "MUL R5.xyz, R6, R5;\n" - "ADD R3.xyz, R4, R5;\n" - "MUL R2.xyz, R1, R2;\n" - "MUL R4.xyz, R0, c[9].z;\n" - "ADD R3.xyz, R3, -R2;\n" - "SGE R4.xyz, R4, R0.w;\n" - "MUL R3.xyz, R4, R3;\n" - "ADD R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[7];\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].w;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R1.x, R0, c[8];\n" + "FLR R1.y, R1.x;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MAX R2.x, R0.w, c[10].w;\n" + "RCP R2.w, R2.x;\n" + "MUL R2.xyz, R0, R2.w;\n" + "MAD R6.xyz, -R2, c[11].z, c[11].y;\n" + "MAD R3.xyz, -R0, R2.w, c[10].z;\n" + "RSQ R2.w, R2.x;\n" + "RCP R2.x, R2.w;\n" + "ADD R1.x, R1, -R1.y;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MAD R4.xyz, R1, c[11].x, -R1.w;\n" + "MUL R5.xyz, R3, R4;\n" + "MAD R5.xyz, -R5, R6, R1.w;\n" + "MAD R3.xyz, -R3, R4, R1.w;\n" + "RSQ R2.z, R2.z;\n" + "RSQ R2.y, R2.y;\n" + "MUL R5.xyz, R0, R5;\n" + "MUL R3.xyz, R0, R3;\n" + "ADD R2.w, -R0, c[10].z;\n" + "RCP R2.z, R2.z;\n" + "RCP R2.y, R2.y;\n" + "MAD R2.xyz, R0.w, R2, -R0;\n" + "MUL R2.xyz, R2, R4;\n" + "MAD R2.xyz, R1.w, R0, R2;\n" + "ADD R6.xyz, R2, -R5;\n" + "MUL R4.xyz, R1, c[11].x;\n" + "MUL R2.xyz, R0, c[11].z;\n" + "SGE R2.xyz, R2, R0.w;\n" + "MAD R2.xyz, R2, R6, R5;\n" + "SGE R4.xyz, R4, R1.w;\n" + "ADD R2.xyz, R2, -R3;\n" + "MAD R2.xyz, R4, R2, R3;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[10].z;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DIFFERENCE = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 2 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 2 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "MUL R0.zw, fragment.position.xyxy, c[10].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R3.xyz, R0, R1;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MUL R0.xyz, R0, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "MAD R2.xyz, -R0, c[9].y, R3;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.z, R0.x, c[8].x;\n" + "FLR R0.w, R0.z;\n" + "ADD R1.x, R0.z, -R0.w;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "ADD R2.xyz, R1, R0;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R1.xyz, R1, R0.w;\n" + "MIN R1.xyz, R1, R3;\n" + "MAD R2.xyz, -R1, c[10].z, R2;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_EXCLUSION = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..5],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[8],\n" - " { 0.15915494, 2 },\n" - " program.local[10] };\n" + "PARAM c[11] = { program.local[0..7],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[6].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[6].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[7].y;\n" - "CMP R0.x, R0, c[7], R1;\n" - "MAD R0.w, R0, c[6].z, -c[6];\n" - "MUL R1.xy, fragment.position, c[10];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[7].z, c[7].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[8];\n" - "MUL R0.x, R0, c[9];\n" - "FLR R0.y, R0.x;\n" - "ADD R0.x, R0, -R0.y;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MAD R3.xyz, R0, R1.w, R2;\n" - "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[9].y, R3;\n" - "ADD R2.w, -R1, c[7];\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[7].w;\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[8].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[9].x, c[9].y;\n" + "MAD R1.z, R1, R1.y, -c[9];\n" + "MAD R1.z, R1, R1.y, c[9].w;\n" + "MAD R1.z, R1, R1.y, -c[10].x;\n" + "MAD R1.y, R1.z, R1, c[10];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[8].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[8].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.z, R0.x, c[8].x;\n" + "FLR R0.w, R0.z;\n" + "ADD R1.x, R0.z, -R0.w;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R2.xyz, R1.w, R0;\n" + "MAD R3.xyz, R1, R0.w, R2;\n" + "MUL R2.xyz, R1, R0;\n" + "MAD R2.xyz, -R2, c[10].z, R3;\n" + "ADD R2.w, -R0, c[10];\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[10].w;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 },\n" - " program.local[7..9] };\n" + "PARAM c[10] = { program.local[0..6],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" - "FLR R0.y, R0.x;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[7].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[8].x, c[8].y;\n" + "MAD R1.z, R1, R1.y, -c[8];\n" + "MAD R1.z, R1, R1.y, c[8].w;\n" + "MAD R1.z, R1, R1.y, -c[9].x;\n" + "MAD R1.y, R1.z, R1, c[9];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[7].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[7].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R2.xyz, R1, c[9].y;\n" + "MUL R2.xyz, R1, c[4].y;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[7];\n" + "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[9].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R2.w, -R1, c[4];\n" - "MUL R0.xyz, R0, c[8].y;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[4].w;\n" - "MUL R1.xyz, R1, c[8].z;\n" - "MAD result.color.xyz, R1, R2.x, R0;\n" + "MUL R3.xyz, R0.w, R2;\n" + "MUL R2.xyz, R0, c[4].x;\n" + "MAD R2.xyz, R1.w, R2, R3;\n" + "ADD R2.w, -R1, c[9].z;\n" + "MUL R0.xyz, R0, c[5].y;\n" + "MAD R0.xyz, R2.w, R0, R2;\n" + "ADD R2.x, -R0.w, c[9].z;\n" + "MUL R1.xyz, R1, c[5].z;\n" + "MAD result.color.xyz, R2.x, R1, R0;\n" "MUL R0.x, R0.w, R1.w;\n" "MUL R0.z, R1.w, R2.x;\n" "MUL R0.y, R0.w, R2.w;\n" - "DP3 result.color.w, R0, c[8];\n" + "DP3 result.color.w, R0, c[5];\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_MULTIPLY_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" - "FLR R0.y, R0.x;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" + "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "ADD R2.x, -R1.w, c[4].w;\n" + "ADD R2.x, -R1.w, c[7].z;\n" "MUL R2.xyz, R0, R2.x;\n" "MAD R0.xyz, R0, R1, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].w;\n" + "ADD R2.y, -R0.w, c[7].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -3283,46 +3186,46 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SCREEN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" "FLR R0.y, R0.x;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" @@ -3333,64 +3236,64 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_OVERLAY_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 2 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R1, c[4];\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[5].y, c[5];\n" + "MAD R1.z, R1, R1.y, -c[5].w;\n" + "MAD R1.z, R1, R1.y, c[6].x;\n" + "MAD R1.z, R1, R1.y, -c[6].y;\n" + "MAD R1.y, R1.z, R1, c[6].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[6].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[7].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[7].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" + "MUL R1.xy, fragment.position, c[4];\n" + "TEX R1, R1, texture[0], 2D;\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[6].y;\n" + "ADD R2.w, -R1, c[7];\n" + "MUL R2.xyz, R2, c[7].z;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MAD R2.xyz, R0, R2.w, R2;\n" "MUL R3.xyz, R0, R2.w;\n" "MUL R0.xyz, R0, R1;\n" - "ADD R2.w, -R0, c[4];\n" - "MAD R0.xyz, R0, c[6].y, R3;\n" + "ADD R2.w, -R0, c[7];\n" + "MAD R0.xyz, R0, c[7].z, R3;\n" "MAD R0.xyz, R1, R2.w, R0;\n" "MAD R2.xyz, R1, R2.w, R2;\n" - "MUL R1.xyz, R1, c[6].y;\n" + "MUL R1.xyz, R1, c[7].z;\n" "ADD R2.w, R0, R1;\n" "ADD R2.xyz, R2, -R0;\n" "SGE R1.xyz, R1, R1.w;\n" @@ -3401,57 +3304,57 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DARKEN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[4];\n" + "ADD R2.w, -R1, c[7].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].w;\n" + "ADD R2.y, -R0.w, c[7].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -3459,57 +3362,57 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_LIGHTEN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[4];\n" + "ADD R2.w, -R1, c[7].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].w;\n" + "ADD R2.y, -R0.w, c[7].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -3517,59 +3420,59 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORDODGE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 1e-06 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[5].y, c[5];\n" + "MAD R1.z, R1, R1.y, -c[5].w;\n" + "MAD R1.z, R1, R1.y, c[6].x;\n" + "MAD R1.z, R1, R1.y, -c[6].y;\n" + "MAD R1.y, R1.z, R1, c[6].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[6].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[7].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[7].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MAX R1.x, R0.w, c[6].y;\n" + "MAX R1.x, R0.w, c[7].w;\n" "RCP R1.x, R1.x;\n" - "MAD R1.xyz, -R0, R1.x, c[4].w;\n" - "MAX R2.xyz, R1, c[6].y;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MAD R1.xyz, -R0, R1.x, c[7].z;\n" + "MAX R2.xyz, R1, c[7].w;\n" + "MUL R1.xy, fragment.position, c[4];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R0, c[4];\n" + "ADD R2.w, -R0, c[7].z;\n" "MUL R3.xyz, R1, R2.w;\n" - "ADD R2.w, -R1, c[4];\n" + "ADD R2.w, -R1, c[7].z;\n" "MAD R3.xyz, R0, R2.w, R3;\n" - "MUL R1.xyz, R1, R0.w;\n" + "MUL R1.xyz, R0.w, R1;\n" "MAD R0.xyz, R0, R1.w, R1;\n" "MUL R2.w, R0, R1;\n" "RCP R2.x, R2.x;\n" @@ -3587,60 +3490,60 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORBURN_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 9.9999997e-06 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R1, c[4];\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[5].y, c[5];\n" + "MAD R1.z, R1, R1.y, -c[5].w;\n" + "MAD R1.z, R1, R1.y, c[6].x;\n" + "MAD R1.z, R1, R1.y, -c[6].y;\n" + "MAD R1.y, R1.z, R1, c[6].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[6].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[7].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[7].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" + "ADD R2.w, -R1, c[7].z;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" "MUL R4.xyz, R0.w, R2;\n" - "MAX R2.xyz, R0, c[6].y;\n" + "MAX R2.xyz, R0, c[7].w;\n" "MUL R5.xyz, R0, R2.w;\n" - "ADD R3.w, -R0, c[4];\n" + "ADD R3.w, -R0, c[7].z;\n" "RCP R2.x, R2.x;\n" "RCP R2.y, R2.y;\n" "RCP R2.z, R2.z;\n" @@ -3659,64 +3562,64 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_HARDLIGHT_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 2 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n" + " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n" + " { 3.1415927, 0.15915494, 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R1, c[4];\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5];\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[5].y, c[5];\n" + "MAD R1.z, R1, R1.y, -c[5].w;\n" + "MAD R1.z, R1, R1.y, c[6].x;\n" + "MAD R1.z, R1, R1.y, -c[6].y;\n" + "MAD R1.y, R1.z, R1, c[6].z;\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[6].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[7].x;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[7].y;\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" + "MUL R1.xy, fragment.position, c[4];\n" + "TEX R1, R1, texture[0], 2D;\n" + "ADD R2.w, -R1, c[7];\n" "ADD R3.xyz, R0.w, -R0;\n" "ADD R2.xyz, R1.w, -R1;\n" "MUL R2.xyz, R2, R3;\n" - "MUL R2.xyz, R2, c[6].y;\n" + "MUL R2.xyz, R2, c[7].z;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MUL R3.xyz, R0, R1;\n" "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R2.w, -R0, c[4];\n" - "MUL R0.xyz, R0, c[6].y;\n" + "ADD R2.w, -R0, c[7];\n" + "MUL R0.xyz, R0, c[7].z;\n" "MAD R2.xyz, R1, R2.w, R2;\n" - "MAD R3.xyz, R3, c[6].y, R4;\n" + "MAD R3.xyz, R3, c[7].z, R4;\n" "MAD R1.xyz, R1, R2.w, R3;\n" "ADD R2.w, R0, R1;\n" "ADD R2.xyz, R2, -R1;\n" @@ -3728,13 +3631,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT_NOMASK = "!!ARBfp1.0\n" - "PARAM c[9] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 9.9999997e-06, 2, 8 },\n" - " program.local[7],\n" - " { 3 } };\n" + "PARAM c[9] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 1, 9.9999997e-006 },\n" + " { 2, 3, 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -3742,75 +3643,74 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MOV R1.x, c[4].y;\n" - "MUL R0.w, R0.z, R0.z;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" - "FLR R0.y, R0.x;\n" - "MAX R0.z, R1.w, c[6].y;\n" - "RCP R2.w, R0.z;\n" + "MAX R2.x, R1.w, c[7].w;\n" + "RCP R2.w, R2.x;\n" "MUL R2.xyz, R1, R2.w;\n" - "RSQ R3.w, R2.x;\n" - "RSQ R4.y, R2.z;\n" - "RCP R4.x, R3.w;\n" + "MAD R6.xyz, -R2, c[8].z, c[8].y;\n" + "MAD R3.xyz, -R1, R2.w, c[7].z;\n" + "RSQ R2.w, R2.x;\n" + "RCP R2.x, R2.w;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" + "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MAD R3.xyz, R0, c[6].z, -R0.w;\n" - "RSQ R3.w, R2.y;\n" - "RCP R4.z, R4.y;\n" - "RCP R4.y, R3.w;\n" - "MAD R4.xyz, R4, R1.w, -R1;\n" - "MUL R6.xyz, R4, R3;\n" - "MUL R4.xyz, -R2, c[6].w;\n" - "MAD R2.xyz, -R1, R2.w, c[4].w;\n" - "ADD R5.xyz, R4, c[8].x;\n" - "MUL R4.xyz, R2, R3;\n" - "MAD R4.xyz, -R4, R5, R0.w;\n" - "MAD R2.xyz, -R2, R3, R0.w;\n" - "MAD R5.xyz, R1, R0.w, R6;\n" - "MUL R4.xyz, R1, R4;\n" - "MUL R6.xyz, R1, c[6].w;\n" - "ADD R5.xyz, R5, -R4;\n" - "SGE R6.xyz, R6, R1.w;\n" - "MUL R5.xyz, R6, R5;\n" - "ADD R3.xyz, R4, R5;\n" - "MUL R2.xyz, R1, R2;\n" - "MUL R4.xyz, R0, c[6].z;\n" - "ADD R3.xyz, R3, -R2;\n" + "MAD R4.xyz, R0, c[8].x, -R0.w;\n" + "MUL R5.xyz, R3, R4;\n" + "MAD R5.xyz, -R5, R6, R0.w;\n" + "MAD R3.xyz, -R3, R4, R0.w;\n" + "RSQ R2.z, R2.z;\n" + "RSQ R2.y, R2.y;\n" + "MUL R5.xyz, R1, R5;\n" + "MUL R3.xyz, R1, R3;\n" + "RCP R2.z, R2.z;\n" + "RCP R2.y, R2.y;\n" + "MAD R2.xyz, R1.w, R2, -R1;\n" + "MUL R2.xyz, R2, R4;\n" + "MAD R2.xyz, R0.w, R1, R2;\n" + "ADD R6.xyz, R2, -R5;\n" + "MUL R4.xyz, R0, c[8].x;\n" + "MUL R2.xyz, R1, c[8].z;\n" + "SGE R2.xyz, R2, R1.w;\n" + "MAD R2.xyz, R2, R6, R5;\n" + "ADD R2.xyz, R2, -R3;\n" "SGE R4.xyz, R4, R0.w;\n" - "MUL R3.xyz, R4, R3;\n" - "ADD R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[4];\n" + "MAD R2.xyz, R4, R2, R3;\n" + "ADD R2.w, -R1, c[7].z;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].w;\n" + "ADD R2.y, -R0.w, c[7].z;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -3818,114 +3718,114 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DIFFERENCE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 2 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 2 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" "FLR R0.y, R0.x;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "ADD R0.xyz, R0, R1;\n" "MIN R2.xyz, R2, R3;\n" "ADD R1.x, R0.w, R1.w;\n" - "MAD result.color.xyz, -R2, c[6].y, R0;\n" + "MAD result.color.xyz, -R2, c[7].z, R0;\n" "MAD result.color.w, -R0, R1, R1.x;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_EXCLUSION_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494, 2 },\n" - " program.local[7] };\n" + "PARAM c[8] = { program.local[0..4],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565, 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[5].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[6].x, c[6].y;\n" + "MAD R1.z, R1, R1.y, -c[6];\n" + "MAD R1.z, R1, R1.y, c[6].w;\n" + "MAD R1.z, R1, R1.y, -c[7].x;\n" + "MAD R1.y, R1.z, R1, c[7];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[5].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[5].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[5];\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[6].y, R3;\n" - "ADD R2.w, -R1, c[4];\n" + "MAD R2.xyz, -R2, c[7].z, R3;\n" + "ADD R2.w, -R1, c[7];\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[4].w;\n" + "ADD R2.y, -R0.w, c[7].w;\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -3933,49 +3833,49 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODE_BLEND_MODE_MASK = "!!ARBfp1.0\n" - "PARAM c[10] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 },\n" - " program.local[7..9] };\n" + "PARAM c[10] = { program.local[0..6],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565 } };\n" "TEMP R0;\n" "TEMP R1;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.y, R0.w;\n" - "RCP R1.x, R1.x;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.z, R0.x, R0.y, c[5].x;\n" - "MUL R1.x, R0.z, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[7].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[8].x, c[8].y;\n" + "MAD R1.z, R1, R1.y, -c[8];\n" + "MAD R1.z, R1, R1.y, c[8].w;\n" + "MAD R1.z, R1, R1.y, -c[9].x;\n" + "MAD R1.y, R1.z, R1, c[9];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R1.y, -R1.x, c[7].w;\n" + "ADD R0.z, -R0, R0.w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[7].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.z, R0.x, c[0].x;\n" + "MUL R1.x, R0.z, c[7];\n" "FLR R1.y, R1.x;\n" - "ADD R0.xy, fragment.position, c[7];\n" - "MUL R0.xy, R0, c[8];\n" + "ADD R0.xy, fragment.position, c[5];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "ADD R1.x, R1, -R1.y;\n" - "DP4 R1.y, R0, c[9];\n" + "DP4 R1.y, R0, c[6];\n" "TEX R0, R1, texture[1], 1D;\n" "MUL result.color, R0, R1.y;\n" "END\n" @@ -3983,42 +3883,43 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODE_BLEND_MODE_NOMASK = "!!ARBfp1.0\n" - "PARAM c[7] = { program.local[0..2],\n" - " { 0.0020000001, 9.9999997e-10, 0.1963, 0.9817 },\n" - " { 2.3561945, 0.78539819, -1, 1 },\n" - " program.local[5],\n" - " { 0.15915494 } };\n" + "PARAM c[7] = { program.local[0..3],\n" + " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n" + " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n" + " { 0.33299461, 0.99999565 } };\n" "TEMP R0;\n" "TEMP R1;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "ABS R0.w, R0.x;\n" - "ABS R0.z, R0.y;\n" - "ADD R0.z, R0, -R0.w;\n" - "ADD R0.w, R0.y, c[3].x;\n" - "ABS R0.z, R0;\n" - "CMP R0.y, -R0.z, R0, R0.w;\n" - "ABS R0.z, -R0.y;\n" - "ADD R0.z, R0, c[3].y;\n" - "ADD R0.w, R0.x, R0.z;\n" - "ADD R1.x, R0.z, -R0;\n" - "RCP R1.x, R1.x;\n" - "RCP R1.y, R0.w;\n" - "MUL R0.w, R0, R1.x;\n" - "ADD R0.z, R0.x, -R0;\n" - "MUL R0.z, R0, R1.y;\n" - "CMP R0.z, R0.x, R0.w, R0;\n" - "MUL R0.w, R0.z, R0.z;\n" - "MOV R1.x, c[4].y;\n" - "CMP R0.y, -R0, c[4].z, c[4].w;\n" - "MAD R0.w, R0, c[3].z, -c[3];\n" - "CMP R0.x, R0, c[4], R1;\n" - "MAD R0.x, R0.w, R0.z, R0;\n" - "MAD R0.x, R0, R0.y, c[5];\n" - "MUL R0.x, R0, c[6];\n" + "ABS R0.z, R0.x;\n" + "ABS R0.w, R0.y;\n" + "ADD R0.w, R0, -R0.z;\n" + "ADD R1.x, R0.y, c[4].y;\n" + "ABS R0.w, R0;\n" + "CMP R0.y, -R0.w, R0, R1.x;\n" + "ABS R0.w, -R0.y;\n" + "MAX R1.x, R0.z, R0.w;\n" + "RCP R1.y, R1.x;\n" + "MIN R1.x, R0.z, R0.w;\n" + "MUL R1.x, R1, R1.y;\n" + "MUL R1.y, R1.x, R1.x;\n" + "MAD R1.z, R1.y, c[5].x, c[5].y;\n" + "MAD R1.z, R1, R1.y, -c[5];\n" + "MAD R1.z, R1, R1.y, c[5].w;\n" + "MAD R1.z, R1, R1.y, -c[6].x;\n" + "MAD R1.y, R1.z, R1, c[6];\n" + "MUL R1.x, R1.y, R1;\n" + "ADD R0.z, -R0, R0.w;\n" + "ADD R1.y, -R1.x, c[4].w;\n" + "CMP R0.z, -R0, R1.y, R1.x;\n" + "ADD R0.w, -R0.z, c[4].z;\n" + "CMP R0.x, R0, R0.w, R0.z;\n" + "CMP R0.x, -R0.y, -R0, R0;\n" + "ADD R0.x, R0, c[0];\n" + "MUL R0.x, R0, c[4];\n" "FLR R0.y, R0.x;\n" "ADD R0.x, R0, -R0.y;\n" "TEX result.color, R0, texture[0], 1D;\n" @@ -4027,45 +3928,43 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SIMPLE_PORTER_DUFF = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..7],\n" - " { 1 },\n" - " program.local[9..10] };\n" + "PARAM c[11] = { program.local[0..9],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "ADD R0.x, R0, R0.y;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[6].z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, c[10].y;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[10].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "MUL R0.xyz, R0, c[9].y;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "MUL R0.xyz, R1, c[9].z;\n" - "ADD R2.w, -R0, c[8].x;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R0.y, -R1.w, c[8].x;\n" - "MUL R0.z, R1.w, R2.w;\n" - "MUL R0.x, R0.w, R1.w;\n" - "MUL R0.y, R0.w, R0;\n" - "DP3 R2.w, R0, c[9];\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.zw, R0.xyxy, c[0].xyxy;\n" + "ADD R1.x, R0.z, R0.w;\n" + "MUL R0.xy, fragment.position, c[7];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.x, R1, c[0].z;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R2.xyz, R0, c[4].y;\n" + "MUL R3.xyz, R1.w, R2;\n" + "MUL R2.xyz, R1, c[4].x;\n" + "MAD R2.xyz, R0.w, R2, R3;\n" + "ADD R3.xy, fragment.position, c[8];\n" + "ADD R2.w, -R0, c[10].x;\n" + "MUL R1.xyz, R1, c[5].y;\n" + "MAD R2.xyz, R2.w, R1, R2;\n" + "MUL R1.xyz, R0, c[5].z;\n" + "ADD R3.z, -R1.w, c[10].x;\n" + "MAD R2.xyz, R3.z, R1, R2;\n" + "MUL R1.y, R1.w, R2.w;\n" + "MUL R1.x, R1.w, R0.w;\n" + "MUL R1.z, R0.w, R3;\n" + "DP3 R2.w, R1, c[5];\n" + "MUL R3.xy, R3, c[6];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[9];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -4076,30 +3975,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "ADD R0.x, R0, R0.y;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[6].z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R2.x, -R1.w, c[8];\n" - "MUL R2.xyz, R0, R2.x;\n" - "MAD R0.xyz, R0, R1, R2;\n" + "MUL R0.zw, R0.xyxy, c[0].xyxy;\n" + "ADD R1.x, R0.z, R0.w;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.x, R1, c[0].z;\n" + "TEX R1, R1, texture[2], 1D;\n" "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R2.xyz, R1, R2.x;\n" + "MAD R1.xyz, R1, R0, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -4110,25 +4009,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "ADD R3.xy, fragment.position, c[0];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R2, R0, R1;\n" - "MAD R2, -R0, R1, R2;\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.z, R0.x, c[0];\n" + "ADD R3.xy, fragment.position, c[6];\n" + "TEX R1, R0.z, texture[2], 1D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R2, R1, R0;\n" + "MAD R2, -R1, R0, R2;\n" + "MUL R3.xy, R3, c[4];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -4141,16 +4040,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[2], 1D;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" "ADD R2.w, -R1, c[8].y;\n" "ADD R3.xyz, R0.w, -R0;\n" @@ -4171,11 +4070,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "MAD R2.xyz, R2, R0, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -4188,32 +4087,32 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.xy, R0, c[0];\n" + "ADD R0.z, R0.x, R0.y;\n" + "MUL R1.x, R0.z, c[0].z;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -4225,64 +4124,64 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.xy, R0, c[0];\n" + "ADD R0.z, R0.x, R0.y;\n" + "MUL R1.x, R0.z, c[0].z;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORDODGE = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[2], 1D;\n" "MAX R1.x, R0.w, c[8].y;\n" "RCP R1.x, R1.x;\n" "MAD R2.xyz, -R0, R1.x, c[8].x;\n" "MAX R2.xyz, R2, c[8].y;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" "ADD R2.w, -R0, c[8].x;\n" "MUL R3.xyz, R1, R2.w;\n" "ADD R2.w, -R1, c[8].x;\n" "MAD R4.xyz, R0, R2.w, R3;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MUL R2.w, R0, R1;\n" "MAD R0.xyz, R0, R1.w, R3;\n" "SGE R0.xyz, R0, R2.w;\n" @@ -4295,11 +4194,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "MAD R2.xyz, R0, R4, R2;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -4307,25 +4206,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORBURN = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[2], 1D;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" "MUL R4.xyz, R0.w, R2;\n" @@ -4340,18 +4239,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "MUL R4.xyz, R1, R3.w;\n" "MAD R0.xyz, R0, R2.w, R4;\n" "MUL R2.w, R0, R1;\n" - "ADD R3.w, -R0, c[8].x;\n" "MAD R2.xyz, R1, R3.w, R2;\n" "ADD R2.xyz, R2, -R0;\n" "SGE R3.xyz, R3, R2.w;\n" "MAD R2.xyz, R3, R2, R0;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -4365,16 +4263,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[2], 1D;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" "ADD R2.w, -R1, c[8].y;\n" "ADD R3.xyz, R0.w, -R0;\n" @@ -4395,11 +4293,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "MAD R2.xyz, R0, R2, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -4407,8 +4305,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT = "!!ARBfp1.0\n" "PARAM c[10] = { program.local[0..7],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -4416,60 +4314,58 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R2.xyz, fragment.position.y, c[4];\n" - "MAD R3.xyz, fragment.position.x, c[3], R2;\n" - "MUL R0.xy, fragment.position, c[7];\n" - "TEX R1, R0, texture[0], 2D;\n" - "MAX R0.x, R1.w, c[8].y;\n" - "RCP R2.w, R0.x;\n" - "MUL R0.xyz, R1, R2.w;\n" - "RSQ R0.w, R0.x;\n" - "RSQ R2.y, R0.y;\n" - "ADD R3.xyz, R3, c[5];\n" - "RCP R2.x, R0.w;\n" - "RCP R0.w, R3.z;\n" - "MUL R3.xy, R3, R0.w;\n" - "RSQ R0.w, R0.z;\n" - "RCP R2.z, R0.w;\n" + "MUL R2.xyz, fragment.position.y, c[2];\n" + "MAD R3.xyz, fragment.position.x, c[1], R2;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MAX R1.x, R0.w, c[8].y;\n" + "RCP R2.w, R1.x;\n" + "MUL R1.xyz, R0, R2.w;\n" + "RSQ R1.w, R1.x;\n" + "RSQ R2.y, R1.y;\n" + "ADD R3.xyz, R3, c[3];\n" + "RCP R2.x, R1.w;\n" + "RCP R1.w, R3.z;\n" + "MUL R3.xy, R3, R1.w;\n" + "RSQ R1.w, R1.z;\n" + "RCP R2.z, R1.w;\n" "RCP R2.y, R2.y;\n" - "MAD R6.xyz, R2, R1.w, -R1;\n" - "MUL R2.xyz, -R0, c[8].w;\n" - "ADD R5.xyz, R2, c[9].x;\n" - "MAD R2.xyz, -R1, R2.w, c[8].x;\n" - "MUL R3.xy, R3, c[6];\n" - "ADD R0.w, R3.x, R3.y;\n" - "MUL R0.w, R0, c[6].z;\n" - "TEX R0, R0.w, texture[2], 1D;\n" - "MAD R3.xyz, R0, c[8].z, -R0.w;\n" + "MAD R6.xyz, R0.w, R2, -R0;\n" + "MUL R2.xyz, -R1, c[9].x;\n" + "ADD R5.xyz, R2, c[8].w;\n" + "MAD R2.xyz, -R0, R2.w, c[8].x;\n" + "MUL R3.xy, R3, c[0];\n" + "ADD R1.w, R3.x, R3.y;\n" + "MUL R1.w, R1, c[0].z;\n" + "TEX R1, R1.w, texture[2], 1D;\n" + "MAD R3.xyz, R1, c[8].z, -R1.w;\n" "MUL R4.xyz, R2, R3;\n" - "MAD R4.xyz, -R4, R5, R0.w;\n" + "MAD R4.xyz, -R4, R5, R1.w;\n" + "MAD R2.xyz, -R2, R3, R1.w;\n" "MUL R5.xyz, R6, R3;\n" - "MAD R2.xyz, -R2, R3, R0.w;\n" - "MAD R6.xyz, R1, R0.w, R5;\n" - "MUL R4.xyz, R1, R4;\n" - "MUL R5.xyz, R1, c[8].w;\n" - "ADD R6.xyz, R6, -R4;\n" - "SGE R5.xyz, R5, R1.w;\n" - "MUL R5.xyz, R5, R6;\n" - "ADD R3.xyz, R4, R5;\n" - "MUL R2.xyz, R1, R2;\n" - "MUL R4.xyz, R0, c[8].z;\n" + "MUL R4.xyz, R0, R4;\n" + "MAD R5.xyz, R1.w, R0, R5;\n" + "ADD R6.xyz, R5, -R4;\n" + "MUL R5.xyz, R0, c[9].x;\n" + "SGE R3.xyz, R5, R0.w;\n" + "MAD R3.xyz, R3, R6, R4;\n" + "MUL R2.xyz, R0, R2;\n" + "MUL R4.xyz, R1, c[8].z;\n" + "SGE R4.xyz, R4, R1.w;\n" "ADD R3.xyz, R3, -R2;\n" - "SGE R4.xyz, R4, R0.w;\n" - "MUL R3.xyz, R4, R3;\n" - "ADD R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MAD R2.xyz, R4, R3, R2;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -4481,106 +4377,104 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "ADD R0.x, R0, R0.y;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[6].z;\n" - "TEX R0, R0, texture[2], 1D;\n" - "ADD R3.xyz, R0, R1;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MUL R0.xyz, R0, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "MAD R2.xyz, -R0, c[8].x, R3;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, R0, c[0];\n" + "ADD R0.z, R0.x, R0.y;\n" + "MUL R1.x, R0.z, c[0].z;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "ADD R2.xyz, R1, R0;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R1.xyz, R1, R0.w;\n" + "MIN R1.xyz, R1, R3;\n" + "MAD R2.xyz, -R1, c[8].x, R2;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_EXCLUSION = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[6].z;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MAD R3.xyz, R0, R1.w, R2;\n" - "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[8].y, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, R0, c[0];\n" + "ADD R0.z, R0.x, R0.y;\n" + "MUL R1.x, R0.z, c[0].z;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 1D;\n" + "MUL R2.xyz, R1.w, R0;\n" + "MAD R3.xyz, R1, R0.w, R2;\n" + "MUL R2.xyz, R1, R0;\n" + "MAD R2.xyz, -R2, c[8].x, R3;\n" + "ADD R2.w, -R0, c[8].y;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8].y;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..4],\n" - " { 1 },\n" - " program.local[6..7] };\n" + "PARAM c[8] = { program.local[0..6],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R2.xyz, R1, c[7].y;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R2.xyz, R1, c[4].y;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[7].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "MUL R0.xyz, R0, c[6].y;\n" - "ADD R2.w, -R1, c[5].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[5];\n" - "MUL R1.xyz, R1, c[6].z;\n" - "MAD result.color.xyz, R1, R2.x, R0;\n" - "ADD R0.y, -R1.w, c[5].x;\n" + "MUL R3.xyz, R0.w, R2;\n" + "MUL R2.xyz, R0, c[4].x;\n" + "MAD R2.xyz, R1.w, R2, R3;\n" + "ADD R2.w, -R1, c[7].x;\n" + "MUL R0.xyz, R0, c[5].y;\n" + "MAD R0.xyz, R2.w, R0, R2;\n" + "ADD R2.x, -R0.w, c[7];\n" + "MUL R1.xyz, R1, c[5].z;\n" + "MAD result.color.xyz, R2.x, R1, R0;\n" "MUL R0.x, R0.w, R1.w;\n" "MUL R0.z, R1.w, R2.x;\n" - "MUL R0.y, R0.w, R0;\n" - "DP3 result.color.w, R0, c[6];\n" + "MUL R0.y, R0.w, R2.w;\n" + "DP3 result.color.w, R0, c[5];\n" "END\n" ; @@ -4591,16 +4485,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "ADD R2.x, -R1.w, c[5];\n" "MUL R2.xyz, R0, R2.x;\n" @@ -4618,16 +4512,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "ADD R2, R0, R1;\n" "MAD result.color, -R0, R1, R2;\n" @@ -4642,14 +4536,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R1.xy, fragment.position, c[4];\n" "TEX R1, R1, texture[0], 2D;\n" @@ -4683,19 +4577,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MIN R2.xyz, R2, R3;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R2.w, R2;\n" @@ -4714,19 +4608,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MAX R2.xyz, R2, R3;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R2.w, R2;\n" @@ -4740,19 +4634,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORDODGE_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "MAX R1.x, R0.w, c[5].y;\n" "RCP R1.x, R1.x;\n" @@ -4764,7 +4658,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "MUL R2.xyz, R1, R2.x;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R2.xyz, R0, R2.w, R2;\n" - "MUL R1.xyz, R1, R0.w;\n" + "MUL R1.xyz, R0.w, R1;\n" "MAD R0.xyz, R0, R1.w, R1;\n" "MUL R2.w, R0, R1;\n" "RCP R3.x, R3.x;\n" @@ -4783,25 +4677,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_COLORBURN_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" @@ -4814,9 +4708,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "RCP R2.z, R2.z;\n" "MAD R2.xyz, R4, R2, R5;\n" "MUL R4.xyz, R1, R3.w;\n" - "MAD R0.xyz, R0, R2.w, R4;\n" - "ADD R3.w, -R0, c[5].x;\n" "MAD R1.xyz, R1, R3.w, R2;\n" + "MAD R0.xyz, R0, R2.w, R4;\n" "MUL R2.x, R0.w, R1.w;\n" "ADD R2.w, R0, R1;\n" "ADD R1.xyz, R1, -R0;\n" @@ -4835,14 +4728,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" "MUL R1.xy, fragment.position, c[4];\n" "TEX R1, R1, texture[0], 2D;\n" @@ -4871,8 +4764,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT_NOMASK = "!!ARBfp1.0\n" "PARAM c[7] = { program.local[0..4],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -4880,8 +4773,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R2.xyz, fragment.position.y, c[1];\n" - "MAD R3.xyz, fragment.position.x, c[0], R2;\n" + "MUL R2.xyz, fragment.position.y, c[2];\n" + "MAD R3.xyz, fragment.position.x, c[1], R2;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R1, R0, texture[0], 2D;\n" "MAX R0.x, R1.w, c[5].y;\n" @@ -4889,39 +4782,37 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "MUL R0.xyz, R1, R2.w;\n" "RSQ R0.w, R0.x;\n" "RSQ R2.y, R0.y;\n" - "ADD R3.xyz, R3, c[2];\n" + "ADD R3.xyz, R3, c[3];\n" "RCP R2.x, R0.w;\n" "RCP R0.w, R3.z;\n" "MUL R3.xy, R3, R0.w;\n" "RSQ R0.w, R0.z;\n" "RCP R2.z, R0.w;\n" "RCP R2.y, R2.y;\n" - "MAD R6.xyz, R2, R1.w, -R1;\n" - "MUL R2.xyz, -R0, c[5].w;\n" - "ADD R5.xyz, R2, c[6].x;\n" + "MAD R6.xyz, R1.w, R2, -R1;\n" + "MUL R2.xyz, -R0, c[6].x;\n" + "ADD R5.xyz, R2, c[5].w;\n" "MAD R2.xyz, -R1, R2.w, c[5].x;\n" - "MUL R3.xy, R3, c[3];\n" + "MUL R3.xy, R3, c[0];\n" "ADD R0.w, R3.x, R3.y;\n" - "MUL R0.w, R0, c[3].z;\n" + "MUL R0.w, R0, c[0].z;\n" "TEX R0, R0.w, texture[1], 1D;\n" "MAD R3.xyz, R0, c[5].z, -R0.w;\n" "MUL R4.xyz, R2, R3;\n" "MAD R4.xyz, -R4, R5, R0.w;\n" "MUL R5.xyz, R6, R3;\n" "MAD R2.xyz, -R2, R3, R0.w;\n" - "MAD R6.xyz, R1, R0.w, R5;\n" "MUL R4.xyz, R1, R4;\n" - "MUL R5.xyz, R1, c[5].w;\n" - "ADD R6.xyz, R6, -R4;\n" - "SGE R5.xyz, R5, R1.w;\n" - "MUL R5.xyz, R5, R6;\n" - "ADD R3.xyz, R4, R5;\n" + "MAD R5.xyz, R0.w, R1, R5;\n" + "ADD R6.xyz, R5, -R4;\n" + "MUL R5.xyz, R1, c[6].x;\n" + "SGE R3.xyz, R5, R1.w;\n" + "MAD R3.xyz, R3, R6, R4;\n" "MUL R2.xyz, R1, R2;\n" "MUL R4.xyz, R0, c[5].z;\n" "ADD R3.xyz, R3, -R2;\n" "SGE R4.xyz, R4, R0.w;\n" - "MUL R3.xyz, R4, R3;\n" - "ADD R2.xyz, R2, R3;\n" + "MAD R2.xyz, R4, R3, R2;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" @@ -4939,19 +4830,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" - "MUL R1.xy, fragment.position, c[4];\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" - "TEX R1, R1, texture[0], 2D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "ADD R0.xyz, R0, R1;\n" "MIN R2.xyz, R2, R3;\n" "ADD R1.x, R0.w, R1.w;\n" @@ -4963,30 +4854,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_EXCLUSION_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX R0, R0, texture[1], 1D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[5].y, R3;\n" - "ADD R2.w, -R1, c[5].x;\n" + "MAD R2.xyz, -R2, c[5].x, R3;\n" + "ADD R2.w, -R1, c[5].y;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[5].x;\n" + "ADD R2.y, -R0.w, c[5];\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -4997,18 +4888,18 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "PARAM c[7] = { program.local[0..6] };\n" "TEMP R0;\n" "TEMP R1;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.z;\n" - "MUL R0.zw, R0, c[3].xyxy;\n" + "MUL R0.zw, R0, c[0].xyxy;\n" "ADD R1.x, R0.z, R0.w;\n" - "ADD R0.xy, fragment.position, c[4];\n" - "MUL R0.xy, R0, c[5];\n" + "ADD R0.xy, fragment.position, c[5];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "DP4 R1.y, R0, c[6];\n" - "MUL R1.x, R1, c[3].z;\n" + "MUL R1.x, R1, c[0].z;\n" "TEX R0, R1, texture[1], 1D;\n" "MUL result.color, R0, R1.y;\n" "END\n" @@ -5018,58 +4909,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD "!!ARBfp1.0\n" "PARAM c[4] = { program.local[0..3] };\n" "TEMP R0;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "ADD R0.x, R0, R0.y;\n" - "MUL R0.x, R0, c[3].z;\n" + "MUL R0.x, R0, c[0].z;\n" "TEX result.color, R0, texture[0], 1D;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SIMPLE_PORTER_DUFF = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..7],\n" - " { 1 },\n" - " program.local[9..10] };\n" + "PARAM c[11] = { program.local[0..9],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" - "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, -R0;\n" - "TEX R0, R0, texture[2], 2D;\n" - "MUL R2.xyz, R1, c[10].y;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[10].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "MUL R0.xyz, R0, c[9].y;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R2.w, -R0, c[8].x;\n" - "MUL R0.xyz, R1, c[9].z;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R0.y, -R1.w, c[8].x;\n" - "MUL R0.z, R1.w, R2.w;\n" - "MUL R0.x, R0.w, R1.w;\n" - "MUL R0.y, R0.w, R0;\n" - "DP3 R2.w, R0, c[9];\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R1.xyz, R0, c[3];\n" + "RCP R0.z, R1.z;\n" + "MUL R1.xy, R1, R0.z;\n" + "MUL R0.xy, fragment.position, c[7];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[2], 2D;\n" + "MUL R2.xyz, R0, c[4].y;\n" + "MUL R3.xyz, R1.w, R2;\n" + "MUL R2.xyz, R1, c[4].x;\n" + "MAD R2.xyz, R0.w, R2, R3;\n" + "ADD R3.xy, fragment.position, c[8];\n" + "ADD R2.w, -R0, c[10].x;\n" + "MUL R1.xyz, R1, c[5].y;\n" + "MAD R2.xyz, R2.w, R1, R2;\n" + "MUL R1.xyz, R0, c[5].z;\n" + "ADD R3.z, -R1.w, c[10].x;\n" + "MAD R2.xyz, R3.z, R1, R2;\n" + "MUL R1.y, R1.w, R2.w;\n" + "MUL R1.x, R1.w, R0.w;\n" + "MUL R1.z, R0.w, R3;\n" + "DP3 R2.w, R1, c[5];\n" + "MUL R3.xy, R3, c[6];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[9];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -5080,29 +4968,28 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" - "RCP R1.x, R0.z;\n" - "MUL R0.xy, R0, R1.x;\n" - "MUL R0.xy, R0, c[6];\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, -R0;\n" - "TEX R0, R0, texture[2], 2D;\n" - "ADD R2.x, -R1.w, c[8];\n" - "MUL R2.xyz, R0, R2.x;\n" - "MAD R0.xyz, R0, R1, R2;\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R1.xyz, R0, c[3];\n" + "RCP R0.z, R1.z;\n" + "MUL R1.xy, R1, R0.z;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R1, R1, texture[2], 2D;\n" "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R2.xyz, R1, R2.x;\n" + "MAD R1.xyz, R1, R0, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -5113,24 +5000,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "ADD R3.xy, fragment.position, c[0];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 2D;\n" - "ADD R2, R0, R1;\n" - "MAD R2, -R0, R1, R2;\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.zw, R0.xyxy, c[0].xyxy;\n" + "ADD R3.xy, fragment.position, c[6];\n" + "TEX R1, R0.zwzw, texture[2], 2D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "ADD R2, R1, R0;\n" + "MAD R2, -R1, R0, R2;\n" + "MUL R3.xy, R3, c[4];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -5143,15 +5029,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[2], 2D;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" "ADD R2.w, -R1, c[8].y;\n" "ADD R3.xyz, R0.w, -R0;\n" @@ -5172,11 +5057,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "MAD R2.xyz, R2, R0, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -5189,31 +5074,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 2D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 2D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -5225,62 +5109,60 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 2D;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 2D;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORDODGE = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[2], 2D;\n" "MAX R1.x, R0.w, c[8].y;\n" "RCP R1.x, R1.x;\n" - "MAD R1.xyz, -R0, R1.x, c[8].x;\n" - "MAX R2.xyz, R1, c[8].y;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MAD R2.xyz, -R0, R1.x, c[8].x;\n" + "MAX R2.xyz, R2, c[8].y;\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" "ADD R2.w, -R0, c[8].x;\n" "MUL R3.xyz, R1, R2.w;\n" "ADD R2.w, -R1, c[8].x;\n" "MAD R4.xyz, R0, R2.w, R3;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MUL R2.w, R0, R1;\n" "MAD R0.xyz, R0, R1.w, R3;\n" "SGE R0.xyz, R0, R2.w;\n" @@ -5293,11 +5175,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "MAD R2.xyz, R0, R4, R2;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -5305,24 +5187,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORBURN = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[2], 2D;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" "MUL R4.xyz, R0.w, R2;\n" @@ -5337,18 +5218,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "MUL R4.xyz, R1, R3.w;\n" "MAD R0.xyz, R0, R2.w, R4;\n" "MUL R2.w, R0, R1;\n" - "ADD R3.w, -R0, c[8].x;\n" "MAD R2.xyz, R1, R3.w, R2;\n" "ADD R2.xyz, R2, -R0;\n" "SGE R3.xyz, R3, R2.w;\n" "MAD R2.xyz, R3, R2, R0;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -5362,15 +5242,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[2], 2D;\n" - "MUL R1.xy, fragment.position, c[7];\n" + "MUL R1.xy, fragment.position, c[5];\n" "TEX R1, R1, texture[0], 2D;\n" "ADD R2.w, -R1, c[8].y;\n" "ADD R3.xyz, R0.w, -R0;\n" @@ -5391,11 +5270,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "MAD R2.xyz, R0, R2, R3;\n" "ADD R0.z, R0.w, R1.w;\n" "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" + "ADD R0.xy, fragment.position, c[6];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" + "DP4 R0.x, R0, c[7];\n" "MAD result.color, R0.x, R2, R1;\n" "END\n" ; @@ -5403,8 +5282,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT = "!!ARBfp1.0\n" "PARAM c[10] = { program.local[0..7],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -5412,59 +5291,56 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" - "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MAX R0.z, R1.w, c[8].y;\n" - "RCP R2.w, R0.z;\n" - "MUL R2.xyz, R1, R2.w;\n" - "MUL R6.xyz, -R2, c[8].w;\n" - "MAD R3.xyz, -R1, R2.w, c[8].x;\n" - "MOV R0.y, -R0;\n" - "TEX R0, R0, texture[2], 2D;\n" - "MAD R4.xyz, R0, c[8].z, -R0.w;\n" - "MUL R5.xyz, R3, R4;\n" - "MAD R3.xyz, -R3, R4, R0.w;\n" - "ADD R6.xyz, R6, c[9].x;\n" - "RSQ R2.x, R2.x;\n" - "RSQ R2.z, R2.z;\n" - "RSQ R2.y, R2.y;\n" - "MAD R5.xyz, -R5, R6, R0.w;\n" - "MUL R3.xyz, R1, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "RCP R2.x, R2.x;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MAX R1.x, R0.w, c[8].y;\n" + "RCP R2.w, R1.x;\n" + "MUL R1.xyz, R0, R2.w;\n" + "RSQ R1.w, R1.x;\n" + "RCP R2.x, R1.w;\n" + "RSQ R1.w, R1.y;\n" + "RSQ R2.z, R1.z;\n" + "MUL R3.xyz, fragment.position.y, c[2];\n" + "MAD R3.xyz, fragment.position.x, c[1], R3;\n" + "ADD R3.xyz, R3, c[3];\n" + "RCP R2.y, R1.w;\n" + "RCP R1.w, R3.z;\n" + "MUL R3.xy, R3, R1.w;\n" "RCP R2.z, R2.z;\n" - "RCP R2.y, R2.y;\n" - "MAD R2.xyz, R2, R1.w, -R1;\n" - "MUL R6.xyz, R2, R4;\n" - "MUL R2.xyz, R1, R5;\n" - "MAD R6.xyz, R1, R0.w, R6;\n" - "MUL R4.xyz, R0, c[8].z;\n" - "MUL R5.xyz, R1, c[8].w;\n" - "ADD R6.xyz, R6, -R2;\n" - "SGE R5.xyz, R5, R1.w;\n" - "MUL R5.xyz, R5, R6;\n" - "ADD R2.xyz, R2, R5;\n" - "SGE R4.xyz, R4, R0.w;\n" - "ADD R2.xyz, R2, -R3;\n" - "MUL R2.xyz, R4, R2;\n" - "ADD R2.xyz, R3, R2;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MAD R6.xyz, R0.w, R2, -R0;\n" + "MUL R2.xyz, -R1, c[9].x;\n" + "ADD R5.xyz, R2, c[8].w;\n" + "MAD R2.xyz, -R0, R2.w, c[8].x;\n" + "MUL R3.xy, R3, c[0];\n" + "TEX R1, R3, texture[2], 2D;\n" + "MAD R3.xyz, R1, c[8].z, -R1.w;\n" + "MUL R4.xyz, R2, R3;\n" + "MAD R4.xyz, -R4, R5, R1.w;\n" + "MAD R2.xyz, -R2, R3, R1.w;\n" + "MUL R5.xyz, R6, R3;\n" + "MUL R4.xyz, R0, R4;\n" + "MAD R5.xyz, R1.w, R0, R5;\n" + "ADD R6.xyz, R5, -R4;\n" + "MUL R5.xyz, R0, c[9].x;\n" + "SGE R3.xyz, R5, R0.w;\n" + "MAD R3.xyz, R3, R6, R4;\n" + "MUL R2.xyz, R0, R2;\n" + "MUL R4.xyz, R1, c[8].z;\n" + "SGE R4.xyz, R4, R1.w;\n" + "ADD R3.xyz, R3, -R2;\n" + "MAD R2.xyz, R4, R3, R2;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -5476,103 +5352,98 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, -R0;\n" - "TEX R0, R0, texture[2], 2D;\n" - "ADD R3.xyz, R0, R1;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MUL R0.xyz, R0, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "MAD R2.xyz, -R0, c[8].x, R3;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 2D;\n" + "ADD R2.xyz, R1, R0;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R1.xyz, R1, R0.w;\n" + "MIN R1.xyz, R1, R3;\n" + "MAD R2.xyz, -R1, c[8].x, R2;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_EXCLUSION = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "TEX R0, R0, texture[2], 2D;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MAD R3.xyz, R0, R1.w, R2;\n" - "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[8].y, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1, R1, texture[2], 2D;\n" + "MUL R2.xyz, R1.w, R0;\n" + "MAD R3.xyz, R1, R0.w, R2;\n" + "MUL R2.xyz, R1, R0;\n" + "MAD R2.xyz, -R2, c[8].x, R3;\n" + "ADD R2.w, -R0, c[8].y;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8].y;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..4],\n" - " { 1 },\n" - " program.local[6..7] };\n" + "PARAM c[8] = { program.local[0..6],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" - "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" + "RCP R1.x, R0.z;\n" + "MUL R0.xy, R0, R1.x;\n" + "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MUL R2.xyz, R1, c[7].y;\n" - "MOV R0.y, -R0;\n" + "MUL R2.xyz, R1, c[4].y;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[7].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "MUL R0.xyz, R0, c[6].y;\n" - "ADD R2.w, -R1, c[5].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[5];\n" - "MUL R1.xyz, R1, c[6].z;\n" - "MAD result.color.xyz, R1, R2.x, R0;\n" - "ADD R0.y, -R1.w, c[5].x;\n" + "MUL R3.xyz, R0.w, R2;\n" + "MUL R2.xyz, R0, c[4].x;\n" + "MAD R2.xyz, R1.w, R2, R3;\n" + "ADD R2.w, -R1, c[7].x;\n" + "MUL R0.xyz, R0, c[5].y;\n" + "MAD R0.xyz, R2.w, R0, R2;\n" + "ADD R2.x, -R0.w, c[7];\n" + "MUL R1.xyz, R1, c[5].z;\n" + "MAD result.color.xyz, R2.x, R1, R0;\n" "MUL R0.x, R0.w, R1.w;\n" "MUL R0.z, R1.w, R2.x;\n" - "MUL R0.y, R0.w, R0;\n" - "DP3 result.color.w, R0, c[6];\n" + "MUL R0.y, R0.w, R2.w;\n" + "DP3 result.color.w, R0, c[5];\n" "END\n" ; @@ -5583,15 +5454,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R1.x, R0.z;\n" "MUL R0.xy, R0, R1.x;\n" - "MUL R0.xy, R0, c[3];\n" "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2.x, -R1.w, c[5];\n" "MUL R2.xyz, R0, R2.x;\n" @@ -5609,15 +5479,14 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "ADD R2, R0, R1;\n" "MAD result.color, -R0, R1, R2;\n" @@ -5632,13 +5501,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "MUL R1.xy, fragment.position, c[4];\n" "TEX R1, R1, texture[0], 2D;\n" @@ -5672,18 +5540,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MIN R2.xyz, R2, R3;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R2.w, R2;\n" @@ -5702,18 +5569,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "MAX R2.xyz, R2, R3;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R2.w, R2;\n" @@ -5727,41 +5593,40 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORDODGE_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "MAX R1.x, R0.w, c[5].y;\n" "RCP R1.x, R1.x;\n" - "MAD R1.xyz, -R0, R1.x, c[5].x;\n" - "MAX R2.xyz, R1, c[5].y;\n" + "MAD R3.xyz, -R0, R1.x, c[5].x;\n" + "MAX R3.xyz, R3, c[5].y;\n" "MUL R1.xy, fragment.position, c[4];\n" "TEX R1, R1, texture[0], 2D;\n" - "ADD R2.w, -R0, c[5].x;\n" - "MUL R3.xyz, R1, R2.w;\n" + "ADD R2.x, -R0.w, c[5];\n" + "MUL R2.xyz, R1, R2.x;\n" "ADD R2.w, -R1, c[5].x;\n" - "MAD R3.xyz, R0, R2.w, R3;\n" - "MUL R1.xyz, R1, R0.w;\n" + "MAD R2.xyz, R0, R2.w, R2;\n" + "MUL R1.xyz, R0.w, R1;\n" "MAD R0.xyz, R0, R1.w, R1;\n" "MUL R2.w, R0, R1;\n" - "RCP R2.x, R2.x;\n" - "RCP R2.y, R2.y;\n" - "RCP R2.z, R2.z;\n" - "MAD R2.xyz, R1, R2, R3;\n" - "MAD R3.xyz, R0.w, R1.w, R3;\n" + "RCP R3.x, R3.x;\n" + "RCP R3.y, R3.y;\n" + "RCP R3.z, R3.z;\n" + "MAD R3.xyz, R1, R3, R2;\n" + "MAD R2.xyz, R0.w, R1.w, R2;\n" "ADD R1.x, R0.w, R1.w;\n" - "ADD R3.xyz, R3, -R2;\n" + "ADD R2.xyz, R2, -R3;\n" "SGE R0.xyz, R0, R2.w;\n" - "MAD result.color.xyz, R0, R3, R2;\n" + "MAD result.color.xyz, R0, R2, R3;\n" "MAD result.color.w, -R0, R1, R1.x;\n" "END\n" ; @@ -5769,24 +5634,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_COLORBURN_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R2.xyz, -R0.w, R1.w, R3;\n" @@ -5799,9 +5663,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "RCP R2.z, R2.z;\n" "MAD R2.xyz, R4, R2, R5;\n" "MUL R4.xyz, R1, R3.w;\n" - "MAD R0.xyz, R0, R2.w, R4;\n" - "ADD R3.w, -R0, c[5].x;\n" "MAD R1.xyz, R1, R3.w, R2;\n" + "MAD R0.xyz, R0, R2.w, R4;\n" "MUL R2.x, R0.w, R1.w;\n" "ADD R2.w, R0, R1;\n" "ADD R1.xyz, R1, -R0;\n" @@ -5820,13 +5683,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" "MUL R1.xy, fragment.position, c[4];\n" "TEX R1, R1, texture[0], 2D;\n" @@ -5836,27 +5698,27 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "MUL R2.xyz, R2, R3;\n" "MUL R2.xyz, R2, c[5].x;\n" "MAD R2.xyz, R0.w, R1.w, -R2;\n" + "MAD R2.xyz, R0, R2.w, R2;\n" "MUL R4.xyz, R0, R2.w;\n" "MUL R3.xyz, R0, R1;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R2.w, -R0, c[5].y;\n" "MUL R0.xyz, R0, c[5].x;\n" - "MAD R2.xyz, R1, R2.w, R2;\n" + "ADD R2.w, -R0, c[5].y;\n" "MAD R3.xyz, R3, c[5].x, R4;\n" - "MAD R1.xyz, R1, R2.w, R3;\n" - "ADD R2.w, R0, R1;\n" - "ADD R2.xyz, R2, -R1;\n" + "MAD R3.xyz, R1, R2.w, R3;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, R0.w, R1.w;\n" + "ADD R1.xyz, R1, -R3;\n" "SGE R0.xyz, R0, R0.w;\n" - "MAD result.color.xyz, R0, R2, R1;\n" - "MAD result.color.w, -R0, R1, R2;\n" + "MAD result.color.xyz, R0, R1, R3;\n" + "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT_NOMASK = "!!ARBfp1.0\n" "PARAM c[7] = { program.local[0..4],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" @@ -5864,47 +5726,44 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R4;\n" "TEMP R5;\n" "TEMP R6;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" - "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MAX R0.z, R1.w, c[5].y;\n" - "RCP R2.w, R0.z;\n" - "MUL R2.xyz, R1, R2.w;\n" - "MUL R6.xyz, -R2, c[5].w;\n" - "MAD R3.xyz, -R1, R2.w, c[5].x;\n" - "MOV R0.y, -R0;\n" - "TEX R0, R0, texture[1], 2D;\n" - "MAD R4.xyz, R0, c[5].z, -R0.w;\n" - "MUL R5.xyz, R3, R4;\n" - "MAD R3.xyz, -R3, R4, R0.w;\n" - "ADD R6.xyz, R6, c[6].x;\n" - "RSQ R2.x, R2.x;\n" - "RSQ R2.z, R2.z;\n" - "RSQ R2.y, R2.y;\n" - "MAD R5.xyz, -R5, R6, R0.w;\n" - "MUL R3.xyz, R1, R3;\n" - "RCP R2.x, R2.x;\n" + "MUL R0.xy, fragment.position, c[4];\n" + "TEX R1, R0, texture[0], 2D;\n" + "MAX R0.x, R1.w, c[5].y;\n" + "RCP R2.w, R0.x;\n" + "MUL R0.xyz, R1, R2.w;\n" + "RSQ R0.w, R0.x;\n" + "RCP R2.x, R0.w;\n" + "RSQ R0.w, R0.y;\n" + "RSQ R2.z, R0.z;\n" + "MUL R3.xyz, fragment.position.y, c[2];\n" + "MAD R3.xyz, fragment.position.x, c[1], R3;\n" + "ADD R3.xyz, R3, c[3];\n" + "RCP R2.y, R0.w;\n" + "RCP R0.w, R3.z;\n" + "MUL R3.xy, R3, R0.w;\n" "RCP R2.z, R2.z;\n" - "RCP R2.y, R2.y;\n" - "MAD R2.xyz, R2, R1.w, -R1;\n" - "MUL R6.xyz, R2, R4;\n" - "MUL R2.xyz, R1, R5;\n" + "MAD R6.xyz, R1.w, R2, -R1;\n" + "MUL R2.xyz, -R0, c[6].x;\n" + "ADD R5.xyz, R2, c[5].w;\n" + "MAD R2.xyz, -R1, R2.w, c[5].x;\n" + "MUL R3.xy, R3, c[0];\n" + "TEX R0, R3, texture[1], 2D;\n" + "MAD R3.xyz, R0, c[5].z, -R0.w;\n" + "MUL R4.xyz, R2, R3;\n" + "MAD R4.xyz, -R4, R5, R0.w;\n" + "MUL R5.xyz, R6, R3;\n" + "MAD R2.xyz, -R2, R3, R0.w;\n" + "MUL R4.xyz, R1, R4;\n" + "MAD R5.xyz, R0.w, R1, R5;\n" + "ADD R6.xyz, R5, -R4;\n" + "MUL R5.xyz, R1, c[6].x;\n" + "SGE R3.xyz, R5, R1.w;\n" + "MAD R3.xyz, R3, R6, R4;\n" + "MUL R2.xyz, R1, R2;\n" "MUL R4.xyz, R0, c[5].z;\n" - "MAD R6.xyz, R1, R0.w, R6;\n" - "MUL R5.xyz, R1, c[5].w;\n" - "ADD R6.xyz, R6, -R2;\n" - "SGE R5.xyz, R5, R1.w;\n" - "MUL R5.xyz, R5, R6;\n" - "ADD R2.xyz, R2, R5;\n" - "ADD R2.xyz, R2, -R3;\n" + "ADD R3.xyz, R3, -R2;\n" "SGE R4.xyz, R4, R0.w;\n" - "MUL R2.xyz, R4, R2;\n" - "ADD R2.xyz, R3, R2;\n" + "MAD R2.xyz, R4, R3, R2;\n" "ADD R2.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" @@ -5922,18 +5781,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[4];\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" - "TEX R1, R1, texture[0], 2D;\n" "MUL R2.xyz, R0, R1.w;\n" - "MUL R3.xyz, R1, R0.w;\n" + "MUL R3.xyz, R0.w, R1;\n" "ADD R0.xyz, R0, R1;\n" "MIN R2.xyz, R2, R3;\n" "ADD R1.x, R0.w, R1.w;\n" @@ -5945,29 +5803,28 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_EXCLUSION_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "MUL R1.xy, fragment.position, c[4];\n" - "TEX R1, R1, texture[0], 2D;\n" + "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n" + "TEX R1, R0.zwzw, texture[0], 2D;\n" + "MUL R0.xy, R0, c[0];\n" "TEX R0, R0, texture[1], 2D;\n" - "MUL R2.xyz, R1, R0.w;\n" + "MUL R2.xyz, R0.w, R1;\n" "MAD R3.xyz, R0, R1.w, R2;\n" "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[5].y, R3;\n" - "ADD R2.w, -R1, c[5].x;\n" + "MAD R2.xyz, -R2, c[5].x, R3;\n" + "ADD R2.w, -R1, c[5].y;\n" "MAD R0.xyz, R0, R2.w, R2;\n" "ADD R2.x, R0.w, R1.w;\n" - "ADD R2.y, -R0.w, c[5].x;\n" + "ADD R2.y, -R0.w, c[5];\n" "MAD result.color.xyz, R1, R2.y, R0;\n" "MAD result.color.w, -R0, R1, R2.x;\n" "END\n" @@ -5978,19 +5835,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "PARAM c[7] = { program.local[0..6] };\n" "TEMP R0;\n" "TEMP R1;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R1.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R1.xyz, R0, c[3];\n" "RCP R0.z, R1.z;\n" "MUL R1.xy, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[4];\n" - "MUL R0.xy, R0, c[5];\n" + "ADD R0.xy, fragment.position, c[5];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "DP4 R1.z, R0, c[6];\n" - "MUL R1.xy, R1, c[3];\n" - "MOV R0.x, R1;\n" - "MOV R0.y, -R1;\n" - "TEX R0, R0, texture[1], 2D;\n" + "MUL R1.xy, R1, c[0];\n" + "TEX R0, R1, texture[1], 2D;\n" "MUL result.color, R0, R1.z;\n" "END\n" ; @@ -5999,58 +5854,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO "!!ARBfp1.0\n" "PARAM c[4] = { program.local[0..3] };\n" "TEMP R0;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" + "MUL R0.xy, R0, c[0];\n" "TEX result.color, R0, texture[0], 2D;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SIMPLE_PORTER_DUFF = "!!ARBfp1.0\n" - "PARAM c[11] = { program.local[0..7],\n" - " { 1 },\n" - " program.local[9..10] };\n" + "PARAM c[11] = { program.local[0..9],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "TEX R0.x, R0, texture[2], 2D;\n" - "MUL R0, fragment.color.primary, R0.x;\n" - "MUL R2.xyz, R1, c[10].y;\n" - "MUL R3.xyz, R2, R0.w;\n" - "MUL R2.xyz, R0, c[10].x;\n" - "MAD R2.xyz, R2, R1.w, R3;\n" - "ADD R3.xy, fragment.position, c[0];\n" - "MUL R0.xyz, R0, c[9].y;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R2.w, -R0, c[8].x;\n" - "MUL R0.xyz, R1, c[9].z;\n" - "MAD R2.xyz, R0, R2.w, R2;\n" - "ADD R0.y, -R1.w, c[8].x;\n" - "MUL R0.z, R1.w, R2.w;\n" - "MUL R0.x, R0.w, R1.w;\n" - "MUL R0.y, R0.w, R0;\n" - "DP3 R2.w, R0, c[9];\n" - "MUL R3.xy, R3, c[1];\n" - "TEX R0, R3, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MOV R1.y, -R1;\n" + "MUL R0.xy, fragment.position, c[7];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1.x, R1, texture[2], 2D;\n" + "MUL R1, fragment.color.primary, R1.x;\n" + "MUL R2.xyz, R0, c[4].y;\n" + "MUL R3.xyz, R1.w, R2;\n" + "MUL R2.xyz, R1, c[4].x;\n" + "MAD R2.xyz, R0.w, R2, R3;\n" + "ADD R3.xy, fragment.position, c[8];\n" + "ADD R2.w, -R0, c[10].x;\n" + "MUL R1.xyz, R1, c[5].y;\n" + "MAD R2.xyz, R2.w, R1, R2;\n" + "MUL R1.xyz, R0, c[5].z;\n" + "ADD R3.z, -R1.w, c[10].x;\n" + "MAD R2.xyz, R3.z, R1, R2;\n" + "MUL R1.y, R1.w, R2.w;\n" + "MUL R1.x, R1.w, R0.w;\n" + "MUL R1.z, R0.w, R3;\n" + "DP3 R2.w, R1, c[5];\n" + "MUL R3.xy, R3, c[6];\n" + "TEX R1, R3, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[9];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6061,30 +5913,30 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "MOV R0.y, -R0;\n" - "TEX R0.x, R0, texture[2], 2D;\n" - "MUL R0, fragment.color.primary, R0.x;\n" - "ADD R2.x, -R1.w, c[8];\n" - "MUL R2.xyz, R0, R2.x;\n" - "MAD R0.xyz, R0, R1, R2;\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MOV R1.y, -R1;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "TEX R1.x, R1, texture[2], 2D;\n" + "MUL R1, fragment.color.primary, R1.x;\n" "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R2.xyz, R1, R2.x;\n" + "MAD R1.xyz, R1, R0, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6095,24 +5947,24 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R1.x, R0, texture[2], 2D;\n" - "MUL R0.xy, fragment.position, c[7];\n" - "ADD R3.xy, fragment.position, c[0];\n" + "MUL R0.xy, fragment.position, c[5];\n" + "ADD R3.xy, fragment.position, c[6];\n" "TEX R0, R0, texture[0], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" "ADD R2, R1, R0;\n" "MAD R2, -R1, R0, R2;\n" - "MUL R3.xy, R3, c[1];\n" + "MUL R3.xy, R3, c[4];\n" "TEX R1, R3, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[7];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6126,16 +5978,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R1.x, R0, texture[2], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MUL R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, fragment.position, c[5];\n" "TEX R0, R0, texture[0], 2D;\n" "ADD R2.w, -R0, c[8].y;\n" "ADD R3.xyz, R1.w, -R1;\n" @@ -6156,11 +6008,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "MAD R2.xyz, R2, R1, R3;\n" "ADD R1.z, R1.w, R0.w;\n" "MAD R2.w, -R1, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[7];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6173,32 +6025,33 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "TEX R0.x, R0, texture[2], 2D;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R0, fragment.color.primary, R0.x;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[2], 2D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1, fragment.color.primary, R1.x;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MIN R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6210,50 +6063,51 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "TEX R0.x, R0, texture[2], 2D;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R0, fragment.color.primary, R0.x;\n" - "MUL R3.xyz, R1, R0.w;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[2], 2D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1, fragment.color.primary, R1.x;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R2.xyz, R1, R0.w;\n" "MAX R2.xyz, R2, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "ADD R2.w, -R0, c[8].x;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8];\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORDODGE = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R0.x, R0, texture[2], 2D;\n" "MUL R1, fragment.color.primary, R0.x;\n" @@ -6261,13 +6115,13 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "RCP R0.x, R0.x;\n" "MAD R0.xyz, -R1, R0.x, c[8].x;\n" "MAX R2.xyz, R0, c[8].y;\n" - "MUL R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, fragment.position, c[5];\n" "TEX R0, R0, texture[0], 2D;\n" "ADD R2.w, -R1, c[8].x;\n" "MUL R3.xyz, R0, R2.w;\n" "ADD R2.w, -R0, c[8].x;\n" "MAD R4.xyz, R1, R2.w, R3;\n" - "MUL R3.xyz, R0, R1.w;\n" + "MUL R3.xyz, R1.w, R0;\n" "MUL R2.w, R1, R0;\n" "MAD R1.xyz, R1, R0.w, R3;\n" "SGE R1.xyz, R1, R2.w;\n" @@ -6280,11 +6134,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "MAD R2.xyz, R1, R4, R2;\n" "ADD R1.z, R1.w, R0.w;\n" "MAD R2.w, -R1, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[7];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6292,25 +6146,26 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORBURN = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "TEX R1.x, R0, texture[2], 2D;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[2], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MUL R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, fragment.position, c[5];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R2.xyz, R1.w, R0;\n" "MAD R3.xyz, R1, R0.w, R2;\n" "MAD R2.xyz, -R1.w, R0.w, R3;\n" "MUL R4.xyz, R1.w, R2;\n" @@ -6325,18 +6180,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "MUL R4.xyz, R0, R3.w;\n" "MAD R1.xyz, R1, R2.w, R4;\n" "MUL R2.w, R1, R0;\n" - "ADD R3.w, -R1, c[8].x;\n" "MAD R2.xyz, R0, R3.w, R2;\n" "ADD R2.xyz, R2, -R1;\n" "SGE R3.xyz, R3, R2.w;\n" "MAD R2.xyz, R3, R2, R1;\n" "ADD R1.z, R1.w, R0.w;\n" "MAD R2.w, -R1, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[7];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6350,16 +6204,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R1.x, R0, texture[2], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MUL R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, fragment.position, c[5];\n" "TEX R0, R0, texture[0], 2D;\n" "ADD R2.w, -R0, c[8].y;\n" "ADD R3.xyz, R1.w, -R1;\n" @@ -6380,11 +6234,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "MAD R2.xyz, R1, R2, R3;\n" "ADD R1.z, R1.w, R0.w;\n" "MAD R2.w, -R1, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[7];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6392,68 +6246,66 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT = "!!ARBfp1.0\n" "PARAM c[10] = { program.local[0..7],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R1.xyz, R0, c[5];\n" + "TEMP R6;\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R1.xyz, R0, c[3];\n" "RCP R0.z, R1.z;\n" "MUL R1.xy, R1, R0.z;\n" - "MUL R1.xy, R1, c[6];\n" + "MUL R1.xy, R1, c[0];\n" "MOV R1.y, -R1;\n" - "MUL R0.xy, fragment.position, c[7];\n" + "MUL R0.xy, fragment.position, c[5];\n" "TEX R0, R0, texture[0], 2D;\n" "MAX R1.z, R0.w, c[8].y;\n" "RCP R2.w, R1.z;\n" "MUL R2.xyz, R0, R2.w;\n" - "MUL R5.xyz, -R2, c[8].w;\n" - "MAD R4.xyz, -R0, R2.w, c[8].x;\n" + "MUL R6.xyz, -R2, c[9].x;\n" + "MAD R3.xyz, -R0, R2.w, c[8].x;\n" "TEX R1.x, R1, texture[2], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MAD R3.xyz, R1, c[8].z, -R1.w;\n" + "MAD R4.xyz, R1, c[8].z, -R1.w;\n" + "MUL R5.xyz, R3, R4;\n" + "MAD R3.xyz, -R3, R4, R1.w;\n" + "ADD R6.xyz, R6, c[8].w;\n" + "MAD R5.xyz, -R5, R6, R1.w;\n" "RSQ R2.x, R2.x;\n" "RSQ R2.z, R2.z;\n" "RSQ R2.y, R2.y;\n" - "MUL R4.xyz, R4, R3;\n" - "ADD R5.xyz, R5, c[9].x;\n" - "MUL R5.xyz, R4, R5;\n" - "ADD R4.xyz, R1.w, -R4;\n" + "MUL R5.xyz, R0, R5;\n" + "MUL R3.xyz, R0, R3;\n" "ADD R2.w, -R0, c[8].x;\n" "RCP R2.x, R2.x;\n" "RCP R2.z, R2.z;\n" "RCP R2.y, R2.y;\n" - "MAD R2.xyz, R2, R0.w, -R0;\n" - "MUL R3.xyz, R2, R3;\n" - "ADD R2.xyz, R1.w, -R5;\n" - "MAD R5.xyz, R0, R1.w, R3;\n" - "MUL R2.xyz, R0, R2;\n" - "MUL R3.xyz, R0, c[8].w;\n" - "ADD R5.xyz, R5, -R2;\n" - "SGE R3.xyz, R3, R0.w;\n" - "MUL R3.xyz, R3, R5;\n" - "ADD R2.xyz, R2, R3;\n" - "MUL R3.xyz, R0, R4;\n" + "MAD R2.xyz, R0.w, R2, -R0;\n" + "MUL R2.xyz, R2, R4;\n" + "MAD R2.xyz, R1.w, R0, R2;\n" + "ADD R6.xyz, R2, -R5;\n" "MUL R4.xyz, R1, c[8].z;\n" + "MUL R2.xyz, R0, c[9].x;\n" + "SGE R2.xyz, R2, R0.w;\n" + "MAD R2.xyz, R2, R6, R5;\n" "SGE R4.xyz, R4, R1.w;\n" "ADD R2.xyz, R2, -R3;\n" - "MUL R2.xyz, R4, R2;\n" - "ADD R2.xyz, R3, R2;\n" + "MAD R2.xyz, R4, R2, R3;\n" "MAD R1.xyz, R1, R2.w, R2;\n" "ADD R2.x, -R1.w, c[8];\n" "MAD R2.xyz, R0, R2.x, R1;\n" "ADD R1.z, R1.w, R0.w;\n" "MAD R2.w, -R1, R0, R1.z;\n" - "ADD R1.xy, fragment.position, c[0];\n" - "MUL R1.xy, R1, c[1];\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" "TEX R1, R1, texture[1], 2D;\n" "ADD R2, R2, -R0;\n" - "DP4 R1.x, R1, c[2];\n" + "DP4 R1.x, R1, c[7];\n" "MAD result.color, R1.x, R2, R0;\n" "END\n" ; @@ -6466,107 +6318,106 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n" - "TEX R1, R0.zwzw, texture[0], 2D;\n" - "TEX R0.x, R0, texture[2], 2D;\n" - "MUL R0, fragment.color.primary, R0.x;\n" - "ADD R3.xyz, R0, R1;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MUL R0.xyz, R0, R1.w;\n" - "MIN R0.xyz, R0, R2;\n" - "MAD R2.xyz, -R0, c[8].x, R3;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[2], 2D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1, fragment.color.primary, R1.x;\n" + "ADD R2.xyz, R1, R0;\n" + "MUL R3.xyz, R1.w, R0;\n" + "MUL R1.xyz, R1, R0.w;\n" + "MIN R1.xyz, R1, R3;\n" + "MAD R2.xyz, -R1, c[8].x, R2;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_EXCLUSION = "!!ARBfp1.0\n" "PARAM c[9] = { program.local[0..7],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[4];\n" - "MAD R0.xyz, fragment.position.x, c[3], R0;\n" - "ADD R0.xyz, R0, c[5];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[6];\n" - "MOV R0.y, -R0;\n" - "TEX R0.x, R0, texture[2], 2D;\n" - "MUL R1.xy, fragment.position, c[7];\n" - "TEX R1, R1, texture[0], 2D;\n" - "MUL R0, fragment.color.primary, R0.x;\n" - "MUL R2.xyz, R1, R0.w;\n" - "MAD R3.xyz, R0, R1.w, R2;\n" - "MUL R2.xyz, R0, R1;\n" - "MAD R2.xyz, -R2, c[8].y, R3;\n" - "ADD R2.w, -R1, c[8].x;\n" - "MAD R0.xyz, R0, R2.w, R2;\n" - "ADD R2.x, -R0.w, c[8];\n" - "MAD R2.xyz, R1, R2.x, R0;\n" - "ADD R0.z, R0.w, R1.w;\n" - "MAD R2.w, -R0, R1, R0.z;\n" - "ADD R0.xy, fragment.position, c[0];\n" - "MUL R0.xy, R0, c[1];\n" - "TEX R0, R0, texture[1], 2D;\n" - "ADD R2, R2, -R1;\n" - "DP4 R0.x, R0, c[2];\n" - "MAD result.color, R0.x, R2, R1;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[2], 2D;\n" + "MUL R0.xy, fragment.position, c[5];\n" + "TEX R0, R0, texture[0], 2D;\n" + "MUL R1, fragment.color.primary, R1.x;\n" + "MUL R2.xyz, R1.w, R0;\n" + "MAD R3.xyz, R1, R0.w, R2;\n" + "MUL R2.xyz, R1, R0;\n" + "MAD R2.xyz, -R2, c[8].x, R3;\n" + "ADD R2.w, -R0, c[8].y;\n" + "MAD R1.xyz, R1, R2.w, R2;\n" + "ADD R2.x, -R1.w, c[8].y;\n" + "MAD R2.xyz, R0, R2.x, R1;\n" + "ADD R1.z, R1.w, R0.w;\n" + "MAD R2.w, -R1, R0, R1.z;\n" + "ADD R1.xy, fragment.position, c[6];\n" + "MUL R1.xy, R1, c[4];\n" + "TEX R1, R1, texture[1], 2D;\n" + "ADD R2, R2, -R0;\n" + "DP4 R1.x, R1, c[7];\n" + "MAD result.color, R1.x, R2, R0;\n" "END\n" ; static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK = "!!ARBfp1.0\n" - "PARAM c[8] = { program.local[0..4],\n" - " { 1 },\n" - " program.local[6..7] };\n" + "PARAM c[8] = { program.local[0..6],\n" + " { 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" - "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.w, -R0.y;\n" - "MOV R0.z, R0.x;\n" - "TEX R1.x, R0.zwzw, texture[1], 2D;\n" - "MUL R0.xy, fragment.position, c[4];\n" + "MUL R0.zw, R0.xyxy, R0.z;\n" + "MUL R1.xy, R0.zwzw, c[0];\n" + "MOV R1.y, -R1;\n" + "MUL R0.xy, fragment.position, c[6];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R2.xyz, R0, c[7].y;\n" + "MUL R2.xyz, R0, c[4].y;\n" + "TEX R1.x, R1, texture[1], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MUL R3.xyz, R2, R1.w;\n" - "MUL R2.xyz, R1, c[7].x;\n" - "MUL R0.xyz, R0, c[6].z;\n" - "MAD R2.xyz, R2, R0.w, R3;\n" - "MUL R1.xyz, R1, c[6].y;\n" - "ADD R2.w, -R0, c[5].x;\n" - "MAD R1.xyz, R1, R2.w, R2;\n" - "ADD R2.x, -R1.w, c[5];\n" - "MAD result.color.xyz, R0, R2.x, R1;\n" - "ADD R0.y, -R0.w, c[5].x;\n" + "MUL R3.xyz, R1.w, R2;\n" + "MUL R2.xyz, R1, c[4].x;\n" + "MUL R0.xyz, R0, c[5].z;\n" + "MAD R2.xyz, R0.w, R2, R3;\n" + "ADD R2.w, -R0, c[7].x;\n" + "MUL R1.xyz, R1, c[5].y;\n" + "MAD R1.xyz, R2.w, R1, R2;\n" + "ADD R2.x, -R1.w, c[7];\n" + "MAD result.color.xyz, R2.x, R0, R1;\n" "MUL R0.x, R1.w, R0.w;\n" "MUL R0.z, R0.w, R2.x;\n" - "MUL R0.y, R1.w, R0;\n" - "DP3 result.color.w, R0, c[6];\n" + "MUL R0.y, R1.w, R2.w;\n" + "DP3 result.color.w, R0, c[5];\n" "END\n" ; @@ -6577,12 +6428,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.zw, R0.xyxy, R0.z;\n" - "MUL R1.xy, R0.zwzw, c[3];\n" + "MUL R1.xy, R0.zwzw, c[0];\n" "MOV R1.y, -R1;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" @@ -6604,12 +6455,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.w, -R0.y;\n" "MOV R0.z, R0.x;\n" "TEX R1.x, R0.zwzw, texture[1], 2D;\n" @@ -6629,12 +6480,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R1.x, R0, texture[1], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" @@ -6670,19 +6521,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "TEX R1.x, R0, texture[1], 2D;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[1], 2D;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" "MUL R2.xyz, R1, R0.w;\n" - "MUL R3.xyz, R0, R1.w;\n" + "MUL R3.xyz, R1.w, R0;\n" "MIN R2.xyz, R2, R3;\n" "ADD R2.w, -R0, c[5].x;\n" "MAD R1.xyz, R1, R2.w, R2;\n" @@ -6701,19 +6553,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "TEX R1.x, R0, texture[1], 2D;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[1], 2D;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" "MUL R2.xyz, R1, R0.w;\n" - "MUL R3.xyz, R0, R1.w;\n" + "MUL R3.xyz, R1.w, R0;\n" "MAX R2.xyz, R2, R3;\n" "ADD R2.w, -R0, c[5].x;\n" "MAD R1.xyz, R1, R2.w, R2;\n" @@ -6727,17 +6580,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORDODGE_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 1e-06 } };\n" + " { 1, 1e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R0.x, R0, texture[1], 2D;\n" "MUL R1, fragment.color.primary, R0.x;\n" @@ -6751,7 +6604,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "MUL R3.xyz, R0, R2.w;\n" "ADD R2.w, -R0, c[5].x;\n" "MAD R3.xyz, R1, R2.w, R3;\n" - "MUL R0.xyz, R0, R1.w;\n" + "MUL R0.xyz, R1.w, R0;\n" "RCP R2.x, R2.x;\n" "RCP R2.y, R2.y;\n" "RCP R2.z, R2.z;\n" @@ -6770,25 +6623,26 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_COLORBURN_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 9.9999997e-06 } };\n" + " { 1, 9.9999997e-006 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "TEX R1.x, R0, texture[1], 2D;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[1], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R2.xyz, R1.w, R0;\n" "MAD R3.xyz, R1, R0.w, R2;\n" "ADD R2.w, -R0, c[5].x;\n" "MAD R2.xyz, -R1.w, R0.w, R3;\n" @@ -6801,9 +6655,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "RCP R2.z, R2.z;\n" "MAD R2.xyz, R4, R2, R5;\n" "MUL R4.xyz, R0, R3.w;\n" - "MAD R1.xyz, R1, R2.w, R4;\n" - "ADD R3.w, -R1, c[5].x;\n" "MAD R0.xyz, R0, R3.w, R2;\n" + "MAD R1.xyz, R1, R2.w, R4;\n" "MUL R2.x, R1.w, R0.w;\n" "ADD R2.w, R1, R0;\n" "ADD R0.xyz, R0, -R1;\n" @@ -6822,12 +6675,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R1.x, R0, texture[1], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" @@ -6858,57 +6711,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT_NOMASK = "!!ARBfp1.0\n" "PARAM c[7] = { program.local[0..4],\n" - " { 1, 9.9999997e-06, 2, 8 },\n" - " { 3 } };\n" + " { 1, 9.9999997e-006, 2, 3 },\n" + " { 8 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" "TEMP R4;\n" "TEMP R5;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R1.xyz, R0, c[2];\n" + "TEMP R6;\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R1.xyz, R0, c[3];\n" "RCP R0.z, R1.z;\n" "MUL R1.xy, R1, R0.z;\n" - "MUL R1.xy, R1, c[3];\n" + "MUL R1.xy, R1, c[0];\n" "MOV R1.y, -R1;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "MAX R1.z, R0.w, c[5].y;\n" "RCP R2.w, R1.z;\n" "MUL R2.xyz, R0, R2.w;\n" - "MUL R5.xyz, -R2, c[5].w;\n" - "MAD R4.xyz, -R0, R2.w, c[5].x;\n" + "MUL R6.xyz, -R2, c[6].x;\n" + "MAD R3.xyz, -R0, R2.w, c[5].x;\n" "TEX R1.x, R1, texture[1], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MAD R3.xyz, R1, c[5].z, -R1.w;\n" + "MAD R4.xyz, R1, c[5].z, -R1.w;\n" + "MUL R5.xyz, R3, R4;\n" + "MAD R3.xyz, -R3, R4, R1.w;\n" + "ADD R6.xyz, R6, c[5].w;\n" + "MAD R5.xyz, -R5, R6, R1.w;\n" "RSQ R2.x, R2.x;\n" "RSQ R2.z, R2.z;\n" "RSQ R2.y, R2.y;\n" - "MUL R4.xyz, R4, R3;\n" - "ADD R5.xyz, R5, c[6].x;\n" - "MUL R5.xyz, R4, R5;\n" - "ADD R4.xyz, R1.w, -R4;\n" + "MUL R5.xyz, R0, R5;\n" + "MUL R3.xyz, R0, R3;\n" "RCP R2.x, R2.x;\n" "RCP R2.z, R2.z;\n" "RCP R2.y, R2.y;\n" - "MAD R2.xyz, R2, R0.w, -R0;\n" - "MUL R3.xyz, R2, R3;\n" - "ADD R2.xyz, R1.w, -R5;\n" - "MAD R5.xyz, R0, R1.w, R3;\n" - "MUL R2.xyz, R0, R2;\n" - "MUL R3.xyz, R0, c[5].w;\n" - "ADD R5.xyz, R5, -R2;\n" - "SGE R3.xyz, R3, R0.w;\n" - "MUL R3.xyz, R3, R5;\n" - "ADD R2.xyz, R2, R3;\n" - "MUL R3.xyz, R0, R4;\n" + "MAD R2.xyz, R0.w, R2, -R0;\n" + "MUL R2.xyz, R2, R4;\n" + "MAD R2.xyz, R1.w, R0, R2;\n" + "ADD R6.xyz, R2, -R5;\n" "MUL R4.xyz, R1, c[5].z;\n" + "MUL R2.xyz, R0, c[6].x;\n" + "SGE R2.xyz, R2, R0.w;\n" + "MAD R2.xyz, R2, R6, R5;\n" "ADD R2.xyz, R2, -R3;\n" "SGE R4.xyz, R4, R1.w;\n" - "MUL R2.xyz, R4, R2;\n" - "ADD R2.xyz, R3, R2;\n" + "MAD R2.xyz, R4, R2, R3;\n" "ADD R2.w, -R0, c[5].x;\n" "MAD R1.xyz, R1, R2.w, R2;\n" "ADD R2.x, R1.w, R0.w;\n" @@ -6926,18 +6777,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "TEX R1.x, R0, texture[1], 2D;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[1], 2D;\n" "MUL R0.xy, fragment.position, c[4];\n" - "MUL R1, fragment.color.primary, R1.x;\n" "TEX R0, R0, texture[0], 2D;\n" - "MUL R3.xyz, R0, R1.w;\n" + "MUL R1, fragment.color.primary, R1.x;\n" + "MUL R3.xyz, R1.w, R0;\n" "MUL R2.xyz, R1, R0.w;\n" "ADD R0.xyz, R1, R0;\n" "MIN R2.xyz, R2, R3;\n" @@ -6950,30 +6802,31 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_EXCLUSION_NOMASK = "!!ARBfp1.0\n" "PARAM c[6] = { program.local[0..4],\n" - " { 1, 2 } };\n" + " { 2, 1 } };\n" "TEMP R0;\n" "TEMP R1;\n" "TEMP R2;\n" "TEMP R3;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" - "MOV R0.y, -R0;\n" - "TEX R1.x, R0, texture[1], 2D;\n" + "MUL R0.xy, R0, c[0];\n" + "MOV R0.w, -R0.y;\n" + "MOV R0.z, R0.x;\n" + "TEX R1.x, R0.zwzw, texture[1], 2D;\n" "MUL R0.xy, fragment.position, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "MUL R1, fragment.color.primary, R1.x;\n" - "MUL R2.xyz, R0, R1.w;\n" + "MUL R2.xyz, R1.w, R0;\n" "MAD R3.xyz, R1, R0.w, R2;\n" "MUL R2.xyz, R1, R0;\n" - "MAD R2.xyz, -R2, c[5].y, R3;\n" - "ADD R2.w, -R0, c[5].x;\n" + "MAD R2.xyz, -R2, c[5].x, R3;\n" + "ADD R2.w, -R0, c[5].y;\n" "MAD R1.xyz, R1, R2.w, R2;\n" "ADD R2.x, R1.w, R0.w;\n" - "ADD R2.y, -R1.w, c[5].x;\n" + "ADD R2.y, -R1.w, c[5];\n" "MAD result.color.xyz, R0, R2.y, R1;\n" "MAD result.color.w, -R1, R0, R2.x;\n" "END\n" @@ -6984,15 +6837,15 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "PARAM c[7] = { program.local[0..6] };\n" "TEMP R0;\n" "TEMP R1;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R1.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R1.xyz, R0, c[3];\n" "RCP R0.z, R1.z;\n" "MUL R0.zw, R1.xyxy, R0.z;\n" - "MUL R1.xy, R0.zwzw, c[3];\n" + "MUL R1.xy, R0.zwzw, c[0];\n" "MOV R1.y, -R1;\n" - "ADD R0.xy, fragment.position, c[4];\n" - "MUL R0.xy, R0, c[5];\n" + "ADD R0.xy, fragment.position, c[5];\n" + "MUL R0.xy, R0, c[4];\n" "TEX R0, R0, texture[0], 2D;\n" "TEX R1.x, R1, texture[1], 2D;\n" "DP4 R0.x, R0, c[6];\n" @@ -7005,12 +6858,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO "!!ARBfp1.0\n" "PARAM c[4] = { program.local[0..3] };\n" "TEMP R0;\n" - "MUL R0.xyz, fragment.position.y, c[1];\n" - "MAD R0.xyz, fragment.position.x, c[0], R0;\n" - "ADD R0.xyz, R0, c[2];\n" + "MUL R0.xyz, fragment.position.y, c[2];\n" + "MAD R0.xyz, fragment.position.x, c[1], R0;\n" + "ADD R0.xyz, R0, c[3];\n" "RCP R0.z, R0.z;\n" "MUL R0.xy, R0, R0.z;\n" - "MUL R0.xy, R0, c[3];\n" + "MUL R0.xy, R0, c[0];\n" "MOV R0.y, -R0;\n" "TEX R0.x, R0, texture[0], 2D;\n" "MUL result.color, fragment.color.primary, R0.x;\n" @@ -7195,19 +7048,19 @@ static const char *painter_fragment_program_sources[num_fragment_brushes][num_fr static int painter_variable_locations[num_fragment_brushes][num_fragment_composition_modes][num_fragment_variables] = { { - { -1, -1, -1, 1, -1, 6, 2, -1, 5, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, 3, 1, 0, -1, 0, -1, -1, -1, -1, -1, }, - { -1, -1, -1, -1, -1, 3, -1, -1, 2, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 2, -1, 0, 5, -1, 1, 3, 1, 0, -1, 4, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 3, -1, -1, 1, 1, 0, -1, 2, -1, -1, -1, -1, -1, }, + { -1, -1, -1, -1, -1, 0, -1, -1, 1, 2, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, @@ -7219,154 +7072,154 @@ static int painter_variable_locations[num_fragment_brushes][num_fragment_composi { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, }, - { -1, -1, -1, 1, -1, -1, 2, -1, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, }, + { -1, -1, -1, 0, -1, -1, 2, -1, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }, }, { - { -1, -1, 4, 1, 5, 11, 2, -1, 10, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 9, 1, 0, 2, 0, -1, 8, 6, 3, -1, }, - { -1, -1, 1, -1, 2, 8, -1, -1, 7, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 6, -1, 0, 1, -1, -1, 5, 3, 0, -1, }, - { -1, -1, 1, 7, 2, -1, 8, -1, -1, -1, 0, -1, 1, 6, -1, 5, 3, 0, -1, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 5, 3, 0, -1, }, + { -1, -1, 3, 7, 4, 5, 10, -1, 6, 8, 1, 0, 2, 9, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 8, -1, -1, 6, 1, 0, 2, 7, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, 5, -1, -1, 6, 7, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, 5, -1, 0, 1, -1, -1, 1, 0, 2, -1, }, + { -1, -1, 3, 5, 4, -1, 7, -1, -1, -1, 0, -1, 1, 6, -1, 1, 0, 2, -1, }, + { -1, -1, 3, -1, 4, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, 0, 2, -1, }, }, { - { -1, -1, 4, 1, 5, 12, 2, -1, 11, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 4, 1, 5, -1, 2, -1, -1, 10, 1, 0, 2, 0, -1, -1, -1, 3, 8, }, - { -1, -1, 1, -1, 2, 9, -1, -1, 8, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, 7, -1, 0, 1, -1, -1, -1, -1, 0, 5, }, - { -1, -1, 1, 8, 2, -1, 9, -1, -1, -1, 0, -1, 1, 7, -1, -1, -1, 0, 5, }, - { -1, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, 5, }, + { -1, -1, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, 2, 8, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, 0, }, + { -1, -1, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, 1, 5, -1, -1, -1, 1, 0, }, + { -1, -1, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 0, }, }, { - { -1, 6, 4, 1, 5, 10, 2, -1, 9, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 6, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, 2, 0, -1, -1, -1, 3, -1, }, - { -1, 3, 1, -1, 2, 7, -1, -1, 6, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 0, -1, }, - { -1, 3, 1, 5, 2, -1, 6, -1, -1, -1, 0, -1, 1, 4, -1, -1, -1, 0, -1, }, - { -1, 3, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, }, + { -1, 0, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, 2, 8, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, 2, 6, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, 1, -1, -1, -1, -1, 1, -1, }, + { -1, 0, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, 1, 5, -1, -1, -1, 1, -1, }, + { -1, 0, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, -1, }, }, { - { 2, -1, 4, 1, 5, 10, 2, -1, 9, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 1, -1, 1, -1, 2, 7, -1, -1, 6, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, 5, 2, -1, 6, -1, -1, -1, 0, -1, -1, 4, 3, -1, -1, 0, -1, }, - { 0, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, }, + { 2, -1, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, -1, 8, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, -1, 5, 0, -1, -1, 1, -1, }, + { 0, -1, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, -1, }, }, { - { 2, -1, 4, 1, 5, 10, 2, -1, 9, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 2, -1, 4, 1, 5, -1, 2, -1, -1, 7, 1, 0, -1, 0, 6, -1, -1, 3, -1, }, - { 1, -1, 1, -1, 2, 7, -1, -1, 6, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, -1, 2, -1, -1, -1, -1, 4, -1, 0, -1, -1, 3, -1, -1, 0, -1, }, - { 1, -1, 1, 5, 2, -1, 6, -1, -1, -1, 0, -1, -1, 4, 3, -1, -1, 0, -1, }, - { 0, -1, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, }, + { 2, -1, 2, 6, 3, 4, 9, -1, 5, 7, 1, 0, -1, 8, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 2, -1, 2, 4, 3, -1, 7, -1, -1, 5, 1, 0, -1, 6, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, 4, -1, -1, 5, 6, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, -1, 3, -1, -1, -1, -1, 4, -1, 0, -1, -1, 0, -1, -1, 1, -1, }, + { 1, -1, 2, 4, 3, -1, 6, -1, -1, -1, 0, -1, -1, 5, 0, -1, -1, 1, -1, }, + { 0, -1, 2, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, -1, }, }, }; static int mask_variable_locations[num_fragment_masks][num_fragment_variables] = { { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }, - { -1, -1, 2, -1, 3, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, }, + { -1, -1, 1, -1, 2, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, }, }; #endif diff --git a/src/opengl/util/generator.pro b/src/opengl/util/generator.pro index 9425dbe..ac71934 100644 --- a/src/opengl/util/generator.pro +++ b/src/opengl/util/generator.pro @@ -9,3 +9,5 @@ INCLUDEPATH += . # Input SOURCES += generator.cpp + +CONFIG += console diff --git a/src/opengl/util/texture_brush.glsl b/src/opengl/util/texture_brush.glsl index 93865b8..9498255 100644 --- a/src/opengl/util/texture_brush.glsl +++ b/src/opengl/util/texture_brush.glsl @@ -17,7 +17,5 @@ vec4 brush() coords *= inv_brush_texture_size; - coords.y = -coords.y; - return texture2D(brush_texture, coords); } diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index b0e190f..09eb646 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1091,6 +1091,7 @@ VGPaintType QVGPaintEnginePrivate::setBrush // The brush is a texture specified by a QPixmap/QImage. QPixmapData *pd = brush.texture().pixmapData(); VGImage vgImg; + bool deref = false; if (pd->pixelType() == QPixmapData::BitmapType) { // Colorize bitmaps using the brush color and opacity. QColor color = brush.color(); @@ -1098,15 +1099,21 @@ VGPaintType QVGPaintEnginePrivate::setBrush color.setAlphaF(color.alphaF() * opacity); QImage image = colorizeBitmap(*(pd->buffer()), color); vgImg = toVGImage(image); + deref = true; } else if (opacity == 1.0) { if (pd->classId() == QPixmapData::OpenVGClass) { QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd); vgImg = vgpd->toVGImage(); } else { vgImg = toVGImage(*(pd->buffer())); + deref = true; } + } else if (pd->classId() == QPixmapData::OpenVGClass) { + QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd); + vgImg = vgpd->toVGImage(opacity); } else { vgImg = toVGImageWithOpacity(*(pd->buffer()), opacity); + deref = true; } if (vgImg == VG_INVALID_HANDLE) break; @@ -1114,7 +1121,8 @@ VGPaintType QVGPaintEnginePrivate::setBrush vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN); vgSetParameteri(paint, VG_PAINT_PATTERN_TILING_MODE, VG_TILE_REPEAT); vgPaintPattern(paint, vgImg); - vgDestroyImage(vgImg); // Will stay valid until pattern is destroyed. + if (deref) + vgDestroyImage(vgImg); // Will be valid until pattern is destroyed. return VG_PAINT_TYPE_PATTERN; } @@ -3064,43 +3072,42 @@ void QVGPaintEngine::setState(QPainterState *s) } } -// Called from QPaintEngine::syncState() to force a state flush. -// This should be called before and after raw VG operations. -void QVGPaintEngine::updateState(const QPaintEngineState &state) +void QVGPaintEngine::beginNativePainting() { - Q_UNUSED(state); Q_D(QVGPaintEngine); - if (!(d->rawVG)) { - // About to enter raw VG mode: flush pending changes and make - // sure that all matrices are set to the current transformation. - QVGPainterState *s = this->state(); - d->ensurePen(s->pen); - d->ensureBrush(s->brush); - d->ensurePathTransform(); - d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, d->imageTransform); + // About to enter raw VG mode: flush pending changes and make + // sure that all matrices are set to the current transformation. + QVGPainterState *s = this->state(); + d->ensurePen(s->pen); + d->ensureBrush(s->brush); + d->ensurePathTransform(); + d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, d->imageTransform); #if !defined(QVG_NO_DRAW_GLYPHS) - d->setTransform(VG_MATRIX_GLYPH_USER_TO_SURFACE, d->pathTransform); + d->setTransform(VG_MATRIX_GLYPH_USER_TO_SURFACE, d->pathTransform); #endif - d->rawVG = true; - } else { - // Exiting raw VG mode: force all state values to be - // explicitly set on the VG engine to undo any changes - // that were made by the raw VG function calls. - QPaintEngine::DirtyFlags dirty = d->dirty; - d->clearModes(); - d->forcePenChange = true; - d->forceBrushChange = true; - d->penType = (VGPaintType)0; - d->brushType = (VGPaintType)0; - d->clearColor = QColor(); - d->fillPaint = d->brushPaint; - restoreState(QPaintEngine::AllDirty); - d->dirty = dirty; - d->rawVG = false; - vgSetPaint(d->penPaint, VG_STROKE_PATH); - vgSetPaint(d->brushPaint, VG_FILL_PATH); - } + d->rawVG = true; +} + +void QVGPaintEngine::endNativePainting() +{ + Q_D(QVGPaintEngine); + // Exiting raw VG mode: force all state values to be + // explicitly set on the VG engine to undo any changes + // that were made by the raw VG function calls. + QPaintEngine::DirtyFlags dirty = d->dirty; + d->clearModes(); + d->forcePenChange = true; + d->forceBrushChange = true; + d->penType = (VGPaintType)0; + d->brushType = (VGPaintType)0; + d->clearColor = QColor(); + d->fillPaint = d->brushPaint; + restoreState(QPaintEngine::AllDirty); + d->dirty = dirty; + d->rawVG = false; + vgSetPaint(d->penPaint, VG_STROKE_PATH); + vgSetPaint(d->brushPaint, VG_FILL_PATH); } QPixmapFilter *QVGPaintEngine::createPixmapFilter(int type) const @@ -3112,6 +3119,8 @@ QPixmapFilter *QVGPaintEngine::createPixmapFilter(int type) const return new QVGPixmapColorizeFilter; else if (type == QPixmapFilter::DropShadowFilter) return new QVGPixmapDropShadowFilter; + else if (type == QPixmapFilter::BlurFilter) + return new QVGPixmapBlurFilter; else #endif return QPaintEngineEx::createPixmapFilter(type); diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h index 469ec9e..f0a7838 100644 --- a/src/openvg/qpaintengine_vg_p.h +++ b/src/openvg/qpaintengine_vg_p.h @@ -140,7 +140,8 @@ public: QVGPainterState *state() { return static_cast<QVGPainterState *>(QPaintEngineEx::state()); } const QVGPainterState *state() const { return static_cast<const QVGPainterState *>(QPaintEngineEx::state()); } - void updateState(const QPaintEngineState &state); + void beginNativePainting(); + void endNativePainting(); QPixmapFilter *createPixmapFilter(int type) const; diff --git a/src/openvg/qpixmapfilter_vg.cpp b/src/openvg/qpixmapfilter_vg.cpp index 2dbdf7e..5a263a5 100644 --- a/src/openvg/qpixmapfilter_vg.cpp +++ b/src/openvg/qpixmapfilter_vg.cpp @@ -335,6 +335,65 @@ void QVGPixmapDropShadowFilter::draw(QPainter *painter, const QPointF &dest, con vgDestroyImage(dstImage); } +QVGPixmapBlurFilter::QVGPixmapBlurFilter(QObject *parent) + : QPixmapBlurFilter(parent) +{ +} + +QVGPixmapBlurFilter::~QVGPixmapBlurFilter() +{ +} + +void QVGPixmapBlurFilter::draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect) const +{ + if (src.pixmapData()->classId() != QPixmapData::OpenVGClass) { + // The pixmap data is not an instance of QVGPixmapData, so fall + // back to the default blur filter implementation. + QPixmapBlurFilter::draw(painter, dest, src, srcRect); + return; + } + + QVGPixmapData *pd = static_cast<QVGPixmapData *>(src.pixmapData()); + + VGImage srcImage = pd->toVGImage(); + if (srcImage == VG_INVALID_HANDLE) + return; + + QSize size = pd->size(); + VGImage dstImage = vgCreateImage + (VG_sARGB_8888_PRE, size.width(), size.height(), + VG_IMAGE_QUALITY_FASTER); + if (dstImage == VG_INVALID_HANDLE) + return; + + // Clamp the radius range. We divide by 2 because the OpenVG blur + // is "too blurry" compared to the default raster implementation. + VGfloat maxRadius = VGfloat(vgGeti(VG_MAX_GAUSSIAN_STD_DEVIATION)); + VGfloat radiusF = VGfloat(radius()) / 2.0f; + if (radiusF < 0.001f) + radiusF = 0.001f; + else if (radiusF > maxRadius) + radiusF = maxRadius; + + vgGaussianBlur(dstImage, srcImage, radiusF, radiusF, VG_TILE_PAD); + + VGImage child = VG_INVALID_HANDLE; + + if (srcRect.isNull() || + (srcRect.topLeft().isNull() && srcRect.size() == size)) { + child = dstImage; + } else { + QRect src = srcRect.toRect(); + child = vgChildImage(dstImage, src.x(), src.y(), src.width(), src.height()); + } + + qt_vg_drawVGImage(painter, dest, child); + + if(child != dstImage) + vgDestroyImage(child); + vgDestroyImage(dstImage); +} + #endif QT_END_NAMESPACE diff --git a/src/openvg/qpixmapfilter_vg_p.h b/src/openvg/qpixmapfilter_vg_p.h index 6a3cc5f..3dc0e8f 100644 --- a/src/openvg/qpixmapfilter_vg_p.h +++ b/src/openvg/qpixmapfilter_vg_p.h @@ -63,6 +63,7 @@ QT_BEGIN_NAMESPACE class Q_OPENVG_EXPORT QVGPixmapConvolutionFilter : public QPixmapConvolutionFilter { + Q_OBJECT public: QVGPixmapConvolutionFilter(); ~QVGPixmapConvolutionFilter(); @@ -72,6 +73,7 @@ public: class Q_OPENVG_EXPORT QVGPixmapColorizeFilter : public QPixmapColorizeFilter { + Q_OBJECT public: QVGPixmapColorizeFilter(); ~QVGPixmapColorizeFilter(); @@ -86,6 +88,7 @@ private: class Q_OPENVG_EXPORT QVGPixmapDropShadowFilter : public QPixmapDropShadowFilter { + Q_OBJECT public: QVGPixmapDropShadowFilter(); ~QVGPixmapDropShadowFilter(); @@ -101,6 +104,16 @@ private: mutable QVarLengthArray<VGshort, 16> kernel; }; +class Q_OPENVG_EXPORT QVGPixmapBlurFilter : public QPixmapBlurFilter +{ + Q_OBJECT +public: + QVGPixmapBlurFilter(QObject *parent = 0); + ~QVGPixmapBlurFilter(); + + void draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect = QRectF()) const; +}; + #endif QT_END_NAMESPACE diff --git a/src/plugins/codecs/jp/qjiscodec.cpp b/src/plugins/codecs/jp/qjiscodec.cpp index a495dae..3e4d5a0 100644 --- a/src/plugins/codecs/jp/qjiscodec.cpp +++ b/src/plugins/codecs/jp/qjiscodec.cpp @@ -41,7 +41,7 @@ // Most of the code here was originally written by Serika Kurusugawa, // a.k.a. Junji Takagi, and is included in Qt with the author's permission -// and the grateful thanks of the Trolltech team. +// and the grateful thanks of the Qt team. /*! \class QJisCodec \reentrant diff --git a/src/plugins/gfxdrivers/directfb/directfb.pro b/src/plugins/gfxdrivers/directfb/directfb.pro index 5c60b2f..c5da3df 100644 --- a/src/plugins/gfxdrivers/directfb/directfb.pro +++ b/src/plugins/gfxdrivers/directfb/directfb.pro @@ -6,6 +6,9 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/gfxdrivers # These defines might be necessary if your DirectFB driver doesn't # support all of the DirectFB API. # +#DEFINES += QT_DIRECTFB_WINDOW_AS_CURSOR +#DEFINES += QT_NO_DIRECTFB_IMAGEPROVIDER +#DEFINES += QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE #DEFINES += QT_DIRECTFB_IMAGECACHE #DEFINES += QT_NO_DIRECTFB_WM #DEFINES += QT_NO_DIRECTFB_LAYER diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp index 3979a8c..6abf0ff 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp @@ -47,7 +47,8 @@ QDirectFBPaintDevice::QDirectFBPaintDevice(QDirectFBScreen *scr) : QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), screen(scr), - bpl(-1), lockFlgs(DFBSurfaceLockFlags(0)), mem(0), engine(0) + bpl(-1), lockFlgs(DFBSurfaceLockFlags(0)), mem(0), engine(0), + imageFormat(QImage::Format_Invalid) {} QDirectFBPaintDevice::~QDirectFBPaintDevice() @@ -56,13 +57,11 @@ QDirectFBPaintDevice::~QDirectFBPaintDevice() delete engine; } - IDirectFBSurface *QDirectFBPaintDevice::directFBSurface() const { return dfbSurface; } - void QDirectFBPaintDevice::lockDirectFB(DFBSurfaceLockFlags flags) { if (!(lockFlgs & flags)) { @@ -77,7 +76,6 @@ void QDirectFBPaintDevice::lockDirectFB(DFBSurfaceLockFlags flags) } } - void QDirectFBPaintDevice::unlockDirectFB() { if (!lockedImage || !QDirectFBScreen::instance()) @@ -90,26 +88,23 @@ void QDirectFBPaintDevice::unlockDirectFB() lockFlgs = DFBSurfaceLockFlags(0); } - void *QDirectFBPaintDevice::memory() const { return mem; } - QImage::Format QDirectFBPaintDevice::format() const { - return QDirectFBScreen::getImageFormat(dfbSurface); + return imageFormat; } - int QDirectFBPaintDevice::bytesPerLine() const { if (bpl == -1) { // Can only get the stride when we lock the surface Q_ASSERT(!lockedImage); QDirectFBPaintDevice* that = const_cast<QDirectFBPaintDevice*>(this); - that->lockDirectFB(DSLF_READ); + that->lockDirectFB(DSLF_READ|DSLF_WRITE); Q_ASSERT(bpl != -1); } return bpl; @@ -143,11 +138,9 @@ int QDirectFBPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const case QPaintDevice::PdmDpiY: return (dotsPerMeterY() * 254) / 10000; // 0.0254 meters-per-inch case QPaintDevice::PdmDepth: - DFBSurfacePixelFormat format; - dfbSurface->GetPixelFormat(dfbSurface, &format); - return QDirectFBScreen::depth(format); + return QDirectFBScreen::depth(imageFormat); case QPaintDevice::PdmNumColors: { - if (lockedImage) + if (lockedImage) return lockedImage->numColors(); DFBResult result; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index 688fd7b..48761b2 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -89,6 +89,7 @@ protected: DFBSurfaceLockFlags lockFlgs; uchar *mem; QDirectFBPaintEngine *engine; + QImage::Format imageFormat; private: Q_DISABLE_COPY(QDirectFBPaintDevice); }; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 956189c..e63a628 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -532,7 +532,7 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image, d->unlock(); bool release; IDirectFBSurface *imgSurface = d->getSurface(image, &release); - d->prepareForBlit(QDirectFBScreen::hasAlpha(imgSurface)); + d->prepareForBlit(QDirectFBScreen::hasAlphaChannel(imgSurface)); CLIPPED_PAINT(d->blit(r, imgSurface, sr)); if (release) { #if (Q_DIRECTFB_VERSION >= 0x010000) @@ -939,9 +939,9 @@ void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color) IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, bool *release) { -#ifndef QT_DIRECTFB_IMAGECACHE +#ifdef QT_NO_DIRECTFB_IMAGECACHE *release = true; - return QDirectFBScreen::instance()->createDFBSurface(img, QDirectFBScreen::DontTrackSurface); + return QDirectFBScreen::instance()->createDFBSurface(img, img.format(), QDirectFBScreen::DontTrackSurface); #else const qint64 key = img.cacheKey(); *release = false; @@ -955,7 +955,7 @@ IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, boo const QImage::Format format = (img.format() == screen->alphaPixmapFormat() || QDirectFBPixmapData::hasAlphaChannel(img) ? screen->alphaPixmapFormat() : screen->pixelFormat()); - IDirectFBSurface *surface = screen->copyToDFBSurface(img, format, + IDirectFBSurface *surface = screen->createDFBSurface(img, format, cache ? QDirectFBScreen::TrackSurface : QDirectFBScreen::DontTrackSurface); @@ -1133,7 +1133,7 @@ IDirectFBSurface *SurfaceCache::getSurface(const uint *buf, int size) clear(); const DFBSurfaceDescription description = QDirectFBScreen::getSurfaceDescription(buf, size); - surface = QDirectFBScreen::instance()->createDFBSurface(description, QDirectFBScreen::TrackSurface); + surface = QDirectFBScreen::instance()->createDFBSurface(description, QDirectFBScreen::TrackSurface, 0); if (!surface) qWarning("QDirectFBPaintEngine: SurfaceCache: Unable to create surface"); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 0afb8a8..146a920 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -45,13 +45,14 @@ #include "qdirectfbpaintengine.h" #include <QtGui/qbitmap.h> +#include <QtCore/qfile.h> #include <directfb.h> static int global_ser_no = 0; QDirectFBPixmapData::QDirectFBPixmapData(QDirectFBScreen *screen, PixelType pixelType) : QPixmapData(pixelType, DirectFBClass), QDirectFBPaintDevice(screen), - format(QImage::Format_Invalid), alpha(false) + alpha(false) { setSerialNumber(0); } @@ -70,11 +71,11 @@ void QDirectFBPixmapData::resize(int width, int height) return; } - format = screen->pixelFormat(); + imageFormat = screen->pixelFormat(); dfbSurface = screen->createDFBSurface(QSize(width, height), - format, + imageFormat, QDirectFBScreen::TrackSurface); - d = screen->depth(); + d = QDirectFBScreen::depth(imageFormat); alpha = false; if (!dfbSurface) { invalidate(); @@ -85,7 +86,6 @@ void QDirectFBPixmapData::resize(int width, int height) w = width; h = height; is_null = (w <= 0 || h <= 0); - d = metric(QPaintDevice::PdmDepth); setSerialNumber(++global_ser_no); } @@ -168,37 +168,200 @@ bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img) #endif } +#ifdef QT_DIRECTFB_IMAGEPROVIDER +bool QDirectFBPixmapData::fromFile(const QString &filename, const char *format, + Qt::ImageConversionFlags flags) +{ + if (flags == Qt::AutoColor) { + if (filename.startsWith(QLatin1Char(':'))) { // resource + QFile file(filename); + if (!file.open(QIODevice::ReadOnly)) + return false; + const QByteArray data = file.readAll(); + file.close(); + return fromData(reinterpret_cast<const uchar*>(data.constData()), data.size(), format, flags); + } else { + DFBDataBufferDescription description; + description.flags = DBDESC_FILE; + const QByteArray fileNameData = filename.toLocal8Bit(); + description.file = fileNameData.constData(); + if (fromDataBufferDescription(description)) { + return true; + } + // fall back to Qt + } + } + return QPixmapData::fromFile(filename, format, flags); +} -void QDirectFBPixmapData::fromImage(const QImage &i, - Qt::ImageConversionFlags flags) +bool QDirectFBPixmapData::fromData(const uchar *buffer, uint len, const char *format, + Qt::ImageConversionFlags flags) { -#ifdef QT_NO_DIRECTFB_OPAQUE_DETECTION - Q_UNUSED(flags); + if (flags == Qt::AutoColor) { + DFBDataBufferDescription description; + description.flags = DBDESC_MEMORY; + description.memory.data = buffer; + description.memory.length = len; + if (fromDataBufferDescription(description)) + return true; + // fall back to Qt + } + return QPixmapData::fromData(buffer, len, format, flags); +} + +template <typename T> struct QDirectFBInterfaceCleanupHandler +{ + static void cleanup(T *t) { if (t) t->Release(t); } +}; + +template <typename T> +class QDirectFBPointer : public QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> > +{ +public: + QDirectFBPointer(T *t = 0) + : QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> >(t) + {} +}; + +bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescription &dataBufferDescription) +{ + IDirectFB *dfb = screen->dfb(); + Q_ASSERT(dfb); + DFBResult result = DFB_OK; + IDirectFBDataBuffer *dataBufferPtr; + if ((result = dfb->CreateDataBuffer(dfb, &dataBufferDescription, &dataBufferPtr)) != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromDataBufferDescription()", result); + return false; + } + QDirectFBPointer<IDirectFBDataBuffer> dataBuffer(dataBufferPtr); + + IDirectFBImageProvider *providerPtr; + if ((result = dataBuffer->CreateImageProvider(dataBuffer.data(), &providerPtr)) != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't create image provider", result); + return false; + } + QDirectFBPointer<IDirectFBImageProvider> provider(providerPtr); + + DFBSurfaceDescription surfaceDescription; + if ((result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription)) != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't get surface description", result); + return false; + } + + QDirectFBPointer<IDirectFBSurface> surfaceFromDescription; + surfaceFromDescription.reset(screen->createDFBSurface(surfaceDescription, QDirectFBScreen::DontTrackSurface, &result)); + if (!surfaceFromDescription) { + DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't create surface", result); + return false; + } + + result = provider->RenderTo(provider.data(), surfaceFromDescription.data(), 0); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't render to surface", result); + return false; + } + + DFBImageDescription imageDescription; + result = provider->GetImageDescription(provider.data(), &imageDescription); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromSurfaceDescription(): Can't get image description", result); + return false; + } + + alpha = imageDescription.caps & (DICAPS_ALPHACHANNEL|DICAPS_COLORKEY); + imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat(); + + dfbSurface = screen->createDFBSurface(QSize(surfaceDescription.width, surfaceDescription.height), + imageFormat, QDirectFBScreen::TrackSurface); + if (alpha) + dfbSurface->Clear(dfbSurface, 0, 0, 0, 0); + + DFBSurfaceBlittingFlags blittingFlags = DSBLIT_NOFX; + if (imageDescription.caps & DICAPS_COLORKEY) { + blittingFlags |= DSBLIT_SRC_COLORKEY; + result = surfaceFromDescription->SetSrcColorKey(surfaceFromDescription.data(), + imageDescription.colorkey_r, + imageDescription.colorkey_g, + imageDescription.colorkey_b); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't set src color key", result); + invalidate(); // release dfbSurface + return false; + } + } + if (imageDescription.caps & DICAPS_ALPHACHANNEL) { + blittingFlags |= DSBLIT_BLEND_ALPHACHANNEL; + } + result = dfbSurface->SetBlittingFlags(dfbSurface, blittingFlags); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't set blitting flags", result); + invalidate(); // release dfbSurface + return false; + } + + result = dfbSurface->Blit(dfbSurface, surfaceFromDescription.data(), 0, 0, 0); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::fromSurfaceDescription: Can't blit to surface", result); + invalidate(); // release dfbSurface + return false; + } + if (blittingFlags != DSBLIT_NOFX) { + dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); + } + + + w = surfaceDescription.width; + h = surfaceDescription.height; + is_null = (w <= 0 || h <= 0); + d = QDirectFBScreen::depth(imageFormat); + setSerialNumber(++global_ser_no); +#if (Q_DIRECTFB_VERSION >= 0x010000) + dfbSurface->ReleaseSource(dfbSurface); +#endif +#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE + screen->setDirectFBImageProvider(providerPtr); + provider.take(); #endif - const QImage img = (i.depth() == 1 ? i.convertToFormat(screen->alphaPixmapFormat()) : i); - if (img.hasAlphaChannel() + + return true; +} + +#endif + +void QDirectFBPixmapData::fromImage(const QImage &image, + Qt::ImageConversionFlags flags) +{ + if (image.depth() == 1) { + fromImage(image.convertToFormat(screen->alphaPixmapFormat()), flags); + return; + } + + if (image.hasAlphaChannel() #ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION - && (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(img)) + && (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(image)) #endif ) { alpha = true; - format = screen->alphaPixmapFormat(); + imageFormat = screen->alphaPixmapFormat(); } else { alpha = false; - format = screen->pixelFormat(); + imageFormat = screen->pixelFormat(); } - dfbSurface = screen->copyToDFBSurface(img, format, - QDirectFBScreen::TrackSurface); + + dfbSurface = screen->createDFBSurface(image, imageFormat, QDirectFBScreen::TrackSurface|QDirectFBScreen::NoPreallocated); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fromImage()"); invalidate(); return; } - w = img.width(); - h = img.height(); + w = image.width(); + h = image.height(); is_null = (w <= 0 || h <= 0); - d = metric(QPaintDevice::PdmDepth); + d = QDirectFBScreen::depth(imageFormat); setSerialNumber(++global_ser_no); +#ifdef QT_NO_DIRECTFB_OPAQUE_DETECTION + Q_UNUSED(flags); +#endif } void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) @@ -212,12 +375,12 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) const QDirectFBPixmapData *otherData = static_cast<const QDirectFBPixmapData*>(data); IDirectFBSurface *src = otherData->directFBSurface(); alpha = data->hasAlphaChannel(); - format = (alpha - ? QDirectFBScreen::instance()->alphaPixmapFormat() - : QDirectFBScreen::instance()->pixelFormat()); + imageFormat = (alpha + ? QDirectFBScreen::instance()->alphaPixmapFormat() + : QDirectFBScreen::instance()->pixelFormat()); - dfbSurface = screen->createDFBSurface(rect.size(), format, + dfbSurface = screen->createDFBSurface(rect.size(), imageFormat, QDirectFBScreen::TrackSurface); if (!dfbSurface) { qWarning("QDirectFBPixmapData::copy()"); @@ -275,11 +438,12 @@ void QDirectFBPixmapData::fill(const QColor &color) alpha = (color.alpha() < 255); - if (alpha && ::isOpaqueFormat(format)) { + if (alpha && ::isOpaqueFormat(imageFormat)) { QSize size; dfbSurface->GetSize(dfbSurface, &size.rwidth(), &size.rheight()); screen->releaseDFBSurface(dfbSurface); - format = screen->alphaPixmapFormat(); + imageFormat = screen->alphaPixmapFormat(); + d = QDirectFBScreen::depth(imageFormat); dfbSurface = screen->createDFBSurface(size, screen->alphaPixmapFormat(), QDirectFBScreen::TrackSurface); setSerialNumber(++global_ser_no); if (!dfbSurface) { @@ -320,7 +484,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, flags = DSBLIT_BLEND_ALPHACHANNEL; } data->dfbSurface = screen->createDFBSurface(size, - format, + imageFormat, QDirectFBScreen::TrackSurface); if (flags & DSBLIT_BLEND_ALPHACHANNEL) { data->dfbSurface->Clear(data->dfbSurface, 0, 0, 0, 0); @@ -399,9 +563,14 @@ QImage * QDirectFBPixmapData::buffer(DFBSurfaceLockFlags lockFlags) void QDirectFBPixmapData::invalidate() { + if (dfbSurface) { + screen->releaseDFBSurface(dfbSurface); + dfbSurface = 0; + } setSerialNumber(0); alpha = false; d = w = h = 0; - format = QImage::Format_Invalid; + is_null = true; + imageFormat = QImage::Format_Invalid; } diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h index 2300174..f0ae2f8 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h @@ -62,6 +62,12 @@ public: // Re-implemented from QPixmapData: virtual void resize(int width, int height); virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags); +#ifdef QT_DIRECTFB_IMAGEPROVIDER + virtual bool fromFile(const QString &filename, const char *format, + Qt::ImageConversionFlags flags); + virtual bool fromData(const uchar *buffer, uint len, const char *format, + Qt::ImageConversionFlags flags); +#endif virtual void copy(const QPixmapData *data, const QRect &rect); virtual void fill(const QColor &color); virtual QPixmap transformed(const QTransform &matrix, @@ -74,12 +80,14 @@ public: QImage *buffer(DFBSurfaceLockFlags lockFlags); // Pure virtual in QPixmapData, so re-implement here and delegate to QDirectFBPaintDevice - inline QImage::Format pixelFormat() const { return format; } + inline QImage::Format pixelFormat() const { return imageFormat; } static bool hasAlphaChannel(const QImage &img); inline bool hasAlphaChannel() const { return alpha; } private: +#ifdef QT_DIRECTFB_IMAGEPROVIDER + bool fromDataBufferDescription(const DFBDataBufferDescription &dataBuffer); +#endif void invalidate(); - QImage::Format format; bool alpha; }; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 45de07a..4542051 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -87,6 +87,9 @@ public: #ifndef QT_NO_DIRECTFB_KEYBOARD QDirectFBKeyboardHandler *keyboard; #endif +#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE + IDirectFBImageProvider *imageProvider; +#endif QColor backgroundColor; QDirectFBScreen *q; }; @@ -109,6 +112,9 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr) #ifndef QT_NO_DIRECTFB_KEYBOARD , keyboard(0) #endif +#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE + , imageProvider(0) +#endif , q(qptr) { #ifndef QT_NO_QWS_SIGNALHANDLER @@ -128,6 +134,10 @@ QDirectFBScreenPrivate::~QDirectFBScreenPrivate() #ifndef QT_NO_DIRECTFB_KEYBOARD delete keyboard; #endif +#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE + if (imageProvider) + imageProvider->Release(imageProvider); +#endif for (QSet<IDirectFBSurface*>::const_iterator it = allocatedSurfaces.begin(); it != allocatedSurfaces.end(); ++it) { (*it)->Release(*it); @@ -150,64 +160,77 @@ QDirectFBScreenPrivate::~QDirectFBScreenPrivate() dfb->Release(dfb); } - - -// creates a preallocated surface with the same format as the image if -// possible. - -IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &img, SurfaceCreationOptions options) +IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &image, QImage::Format format, SurfaceCreationOptions options, DFBResult *resultPtr) { - if (img.isNull()) // assert? + if (image.isNull()) // assert? return 0; - if (QDirectFBScreen::getSurfacePixelFormat(img.format()) == DSPF_UNKNOWN) { - QImage image = img.convertToFormat(img.hasAlphaChannel() - ? d_ptr->alphaPixmapFormat - : pixelFormat()); - IDirectFBSurface *tmp = createDFBSurface(image, false); - if (!tmp) { - qWarning("Couldn't create surface createDFBSurface(QImage, bool)"); - return 0; - } - IDirectFBSurface *surface = copyDFBSurface(tmp, image.format(), options); - tmp->Release(tmp); - return surface; + if (QDirectFBScreen::getSurfacePixelFormat(format) == DSPF_UNKNOWN) { + format = QDirectFBPixmapData::hasAlphaChannel(image) ? d_ptr->alphaPixmapFormat : pixelFormat(); + } + if (image.format() != format) { + return createDFBSurface(image.convertToFormat(format), format, options | NoPreallocated, resultPtr); } - IDirectFBSurface *surface = createDFBSurface(QDirectFBScreen::getSurfaceDescription(img), options); -#ifdef QT_NO_DIRECTFB_PREALLOCATED - if (surface) { - int bpl; - uchar *mem = QDirectFBScreen::lockSurface(surface, DSLF_WRITE, &bpl); + DFBSurfaceDescription description; + memset(&description, 0, sizeof(DFBSurfaceDescription)); + description.width = image.width(); + description.height = image.height(); + description.flags = DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT; + initSurfaceDescriptionPixelFormat(&description, format); + bool doMemCopy = true; +#ifdef QT_DIRECTFB_PREALLOCATED + if (!(options & NoPreallocated)) { + doMemCopy = false; + description.flags |= DSDESC_PREALLOCATED; + description.preallocated[0].data = const_cast<uchar*>(image.bits()); + description.preallocated[0].pitch = image.bytesPerLine(); + description.preallocated[1].data = 0; + description.preallocated[1].pitch = 0; + } +#endif + DFBResult result; + IDirectFBSurface *surface = createDFBSurface(description, options, &result); + if (resultPtr) + *resultPtr = result; + if (!surface) { + DirectFBError("Couldn't create surface createDFBSurface(QImage, QImage::Format, SurfaceCreationOptions)", result); + return 0; + } + if (doMemCopy) { + int bplDFB; + uchar *mem = QDirectFBScreen::lockSurface(surface, DSLF_WRITE, &bplDFB); if (mem) { - const int h = img.height(); - const int w = img.width() * img.depth() / 8; - for (int i = 0; i < h; ++i) { - memcpy(mem, img.scanLine(i), w); - mem += bpl; + const int height = image.height(); + const int bplQt = image.bytesPerLine(); + if (bplQt == bplDFB && bplQt == (image.width() * image.depth() / 8)) { + memcpy(mem, image.bits(), image.numBytes()); + } else { + for (int i=0; i<height; ++i) { + memcpy(mem, image.scanLine(i), bplQt); + mem += bplDFB; + } } surface->Unlock(surface); } } -#endif -#ifndef QT_NO_DIRECTFB_PALETTE - if (img.numColors() != 0 && surface) - QDirectFBScreen::setSurfaceColorTable(surface, img); +#ifdef QT_DIRECTFB_PALETTE + if (image.numColors() != 0 && surface) + QDirectFBScreen::setSurfaceColorTable(surface, image); #endif return surface; } IDirectFBSurface *QDirectFBScreen::copyDFBSurface(IDirectFBSurface *src, QImage::Format format, - SurfaceCreationOptions options) + SurfaceCreationOptions options, + DFBResult *result) { Q_ASSERT(src); QSize size; src->GetSize(src, &size.rwidth(), &size.rheight()); - IDirectFBSurface *surface = createDFBSurface(size, format, options); - DFBSurfacePixelFormat dspf; - src->GetPixelFormat(src, &dspf); - DFBSurfaceBlittingFlags flags = QDirectFBScreen::hasAlpha(dspf) + IDirectFBSurface *surface = createDFBSurface(size, format, options, result); + DFBSurfaceBlittingFlags flags = QDirectFBScreen::hasAlphaChannel(surface) ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; if (flags & DSBLIT_BLEND_ALPHACHANNEL) @@ -223,7 +246,8 @@ IDirectFBSurface *QDirectFBScreen::copyDFBSurface(IDirectFBSurface *src, IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size, QImage::Format format, - SurfaceCreationOptions options) + SurfaceCreationOptions options, + DFBResult *result) { DFBSurfaceDescription desc; memset(&desc, 0, sizeof(DFBSurfaceDescription)); @@ -232,12 +256,14 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size, return 0; desc.width = size.width(); desc.height = size.height(); - return createDFBSurface(desc, options); + return createDFBSurface(desc, options, result); } -IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, SurfaceCreationOptions options) +IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, SurfaceCreationOptions options, DFBResult *resultPtr) { - DFBResult result = DFB_OK; + DFBResult tmp; + DFBResult &result = (resultPtr ? *resultPtr : tmp); + result = DFB_OK; IDirectFBSurface *newSurface = 0; if (!d_ptr->dfb) { @@ -299,68 +325,6 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, return newSurface; } -IDirectFBSurface *QDirectFBScreen::copyToDFBSurface(const QImage &img, - QImage::Format pixmapFormat, - SurfaceCreationOptions options) -{ - QImage image = img; - if (QDirectFBScreen::getSurfacePixelFormat(image.format()) == DSPF_UNKNOWN -#ifdef QT_NO_DIRECTFB_PREALLOCATED - || image.format() != pixmapFormat -#endif -#ifdef QT_NO_DIRECTFB_PALETTE - || image.numColors() != 0 -#endif - ) { - image = image.convertToFormat(pixmapFormat); - } - - IDirectFBSurface *dfbSurface = createDFBSurface(image.size(), pixmapFormat, options); - if (!dfbSurface) { - qWarning("QDirectFBScreen::copyToDFBSurface() Couldn't create surface"); - return 0; - } - -#ifndef QT_NO_DIRECTFB_PREALLOCATED - IDirectFBSurface *imgSurface = createDFBSurface(image, DontTrackSurface); - if (!imgSurface) { - qWarning("QDirectFBScreen::copyToDFBSurface()"); - QDirectFBScreen::releaseDFBSurface(dfbSurface); - return 0; - } - - Q_ASSERT(imgSurface); - DFBSurfaceBlittingFlags flags = img.hasAlphaChannel() - ? DSBLIT_BLEND_ALPHACHANNEL - : DSBLIT_NOFX; - if (flags & DSBLIT_BLEND_ALPHACHANNEL) - dfbSurface->Clear(dfbSurface, 0, 0, 0, 0); - - dfbSurface->SetBlittingFlags(dfbSurface, flags); - DFBResult result = dfbSurface->Blit(dfbSurface, imgSurface, 0, 0, 0); - if (result != DFB_OK) - DirectFBError("QDirectFBScreen::copyToDFBSurface()", result); - imgSurface->Release(imgSurface); -#if (Q_DIRECTFB_VERSION >= 0x010000) - dfbSurface->ReleaseSource(dfbSurface); -#endif -#else // QT_NO_DIRECTFB_PREALLOCATED - Q_ASSERT(image.format() == pixmapFormat); - int bpl; - uchar *mem = QDirectFBScreen::lockSurface(dfbSurface, DSLF_WRITE, &bpl); - if (mem) { - const int h = image.height(); - const int w = image.width() * image.depth() / 8; - for (int i=0; i<h; ++i) { - memcpy(mem, image.scanLine(i), w); - mem += bpl; - } - dfbSurface->Unlock(dfbSurface); - } -#endif - return dfbSurface; -} - void QDirectFBScreen::releaseDFBSurface(IDirectFBSurface *surface) { Q_ASSERT(QDirectFBScreen::instance()); @@ -474,36 +438,6 @@ QImage::Format QDirectFBScreen::getImageFormat(IDirectFBSurface *surface) return QImage::Format_Invalid; } -DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const QImage &image) -{ - DFBSurfaceDescription description; - memset(&description, 0, sizeof(DFBSurfaceDescription)); - - const DFBSurfacePixelFormat format = getSurfacePixelFormat(image.format()); - - if (format == DSPF_UNKNOWN || image.isNull()) { - description.flags = DSDESC_NONE; - return description; - } - - description.flags = DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT; - QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description, image.format()); - description.width = image.width(); - description.height = image.height(); -#ifndef QT_NO_DIRECTFB_PREALLOCATED - description.flags |= DSDESC_PREALLOCATED; - description.preallocated[0].data = (void*)(image.bits()); - description.preallocated[0].pitch = image.bytesPerLine(); - description.preallocated[1].data = 0; - description.preallocated[1].pitch = 0; -#endif - - if (QDirectFBScreen::isPremultiplied(image.format())) - description.caps = DSCAPS_PREMULTIPLIED; - - return description; -} - DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer, int length) { @@ -519,7 +453,7 @@ DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer, description.preallocated[0].pitch = length * sizeof(uint); description.preallocated[1].data = 0; description.preallocated[1].pitch = 0; -return description; + return description; } #ifndef QT_NO_DIRECTFB_PALETTE @@ -560,7 +494,15 @@ void QDirectFBScreen::setSurfaceColorTable(IDirectFBSurface *surface, #endif // QT_NO_DIRECTFB_PALETTE -#if !defined(QT_NO_DIRECTFB_LAYER) && !defined(QT_NO_QWS_CURSOR) +#ifndef QT_NO_QWS_CURSOR +#if defined QT_DIRECTFB_WM && defined QT_DIRECTFB_WINDOW_AS_CURSOR +#define QT_DIRECTFB_CURSOR +#elif defined QT_DIRECTFB_LAYER +#define QT_DIRECTFB_CURSOR +#endif +#endif + +#if defined QT_DIRECTFB_CURSOR class Q_GUI_EXPORT QDirectFBScreenCursor : public QScreenCursor { public: @@ -570,6 +512,11 @@ public: virtual void show(); virtual void hide(); private: +#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR + ~QDirectFBScreenCursor(); + bool createWindow(); + IDirectFBWindow *window; +#endif IDirectFBDisplayLayer *layer; }; @@ -585,12 +532,95 @@ QDirectFBScreenCursor::QDirectFBScreenCursor() enable = false; hwaccel = true; supportsAlpha = true; +#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR + window = 0; + DFBResult result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::hide: " + "Unable to set cooperative level", result); + } + result = layer->SetCursorOpacity(layer, 0); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::hide: " + "Unable to set cursor opacity", result); + } + + result = layer->SetCooperativeLevel(layer, DLSCL_SHARED); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::hide: " + "Unable to set cooperative level", result); + } +#endif +} + +#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR +QDirectFBScreenCursor::~QDirectFBScreenCursor() +{ + if (window) { + window->Release(window); + window = 0; + } } +bool QDirectFBScreenCursor::createWindow() +{ + Q_ASSERT(!window); + Q_ASSERT(!cursor.isNull()); + DFBWindowDescription description; + memset(&description, 0, sizeof(DFBWindowDescription)); + description.flags = DWDESC_POSX|DWDESC_POSY|DWDESC_WIDTH|DWDESC_HEIGHT|DWDESC_CAPS|DWDESC_OPTIONS|DWDESC_PIXELFORMAT|DWDESC_SURFACE_CAPS; + description.width = cursor.width(); + description.height = cursor.height(); + description.posx = pos.x() - hotspot.x(); + description.posy = pos.y() - hotspot.y(); + description.options = DWOP_GHOST|DWOP_ALPHACHANNEL; + description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER; + const QImage::Format format = QDirectFBScreen::instance()->alphaPixmapFormat(); + description.pixelformat = QDirectFBScreen::getSurfacePixelFormat(format); + if (QDirectFBScreen::isPremultiplied(format)) + description.surface_caps = DSCAPS_PREMULTIPLIED; + + DFBResult result = layer->CreateWindow(layer, &description, &window); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::createWindow: Unable to create window", result); + return false; + } + result = window->SetOpacity(window, 255); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::createWindow: Unable to set opacity ", result); + return false; + } + + result = window->SetStackingClass(window, DWSC_UPPER); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::createWindow: Unable to set stacking class ", result); + return false; + } + + result = window->RaiseToTop(window); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::createWindow: Unable to raise window ", result); + return false; + } + + return true; +} +#endif + void QDirectFBScreenCursor::move(int x, int y) { pos = QPoint(x, y); +#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR + if (window) { + const QPoint p = pos - hotspot; + DFBResult result = window->MoveTo(window, p.x(), p.y()); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::move: Unable to move window", result); + } + } +#else layer->WarpCursor(layer, x, y); +#endif } void QDirectFBScreenCursor::hide() @@ -598,6 +628,7 @@ void QDirectFBScreenCursor::hide() if (enable) { enable = false; DFBResult result; +#ifndef QT_DIRECTFB_WINDOW_AS_CURSOR result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); if (result != DFB_OK) { DirectFBError("QDirectFBScreenCursor::hide: " @@ -613,6 +644,15 @@ void QDirectFBScreenCursor::hide() DirectFBError("QDirectFBScreenCursor::hide: " "Unable to set cooperative level", result); } +#else + if (window) { + result = window->SetOpacity(window, 0); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::hide: " + "Unable to set window opacity", result); + } + } +#endif } } @@ -626,7 +666,13 @@ void QDirectFBScreenCursor::show() DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cooperative level", result); } - result = layer->SetCursorOpacity(layer, 255); + result = layer->SetCursorOpacity(layer, +#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR + 0 +#else + 255 +#endif + ); if (result != DFB_OK) { DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cursor shape", result); @@ -636,6 +682,15 @@ void QDirectFBScreenCursor::show() DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cooperative level", result); } +#ifdef QT_DIRECTFB_WINDOW_AS_CURSOR + if (window) { + DFBResult result = window->SetOpacity(window, 255); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::show: " + "Unable to set window opacity", result); + } + } +#endif } } @@ -652,12 +707,15 @@ void QDirectFBScreenCursor::set(const QImage &image, int hotx, int hoty) cursor = image.convertToFormat(screen->alphaPixmapFormat()); size = cursor.size(); hotspot = QPoint(hotx, hoty); - IDirectFBSurface *surface = screen->createDFBSurface(cursor, QDirectFBScreen::DontTrackSurface); + DFBResult result = DFB_OK; + IDirectFBSurface *surface = screen->createDFBSurface(cursor, screen->alphaPixmapFormat(), + QDirectFBScreen::DontTrackSurface, &result); if (!surface) { - qWarning("QDirectFBScreenCursor::set: Unable to create surface"); + DirectFBError("QDirectFBScreenCursor::set: Unable to create surface", result); return; } - DFBResult result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); +#ifndef QT_DIRECTFB_WINDOW_AS_CURSOR + result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); if (result != DFB_OK) { DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cooperative level", result); @@ -667,17 +725,53 @@ void QDirectFBScreenCursor::set(const QImage &image, int hotx, int hoty) DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cursor shape", result); } - surface->Release(surface); result = layer->SetCooperativeLevel(layer, DLSCL_SHARED); if (result != DFB_OK) { DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cooperative level", result); } +#else + if (window || createWindow()) { + QSize windowSize; + result = window->GetSize(window, &windowSize.rwidth(), &windowSize.rheight()); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::set: " + "Unable to get window size", result); + } + result = window->Resize(window, size.width(), size.height()); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::set: Unable to resize window", result); + } + + IDirectFBSurface *windowSurface; + result = window->GetSurface(window, &windowSurface); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::set: Unable to get window surface", result); + } else { + result = windowSurface->Clear(windowSurface, 0, 0, 0, 0); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::set: Unable to clear surface", result); + } + + result = windowSurface->Blit(windowSurface, surface, 0, 0, 0); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::set: Unable to blit to surface", result); + } + } + result = windowSurface->Flip(windowSurface, 0, DSFLIP_NONE); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreenCursor::set: Unable to flip window", result); + } + + windowSurface->Release(windowSurface); + } +#endif + surface->Release(surface); show(); } } -#endif // QT_NO_DIRECTFB_LAYER +#endif // QT_DIRECTFB_CURSOR QDirectFBScreen::QDirectFBScreen(int display_id) : QScreen(display_id, DirectFBClass), d_ptr(new QDirectFBScreenPrivate(this)) @@ -732,6 +826,42 @@ int QDirectFBScreen::depth(DFBSurfacePixelFormat format) return 0; } +int QDirectFBScreen::depth(QImage::Format format) +{ + int depth = 0; + switch(format) { + case QImage::Format_Invalid: + case QImage::NImageFormats: + Q_ASSERT(false); + case QImage::Format_Mono: + case QImage::Format_MonoLSB: + depth = 1; + break; + case QImage::Format_Indexed8: + depth = 8; + break; + case QImage::Format_RGB32: + case QImage::Format_ARGB32: + case QImage::Format_ARGB32_Premultiplied: + depth = 32; + break; + case QImage::Format_RGB555: + case QImage::Format_RGB16: + case QImage::Format_RGB444: + case QImage::Format_ARGB4444_Premultiplied: + depth = 16; + break; + case QImage::Format_RGB666: + case QImage::Format_ARGB6666_Premultiplied: + case QImage::Format_ARGB8565_Premultiplied: + case QImage::Format_ARGB8555_Premultiplied: + case QImage::Format_RGB888: + depth = 24; + break; + } + return depth; +} + void QDirectFBScreenPrivate::setFlipFlags(const QStringList &args) { QRegExp flipRegexp(QLatin1String("^flip=([\\w,]*)$")); @@ -1015,7 +1145,7 @@ bool QDirectFBScreen::connect(const QString &displaySpec) } // We don't track the primary surface as it's released in disconnect - d_ptr->primarySurface = createDFBSurface(description, DontTrackSurface); + d_ptr->primarySurface = createDFBSurface(description, DontTrackSurface, &result); if (!d_ptr->primarySurface) { DirectFBError("QDirectFBScreen: error creating primary surface", result); @@ -1026,7 +1156,11 @@ bool QDirectFBScreen::connect(const QString &displaySpec) #else description.flags = DSDESC_WIDTH|DSDESC_HEIGHT; description.width = description.height = 1; - surface = createDFBSurface(description, DontTrackSurface); + surface = createDFBSurface(description, DontTrackSurface, &result); + if (!surface) { + DirectFBError("QDirectFBScreen: error creating surface", result); + return false; + } #endif // Work out what format we're going to use for surfaces with an alpha channel QImage::Format pixelFormat = QDirectFBScreen::getImageFormat(surface); @@ -1131,6 +1265,10 @@ bool QDirectFBScreen::connect(const QString &displaySpec) void QDirectFBScreen::disconnect() { +#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE + if (d_ptr->imageProvider) + d_ptr->imageProvider->Release(d_ptr->imageProvider); +#endif #ifdef QT_NO_DIRECTFB_WM d_ptr->primarySurface->Release(d_ptr->primarySurface); d_ptr->primarySurface = 0; @@ -1295,7 +1433,7 @@ void QDirectFBScreen::exposeRegion(QRegion r, int changing) const QRect cursorRectangle = cursor->boundingRect(); if (cursor->isVisible() && !cursor->isAccelerated() && cursorRectangle.intersects(brect)) { const QImage image = cursor->image(); - IDirectFBSurface *surface = createDFBSurface(image, QDirectFBScreen::DontTrackSurface); + IDirectFBSurface *surface = createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); d_ptr->primarySurface->SetBlittingFlags(d_ptr->primarySurface, DSBLIT_BLEND_ALPHACHANNEL); d_ptr->primarySurface->Blit(d_ptr->primarySurface, surface, 0, cursorRectangle.x(), cursorRectangle.y()); surface->Release(surface); @@ -1371,10 +1509,10 @@ bool QDirectFBScreen::initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *d return true; } -uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, uint flags, int *bpl) +uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl) { void *mem; - const DFBResult result = surface->Lock(surface, static_cast<DFBSurfaceLockFlags>(flags), static_cast<void**>(&mem), bpl); + const DFBResult result = surface->Lock(surface, flags, &mem, bpl); if (result != DFB_OK) { DirectFBError("QDirectFBScreen::lockSurface()", result); } @@ -1409,4 +1547,46 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags } } +#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE +void QDirectFBScreen::setDirectFBImageProvider(IDirectFBImageProvider *provider) +{ + Q_ASSERT(provider); + if (d_ptr->imageProvider) + d_ptr->imageProvider->Release(d_ptr->imageProvider); + d_ptr->imageProvider = provider; +} +#endif + +IDirectFBSurface * QDirectFBScreen::surfaceForWidget(const QWidget *widget, QRect *rect) const +{ + Q_ASSERT(widget); + if (!widget->isVisible() || widget->size().isNull()) + return 0; + + const QWSWindowSurface *surface = static_cast<const QWSWindowSurface*>(widget->windowSurface()); + if (surface && surface->key() == QLatin1String("directfb")) { + return static_cast<const QDirectFBWindowSurface*>(surface)->surfaceForWidget(widget, rect); + } + return 0; +} + +IDirectFBSurface *QDirectFBScreen::subSurfaceForWidget(const QWidget *widget, const QRect &area) const +{ + Q_ASSERT(widget); + QRect rect; + IDirectFBSurface *surface = surfaceForWidget(widget, &rect); + IDirectFBSurface *subSurface = 0; + if (surface) { + if (!area.isNull()) + rect &= area.translated(widget->mapTo(widget->window(), QPoint(0, 0))); + if (!rect.isNull()) { + const DFBRectangle subRect = {rect.x(), rect.y(), rect.width(), rect.height() }; + const DFBResult result = surface->GetSubSurface(surface, &subRect, &subSurface); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreen::subSurface(): Can't get sub surface", result); + } + } + } + return subSurface; +} diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 3f9248e..4b6c01f 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -59,6 +59,15 @@ QT_MODULE(Gui) #if !defined QT_DIRECTFB_IMAGECACHE && !defined QT_NO_DIRECTFB_IMAGECACHE #define QT_NO_DIRECTFB_IMAGECACHE #endif +#if !defined QT_DIRECTFB_NO_IMAGEPROVIDER && !defined QT_DIRECTFB_IMAGEPROVIDER +#define QT_DIRECTFB_IMAGEPROVIDER +#endif +#if !defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE && !defined QT_NO_DIRECTFB_IMAGEPROVIDER_KEEPALIVE +#define QT_NO_DIRECTFB_IMAGEPROVIDER_KEEPALIVE +#endif +#if !defined QT_DIRECTFB_WINDOW_AS_CURSOR && !defined QT_NO_DIRECTFB_WINDOW_AS_CURSOR +#define QT_NO_DIRECTFB_WINDOW_AS_CURSOR +#endif #if !defined QT_NO_DIRECTFB_PALETTE && !defined QT_DIRECTFB_PALETTE #define QT_DIRECTFB_PALETTE #endif @@ -74,6 +83,15 @@ QT_MODULE(Gui) #if !defined QT_NO_DIRECTFB_OPAQUE_DETECTION && !defined QT_DIRECTFB_OPAQUE_DETECTION #define QT_DIRECTFB_OPAQUE_DETECTION #endif +#if defined QT_NO_DIRECTFB_LAYER && defined QT_DIRECTFB_WM +#error QT_NO_DIRECTFB_LAYER requires QT_NO_DIRECTFB_WM +#endif +#if defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE && defined QT_NO_DIRECTFB_IMAGEPROVIDER +#error QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE requires QT_DIRECTFB_IMAGEPROVIDER to be defined +#endif +#if defined QT_DIRECTFB_WINDOW_AS_CURSOR && defined QT_NO_DIRECTFB_WM +#error QT_DIRECTFB_WINDOW_AS_CURSOR requires QT_DIRECTFB_WM to be defined +#endif #define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERION << 8) | DIRECTFB_MICRO_VERSION) @@ -86,6 +104,8 @@ QT_MODULE(Gui) DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBInputDeviceCapabilities); DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowDescriptionFlags); +DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowCapabilities); +DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBWindowOptions); DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceDescriptionFlags); DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceCapabilities); DIRECTFB_DECLARE_OPERATORS_FOR_FLAGS(DFBSurfaceLockFlags); @@ -132,6 +152,9 @@ public: return static_cast<QDirectFBScreen*>(inst); } + IDirectFBSurface *surfaceForWidget(const QWidget *widget, QRect *rect) const; + IDirectFBSurface *subSurfaceForWidget(const QWidget *widget, const QRect &area = QRect()) const; + IDirectFB *dfb(); #ifdef QT_NO_DIRECTFB_WM IDirectFBSurface *primarySurface(); @@ -142,21 +165,27 @@ public: // Track surface creation/release so we can release all on exit enum SurfaceCreationOption { - DontTrackSurface = 0, - TrackSurface = 1 + DontTrackSurface = 0x1, + TrackSurface = 0x2, + NoPreallocated = 0x4 }; Q_DECLARE_FLAGS(SurfaceCreationOptions, SurfaceCreationOption); IDirectFBSurface *createDFBSurface(const QImage &image, - SurfaceCreationOptions options); + QImage::Format format, + SurfaceCreationOptions options, + DFBResult *result = 0); IDirectFBSurface *createDFBSurface(const QSize &size, QImage::Format format, - SurfaceCreationOptions options); + SurfaceCreationOptions options, + DFBResult *result = 0); IDirectFBSurface *copyDFBSurface(IDirectFBSurface *src, QImage::Format format, - SurfaceCreationOptions options); - IDirectFBSurface *copyToDFBSurface(const QImage &image, - QImage::Format format, - SurfaceCreationOptions options); + SurfaceCreationOptions options, + DFBResult *result = 0); + IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc, + SurfaceCreationOptions options, + DFBResult *result); + void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags, const QRegion ®ion, const QPoint &offset); void releaseDFBSurface(IDirectFBSurface *surface); @@ -164,16 +193,16 @@ public: using QScreen::depth; static int depth(DFBSurfacePixelFormat format); + static int depth(QImage::Format format); static DFBSurfacePixelFormat getSurfacePixelFormat(QImage::Format format); - static DFBSurfaceDescription getSurfaceDescription(const QImage &image); static DFBSurfaceDescription getSurfaceDescription(const uint *buffer, int length); static QImage::Format getImageFormat(IDirectFBSurface *surface); static bool initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *description, QImage::Format format); static inline bool isPremultiplied(QImage::Format format); - static inline bool hasAlpha(DFBSurfacePixelFormat format); - static inline bool hasAlpha(IDirectFBSurface *surface); + static inline bool hasAlphaChannel(DFBSurfacePixelFormat format); + static inline bool hasAlphaChannel(IDirectFBSurface *surface); QImage::Format alphaPixmapFormat() const; #ifndef QT_NO_DIRECTFB_PALETTE @@ -181,12 +210,12 @@ public: const QImage &image); #endif - static uchar *lockSurface(IDirectFBSurface *surface, uint flags, int *bpl = 0); + static uchar *lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl = 0); +#if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE + void setDirectFBImageProvider(IDirectFBImageProvider *provider); +#endif private: - IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc, - SurfaceCreationOptions options); QDirectFBScreenPrivate *d_ptr; - friend class SurfaceCache; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDirectFBScreen::SurfaceCreationOptions); @@ -207,7 +236,7 @@ inline bool QDirectFBScreen::isPremultiplied(QImage::Format format) return false; } -inline bool QDirectFBScreen::hasAlpha(DFBSurfacePixelFormat format) +inline bool QDirectFBScreen::hasAlphaChannel(DFBSurfacePixelFormat format) { switch (format) { case DSPF_ARGB1555: @@ -232,12 +261,12 @@ inline bool QDirectFBScreen::hasAlpha(DFBSurfacePixelFormat format) } } -inline bool QDirectFBScreen::hasAlpha(IDirectFBSurface *surface) +inline bool QDirectFBScreen::hasAlphaChannel(IDirectFBSurface *surface) { Q_ASSERT(surface); DFBSurfacePixelFormat format; surface->GetPixelFormat(surface, &format); - return QDirectFBScreen::hasAlpha(format); + return QDirectFBScreen::hasAlphaChannel(format); } QT_END_HEADER diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 441bac9..9de1ca5 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -48,8 +48,6 @@ #include <qpaintdevice.h> #include <qvarlengtharray.h> -//#define QT_DIRECTFB_DEBUG_SURFACES 1 - QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirectFBScreen *scr) : QDirectFBPaintDevice(scr) #ifndef QT_NO_DIRECTFB_WM @@ -119,15 +117,12 @@ bool QDirectFBWindowSurface::isValid() const #ifndef QT_NO_DIRECTFB_WM void QDirectFBWindowSurface::createWindow() { -#ifdef QT_NO_DIRECTFB_LAYER -#error QT_NO_DIRECTFB_LAYER requires QT_NO_DIRECTFB_WM -#else IDirectFBDisplayLayer *layer = screen->dfbDisplayLayer(); if (!layer) qFatal("QDirectFBWindowSurface: Unable to get primary display layer!"); DFBWindowDescription description; - description.caps = DWCAPS_NODECORATION; + description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER; description.flags = DWDESC_CAPS|DWDESC_SURFACE_CAPS|DWDESC_PIXELFORMAT; description.surface_caps = DSCAPS_NONE; @@ -147,7 +142,7 @@ void QDirectFBWindowSurface::createWindow() dfbSurface->Release(dfbSurface); dfbWindow->GetSurface(dfbWindow, &dfbSurface); -#endif + updateFormat(); } #endif // QT_NO_DIRECTFB_WM @@ -183,6 +178,7 @@ static DFBResult setGeometry(IDirectFBWindow *dfbWindow, const QRect &old, const void QDirectFBWindowSurface::setGeometry(const QRect &rect) { + IDirectFBSurface *oldSurface = dfbSurface; #ifdef QT_NO_DIRECTFB_WM IDirectFBSurface *primarySurface = screen->primarySurface(); Q_ASSERT(primarySurface); @@ -240,27 +236,26 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) if (result != DFB_OK) DirectFBErrorFatal("QDirectFBWindowSurface::setGeometry()", result); } + if (oldSurface != dfbSurface) + updateFormat(); QWSWindowSurface::setGeometry(rect); } QByteArray QDirectFBWindowSurface::permanentState() const { - QByteArray state; #ifdef QT_DIRECTFB_WM - QDataStream ds(&state, QIODevice::WriteOnly); - ds << reinterpret_cast<quintptr>(this); -#endif + QByteArray state(sizeof(this), 0); + *reinterpret_cast<const QDirectFBWindowSurface**>(state.data()) = this; return state; +#endif + return QByteArray(); } void QDirectFBWindowSurface::setPermanentState(const QByteArray &state) { #ifdef QT_DIRECTFB_WM - if (state.size() == sizeof(quintptr)) { - QDataStream ds(state); - quintptr ptr; - ds >> ptr; - sibling = reinterpret_cast<QDirectFBWindowSurface*>(ptr); + if (state.size() == sizeof(this)) { + sibling = *reinterpret_cast<QDirectFBWindowSurface *const*>(state.constData()); } #else Q_UNUSED(state); @@ -392,7 +387,7 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, && region.intersects(cursorRectangle.translated(-(offset + windowGeometry.topLeft())))) { const QImage image = cursor->image(); - IDirectFBSurface *surface = screen->createDFBSurface(image, QDirectFBScreen::DontTrackSurface); + IDirectFBSurface *surface = screen->createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); primarySurface->SetBlittingFlags(primarySurface, DSBLIT_BLEND_ALPHACHANNEL); primarySurface->Blit(primarySurface, surface, 0, cursorRectangle.x(), cursorRectangle.y()); surface->Release(surface); @@ -418,7 +413,6 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, #endif } - void QDirectFBWindowSurface::beginPaint(const QRegion &) { if (!engine) @@ -427,42 +421,31 @@ void QDirectFBWindowSurface::beginPaint(const QRegion &) void QDirectFBWindowSurface::endPaint(const QRegion &) { -#ifdef QT_DIRECTFB_DEBUG_SURFACES - if (bufferImages.count()) { - qDebug("QDirectFBWindowSurface::endPaint() this=%p", this); - - foreach(QImage* bufferImg, bufferImages) - qDebug(" Deleting buffer image %p", bufferImg); - } -#endif - - qDeleteAll(bufferImages); - bufferImages.clear(); unlockDirectFB(); } - -QImage *QDirectFBWindowSurface::buffer(const QWidget *widget) +IDirectFBSurface *QDirectFBWindowSurface::surfaceForWidget(const QWidget *widget, QRect *rect) const { - if (!lockedImage) + Q_ASSERT(widget); + if (!dfbSurface) { + if (sibling && (!sibling->sibling || sibling->dfbSurface)) + return sibling->surfaceForWidget(widget, rect); return 0; - - const QRect rect = QRect(offset(widget), widget->size()) - & lockedImage->rect(); - if (rect.isEmpty()) - return 0; - - QImage *img = new QImage(lockedImage->scanLine(rect.y()) - + rect.x() * (lockedImage->depth() / 8), - rect.width(), rect.height(), - lockedImage->bytesPerLine(), - lockedImage->format()); - bufferImages.append(img); - -#ifdef QT_DIRECTFB_DEBUG_SURFACES - qDebug("QDirectFBWindowSurface::buffer() Created & returned %p", img); -#endif - - return img; + } + QWidget *win = window(); + Q_ASSERT(win); + if (rect) { + if (win == widget) { + *rect = widget->rect(); + } else { + *rect = QRect(widget->mapTo(win, QPoint(0, 0)), widget->size()); + } + } + Q_ASSERT(win == widget || widget->isAncestorOf(win)); + return dfbSurface; } +void QDirectFBWindowSurface::updateFormat() +{ + imageFormat = dfbSurface ? QDirectFBScreen::getImageFormat(dfbSurface) : QImage::Format_Invalid; +} diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h index 2c4bcdf..f8c0aae 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h @@ -88,22 +88,20 @@ public: void beginPaint(const QRegion &); void endPaint(const QRegion &); - QImage *buffer(const QWidget *widget); + IDirectFBSurface *surfaceForWidget(const QWidget *widget, QRect *rect) const; private: + void updateFormat(); #ifdef QT_DIRECTFB_WM void createWindow(); IDirectFBWindow *dfbWindow; QDirectFBWindowSurface *sibling; -#endif - -#ifdef QT_NO_DIRECTFB_WM +#else enum Mode { Primary, Offscreen } mode; #endif - QList<QImage*> bufferImages; DFBSurfaceFlipFlags flipFlags; bool boundingRectFlip; #ifdef QT_DIRECTFB_TIMING diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp index 395adca..910366c 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp +++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp @@ -493,7 +493,16 @@ private: in--; out[i] = qRgb(*in, *in, *in); } - } else { + } else if (cinfo->out_color_space == JCS_CMYK) { + int cols32Bit = scaledWidth() * 4; + in = (uchar*)out + cols32Bit; + for (uint i = scaledWidth(); i--; ) { + in -= 4; + int k = in[3]; + out[i] = qRgb(k * in[0] / 255, k * in[1] / 255, k * in[2] / 255); + //out[i] = qRgb(in[0], in[1], in[2]); + } + } else { in = (uchar*)out + cols24Bit; for (uint i = scaledWidth(); i--; ) { in -= 3; diff --git a/src/qbase.pri b/src/qbase.pri index b285d88..27e4992 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -101,7 +101,8 @@ symbian { "DEFFILE ../s60installs/eabi/$${TARGET}.def" \ "$${LITERAL_HASH}endif" - MMP_RULES += defBlock + #MMP_RULES += defBlock + MMP_RULES += EXPORTUNFROZEN } load(armcc_warnings) } diff --git a/src/qt3support/tools/q3garray.cpp b/src/qt3support/tools/q3garray.cpp index e4aef3d..c1360a0 100644 --- a/src/qt3support/tools/q3garray.cpp +++ b/src/qt3support/tools/q3garray.cpp @@ -114,6 +114,7 @@ Q3GArray::Q3GArray() */ Q3GArray::Q3GArray(int, int) + : shd(0) { } diff --git a/src/script/api/qscriptclass.cpp b/src/script/api/qscriptclass.cpp index f96a5bc..9ad5ad6 100644 --- a/src/script/api/qscriptclass.cpp +++ b/src/script/api/qscriptclass.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -42,8 +42,6 @@ #include "qscriptclass.h" #include "qscriptstring.h" -QT_BEGIN_NAMESPACE - /*! \since 4.4 \class QScriptClass @@ -131,6 +129,8 @@ QT_BEGIN_NAMESPACE \sa queryProperty() */ +QT_BEGIN_NAMESPACE + class QScriptClassPrivate { Q_DECLARE_PUBLIC(QScriptClass) diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 0b1ca33..6a85ede 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -305,8 +305,8 @@ QScriptValue QScriptContext::argumentsObject() const { JSC::CallFrame *frame = const_cast<JSC::ExecState*>(QScriptEnginePrivate::frameForContext(this)); - if (frame == frame->lexicalGlobalObject()->globalExec() || frame->callerFrame()->hasHostCallFrameFlag()) { - // <global> or <eval> context doesn't have arguments. return an empty object + if (frame == frame->lexicalGlobalObject()->globalExec()) { + // <global> context doesn't have arguments. return an empty object return QScriptEnginePrivate::get(QScript::scriptEngineFromExec(frame))->newObject(); } @@ -316,6 +316,11 @@ QScriptValue QScriptContext::argumentsObject() const return QScript::scriptEngineFromExec(frame)->scriptValueFromJSCValue(result); } + if (frame->callerFrame()->hasHostCallFrameFlag()) { + // <eval> context doesn't have arguments. return an empty object + return QScriptEnginePrivate::get(QScript::scriptEngineFromExec(frame))->newObject(); + } + //for a native function if (!frame->optionalCalleeArguments()) { Q_ASSERT(frame->argumentCount() > 0); //we need at least 'this' otherwise we'll crash later diff --git a/src/script/api/qscriptcontext.h b/src/script/api/qscriptcontext.h index 2eb0c85..53d07cc 100644 --- a/src/script/api/qscriptcontext.h +++ b/src/script/api/qscriptcontext.h @@ -44,7 +44,6 @@ #include <QtCore/qobjectdefs.h> -#include <QtCore/qscopedpointer.h> #include <QtScript/qscriptvalue.h> QT_BEGIN_HEADER diff --git a/src/script/api/qscriptcontext_p.h b/src/script/api/qscriptcontext_p.h index e8cc47e..c40f3de 100644 --- a/src/script/api/qscriptcontext_p.h +++ b/src/script/api/qscriptcontext_p.h @@ -55,8 +55,6 @@ #include <QtCore/qobjectdefs.h> -QT_BEGIN_NAMESPACE - namespace JSC { class JSObject; @@ -64,8 +62,7 @@ namespace JSC class ExecState; } -#include "wtf/Platform.h" -#include "JSValue.h" +QT_BEGIN_NAMESPACE class QScriptEnginePrivate; @@ -73,4 +70,7 @@ class QScriptContext; QT_END_NAMESPACE +#include "wtf/Platform.h" +#include "JSValue.h" + #endif diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index e59b773..890ed9d 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -50,6 +50,9 @@ #include <QtCore/qmetaobject.h> #include "CodeBlock.h" #include "JSFunction.h" +#if ENABLE(JIT) +#include "MacroAssemblerCodeRef.h" +#endif QT_BEGIN_NAMESPACE @@ -154,7 +157,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte lineNumber = -1; columnNumber = -1; - const JSC::ExecState *frame = QScriptEnginePrivate::frameForContext(context); + JSC::CallFrame *frame = const_cast<JSC::CallFrame *>(QScriptEnginePrivate::frameForContext(context)); // Get the line number: @@ -171,8 +174,13 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte JSC::Instruction *returnPC = aboveFrame->returnPC(); JSC::CodeBlock *codeBlock = frame->codeBlock(); if (returnPC && codeBlock) { - lineNumber = codeBlock->lineNumberForBytecodeOffset(const_cast<JSC::ExecState *>(frame), - returnPC - codeBlock->instructions().begin() -1); +#if ENABLE(JIT) + unsigned bytecodeOffset = codeBlock->getBytecodeIndex(frame, JSC::ReturnAddressPtr(returnPC)); +#else + unsigned bytecodeOffset = returnPC - codeBlock->instructions().begin(); +#endif + bytecodeOffset--; //because returnPC is on the next instruction. We want the current one + lineNumber = codeBlock->lineNumberForBytecodeOffset(const_cast<JSC::ExecState *>(frame), bytecodeOffset); } } } else { diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 131fe28..29044a9 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -468,7 +468,7 @@ bool isFunction(JSC::JSValue value) static JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); static JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObject */*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args) +JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObject * /*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args) { #ifndef QT_NO_QOBJECT if (args.size() == 0) { @@ -533,7 +533,7 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec #endif // QT_NO_QOBJECT } -JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject */*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args) +JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * /*callee*/, JSC::JSValue thisObject, const JSC::ArgList &args) { #ifndef QT_NO_QOBJECT if (args.size() == 0) { @@ -791,7 +791,7 @@ static QScriptValue __setupPackage__(QScriptContext *ctx, QScriptEngine *eng) } // namespace QScript QScriptEnginePrivate::QScriptEnginePrivate() - : registeredScriptValues(0), inEval(false) + : registeredScriptValues(0), freeScriptValues(0), inEval(false) { qMetaTypeId<QScriptValue>(); @@ -844,34 +844,11 @@ QScriptEnginePrivate::~QScriptEnginePrivate() JSC::JSLock lock(false); globalData->heap.destroy(); globalData->deref(); -} - -QScriptValue QScriptEnginePrivate::scriptValueFromJSCValue(JSC::JSValue value) -{ - if (!value) - return QScriptValue(); - - QScriptValuePrivate *p_value = new QScriptValuePrivate(); - p_value->engine = this; - p_value->initFrom(value); - return QScriptValuePrivate::toPublic(p_value); -} - -JSC::JSValue QScriptEnginePrivate::scriptValueToJSCValue(const QScriptValue &value) -{ - QScriptValuePrivate *vv = QScriptValuePrivate::get(value); - if (!vv) - return JSC::JSValue(); - if (vv->type != QScriptValuePrivate::JSC) { - Q_ASSERT(!vv->engine || vv->engine == this); - vv->engine = this; - if (vv->type == QScriptValuePrivate::Number) { - vv->initFrom(JSC::jsNumber(currentFrame, vv->numberValue)); - } else { //QScriptValuePrivate::String - vv->initFrom(JSC::jsString(currentFrame, vv->stringValue)); - } + while (freeScriptValues) { + QScriptValuePrivate *p = freeScriptValues; + freeScriptValues = p->next; + qFree(p); } - return vv->jscValue; } QScriptValue QScriptEnginePrivate::scriptValueFromVariant(const QVariant &v) @@ -1203,14 +1180,14 @@ JSC::JSValue QScriptEnginePrivate::newQObject( bool preferExisting = (options & QScriptEngine::PreferExistingWrapperObject) != 0; QScriptEngine::QObjectWrapOptions opt = options & ~QScriptEngine::PreferExistingWrapperObject; QScriptObject *result = 0; - if (preferExisting) + if (preferExisting) { result = data->findWrapper(ownership, opt); - if (!result) { - result = new (exec) QScriptObject(qobjectWrapperObjectStructure); - if (preferExisting) - data->registerWrapper(result, ownership, opt); + if (result) + return result; } - Q_ASSERT(result != 0); + result = new (exec) QScriptObject(qobjectWrapperObjectStructure); + if (preferExisting) + data->registerWrapper(result, ownership, opt); result->setDelegate(new QScript::QObjectDelegate(object, ownership, options)); /*if (setDefaultPrototype)*/ { const QMetaObject *meta = object->metaObject(); @@ -1362,27 +1339,6 @@ bool QScriptEnginePrivate::scriptDisconnect(JSC::JSValue signal, JSC::JSValue re #endif -void QScriptEnginePrivate::registerScriptValue(QScriptValuePrivate *value) -{ - value->prev = 0; - value->next = registeredScriptValues; - if (registeredScriptValues) - registeredScriptValues->prev = value; - registeredScriptValues = value; -} - -void QScriptEnginePrivate::unregisterScriptValue(QScriptValuePrivate *value) -{ - if (value->prev) - value->prev->next = value->next; - if (value->next) - value->next->prev = value->prev; - if (value == registeredScriptValues) - registeredScriptValues = value->next; - value->prev = 0; - value->next = 0; -} - void QScriptEnginePrivate::detachAllRegisteredScriptValues() { QScriptValuePrivate *it; @@ -1679,7 +1635,6 @@ QScriptValue QScriptEngine::newVariant(const QScriptValue &object, } QScriptObject *jscScriptObject = static_cast<QScriptObject*>(jscObject); if (!object.isVariant()) { - delete jscScriptObject->delegate(); jscScriptObject->setDelegate(new QScript::QVariantDelegate(value)); } else { QScriptValuePrivate::get(object)->setVariantValue(value); @@ -1757,7 +1712,6 @@ QScriptValue QScriptEngine::newQObject(const QScriptValue &scriptObject, } QScriptObject *jscScriptObject = static_cast<QScriptObject*>(jscObject); if (!scriptObject.isQObject()) { - delete jscScriptObject->delegate(); jscScriptObject->setDelegate(new QScript::QObjectDelegate(qtObject, ownership, options)); } else { QScript::QObjectDelegate *delegate = static_cast<QScript::QObjectDelegate*>(jscScriptObject->delegate()); @@ -2305,8 +2259,11 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV if (calledAsConstructor) flags |= CalledAsConstructorContext; + //build a frame JSC::CallFrame *newCallFrame = exec; - if (callee == 0 || !(exec->callee() == callee && exec->returnPC() != 0)) { + if (callee == 0 //called from public QScriptEngine::pushContext + || exec->returnPC() == 0 || (contextFlags(exec) & NativeContext) //called from native-native call + || (exec->codeBlock() && exec->callee() != callee)) { //the interpreter did not build a frame for us. //We need to check if the Interpreter might have already created a frame for function called from JS. JSC::Interpreter *interp = exec->interpreter(); JSC::Register *oldEnd = interp->registerFile().end(); @@ -2324,6 +2281,9 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV newCallFrame->init(0, /*vPC=*/0, exec->scopeChain(), exec, flags, argc, callee); } else { setContextFlags(newCallFrame, flags); +#if ENABLE(JIT) + exec->registers()[JSC::RegisterFile::Callee] = JSC::JSValue(callee); //JIT let the callee set the 'callee' +#endif if (calledAsConstructor) { //update the new created this JSC::Register* thisRegister = newCallFrame->registers() - JSC::RegisterFile::CallFrameHeaderSize - newCallFrame->argumentCount(); @@ -3631,9 +3591,6 @@ void QScriptEngine::setAgent(QScriptEngineAgent *agent) QScriptEngineAgentPrivate::get(d->activeAgent)->detach(); d->activeAgent = agent; if (agent) { - int index = d->ownedAgents.indexOf(agent); - if (index == -1) - d->ownedAgents.append(agent); QScriptEngineAgentPrivate::get(agent)->attach(); } } diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 5979b9b..67b2d45 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -57,14 +57,13 @@ #include <QtCore/qhash.h> #include <QtCore/qset.h> +#include "qscriptvalue_p.h" #include "RefPtr.h" #include "Structure.h" #include "JSGlobalObject.h" #include "JSValue.h" -QT_BEGIN_NAMESPACE - namespace JSC { class ExecState; @@ -75,11 +74,12 @@ namespace JSC } +QT_BEGIN_NAMESPACE + class QString; class QStringList; class QScriptContext; class QScriptValue; -class QScriptValuePrivate; class QScriptTypeInfo; class QScriptEngineAgent; class QScriptEnginePrivate; @@ -120,8 +120,8 @@ public: QScriptValue create(int type, const void *ptr); bool hasDemarshalFunction(int type) const; - QScriptValue scriptValueFromJSCValue(JSC::JSValue value); - JSC::JSValue scriptValueToJSCValue(const QScriptValue &value); + inline QScriptValue scriptValueFromJSCValue(JSC::JSValue value); + inline JSC::JSValue scriptValueToJSCValue(const QScriptValue &value); QScriptValue scriptValueFromVariant(const QVariant &value); QVariant scriptValueToVariant(const QScriptValue &value, int targetType); @@ -210,8 +210,11 @@ public: bool scriptDisconnect(JSC::JSValue signal, JSC::JSValue receiver, JSC::JSValue function); - void registerScriptValue(QScriptValuePrivate *value); - void unregisterScriptValue(QScriptValuePrivate *value); + inline QScriptValuePrivate *allocateScriptValuePrivate(size_t); + inline void freeScriptValuePrivate(QScriptValuePrivate *p); + + inline void registerScriptValue(QScriptValuePrivate *value); + inline void unregisterScriptValue(QScriptValuePrivate *value); void detachAllRegisteredScriptValues(); // private slots @@ -237,6 +240,7 @@ public: QScriptEngineAgent *activeAgent; int agentLineNumber; QScriptValuePrivate *registeredScriptValues; + QScriptValuePrivate *freeScriptValues; QHash<int, QScriptTypeInfo*> m_typeInfos; int processEventsInterval; QScriptValue abortResult; @@ -254,6 +258,110 @@ public: #endif }; +inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(size_t size) +{ + if (freeScriptValues) { + QScriptValuePrivate *p = freeScriptValues; + freeScriptValues = p->next; + return p; + } + return reinterpret_cast<QScriptValuePrivate*>(qMalloc(size)); +} + +inline void QScriptEnginePrivate::freeScriptValuePrivate(QScriptValuePrivate *p) +{ + p->next = freeScriptValues; + freeScriptValues = p; +} + +inline void QScriptEnginePrivate::registerScriptValue(QScriptValuePrivate *value) +{ + value->prev = 0; + value->next = registeredScriptValues; + if (registeredScriptValues) + registeredScriptValues->prev = value; + registeredScriptValues = value; +} + +inline void QScriptEnginePrivate::unregisterScriptValue(QScriptValuePrivate *value) +{ + if (value->prev) + value->prev->next = value->next; + if (value->next) + value->next->prev = value->prev; + if (value == registeredScriptValues) + registeredScriptValues = value->next; + value->prev = 0; + value->next = 0; +} + +inline QScriptValue QScriptEnginePrivate::scriptValueFromJSCValue(JSC::JSValue value) +{ + if (!value) + return QScriptValue(); + + QScriptValuePrivate *p_value = new (this)QScriptValuePrivate(this); + p_value->initFrom(value); + return QScriptValuePrivate::toPublic(p_value); +} + +inline JSC::JSValue QScriptEnginePrivate::scriptValueToJSCValue(const QScriptValue &value) +{ + QScriptValuePrivate *vv = QScriptValuePrivate::get(value); + if (!vv) + return JSC::JSValue(); + if (vv->type != QScriptValuePrivate::JSC) { + Q_ASSERT(!vv->engine || vv->engine == this); + vv->engine = this; + if (vv->type == QScriptValuePrivate::Number) { + vv->initFrom(JSC::jsNumber(currentFrame, vv->numberValue)); + } else { //QScriptValuePrivate::String + vv->initFrom(JSC::jsString(currentFrame, vv->stringValue)); + } + } + return vv->jscValue; +} + +inline QScriptValuePrivate::~QScriptValuePrivate() +{ + if (engine) + engine->unregisterScriptValue(this); +} + +inline void QScriptValuePrivate::initFrom(JSC::JSValue value) +{ + if (value.isCell()) { + Q_ASSERT(engine != 0); + value = engine->toUsableValue(value); + } + type = JSC; + jscValue = value; + if (engine) + engine->registerScriptValue(this); +} + +inline void QScriptValuePrivate::initFrom(double value) +{ + type = Number; + numberValue = value; + if (engine) + engine->registerScriptValue(this); +} + +inline void QScriptValuePrivate::initFrom(const QString &value) +{ + type = String; + stringValue = value; + if (engine) + engine->registerScriptValue(this); +} + +inline QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const +{ + JSC::ExecState *exec = engine->currentFrame; + return property(JSC::Identifier(exec, name), resolveMode); +} + QT_END_NAMESPACE #endif diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index b18f29d..193ee21 100644 --- a/src/script/api/qscriptengineagent.cpp +++ b/src/script/api/qscriptengineagent.cpp @@ -213,6 +213,7 @@ QScriptEngineAgent::QScriptEngineAgent(QScriptEngine *engine) { d_ptr->q_ptr = this; d_ptr->engine = QScriptEnginePrivate::get(engine); + d_ptr->engine->ownedAgents.append(this); } /*! diff --git a/src/script/api/qscriptengineagent_p.h b/src/script/api/qscriptengineagent_p.h index 64befc1..9ef1eaf 100644 --- a/src/script/api/qscriptengineagent_p.h +++ b/src/script/api/qscriptengineagent_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptstring.cpp b/src/script/api/qscriptstring.cpp index b9c26f8..de707e9 100644 --- a/src/script/api/qscriptstring.cpp +++ b/src/script/api/qscriptstring.cpp @@ -72,7 +72,8 @@ QT_BEGIN_NAMESPACE /*! \internal */ -QScriptStringPrivate::QScriptStringPrivate() +QScriptStringPrivate::QScriptStringPrivate(QScriptEngine *e, const JSC::Identifier &id) + : engine(e), identifier(id) { ref = 0; } @@ -87,12 +88,11 @@ QScriptStringPrivate::~QScriptStringPrivate() /*! \internal */ -void QScriptStringPrivate::init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &value) +void QScriptStringPrivate::init(QScriptString &q, QScriptEngine *engine, + const JSC::Identifier &value) { Q_ASSERT(!q.isValid()); - q.d_ptr = new QScriptStringPrivate(); - q.d_ptr->identifier = value; - q.d_ptr->engine = engine; + q.d_ptr = new QScriptStringPrivate(engine, value); } /*! diff --git a/src/script/api/qscriptstring_p.h b/src/script/api/qscriptstring_p.h index 74094bf..3413315 100644 --- a/src/script/api/qscriptstring_p.h +++ b/src/script/api/qscriptstring_p.h @@ -69,10 +69,10 @@ class QScriptEngine; class QScriptStringPrivate { public: - QScriptStringPrivate(); + QScriptStringPrivate(QScriptEngine *engine, const JSC::Identifier &id); ~QScriptStringPrivate(); - static void init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &value); + static void init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &id); QBasicAtomicInt ref; #ifndef QT_NO_QOBJECT diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index c344aed..d5aaed7 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -63,6 +63,7 @@ #include <QtCore/qdatetime.h> #include <QtCore/qregexp.h> #include <QtCore/qvariant.h> +#include <QtCore/qvarlengtharray.h> #include <QtCore/qnumeric.h> #include "utils/qscriptdate_p.h" @@ -71,8 +72,6 @@ #include "bridge/qscriptvariant_p.h" #include "bridge/qscriptqobject_p.h" -QT_BEGIN_NAMESPACE - /*! \since 4.3 \class QScriptValue @@ -202,6 +201,8 @@ QT_BEGIN_NAMESPACE #include <QtCore/qnumeric.h> #include <math.h> +QT_BEGIN_NAMESPACE + namespace QScript { @@ -275,61 +276,9 @@ qsreal ToInteger(qsreal n) } // namespace QScript -QScriptValuePrivate::QScriptValuePrivate() : engine(0), prev(0), next(0) -{ - ref = 0; -} - -QScriptValuePrivate::~QScriptValuePrivate() -{ - if (engine) - engine->unregisterScriptValue(this); -} - -void QScriptValuePrivate::initFrom(JSC::JSValue value) -{ - if (value.isCell()) { - Q_ASSERT(engine != 0); - value = engine->toUsableValue(value); - JSC::JSCell *cell = JSC::asCell(value); - Q_ASSERT(cell != engine->originalGlobalObject()); - } - type = JSC; - jscValue = value; - if (engine) - engine->registerScriptValue(this); -} - -void QScriptValuePrivate::initFrom(double value) -{ - type = Number; - numberValue = value; - if (engine) - engine->registerScriptValue(this); -} - -void QScriptValuePrivate::initFrom(const QString &value) -{ - type = String; - stringValue = value; - if (engine) - engine->registerScriptValue(this); -} - -bool QScriptValuePrivate::isJSC() const -{ - return (type == JSC); -} - -QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const -{ - JSC::ExecState *exec = engine->currentFrame; - return property(JSC::Identifier(exec, name), resolveMode); -} - QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const { - Q_ASSERT(isJSC()); + Q_ASSERT(isObject()); JSC::ExecState *exec = engine->currentFrame; JSC::JSObject *object = jscValue.getObject(); JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object)); @@ -352,7 +301,7 @@ QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolv QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const { - Q_ASSERT(isJSC()); + Q_ASSERT(isObject()); JSC::ExecState *exec = engine->currentFrame; JSC::JSObject *object = jscValue.getObject(); JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object)); @@ -366,6 +315,115 @@ QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const return engine->scriptValueFromJSCValue(result); } +void QScriptValuePrivate::setProperty(const JSC::Identifier &id, const QScriptValue &value, + const QScriptValue::PropertyFlags &flags) +{ + QScriptEngine *valueEngine = value.engine(); + if (valueEngine && (QScriptEnginePrivate::get(valueEngine) != engine)) { + qWarning("QScriptValue::setProperty(%s) failed: " + "cannot set value created in a different engine", + qPrintable(QString(id.ustring()))); + return; + } + JSC::ExecState *exec = engine->currentFrame; + JSC::JSValue jsValue = engine->scriptValueToJSCValue(value); + JSC::JSObject *thisObject = JSC::asObject(jscValue); + JSC::JSValue setter = thisObject->lookupSetter(exec, id); + JSC::JSValue getter = thisObject->lookupGetter(exec, id); + if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { + if (!jsValue) { + // deleting getter/setter + if ((flags & QScriptValue::PropertyGetter) && (flags & QScriptValue::PropertySetter)) { + // deleting both: just delete the property + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + } else if (flags & QScriptValue::PropertyGetter) { + // preserve setter, if there is one + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + if (setter && setter.isObject()) + thisObject->defineSetter(exec, id, JSC::asObject(setter)); + } else { // flags & QScriptValue::PropertySetter + // preserve getter, if there is one + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + if (getter && getter.isObject()) + thisObject->defineGetter(exec, id, JSC::asObject(getter)); + } + } else { + if (jsValue.isObject()) { // ### should check if it has callData() + // defining getter/setter + if (id == exec->propertyNames().underscoreProto) { + qWarning("QScriptValue::setProperty() failed: " + "cannot set getter or setter of native property `__proto__'"); + } else { + if (flags & QScriptValue::PropertyGetter) + thisObject->defineGetter(exec, id, JSC::asObject(jsValue)); + if (flags & QScriptValue::PropertySetter) + thisObject->defineSetter(exec, id, JSC::asObject(jsValue)); + } + } else { + qWarning("QScriptValue::setProperty(): getter/setter must be a function"); + } + } + } else { + // setting the value + if (getter && getter.isObject() && !(setter && setter.isObject())) { + qWarning("QScriptValue::setProperty() failed: " + "property '%s' has a getter but no setter", + qPrintable(QString(id.ustring()))); + return; + } + if (!jsValue) { + // ### check if it's a getter/setter property + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + } else if (flags != QScriptValue::KeepExistingFlags) { + if (thisObject->hasOwnProperty(exec, id)) + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); // ### hmmm - can't we just update the attributes? + unsigned attribs = 0; + if (flags & QScriptValue::ReadOnly) + attribs |= JSC::ReadOnly; + if (flags & QScriptValue::SkipInEnumeration) + attribs |= JSC::DontEnum; + if (flags & QScriptValue::Undeletable) + attribs |= JSC::DontDelete; + attribs |= flags & QScriptValue::UserRange; + thisObject->putWithAttributes(exec, id, jsValue, attribs); + } else { + JSC::PutPropertySlot slot; + thisObject->put(exec, id, jsValue, slot); + } + } +} + +QScriptValue::PropertyFlags QScriptValuePrivate::propertyFlags(const JSC::Identifier &id, + const QScriptValue::ResolveFlags &mode) const +{ + JSC::ExecState *exec = engine->currentFrame; + JSC::JSObject *object = JSC::asObject(jscValue); + unsigned attribs = 0; + if (!object->getPropertyAttributes(exec, id, attribs)) { + if ((mode & QScriptValue::ResolvePrototype) && object->prototype() && object->prototype().isObject()) { + QScriptValue proto = engine->scriptValueFromJSCValue(object->prototype()); + return QScriptValuePrivate::get(proto)->propertyFlags(id, mode); + } + return 0; + } + QScriptValue::PropertyFlags result = 0; + if (attribs & JSC::ReadOnly) + result |= QScriptValue::ReadOnly; + if (attribs & JSC::DontEnum) + result |= QScriptValue::SkipInEnumeration; + if (attribs & JSC::DontDelete) + result |= QScriptValue::Undeletable; + //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?) + if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull()) + result |= QScriptValue::PropertyGetter; + if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull()) + result |= QScriptValue::PropertySetter; + if (attribs & QScript::QObjectMemberAttribute) + result |= QScriptValue::QObjectMember; + result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange); + return result; +} + QVariant &QScriptValuePrivate::variantValue() const { Q_ASSERT(jscValue.isObject(&QScriptObject::info)); @@ -405,6 +463,30 @@ void QScriptValuePrivate::detachFromEngine() engine = 0; } +void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine) +{ + if (engine) + return engine->allocateScriptValuePrivate(size); + return qMalloc(size); +} + +void QScriptValuePrivate::operator delete(void *ptr) +{ + QScriptValuePrivate *d = reinterpret_cast<QScriptValuePrivate*>(ptr); + if (d->engine) + d->engine->freeScriptValuePrivate(d); + else + qFree(d); +} + +/*! + \internal +*/ +QScriptValue::QScriptValue(QScriptValuePrivate *d) + : d_ptr(d) +{ +} + /*! Constructs an invalid QScriptValue. */ @@ -439,9 +521,8 @@ QScriptValue::QScriptValue(const QScriptValue &other) registers it with the script \a engine. */ QScriptValue::QScriptValue(QScriptEngine *engine, QScriptValue::SpecialValue value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); switch (value) { case NullValue: d_ptr->initFrom(JSC::jsNull()); @@ -461,9 +542,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, QScriptValue::SpecialValue val registers it with the script \a engine. */ QScriptValue::QScriptValue(QScriptEngine *engine, bool val) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); d_ptr->initFrom(JSC::jsBoolean(val)); } @@ -475,9 +555,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, bool val) registers it with the script \a engine. */ QScriptValue::QScriptValue(QScriptEngine *engine, int val) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); if (engine) { JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsNumber(exec, val)); @@ -498,9 +577,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, int val) registers it with the script \a engine. */ QScriptValue::QScriptValue(QScriptEngine *engine, uint val) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); if (engine) { JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsNumber(exec, val)); @@ -521,9 +599,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, uint val) registers it with the script \a engine. */ QScriptValue::QScriptValue(QScriptEngine *engine, qsreal val) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); if (engine) { JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsNumber(exec, val)); @@ -544,9 +621,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, qsreal val) registers it with the script \a engine. */ QScriptValue::QScriptValue(QScriptEngine *engine, const QString &val) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); if (engine) { JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsString(exec, val)); @@ -565,9 +641,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, const QString &val) #ifndef QT_NO_CAST_FROM_ASCII QScriptValue::QScriptValue(QScriptEngine *engine, const char *val) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine))) { - d_ptr->engine = QScriptEnginePrivate::get(engine); if (engine) { JSC::ExecState *exec = d_ptr->engine->currentFrame; d_ptr->initFrom(JSC::jsString(exec, val)); @@ -583,9 +658,8 @@ QScriptValue::QScriptValue(QScriptEngine *engine, const char *val) Constructs a new QScriptValue with a special \a value. */ QScriptValue::QScriptValue(SpecialValue value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; switch (value) { case NullValue: d_ptr->initFrom(JSC::jsNull()); @@ -602,9 +676,8 @@ QScriptValue::QScriptValue(SpecialValue value) Constructs a new QScriptValue with a boolean \a value. */ QScriptValue::QScriptValue(bool value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; d_ptr->initFrom(JSC::jsBoolean(value)); } @@ -614,9 +687,8 @@ QScriptValue::QScriptValue(bool value) Constructs a new QScriptValue with a number \a value. */ QScriptValue::QScriptValue(int value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; JSC::JSValue immediate = JSC::JSImmediate::from(value); if (immediate) d_ptr->initFrom(immediate); @@ -630,9 +702,8 @@ QScriptValue::QScriptValue(int value) Constructs a new QScriptValue with a number \a value. */ QScriptValue::QScriptValue(uint value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; JSC::JSValue immediate = JSC::JSImmediate::from(value); if (immediate) d_ptr->initFrom(immediate); @@ -646,9 +717,8 @@ QScriptValue::QScriptValue(uint value) Constructs a new QScriptValue with a number \a value. */ QScriptValue::QScriptValue(qsreal value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; JSC::JSValue immediate = JSC::JSImmediate::from(value); if (immediate) d_ptr->initFrom(immediate); @@ -662,9 +732,8 @@ QScriptValue::QScriptValue(qsreal value) Constructs a new QScriptValue with a string \a value. */ QScriptValue::QScriptValue(const QString &value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; d_ptr->initFrom(value); } @@ -674,9 +743,8 @@ QScriptValue::QScriptValue(const QString &value) Constructs a new QScriptValue with a string \a value. */ QScriptValue::QScriptValue(const QLatin1String &value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; d_ptr->initFrom(value); } @@ -688,9 +756,8 @@ QScriptValue::QScriptValue(const QLatin1String &value) #ifndef QT_NO_CAST_FROM_ASCII QScriptValue::QScriptValue(const char *value) - : d_ptr(new QScriptValuePrivate) + : d_ptr(new (/*engine=*/0)QScriptValuePrivate(/*engine=*/0)) { - d_ptr->engine = 0; d_ptr->initFrom(QString::fromAscii(value)); } #endif @@ -717,7 +784,7 @@ QScriptValue &QScriptValue::operator=(const QScriptValue &other) bool QScriptValue::isError() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return false; return d->jscValue.isObject(&JSC::ErrorInstance::info); } @@ -731,7 +798,7 @@ bool QScriptValue::isError() const bool QScriptValue::isArray() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return false; return d->jscValue.isObject(&JSC::JSArray::info); } @@ -745,7 +812,7 @@ bool QScriptValue::isArray() const bool QScriptValue::isDate() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return false; return d->jscValue.isObject(&JSC::DateInstance::info); } @@ -759,7 +826,7 @@ bool QScriptValue::isDate() const bool QScriptValue::isRegExp() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return false; return d->jscValue.isObject(&JSC::RegExpObject::info); } @@ -774,7 +841,7 @@ bool QScriptValue::isRegExp() const QScriptValue QScriptValue::prototype() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return QScriptValue(); return d->engine->scriptValueFromJSCValue(JSC::asObject(d->jscValue)->prototype()); } @@ -793,7 +860,7 @@ QScriptValue QScriptValue::prototype() const void QScriptValue::setPrototype(const QScriptValue &prototype) { Q_D(QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return; if (prototype.isValid() && prototype.engine() && (prototype.engine() != engine())) { @@ -823,7 +890,7 @@ void QScriptValue::setPrototype(const QScriptValue &prototype) QScriptValue QScriptValue::scope() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return QScriptValue(); // ### make hidden property return d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal); @@ -835,7 +902,7 @@ QScriptValue QScriptValue::scope() const void QScriptValue::setScope(const QScriptValue &scope) { Q_D(QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return; if (scope.isValid() && scope.engine() && (scope.engine() != engine())) { @@ -867,7 +934,7 @@ void QScriptValue::setScope(const QScriptValue &scope) bool QScriptValue::instanceOf(const QScriptValue &other) const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject() || !other.isObject()) + if (!d || !d->isObject() || !other.isObject()) return false; if (other.engine() != engine()) { qWarning("QScriptValue::instanceof: " @@ -1626,9 +1693,10 @@ void QScriptValue::setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags) { Q_D(QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return; - setProperty(engine()->toStringHandle(name), value, flags); + JSC::ExecState *exec = d->engine->currentFrame; + d->setProperty(JSC::Identifier(exec, name), value, flags); } /*! @@ -1650,7 +1718,7 @@ QScriptValue QScriptValue::property(const QString &name, const ResolveFlags &mode) const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return QScriptValue(); return d->property(name, mode); } @@ -1672,7 +1740,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex, const ResolveFlags &mode) const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return QScriptValue(); return d->property(arrayIndex, mode); } @@ -1693,7 +1761,7 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value, const PropertyFlags &flags) { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return; if (value.engine() && (value.engine() != engine())) { qWarning("QScriptValue::setProperty() failed: " @@ -1743,7 +1811,7 @@ QScriptValue QScriptValue::property(const QScriptString &name, const ResolveFlags &mode) const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject() || !name.isValid()) + if (!d || !d->isObject() || !name.isValid()) return QScriptValue(); return d->property(name.d_ptr->identifier, mode); } @@ -1766,82 +1834,9 @@ void QScriptValue::setProperty(const QScriptString &name, const PropertyFlags &flags) { Q_D(QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject() || !name.isValid()) + if (!d || !d->isObject() || !name.isValid()) return; - QScriptEngine *valueEngine = value.engine(); - if (valueEngine && (QScriptEnginePrivate::get(valueEngine) != d->engine)) { - qWarning("QScriptValue::setProperty(%s) failed: " - "cannot set value created in a different engine", - qPrintable(name.toString())); - return; - } - JSC::ExecState *exec = d->engine->currentFrame; - JSC::JSValue jscValue = d->engine->scriptValueToJSCValue(value); - JSC::Identifier id = name.d_ptr->identifier; - JSC::JSObject *thisObject = JSC::asObject(d->jscValue); - JSC::JSValue setter = thisObject->lookupSetter(exec, id); - JSC::JSValue getter = thisObject->lookupGetter(exec, id); - if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { - if (!jscValue) { - // deleting getter/setter - if ((flags & QScriptValue::PropertyGetter) && (flags & QScriptValue::PropertySetter)) { - // deleting both: just delete the property - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - } else if (flags & QScriptValue::PropertyGetter) { - // preserve setter, if there is one - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - if (setter && setter.isObject()) - thisObject->defineSetter(exec, id, JSC::asObject(setter)); - } else { // flags & QScriptValue::PropertySetter - // preserve getter, if there is one - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - if (getter && getter.isObject()) - thisObject->defineGetter(exec, id, JSC::asObject(getter)); - } - } else { - if (jscValue.isObject()) { // ### should check if it has callData() - // defining getter/setter - if (id == exec->propertyNames().underscoreProto) { - qWarning("QScriptValue::setProperty() failed: " - "cannot set getter or setter of native property `__proto__'"); - } else { - if (flags & QScriptValue::PropertyGetter) - thisObject->defineGetter(exec, id, JSC::asObject(jscValue)); - if (flags & QScriptValue::PropertySetter) - thisObject->defineSetter(exec, id, JSC::asObject(jscValue)); - } - } else { - qWarning("QScriptValue::setProperty(): getter/setter must be a function"); - } - } - } else { - // setting the value - if (getter && getter.isObject() && !(setter && setter.isObject())) { - qWarning("QScriptValue::setProperty() failed: " - "property '%s' has a getter but no setter", - qPrintable(name.toString())); - return; - } - if (!jscValue) { - // ### check if it's a getter/setter property - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - } else if (flags != QScriptValue::KeepExistingFlags) { - if (thisObject->hasOwnProperty(exec, id)) - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); // ### hmmm - can't we just update the attributes? - unsigned attribs = 0; - if (flags & QScriptValue::ReadOnly) - attribs |= JSC::ReadOnly; - if (flags & QScriptValue::SkipInEnumeration) - attribs |= JSC::DontEnum; - if (flags & QScriptValue::Undeletable) - attribs |= JSC::DontDelete; - attribs |= flags & QScriptValue::UserRange; - thisObject->putWithAttributes(exec, id, jscValue, attribs); - } else { - JSC::PutPropertySlot slot; - thisObject->put(exec, id, jscValue, slot); - } - } + d->setProperty(name.d_ptr->identifier, value, flags); } /*! @@ -1853,9 +1848,11 @@ void QScriptValue::setProperty(const QScriptString &name, QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QString &name, const ResolveFlags &mode) const { - if (!isObject()) + Q_D(const QScriptValue); + if (!d || !d->isObject()) return 0; - return propertyFlags(engine()->toStringHandle(name), mode); + JSC::ExecState *exec = d->engine->currentFrame; + return d->propertyFlags(JSC::Identifier(exec, name), mode); } @@ -1871,33 +1868,9 @@ QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QScriptString &nam const ResolveFlags &mode) const { Q_D(const QScriptValue); - if (!isObject()) - return 0; - JSC::ExecState *exec = d->engine->currentFrame; - JSC::JSObject *object = JSC::asObject(d->jscValue); - JSC::Identifier id = name.d_ptr->identifier; - unsigned attribs = 0; - if (!object->getPropertyAttributes(exec, id, attribs)) { - if ((mode & QScriptValue::ResolvePrototype) && object->prototype()) - return d->engine->scriptValueFromJSCValue(object->prototype()).propertyFlags(name, mode); + if (!d || !d->isObject() || !name.isValid()) return 0; - } - QScriptValue::PropertyFlags result = 0; - if (attribs & JSC::ReadOnly) - result |= QScriptValue::ReadOnly; - if (attribs & JSC::DontEnum) - result |= QScriptValue::SkipInEnumeration; - if (attribs & JSC::DontDelete) - result |= QScriptValue::Undeletable; - //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?) - if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull()) - result |= QScriptValue::PropertyGetter; - if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull()) - result |= QScriptValue::PropertySetter; - if (attribs & QScript::QObjectMemberAttribute) - result |= QScriptValue::QObjectMember; - result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange); - return result; + return d->propertyFlags(name.d_ptr->identifier, mode); } /*! @@ -1927,7 +1900,12 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, const QScriptValueList &args) { Q_D(const QScriptValue); - if (!isFunction()) + if (!d || !d->isJSC()) + return QScriptValue(); + JSC::JSValue callee = d->jscValue; + JSC::CallData callData; + JSC::CallType callType = callee.getCallData(callData); + if (callType == JSC::CallTypeNone) return QScriptValue(); if (thisObject.engine() && (thisObject.engine() != engine())) { @@ -1936,7 +1914,6 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, "a different engine"); return QScriptValue(); } - engine()->currentContext()->activationObject(); //force the creation of a context for native function; JSC::ExecState *exec = d->engine->currentFrame; @@ -1944,8 +1921,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, if (!jscThisObject || !jscThisObject.isObject()) jscThisObject = d->engine->globalObject(); - QVector<JSC::JSValue> argsVector; - argsVector.resize(args.size()); + QVarLengthArray<JSC::JSValue, 8> argsVector(args.size()); for (int i = 0; i < args.size(); ++i) { const QScriptValue &arg = args.at(i); if (!arg.isValid()) { @@ -1961,9 +1937,6 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, } JSC::ArgList jscArgs(argsVector.data(), argsVector.size()); - JSC::JSValue callee = d->jscValue; - JSC::CallData callData; - JSC::CallType callType = callee.getCallData(callData); JSC::JSValue savedException; QScriptValuePrivate::saveException(exec, &savedException); JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, jscArgs); @@ -2002,7 +1975,12 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, const QScriptValue &arguments) { Q_D(QScriptValue); - if (!isFunction()) + if (!d || !d->isJSC()) + return QScriptValue(); + JSC::JSValue callee = d->jscValue; + JSC::CallData callData; + JSC::CallType callType = callee.getCallData(callData); + if (callType == JSC::CallTypeNone) return QScriptValue(); if (thisObject.engine() && (thisObject.engine() != engine())) { @@ -2011,7 +1989,6 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, "a different engine"); return QScriptValue(); } - engine()->currentContext()->activationObject(); //force the creation of a context for native function; JSC::ExecState *exec = d->engine->currentFrame; @@ -2040,9 +2017,6 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, } } - JSC::JSValue callee = d->jscValue; - JSC::CallData callData; - JSC::CallType callType = callee.getCallData(callData); JSC::JSValue savedException; QScriptValuePrivate::saveException(exec, &savedException); JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, applyArgs); @@ -2075,13 +2049,17 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, QScriptValue QScriptValue::construct(const QScriptValueList &args) { Q_D(const QScriptValue); - if (!isFunction()) + if (!d || !d->isJSC()) + return QScriptValue(); + JSC::JSValue callee = d->jscValue; + JSC::ConstructData constructData; + JSC::ConstructType constructType = callee.getConstructData(constructData); + if (constructType == JSC::ConstructTypeNone) return QScriptValue(); - engine()->currentContext()->activationObject(); //force the creation of a context for native function; + JSC::ExecState *exec = d->engine->currentFrame; - QVector<JSC::JSValue> argsVector; - argsVector.resize(args.size()); + QVarLengthArray<JSC::JSValue, 8> argsVector(args.size()); for (int i = 0; i < args.size(); ++i) { if (!args.at(i).isValid()) argsVector[i] = JSC::jsUndefined(); @@ -2091,9 +2069,6 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args) JSC::ArgList jscArgs(argsVector.data(), argsVector.size()); - JSC::JSValue callee = d->jscValue; - JSC::ConstructData constructData; - JSC::ConstructType constructType = callee.getConstructData(constructData); JSC::JSValue savedException; QScriptValuePrivate::saveException(exec, &savedException); JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, jscArgs); @@ -2123,9 +2098,14 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args) QScriptValue QScriptValue::construct(const QScriptValue &arguments) { Q_D(QScriptValue); - if (!isFunction()) + if (!d || !d->isJSC()) + return QScriptValue(); + JSC::JSValue callee = d->jscValue; + JSC::ConstructData constructData; + JSC::ConstructType constructType = callee.getConstructData(constructData); + if (constructType == JSC::ConstructTypeNone) return QScriptValue(); - engine()->currentContext()->activationObject(); //force the creation of a context for native function; + JSC::ExecState *exec = d->engine->currentFrame; JSC::JSValue array = d->engine->scriptValueToJSCValue(arguments); @@ -2148,9 +2128,6 @@ QScriptValue QScriptValue::construct(const QScriptValue &arguments) } } - JSC::JSValue callee = d->jscValue; - JSC::ConstructData constructData; - JSC::ConstructType constructType = callee.getConstructData(constructData); JSC::JSValue savedException; QScriptValuePrivate::saveException(exec, &savedException); JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, applyArgs); @@ -2295,7 +2272,7 @@ bool QScriptValue::isUndefined() const bool QScriptValue::isObject() const { Q_D(const QScriptValue); - return d && d->isJSC() && d->jscValue.isObject(); + return d && d->isObject(); } /*! @@ -2342,10 +2319,9 @@ bool QScriptValue::isQObject() const bool QScriptValue::isQMetaObject() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return false; return JSC::asObject(d->jscValue)->isObject(&QScript::QMetaObjectWrapperObject::info); - return false; } /*! @@ -2369,7 +2345,7 @@ bool QScriptValue::isValid() const QScriptValue QScriptValue::data() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return QScriptValue(); if (d->jscValue.isObject(&QScriptObject::info)) { QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(d->jscValue)); @@ -2391,7 +2367,7 @@ QScriptValue QScriptValue::data() const void QScriptValue::setData(const QScriptValue &data) { Q_D(QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject()) + if (!d || !d->isObject()) return; JSC::JSValue other = d->engine->scriptValueToJSCValue(data); if (d->jscValue.isObject(&QScriptObject::info)) { @@ -2445,8 +2421,13 @@ QScriptClass *QScriptValue::scriptClass() const void QScriptValue::setScriptClass(QScriptClass *scriptClass) { Q_D(QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.isObject(&QScriptObject::info)) + if (!d || !d->isObject()) return; + if (!d->jscValue.isObject(&QScriptObject::info)) { + qWarning("QScriptValue::setScriptClass() failed: " + "cannot change class of non-QScriptObject"); + return; + } QScriptObject *scriptObject = static_cast<QScriptObject*>(JSC::asObject(d->jscValue)); QScriptObjectDelegate *delegate = scriptObject->delegate(); if (!delegate || (delegate->type() != QScriptObjectDelegate::ClassObject)) { diff --git a/src/script/api/qscriptvalue.h b/src/script/api/qscriptvalue.h index 67b9514..afa247a 100644 --- a/src/script/api/qscriptvalue.h +++ b/src/script/api/qscriptvalue.h @@ -220,6 +220,8 @@ private: // force compile error, prevent QScriptValue(QScriptEngine*, bool) to be called inline QScriptValue(QScriptEngine *, void *); + QScriptValue(QScriptValuePrivate*); + private: QExplicitlySharedDataPointer<QScriptValuePrivate> d_ptr; diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index bab59fe..6d57d32 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -55,11 +55,11 @@ #include <QtCore/qobjectdefs.h> -QT_BEGIN_NAMESPACE - #include "wtf/Platform.h" #include "JSValue.h" +QT_BEGIN_NAMESPACE + class QString; class QScriptEnginePrivate; @@ -68,40 +68,45 @@ class QScriptValuePrivate { Q_DISABLE_COPY(QScriptValuePrivate); public: + void* operator new(size_t, QScriptEnginePrivate*); + void operator delete(void*); + enum Type { JSC, Number, String }; - QScriptValuePrivate(); - ~QScriptValuePrivate(); + inline QScriptValuePrivate(QScriptEnginePrivate*); + inline ~QScriptValuePrivate(); - void initFrom(JSC::JSValue value); - void initFrom(double value); - void initFrom(const QString &value); + inline void initFrom(JSC::JSValue value); + inline void initFrom(double value); + inline void initFrom(const QString &value); - bool isJSC() const; + inline bool isJSC() const; + inline bool isObject() const; QVariant &variantValue() const; void setVariantValue(const QVariant &value); - static QScriptValuePrivate *get(const QScriptValue &q) + static inline QScriptValuePrivate *get(const QScriptValue &q) { return q.d_ptr.data(); } - static QScriptValue toPublic(QScriptValuePrivate *d) + static inline QScriptValue toPublic(QScriptValuePrivate *d) { - QScriptValue tmp; - tmp.d_ptr = d; - d->ref.ref(); - return tmp; + return QScriptValue(d); } QScriptValue property(const JSC::Identifier &id, int resolveMode) const; QScriptValue property(quint32 index, int resolveMode) const; - QScriptValue property(const QString &, int resolveMode) const; + inline QScriptValue property(const QString &, int resolveMode) const; + void setProperty(const JSC::Identifier &id, const QScriptValue &value, + const QScriptValue::PropertyFlags &flags); + QScriptValue::PropertyFlags propertyFlags( + const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode) const; void detachFromEngine(); @@ -129,6 +134,23 @@ public: QBasicAtomicInt ref; }; +inline QScriptValuePrivate::QScriptValuePrivate(QScriptEnginePrivate *e) + : engine(e), prev(0), next(0) +{ + ref = 0; +} + +inline bool QScriptValuePrivate::isJSC() const +{ + return (type == JSC); +} + +inline bool QScriptValuePrivate::isObject() const +{ + return isJSC() && jscValue && jscValue.isObject(); +} + +// Rest of inline functions implemented in qscriptengine_p.h QT_END_NAMESPACE diff --git a/src/script/bridge/qscriptactivationobject.cpp b/src/script/bridge/qscriptactivationobject.cpp index a8a2181..7712b87 100644 --- a/src/script/bridge/qscriptactivationobject.cpp +++ b/src/script/bridge/qscriptactivationobject.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp index f6c6792..13b5ebe 100644 --- a/src/script/bridge/qscriptclassobject.cpp +++ b/src/script/bridge/qscriptclassobject.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptfunction.cpp b/src/script/bridge/qscriptfunction.cpp index 27ec203..4764f68 100644 --- a/src/script/bridge/qscriptfunction.cpp +++ b/src/script/bridge/qscriptfunction.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -59,6 +59,8 @@ ASSERT_CLASS_FITS_IN_CELL(QScript::FunctionWrapper); ASSERT_CLASS_FITS_IN_CELL(QScript::FunctionWithArgWrapper); } +QT_BEGIN_NAMESPACE + namespace QScript { diff --git a/src/script/bridge/qscriptglobalobject.cpp b/src/script/bridge/qscriptglobalobject.cpp index eb8673e..3fa5879 100644 --- a/src/script/bridge/qscriptglobalobject.cpp +++ b/src/script/bridge/qscriptglobalobject.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -45,16 +45,17 @@ #include "../api/qscriptengine.h" #include "../api/qscriptengine_p.h" -QT_BEGIN_NAMESPACE - namespace JSC { +QT_USE_NAMESPACE ASSERT_CLASS_FITS_IN_CELL(QScript::GlobalObject); ASSERT_CLASS_FITS_IN_CELL(QScript::OriginalGlobalObjectProxy); } // namespace JSC +QT_BEGIN_NAMESPACE + namespace QScript { @@ -99,6 +100,15 @@ void GlobalObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyName JSC::JSGlobalObject::put(exec, propertyName, value, slot); } +void GlobalObject::putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, + JSC::JSValue value, unsigned attributes) +{ + if (customGlobalObject) + customGlobalObject->putWithAttributes(exec, propertyName, value, attributes); + else + JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes); +} + bool GlobalObject::deleteProperty(JSC::ExecState* exec, const JSC::Identifier& propertyName, bool checkDontDelete) { diff --git a/src/script/bridge/qscriptglobalobject_p.h b/src/script/bridge/qscriptglobalobject_p.h index 673f7f6..11b1482 100644 --- a/src/script/bridge/qscriptglobalobject_p.h +++ b/src/script/bridge/qscriptglobalobject_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -74,6 +74,8 @@ public: JSC::PropertySlot&); virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); + virtual void putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, + JSC::JSValue value, unsigned attributes); virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier& propertyName, bool checkDontDelete = true); @@ -115,6 +117,8 @@ public: virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue value, JSC::PutPropertySlot& slot) { originalGlobalObject->JSC::JSGlobalObject::put(exec, propertyName, value, slot); } + virtual void putWithAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue value, unsigned attributes) + { originalGlobalObject->JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes); } virtual bool deleteProperty(JSC::ExecState* exec, const JSC::Identifier& propertyName, bool checkDontDelete = true) { return originalGlobalObject->JSC::JSGlobalObject::deleteProperty(exec, propertyName, checkDontDelete); } diff --git a/src/script/bridge/qscriptobject.cpp b/src/script/bridge/qscriptobject.cpp index a550d39..e59c542 100644 --- a/src/script/bridge/qscriptobject.cpp +++ b/src/script/bridge/qscriptobject.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -43,14 +43,15 @@ #include "qscriptobject_p.h" #include "private/qobject_p.h" -QT_BEGIN_NAMESPACE - namespace JSC { +//QT_USE_NAMESPACE ASSERT_CLASS_FITS_IN_CELL(QScriptObject); ASSERT_CLASS_FITS_IN_CELL(QScriptObjectPrototype); } +QT_BEGIN_NAMESPACE + // masquerading as JSC::JSObject const JSC::ClassInfo QScriptObject::info = { "Object", 0, 0, 0 }; @@ -94,6 +95,8 @@ void QScriptObject::setDelegate(QScriptObjectDelegate *delegate) { if (!d) d = new Data(); + else + delete d->delegate; d->delegate = delegate; } diff --git a/src/script/bridge/qscriptobject_p.h b/src/script/bridge/qscriptobject_p.h index d499c61..3ae7146 100644 --- a/src/script/bridge/qscriptobject_p.h +++ b/src/script/bridge/qscriptobject_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index b7a0e44..ac540ef 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -61,10 +61,9 @@ #include "RegExpObject.h" #include "RegExpConstructor.h" -QT_BEGIN_NAMESPACE - namespace JSC { +QT_USE_NAMESPACE ASSERT_CLASS_FITS_IN_CELL(QScript::QObjectPrototype); ASSERT_CLASS_FITS_IN_CELL(QScript::QMetaObjectWrapperObject); ASSERT_CLASS_FITS_IN_CELL(QScript::QMetaObjectPrototype); @@ -72,6 +71,8 @@ ASSERT_CLASS_FITS_IN_CELL(QScript::QtFunction); ASSERT_CLASS_FITS_IN_CELL(QScript::QtPropertyFunction); } +QT_BEGIN_NAMESPACE + namespace QScript { @@ -2022,8 +2023,7 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) int argc = parameterTypes.count(); JSC::ExecState *exec = engine->currentFrame; - QVector<JSC::JSValue> argsVector; - argsVector.resize(argc); + QVarLengthArray<JSC::JSValue, 8> argsVector(argc); for (int i = 0; i < argc; ++i) { // ### optimize -- no need to convert via QScriptValue QScriptValue actual; @@ -2210,12 +2210,12 @@ void QObjectData::registerWrapper(QScriptObject *wrapper, } // namespace QScript +QT_END_NAMESPACE + namespace JSC { ASSERT_CLASS_FITS_IN_CELL(QScript::QtFunction); } -QT_END_NAMESPACE - #include "moc_qscriptqobject_p.cpp" diff --git a/src/script/bridge/qscriptqobject_p.h b/src/script/bridge/qscriptqobject_p.h index 64853ff..9401910 100644 --- a/src/script/bridge/qscriptqobject_p.h +++ b/src/script/bridge/qscriptqobject_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptvariant.cpp b/src/script/bridge/qscriptvariant.cpp index ee59e4f..ab75a02 100644 --- a/src/script/bridge/qscriptvariant.cpp +++ b/src/script/bridge/qscriptvariant.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -49,13 +49,14 @@ #include "PrototypeFunction.h" #include "JSString.h" -QT_BEGIN_NAMESPACE - namespace JSC { +QT_USE_NAMESPACE ASSERT_CLASS_FITS_IN_CELL(QScript::QVariantPrototype); } +QT_BEGIN_NAMESPACE + namespace QScript { @@ -136,7 +137,7 @@ static JSC::JSValue JSC_HOST_CALL variantProtoFuncToString(JSC::ExecState *exec, JSC::JSValue value = variantProtoFuncValueOf(exec, callee, thisValue, args); if (value.isObject()) { result = v.toString(); - if (result.isEmpty()) { + if (result.isEmpty() && !v.canConvert(QVariant::String)) { result = "QVariant("; result += v.typeName(); result += ")"; diff --git a/src/script/script.pro b/src/script/script.pro index 5844620..301386d 100644 --- a/src/script/script.pro +++ b/src/script/script.pro @@ -10,6 +10,9 @@ unix:QMAKE_PKGCONFIG_REQUIRES = QtCore include(../qbase.pri) +# Disable a few warnings on Windows. +win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4503 -wd4800 -wd4819 -wd4996 -wd4396 -wd4099 + # disable JIT for now DEFINES += ENABLE_JIT=0 # FIXME: shared the statically built JavaScriptCore diff --git a/src/script/utils/qscriptdate.cpp b/src/script/utils/qscriptdate.cpp index 4f235f6..a6abe4a 100644 --- a/src/script/utils/qscriptdate.cpp +++ b/src/script/utils/qscriptdate.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp index d228745..1288991 100644 --- a/src/scripttools/debugging/qscriptcompletiontask.cpp +++ b/src/scripttools/debugging/qscriptcompletiontask.cpp @@ -76,6 +76,8 @@ public: }; QScriptCompletionTaskPrivate::QScriptCompletionTaskPrivate() + : cursorPosition(0), frameIndex(0), commandScheduler(0), + jobScheduler(0), console(0) { } diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp index c9bc650..a316894 100644 --- a/src/scripttools/debugging/qscriptdebugger.cpp +++ b/src/scripttools/debugging/qscriptdebugger.cpp @@ -1019,7 +1019,7 @@ class SyncBreakpointsJob : public QScriptDebuggerCommandSchedulerJob public: SyncBreakpointsJob(QScriptDebuggerPrivate *debugger) : QScriptDebuggerCommandSchedulerJob(debugger), - m_debugger(debugger) {} + m_debugger(debugger), m_index(-1) {} void start() { QScriptDebuggerCommandSchedulerFrontend frontend(commandScheduler(), this); diff --git a/src/scripttools/debugging/qscriptdebuggeragent.cpp b/src/scripttools/debugging/qscriptdebuggeragent.cpp index 492b79f..3fc9d7b 100644 --- a/src/scripttools/debugging/qscriptdebuggeragent.cpp +++ b/src/scripttools/debugging/qscriptdebuggeragent.cpp @@ -61,11 +61,11 @@ QT_BEGIN_NAMESPACE */ QScriptDebuggerAgentPrivate::QScriptDebuggerAgentPrivate() + : state(NoState), stepDepth(0), stepCount(0), + targetScriptId(-1), targetLineNumber(-1), returnCounter(0), + nextBreakpointId(1), hitBreakpointId(0), + nextContextId(0), statementCounter(0) { - state = NoState; - nextBreakpointId = 1; - nextContextId = 0; - statementCounter = 0; } QScriptDebuggerAgentPrivate::~QScriptDebuggerAgentPrivate() diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp index d6f63ee..63382d0 100644 --- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp +++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp @@ -131,14 +131,13 @@ private: QScriptDebuggerBackendPrivate::QScriptDebuggerBackendPrivate() + : agent(0), commandExecutor(0), + pendingEvaluateContextIndex(-1), pendingEvaluateLineNumber(-1), + ignoreExceptions(false), + nextScriptValueIteratorId(0), nextScriptObjectSnapshotId(0), + eventReceiver(0), + q_ptr(0) // q_ptr will be set later by QScriptDebuggerBackend constructor { - eventReceiver = 0; - agent = 0; - commandExecutor = 0; - pendingEvaluateLineNumber = -1; - ignoreExceptions = false; - nextScriptValueIteratorId = 0; - nextScriptObjectSnapshotId = 0; } QScriptDebuggerBackendPrivate::~QScriptDebuggerBackendPrivate() diff --git a/src/scripttools/debugging/qscriptdebuggerevent.cpp b/src/scripttools/debugging/qscriptdebuggerevent.cpp index 5fab17e..393f7a9 100644 --- a/src/scripttools/debugging/qscriptdebuggerevent.cpp +++ b/src/scripttools/debugging/qscriptdebuggerevent.cpp @@ -60,6 +60,7 @@ public: }; QScriptDebuggerEventPrivate::QScriptDebuggerEventPrivate() + : type(QScriptDebuggerEvent::None) { } diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp index 167053d..a6096f2 100644 --- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp +++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp @@ -367,7 +367,7 @@ class QScriptDebuggerScriptedConsoleCommandJobPrivate : public QScriptDebuggerConsoleCommandJobPrivate { public: - QScriptDebuggerScriptedConsoleCommandJobPrivate() {} + QScriptDebuggerScriptedConsoleCommandJobPrivate() : command(0), commandCount(0) {} ~QScriptDebuggerScriptedConsoleCommandJobPrivate() {} QScriptDebuggerScriptedConsoleCommandPrivate *command; diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index 6a8609e..06ee3e1 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -743,37 +743,31 @@ void QODBCDriverPrivate::splitTableQualifier(const QString & qualifier, QString QODBCDriverPrivate::DefaultCase QODBCDriverPrivate::defaultCase() const { - static bool isInitialized = false; - static DefaultCase ret; - - if (!isInitialized) { - SQLUSMALLINT casing; - int r = SQLGetInfo(hDbc, - SQL_IDENTIFIER_CASE, - &casing, - sizeof(casing), - NULL); - if ( r != SQL_SUCCESS) - ret = Lower;//arbitrary case if driver cannot be queried - else { - switch (casing) { - case (SQL_IC_UPPER): - ret = Upper; - break; - case (SQL_IC_LOWER): - ret = Lower; - break; - case (SQL_IC_SENSITIVE): - ret = Sensitive; - break; - case (SQL_IC_MIXED): - ret = Mixed; - break; - default: - ret = Upper; - } + DefaultCase ret; + SQLUSMALLINT casing; + int r = SQLGetInfo(hDbc, + SQL_IDENTIFIER_CASE, + &casing, + sizeof(casing), + NULL); + if ( r != SQL_SUCCESS) + ret = Mixed;//arbitrary case if driver cannot be queried + else { + switch (casing) { + case (SQL_IC_UPPER): + ret = Upper; + break; + case (SQL_IC_LOWER): + ret = Lower; + break; + case (SQL_IC_SENSITIVE): + ret = Sensitive; + break; + case (SQL_IC_MIXED): + default: + ret = Mixed; + break; } - isInitialized = true; } return ret; } diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 372ea13..94071c9 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -1150,12 +1150,13 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const case QVariant::Time: #ifndef QT_NO_DATESTRING if (field.value().toTime().isValid()) { - r = field.value().toTime().toString(Qt::ISODate); + r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate) + QLatin1Char('\''); } else #endif { r = QLatin1String("NULL"); } + break; case QVariant::String: { // Escape '\' characters diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index f45a1d3..81afbf9 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -64,6 +64,17 @@ Q_DECLARE_METATYPE(sqlite3_stmt*) QT_BEGIN_NAMESPACE +static QString _q_escapeIdentifier(const QString &identifier) +{ + QString res = identifier; + if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) { + res.replace(QLatin1Char('"'), QLatin1String("\"\"")); + res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); + res.replace(QLatin1Char('.'), QLatin1String("\".\"")); + } + return res; +} + static QVariant::Type qGetColumnType(const QString &tpName) { const QString typeName = tpName.toLower(); @@ -629,7 +640,7 @@ static QSqlIndex qGetTableInfo(QSqlQuery &q, const QString &tableName, bool only schema = tableName.left(indexOfSeparator).append(QLatin1Char('.')); table = tableName.mid(indexOfSeparator + 1); } - q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info ('") + table + QLatin1String("')")); + q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info (") + _q_escapeIdentifier(table) + QLatin1String(")")); QSqlIndex ind; while (q.next()) { @@ -684,13 +695,7 @@ QVariant QSQLiteDriver::handle() const QString QSQLiteDriver::escapeIdentifier(const QString &identifier, IdentifierType type) const { - QString res = identifier; - if(!identifier.isEmpty() && !isIdentifierEscaped(identifier, type) ) { - res.replace(QLatin1Char('"'), QLatin1String("\"\"")); - res.prepend(QLatin1Char('"')).append(QLatin1Char('"')); - res.replace(QLatin1Char('.'), QLatin1String("\".\"")); - } - return res; + return _q_escapeIdentifier(identifier); } QT_END_NAMESPACE diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp index 40cf06b..6f30b90 100644 --- a/src/svg/qsvggraphics.cpp +++ b/src/svg/qsvggraphics.cpp @@ -56,20 +56,21 @@ QT_BEGIN_NAMESPACE -#define QT_SVG_DRAW_SHAPE(command) \ - applyStyle(p, states); \ - qreal oldOpacity = p->opacity(); \ - QBrush oldBrush = p->brush(); \ - QPen oldPen = p->pen(); \ - p->setPen(Qt::NoPen); \ - p->setOpacity(oldOpacity * states.fillOpacity); \ - command; \ - p->setOpacity(oldOpacity); \ - p->setPen(oldPen); \ - p->setBrush(Qt::NoBrush); \ - command; \ - p->setBrush(oldBrush); \ - revertStyle(p, states); +#define QT_SVG_DRAW_SHAPE(command) \ + qreal oldOpacity = p->opacity(); \ + QBrush oldBrush = p->brush(); \ + QPen oldPen = p->pen(); \ + p->setPen(Qt::NoPen); \ + p->setOpacity(oldOpacity * states.fillOpacity); \ + command; \ + p->setPen(oldPen); \ + if (oldPen.widthF() != 0) { \ + p->setOpacity(oldOpacity * states.strokeOpacity); \ + p->setBrush(Qt::NoBrush); \ + command; \ + p->setBrush(oldBrush); \ + } \ + p->setOpacity(oldOpacity); void QSvgAnimation::draw(QPainter *, QSvgExtraStates &) @@ -105,7 +106,9 @@ QRectF QSvgCircle::bounds() const void QSvgCircle::draw(QPainter *p, QSvgExtraStates &states) { + applyStyle(p, states); QT_SVG_DRAW_SHAPE(p->drawEllipse(m_bounds)); + revertStyle(p, states); } QSvgArc::QSvgArc(QSvgNode *parent, const QPainterPath &path) @@ -117,7 +120,12 @@ QSvgArc::QSvgArc(QSvgNode *parent, const QPainterPath &path) void QSvgArc::draw(QPainter *p, QSvgExtraStates &states) { applyStyle(p, states); - p->drawPath(cubic); + if (p->pen().widthF() != 0) { + qreal oldOpacity = p->opacity(); + p->setOpacity(oldOpacity * states.strokeOpacity); + p->drawPath(cubic); + p->setOpacity(oldOpacity); + } revertStyle(p, states); } @@ -140,7 +148,9 @@ QRectF QSvgEllipse::bounds() const void QSvgEllipse::draw(QPainter *p, QSvgExtraStates &states) { + applyStyle(p, states); QT_SVG_DRAW_SHAPE(p->drawEllipse(m_bounds)); + revertStyle(p, states); } QSvgImage::QSvgImage(QSvgNode *parent, const QImage &image, @@ -171,7 +181,12 @@ QSvgLine::QSvgLine(QSvgNode *parent, const QLineF &line) void QSvgLine::draw(QPainter *p, QSvgExtraStates &states) { applyStyle(p, states); - p->drawLine(m_bounds); + if (p->pen().widthF() != 0) { + qreal oldOpacity = p->opacity(); + p->setOpacity(oldOpacity * states.strokeOpacity); + p->drawLine(m_bounds); + p->setOpacity(oldOpacity); + } revertStyle(p, states); } @@ -184,7 +199,10 @@ QSvgPath::QSvgPath(QSvgNode *parent, const QPainterPath &qpath) void QSvgPath::draw(QPainter *p, QSvgExtraStates &states) { + applyStyle(p, states); + m_path.setFillRule(states.fillRule); QT_SVG_DRAW_SHAPE(p->drawPath(m_path)); + revertStyle(p, states); } QRectF QSvgPath::bounds() const @@ -198,7 +216,7 @@ QRectF QSvgPath::bounds() const } QSvgPolygon::QSvgPolygon(QSvgNode *parent, const QPolygonF &poly) - : QSvgNode(parent), m_poly(poly), m_fillRule(Qt::WindingFill) + : QSvgNode(parent), m_poly(poly) { } @@ -216,7 +234,9 @@ QRectF QSvgPolygon::bounds() const void QSvgPolygon::draw(QPainter *p, QSvgExtraStates &states) { - QT_SVG_DRAW_SHAPE(p->drawPolygon(m_poly, m_fillRule)); + applyStyle(p, states); + QT_SVG_DRAW_SHAPE(p->drawPolygon(m_poly, states.fillRule)); + revertStyle(p, states); } @@ -229,13 +249,19 @@ QSvgPolyline::QSvgPolyline(QSvgNode *parent, const QPolygonF &poly) void QSvgPolyline::draw(QPainter *p, QSvgExtraStates &states) { applyStyle(p, states); + qreal oldOpacity = p->opacity(); if (p->brush().style() != Qt::NoBrush) { QPen save = p->pen(); p->setPen(QPen(Qt::NoPen)); - p->drawPolygon(m_poly); + p->setOpacity(oldOpacity * states.fillOpacity); + p->drawPolygon(m_poly, states.fillRule); p->setPen(save); } - p->drawPolyline(m_poly); + if (p->pen().widthF() != 0) { + p->setOpacity(oldOpacity * states.strokeOpacity); + p->drawPolyline(m_poly); + } + p->setOpacity(oldOpacity); revertStyle(p, states); } @@ -259,11 +285,13 @@ QRectF QSvgRect::bounds() const void QSvgRect::draw(QPainter *p, QSvgExtraStates &states) { + applyStyle(p, states); if (m_rx || m_ry) { QT_SVG_DRAW_SHAPE(p->drawRoundedRect(m_rect, m_rx, m_ry, Qt::RelativeSize)); } else { QT_SVG_DRAW_SHAPE(p->drawRect(m_rect)); } + revertStyle(p, states); } QSvgTspan * const QSvgText::LINEBREAK = 0; @@ -296,6 +324,8 @@ void QSvgText::setTextArea(const QSizeF &size) void QSvgText::draw(QPainter *p, QSvgExtraStates &states) { applyStyle(p, states); + qreal oldOpacity = p->opacity(); + p->setOpacity(oldOpacity * states.fillOpacity); // Force the font to have a size of 100 pixels to avoid truncation problems // when the font is very small. @@ -456,6 +486,7 @@ void QSvgText::draw(QPainter *p, QSvgExtraStates &states) } p->setWorldTransform(oldTransform, false); + p->setOpacity(oldOpacity); revertStyle(p, states); } diff --git a/src/svg/qsvggraphics_p.h b/src/svg/qsvggraphics_p.h index 20310e3..02c312b 100644 --- a/src/svg/qsvggraphics_p.h +++ b/src/svg/qsvggraphics_p.h @@ -155,13 +155,8 @@ public: virtual void draw(QPainter *p, QSvgExtraStates &states); virtual Type type() const; virtual QRectF bounds() const; - void setFillRule(Qt::FillRule f) - { - m_fillRule = f; - } private: QPolygonF m_poly; - Qt::FillRule m_fillRule; }; class QSvgPolyline : public QSvgNode diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index adfe468..5b778d2 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -493,8 +493,7 @@ static bool resolveColor(const QString &colorStr, QColor &color, QSvgHandler *ha int(compo[1]), int(compo[2])); return true; - } else if (colorStr == QLatin1String("inherited") || - colorStr == QT_INHERIT) { + } else if (colorStr == QT_INHERIT) { return false; } else if (colorStr == QLatin1String("currentColor")) { color = handler->currentColor(); @@ -649,7 +648,7 @@ static void parseBrush(QSvgNode *node, QString myId = someId(attributes); if (!value.isEmpty() || !fillRule.isEmpty() || !opacity.isEmpty()) { - QSvgFillStyle *prop = new QSvgFillStyle(0); + QSvgFillStyle *prop = new QSvgFillStyle; //fill-rule attribute handling if (!fillRule.isEmpty() && fillRule != QT_INHERIT) { @@ -670,7 +669,8 @@ static void parseBrush(QSvgNode *node, value = value.remove(0, 3); QSvgStyleProperty *style = styleFromUrl(node, value); if (style) { - prop->setFillStyle(style); + if (style->type() == QSvgStyleProperty::SOLID_COLOR || style->type() == QSvgStyleProperty::GRADIENT) + prop->setFillStyle(reinterpret_cast<QSvgFillStyleProperty *>(style)); } else { QString id = idFromUrl(value); prop->setGradientId(id); @@ -834,154 +834,95 @@ static void parsePen(QSvgNode *node, //qDebug()<<"Node "<<node->type()<<", attrs are "<<value<<width; - if (!value.isEmpty() || !width.isEmpty() || !dashArray.isEmpty() || !linecap.isEmpty() || - !linejoin.isEmpty() || !miterlimit.isEmpty() || !opacity.isEmpty() || - !dashOffset.isEmpty() || !vectorEffect.isEmpty()) { + if (!value.isEmpty() || !dashArray.isEmpty() || !dashOffset.isEmpty() || !linecap.isEmpty() + || !linejoin.isEmpty() || !miterlimit.isEmpty() || !opacity.isEmpty() || !width.isEmpty() + || !vectorEffect.isEmpty()) { - QSvgStrokeStyle *inherited = - static_cast<QSvgStrokeStyle*>(node->parent()->styleProperty( - QSvgStyleProperty::STROKE)); - - QPen pen(handler->defaultPen()); - bool stroke = false; - if (inherited) { - pen = inherited->qpen(); - stroke = inherited->strokePresent(); - } - - // stroke-opacity attribute handling - qreal strokeAlpha; - if (!opacity.isEmpty() && opacity != QT_INHERIT) { - strokeAlpha = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity))); - } else { - strokeAlpha = pen.color().alphaF(); - } + QSvgStrokeStyle *prop = new QSvgStrokeStyle; //stroke attribute handling - if (!value.isEmpty() && value != QT_INHERIT) { + if ((!value.isEmpty()) && (value != QT_INHERIT) ) { if (value.startsWith(QLatin1String("url"))) { value = value.remove(0, 3); QSvgStyleProperty *style = styleFromUrl(node, value); if (style) { - if (style->type() == QSvgStyleProperty::GRADIENT) { - QBrush b(*((QSvgGradientStyle*)style)->qgradient()); - pen.setBrush(b); - } else if (style->type() == QSvgStyleProperty::SOLID_COLOR) { - pen.setColor( - ((QSvgSolidColorStyle*)style)->qcolor()); - } - stroke = true; + if (style->type() == QSvgStyleProperty::SOLID_COLOR || style->type() == QSvgStyleProperty::GRADIENT) + prop->setStyle(reinterpret_cast<QSvgFillStyleProperty *>(style)); } else { - qWarning() << "QSvgHandler::parsePen could not resolve property" << idFromUrl(value); + QString id = idFromUrl(value); + prop->setGradientId(id); + prop->setGradientResolved(false); } - } else if (value == QLatin1String("none")) { - QColor color; //### fixme: dafalut value for color. - color.setAlphaF(strokeAlpha); - pen.setColor(color); - stroke = false; // This is required because, parent may have a valid stroke but the child may have stroke = "none" - } else { + } else if (value != QLatin1String("none")) { QColor color; - if (resolveColor(value, color, handler)) { - color.setAlphaF(strokeAlpha); - pen.setColor(color); - } - stroke = true; + if (resolveColor(value, color, handler)) + prop->setStroke(QBrush(color)); + } else { + prop->setStroke(QBrush(Qt::NoBrush)); } - } else { - QColor color = pen.color(); - color.setAlphaF(strokeAlpha); - pen.setColor(color); } //stroke-width handling + qreal w = 0; if (!width.isEmpty() && width != QT_INHERIT) { - qreal widthF; QSvgHandler::LengthType lt; - widthF = parseLength(width, lt, handler); - pen.setWidthF(widthF); + prop->setWidth(w = parseLength(width, lt, handler)); + } + + //stroke-dasharray + if (!dashArray.isEmpty() && dashArray != QT_INHERIT) { + if (dashArray == QLatin1String("none")) { + prop->setDashArrayNone(); + } else { + const QChar *s = dashArray.constData(); + QVector<qreal> dashes = parseNumbersList(s); + // if the dash count is odd the dashes should be duplicated + if ((dashes.size() & 1) != 0) + dashes << QVector<qreal>(dashes); + prop->setDashArray(dashes); + } } //stroke-linejoin attribute handling if (!linejoin.isEmpty()) { if (linejoin == QLatin1String("miter")) - pen.setJoinStyle(Qt::SvgMiterJoin); + prop->setLineJoin(Qt::SvgMiterJoin); else if (linejoin == QLatin1String("round")) - pen.setJoinStyle(Qt::RoundJoin); + prop->setLineJoin(Qt::RoundJoin); else if (linejoin == QLatin1String("bevel")) - pen.setJoinStyle(Qt::BevelJoin); + prop->setLineJoin(Qt::BevelJoin); } //stroke-linecap attribute handling if (!linecap.isEmpty()) { if (linecap == QLatin1String("butt")) - pen.setCapStyle(Qt::FlatCap); + prop->setLineCap(Qt::FlatCap); else if (linecap == QLatin1String("round")) - pen.setCapStyle(Qt::RoundCap); + prop->setLineCap(Qt::RoundCap); else if (linecap == QLatin1String("square")) - pen.setCapStyle(Qt::SquareCap); + prop->setLineCap(Qt::SquareCap); } - //strok-dasharray attribute handling - qreal penw = pen.widthF(); - if (!dashArray.isEmpty() && dashArray != QT_INHERIT) { - const QChar *s = dashArray.constData(); - QVector<qreal> dashes = parseNumbersList(s); - qreal *d = dashes.data(); - if (penw != 0) - for (int i = 0; i < dashes.size(); ++i) { - *d /= penw; - ++d; - } - // if the dash count is odd the dashes should be duplicated - if (dashes.size() % 2 != 0) - dashes << QVector<qreal>(dashes); - pen.setDashPattern(dashes); - } else if (inherited) { - QVector<qreal> dashes(inherited->qpen().dashPattern()); - qreal *d = dashes.data(); - if (!penw) - penw = 1.0; - qreal inheritpenw = inherited->qpen().widthF(); - if (!inheritpenw) - inheritpenw = 1.0; - for ( int i = 0; i < dashes.size(); ++i) { - *d *= (inheritpenw/ penw); - ++d; - } - pen.setDashPattern(dashes); - } - - //stroke-dashoffset attribute handling - if (!dashOffset.isEmpty() && dashOffset != QT_INHERIT) { - qreal doffset = toDouble(dashOffset); - if (penw != 0) - doffset /= penw; - pen.setDashOffset(doffset); - } else if (inherited) { - qreal doffset = pen.dashOffset(); - if (!penw) - penw = 1.0; - qreal inheritpenw = inherited->qpen().widthF(); - if (!inheritpenw) - inheritpenw = 1.0; - doffset *= (inheritpenw/ penw); - pen.setDashOffset(doffset); - } + if (!dashOffset.isEmpty() && dashOffset != QT_INHERIT) + prop->setDashOffset(toDouble(dashOffset)); //vector-effect attribute handling if (!vectorEffect.isEmpty()) { if (vectorEffect == QLatin1String("non-scaling-stroke")) - pen.setCosmetic(true); + prop->setVectorEffect(true); else if (vectorEffect == QLatin1String("none")) - pen.setCosmetic(false); + prop->setVectorEffect(false); } + //stroke-miterlimit if (!miterlimit.isEmpty() && miterlimit != QT_INHERIT) - pen.setMiterLimit(toDouble(miterlimit)); + prop->setMiterLimit(toDouble(miterlimit)); + + //stroke-opacity atttribute handling + if (!opacity.isEmpty() && opacity != QT_INHERIT) + prop->setOpacity(qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)))); - QSvgStrokeStyle *prop = new QSvgStrokeStyle(pen); - prop->setStroke(stroke); node->appendStyleProperty(prop, myId); } } @@ -2770,7 +2711,7 @@ static bool parseStopNode(QSvgStyleProperty *parent, colorStr = QLatin1String("#000000"); } - bool colorOK = constructColor(colorStr, opacityStr, color, handler); + constructColor(colorStr, opacityStr, color, handler); QGradient *grad = style->qgradient(); @@ -2794,8 +2735,6 @@ static bool parseStopNode(QSvgStyleProperty *parent, grad->setColorAt(offset, color); style->setGradientStopsSet(true); - if (!colorOK) - style->addResolve(offset); return true; } @@ -2849,19 +2788,16 @@ static QSvgNode *createSvgNode(QSvgNode *parent, node->setHeight(int(height), type == QSvgHandler::LT_PERCENT); } + QStringList viewBoxValues; if (!viewBoxStr.isEmpty()) { - QStringList lst = viewBoxStr.split(QLatin1Char(' '), QString::SkipEmptyParts); - if (lst.count() != 4) - lst = viewBoxStr.split(QLatin1Char(','), QString::SkipEmptyParts); - int count = lst.count(); - while (count < 4) { - lst.append(QLatin1String("")); - count++; - } - QString xStr = lst.at(0).trimmed(); - QString yStr = lst.at(1).trimmed(); - QString widthStr = lst.at(2).trimmed(); - QString heightStr = lst.at(3).trimmed(); + viewBoxStr = viewBoxStr.replace(QLatin1Char(' '), QLatin1Char(',')); + viewBoxValues = viewBoxStr.split(QLatin1Char(','), QString::SkipEmptyParts); + } + if (viewBoxValues.count() == 4) { + QString xStr = viewBoxValues.at(0).trimmed(); + QString yStr = viewBoxValues.at(1).trimmed(); + QString widthStr = viewBoxValues.at(2).trimmed(); + QString heightStr = viewBoxValues.at(3).trimmed(); QSvgHandler::LengthType lt; qreal x = parseLength(xStr, lt, handler); @@ -3363,7 +3299,7 @@ bool QSvgHandler::startElement(const QString &localName, m_style = prop; m_nodes.top()->appendStyleProperty(prop, someId(attributes), true); } else { - qWarning("Couldn't parse node: %s", qPrintable(localName)); + qWarning("Could not parse node: %s", qPrintable(localName)); } } else if (StyleParseMethod method = findStyleUtilFactoryMethod(localName)) { if (m_style) { @@ -3422,15 +3358,28 @@ bool QSvgHandler::endElement(const QStringRef &localName) QList<QSvgNode*>::iterator itr = ren.begin(); while (itr != ren.end()) { QSvgNode *eleNode = *itr++; - QSvgFillStyle *prop = static_cast<QSvgFillStyle*>(eleNode->styleProperty(QSvgStyleProperty::FILL)); - if (prop && !(prop->isGradientResolved())) { - QString id = prop->getGradientId(); + QSvgFillStyle *fill = static_cast<QSvgFillStyle*>(eleNode->styleProperty(QSvgStyleProperty::FILL)); + if (fill && !(fill->isGradientResolved())) { + QString id = fill->gradientId(); + QSvgStyleProperty *style = structureNode->scopeStyle(id); + if (style) { + if (style->type() == QSvgStyleProperty::SOLID_COLOR || style->type() == QSvgStyleProperty::GRADIENT) + fill->setFillStyle(reinterpret_cast<QSvgFillStyleProperty *>(style)); + } else { + qWarning("Could not resolve property : %s",qPrintable(id)); + fill->setBrush(QBrush(Qt::NoBrush)); + } + } + QSvgStrokeStyle *stroke = static_cast<QSvgStrokeStyle*>(eleNode->styleProperty(QSvgStyleProperty::STROKE)); + if (stroke && !(stroke->isGradientResolved())) { + QString id = stroke->gradientId(); QSvgStyleProperty *style = structureNode->scopeStyle(id); if (style) { - prop->setFillStyle(style); + if (style->type() == QSvgStyleProperty::SOLID_COLOR || style->type() == QSvgStyleProperty::GRADIENT) + stroke->setStyle(reinterpret_cast<QSvgFillStyleProperty *>(style)); } else { - qWarning("Couldn't resolve property : %s",qPrintable(id)); - prop->setBrush(QBrush(Qt::NoBrush)); + qWarning("Could not resolve property : %s",qPrintable(id)); + stroke->setStroke(QBrush(Qt::NoBrush)); } } } diff --git a/src/svg/qsvgnode.cpp b/src/svg/qsvgnode.cpp index 33907fd..de5a568 100644 --- a/src/svg/qsvgnode.cpp +++ b/src/svg/qsvgnode.cpp @@ -320,9 +320,11 @@ qreal QSvgNode::strokeWidth() const { QSvgStrokeStyle *stroke = static_cast<QSvgStrokeStyle*>( styleProperty(QSvgStyleProperty::STROKE)); - if (!stroke || !stroke->strokePresent()) + if (!stroke) return 0; - return stroke->qpen().widthF(); + if (stroke->stroke().brush().style() == Qt::NoBrush) + return 0; + return stroke->width(); } QT_END_NAMESPACE diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index e1a7049..13a0d30 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -59,9 +59,13 @@ QT_BEGIN_NAMESPACE QSvgExtraStates::QSvgExtraStates() : fillOpacity(1.0) + , strokeOpacity(1.0) , svgFont(0) , textAnchor(Qt::AlignLeft) , fontWeight(400) + , fillRule(Qt::WindingFill) + , strokeDashOffset(0) + , vectorEffect(false) { } @@ -69,6 +73,17 @@ QSvgStyleProperty::~QSvgStyleProperty() { } +void QSvgFillStyleProperty::apply(QPainter *, const QRectF &, QSvgNode *, QSvgExtraStates &) +{ + Q_ASSERT(!"This should not be called!"); +} + +void QSvgFillStyleProperty::revert(QPainter *, QSvgExtraStates &) +{ + Q_ASSERT(!"This should not be called!"); +} + + QSvgQualityStyle::QSvgQualityStyle(int color) : m_colorRendering(color) { @@ -83,83 +98,55 @@ void QSvgQualityStyle::revert(QPainter *, QSvgExtraStates &) } -QSvgFillStyle::QSvgFillStyle(const QBrush &brush) - : m_fill(brush) - , m_style(0) - , m_fillRuleSet(false) +QSvgFillStyle::QSvgFillStyle() + : m_style(0) , m_fillRule(Qt::WindingFill) - , m_fillOpacitySet(false) + , m_oldFillRule(Qt::WindingFill) , m_fillOpacity(1.0) - , m_oldOpacity(0) - , m_gradientResolved(true) - , m_fillSet(true) -{ -} - -QSvgFillStyle::QSvgFillStyle(QSvgStyleProperty *style) - : m_style(style) - , m_fillRuleSet(false) - , m_fillRule(Qt::WindingFill) - , m_fillOpacitySet(false) - , m_fillOpacity(1.0) - , m_oldOpacity(0) - , m_gradientResolved(true) - , m_fillSet(style != 0) + , m_oldFillOpacity(0) + , m_gradientResolved(1) + , m_fillRuleSet(0) + , m_fillOpacitySet(0) + , m_fillSet(0) { } void QSvgFillStyle::setFillRule(Qt::FillRule f) { - m_fillRuleSet = true; + m_fillRuleSet = 1; m_fillRule = f; } void QSvgFillStyle::setFillOpacity(qreal opacity) { - m_fillOpacitySet = true; + m_fillOpacitySet = 1; m_fillOpacity = opacity; } -void QSvgFillStyle::setFillStyle(QSvgStyleProperty* style) +void QSvgFillStyle::setFillStyle(QSvgFillStyleProperty* style) { m_style = style; - m_fillSet = true; + m_fillSet = 1; } void QSvgFillStyle::setBrush(QBrush brush) { m_fill = brush; m_style = 0; - m_fillSet = true; + m_fillSet = 1; } -static void recursivelySetFill(QSvgNode *node, Qt::FillRule f) -{ - if (node->type() == QSvgNode::PATH) { - QSvgPath *path = static_cast<QSvgPath*>(node); - path->qpath()->setFillRule(f); - } else if (node->type() == QSvgNode::POLYGON) { - QSvgPolygon *polygon = static_cast<QSvgPolygon*>(node); - polygon->setFillRule(f); - } else if (node->type() == QSvgNode::G) { - QList<QSvgNode*> renderers = static_cast<QSvgG*>(node)->renderers(); - foreach(QSvgNode *n, renderers) { - recursivelySetFill(n, f); - } - } -} -void QSvgFillStyle::apply(QPainter *p, const QRectF &rect, QSvgNode *node, QSvgExtraStates &states) +void QSvgFillStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &states) { m_oldFill = p->brush(); - m_oldOpacity = states.fillOpacity; + m_oldFillRule = states.fillRule; + m_oldFillOpacity = states.fillOpacity; - if (m_fillRuleSet) { - recursivelySetFill(node, m_fillRule); - m_fillRuleSet = false;//set it only on the first run - } + if (m_fillRuleSet) + states.fillRule = m_fillRule; if (m_fillSet) { if (m_style) - m_style->apply(p, rect, node, states); + p->setBrush(m_style->brush(p, states)); else p->setBrush(m_fill); } @@ -170,13 +157,11 @@ void QSvgFillStyle::apply(QPainter *p, const QRectF &rect, QSvgNode *node, QSvgE void QSvgFillStyle::revert(QPainter *p, QSvgExtraStates &states) { if (m_fillOpacitySet) - states.fillOpacity = m_oldOpacity; - if (m_fillSet) { - if (m_style) - m_style->revert(p, states); - else - p->setBrush(m_oldFill); - } + states.fillOpacity = m_oldFillOpacity; + if (m_fillSet) + p->setBrush(m_oldFill); + if (m_fillRuleSet) + states.fillRule = m_oldFillRule; } QSvgViewportFillStyle::QSvgViewportFillStyle(const QBrush &brush) @@ -286,47 +271,137 @@ void QSvgFontStyle::revert(QPainter *p, QSvgExtraStates &states) states.fontWeight = m_oldWeight; } -QSvgStrokeStyle::QSvgStrokeStyle(const QPen &pen) - : m_stroke(pen), m_strokePresent(true) +QSvgStrokeStyle::QSvgStrokeStyle() + : m_strokeOpacity(1.0) + , m_oldStrokeOpacity(0.0) + , m_strokeDashOffset(0) + , m_oldStrokeDashOffset(0) + , m_style(0) + , m_gradientResolved(1) + , m_vectorEffect(0) + , m_oldVectorEffect(0) + , m_strokeSet(0) + , m_strokeDashArraySet(0) + , m_strokeDashOffsetSet(0) + , m_strokeLineCapSet(0) + , m_strokeLineJoinSet(0) + , m_strokeMiterLimitSet(0) + , m_strokeOpacitySet(0) + , m_strokeWidthSet(0) + , m_vectorEffectSet(0) { } -void QSvgStrokeStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &) +void QSvgStrokeStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &states) { m_oldStroke = p->pen(); - if (!m_strokePresent || !m_stroke.widthF() || !m_stroke.color().alphaF()) { - p->setPen(Qt::NoPen); - } else { - p->setPen(m_stroke); + m_oldStrokeOpacity = states.strokeOpacity; + m_oldStrokeDashOffset = states.strokeDashOffset; + m_oldVectorEffect = states.vectorEffect; + + QPen pen = p->pen(); + + qreal oldWidth = pen.widthF(); + qreal width = m_stroke.widthF(); + if (oldWidth == 0) + oldWidth = 1; + if (width == 0) + width = 1; + qreal scale = oldWidth / width; + + if (m_strokeOpacitySet) + states.strokeOpacity = m_strokeOpacity; + + if (m_vectorEffectSet) + states.vectorEffect = m_vectorEffect; + + if (m_strokeSet) { + if (m_style) + pen.setBrush(m_style->brush(p, states)); + else + pen.setBrush(m_stroke.brush()); } -} -void QSvgStrokeStyle::revert(QPainter *p, QSvgExtraStates &) -{ - p->setPen(m_oldStroke); + if (m_strokeWidthSet) + pen.setWidthF(m_stroke.widthF()); + + bool setDashOffsetNeeded = false; + + if (m_strokeDashOffsetSet) { + states.strokeDashOffset = m_strokeDashOffset; + setDashOffsetNeeded = true; + } + + if (m_strokeDashArraySet) { + if (m_stroke.style() == Qt::SolidLine) { + pen.setStyle(Qt::SolidLine); + } else if (m_strokeWidthSet || oldWidth == 1) { + // If both width and dash array was set, the dash array is already scaled correctly. + pen.setDashPattern(m_stroke.dashPattern()); + setDashOffsetNeeded = true; + } else { + // If dash array was set, but not the width, the dash array has to be scaled with respect to the old width. + QVector<qreal> dashes = m_stroke.dashPattern(); + for (int i = 0; i < dashes.size(); ++i) + dashes[i] /= oldWidth; + pen.setDashPattern(dashes); + setDashOffsetNeeded = true; + } + } else if (m_strokeWidthSet && pen.style() != Qt::SolidLine && scale != 1) { + // If the width was set, but not the dash array, the old dash array must be scaled with respect to the new width. + QVector<qreal> dashes = pen.dashPattern(); + for (int i = 0; i < dashes.size(); ++i) + dashes[i] *= scale; + pen.setDashPattern(dashes); + setDashOffsetNeeded = true; + } + + if (m_strokeLineCapSet) + pen.setCapStyle(m_stroke.capStyle()); + if (m_strokeLineJoinSet) + pen.setJoinStyle(m_stroke.joinStyle()); + if (m_strokeMiterLimitSet) + pen.setMiterLimit(m_stroke.miterLimit()); + + if (setDashOffsetNeeded) { + qreal currentWidth = pen.widthF(); + if (currentWidth == 0) + currentWidth = 1; + pen.setDashOffset(states.strokeDashOffset / currentWidth); + } + + pen.setCosmetic(states.vectorEffect); + + p->setPen(pen); } -QSvgSolidColorStyle::QSvgSolidColorStyle(const QColor &color) - : m_solidColor(color) +void QSvgStrokeStyle::revert(QPainter *p, QSvgExtraStates &states) { + p->setPen(m_oldStroke); + states.strokeOpacity = m_oldStrokeOpacity; + states.strokeDashOffset = m_oldStrokeDashOffset; + states.vectorEffect = m_oldVectorEffect; } -void QSvgSolidColorStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &) +void QSvgStrokeStyle::setDashArray(const QVector<qreal> &dashes) { - m_oldFill = p->brush(); - m_oldStroke = p->pen(); - QBrush b = m_oldFill; - b.setColor(m_solidColor); - p->setBrush(b); - QPen pen = m_oldStroke; - pen.setColor(m_solidColor); - p->setPen(pen); + if (m_strokeWidthSet) { + QVector<qreal> d = dashes; + qreal w = m_stroke.widthF(); + if (w != 0 && w != 1) { + for (int i = 0; i < d.size(); ++i) + d[i] /= w; + } + m_stroke.setDashPattern(d); + } else { + m_stroke.setDashPattern(dashes); + } + m_strokeDashArraySet = 1; } -void QSvgSolidColorStyle::revert(QPainter *p, QSvgExtraStates &) +QSvgSolidColorStyle::QSvgSolidColorStyle(const QColor &color) + : m_solidColor(color) { - p->setBrush(m_oldFill); - p->setPen(m_oldStroke); } QSvgGradientStyle::QSvgGradientStyle(QGradient *grad) @@ -334,44 +409,24 @@ QSvgGradientStyle::QSvgGradientStyle(QGradient *grad) { } -void QSvgGradientStyle::apply(QPainter *p, const QRectF &/*rect*/, QSvgNode *, QSvgExtraStates &) +QBrush QSvgGradientStyle::brush(QPainter *, QSvgExtraStates &) { if (!m_link.isEmpty()) { resolveStops(); } - m_oldFill = p->brush(); - - //resolving stop colors - if (!m_resolvePoints.isEmpty()) { - QColor color = p->brush().color(); - if (!color.isValid()) - color = p->pen().color(); - QList<qreal>::const_iterator itr = m_resolvePoints.constBegin(); - for (; itr != m_resolvePoints.constEnd(); ++itr) { - //qDebug()<<"resolving "<<(*itr)<<" to "<<color; - m_gradient->setColorAt(*itr, color); - } - } - // If the gradient is marked as empty, insert transparent black if (!m_gradientStopsSet) { m_gradient->setStops(QGradientStops() << QGradientStop(0.0, QColor(0, 0, 0, 0))); m_gradientStopsSet = true; } - QBrush brush; - brush = QBrush(*m_gradient); + QBrush b(*m_gradient); if (!m_matrix.isIdentity()) - brush.setMatrix(m_matrix); - - p->setBrush(brush); -} + b.setMatrix(m_matrix); -void QSvgGradientStyle::revert(QPainter *p, QSvgExtraStates &) -{ - p->setBrush(m_oldFill); + return b; } @@ -380,11 +435,6 @@ void QSvgGradientStyle::setMatrix(const QMatrix &mat) m_matrix = mat; } -void QSvgGradientStyle::addResolve(qreal offset) -{ - m_resolvePoints.append(offset); -} - QSvgTransformStyle::QSvgTransformStyle(const QTransform &trans) : m_transform(trans) { @@ -490,14 +540,6 @@ void QSvgStyle::apply(QPainter *p, const QRectF &rect, QSvgNode *node, QSvgExtra stroke->apply(p, rect, node, states); } - if (solidColor) { - solidColor->apply(p, rect, node, states); - } - - if (gradient) { - gradient->apply(p, rect, node, states); - } - if (transform) { transform->apply(p, rect, node, states); } @@ -562,14 +604,6 @@ void QSvgStyle::revert(QPainter *p, QSvgExtraStates &states) stroke->revert(p, states); } - if (solidColor) { - solidColor->revert(p, states); - } - - if (gradient) { - gradient->revert(p, states); - } - //animated transforms need to be reverted _before_ //the native transforms if (!animateTransforms.isEmpty()) { @@ -604,7 +638,7 @@ void QSvgStyle::revert(QPainter *p, QSvgExtraStates &states) QSvgAnimateTransform::QSvgAnimateTransform(int startMs, int endMs, int byMs ) : QSvgStyleProperty(), m_from(startMs), m_to(endMs), m_by(byMs), - m_type(Empty), m_count(0), m_finished(false), m_additive(Replace), m_transformApplied(false) + m_type(Empty), m_additive(Replace), m_count(0), m_finished(false), m_transformApplied(false) { m_totalRunningTime = m_to - m_from; } @@ -815,7 +849,9 @@ void QSvgAnimateColor::apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgEx if (totalTimeElapsed < m_from || m_finished) return; - qreal animationFrame = (totalTimeElapsed - m_from) / m_to; + qreal animationFrame = 0; + if (m_totalRunningTime != 0) + animationFrame = (totalTimeElapsed - m_from) / m_totalRunningTime; if (m_repeatCount >= 0 && m_repeatCount < animationFrame) { m_finished = true; diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h index 056b73b..f358bc1 100644 --- a/src/svg/qsvgstyle_p.h +++ b/src/svg/qsvgstyle_p.h @@ -143,9 +143,13 @@ struct QSvgExtraStates QSvgExtraStates(); qreal fillOpacity; + qreal strokeOpacity; QSvgFont *svgFont; Qt::Alignment textAnchor; int fontWeight; + Qt::FillRule fillRule; + qreal strokeDashOffset; + bool vectorEffect; // true if pen is cosmetic }; class QSvgStyleProperty : public QSvgRefCounted @@ -173,6 +177,14 @@ public: virtual Type type() const=0; }; +class QSvgFillStyleProperty : public QSvgStyleProperty +{ +public: + virtual QBrush brush(QPainter *p, QSvgExtraStates &states) = 0; + virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states); + virtual void revert(QPainter *p, QSvgExtraStates &states); +}; + class QSvgQualityStyle : public QSvgStyleProperty { public: @@ -220,15 +232,14 @@ private: class QSvgFillStyle : public QSvgStyleProperty { public: - QSvgFillStyle(const QBrush &brush); - QSvgFillStyle(QSvgStyleProperty *style); + QSvgFillStyle(); virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states); virtual void revert(QPainter *p, QSvgExtraStates &states); virtual Type type() const; void setFillRule(Qt::FillRule f); void setFillOpacity(qreal opacity); - void setFillStyle(QSvgStyleProperty* style); + void setFillStyle(QSvgFillStyleProperty* style); void setBrush(QBrush brush); const QBrush & qbrush() const @@ -246,7 +257,7 @@ public: return m_fillRule; } - QSvgStyleProperty* style() const + QSvgFillStyleProperty* style() const { return m_style; } @@ -256,7 +267,7 @@ public: m_gradientId = Id; } - QString getGradientId() const + QString gradientId() const { return m_gradientId; } @@ -276,16 +287,19 @@ private: // fill-opacity v v 'inherit' | <OpacityValue.datatype> QBrush m_fill; QBrush m_oldFill; - QSvgStyleProperty *m_style; + QSvgFillStyleProperty *m_style; - bool m_fillRuleSet; Qt::FillRule m_fillRule; - bool m_fillOpacitySet; + Qt::FillRule m_oldFillRule; qreal m_fillOpacity; - qreal m_oldOpacity; + qreal m_oldFillOpacity; + QString m_gradientId; - bool m_gradientResolved; - bool m_fillSet; + uint m_gradientResolved : 1; + + uint m_fillRuleSet : 1; + uint m_fillOpacitySet : 1; + uint m_fillSet : 1; }; class QSvgViewportFillStyle : public QSvgStyleProperty @@ -384,36 +398,121 @@ private: Qt::Alignment m_oldTextAnchor; int m_oldWeight; - unsigned m_familySet : 1; - unsigned m_sizeSet : 1; - unsigned m_styleSet : 1; - unsigned m_variantSet : 1; - unsigned m_weightSet : 1; - unsigned m_textAnchorSet : 1; + uint m_familySet : 1; + uint m_sizeSet : 1; + uint m_styleSet : 1; + uint m_variantSet : 1; + uint m_weightSet : 1; + uint m_textAnchorSet : 1; }; class QSvgStrokeStyle : public QSvgStyleProperty { public: - QSvgStrokeStyle(const QPen &pen); + QSvgStrokeStyle(); virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states); virtual void revert(QPainter *p, QSvgExtraStates &states); virtual Type type() const; - void setStroke(bool stroke) + void setStroke(QBrush brush) + { + m_stroke.setBrush(brush); + m_style = 0; + m_strokeSet = 1; + } + + void setStyle(QSvgFillStyleProperty *style) + { + m_style = style; + m_strokeSet = 1; + } + + void setDashArray(const QVector<qreal> &dashes); + + void setDashArrayNone() + { + m_stroke.setStyle(Qt::SolidLine); + m_strokeDashArraySet = 1; + } + + void setDashOffset(qreal offset) + { + m_strokeDashOffset = offset; + m_strokeDashOffsetSet = 1; + } + + void setLineCap(Qt::PenCapStyle cap) + { + m_stroke.setCapStyle(cap); + m_strokeLineCapSet = 1; + } + + void setLineJoin(Qt::PenJoinStyle join) + { + m_stroke.setJoinStyle(join); + m_strokeLineJoinSet = 1; + } + + void setMiterLimit(qreal limit) + { + m_stroke.setMiterLimit(limit); + m_strokeMiterLimitSet = 1; + } + + void setOpacity(qreal opacity) + { + m_strokeOpacity = opacity; + m_strokeOpacitySet = 1; + } + + void setWidth(qreal width) + { + m_stroke.setWidthF(width); + m_strokeWidthSet = 1; + Q_ASSERT(!m_strokeDashArraySet); // set width before dash array. + } + + qreal width() + { + return m_stroke.widthF(); + } + + void setVectorEffect(bool nonScalingStroke) + { + m_vectorEffect = nonScalingStroke; + m_vectorEffectSet = 1; + } + + QSvgFillStyleProperty* style() const + { + return m_style; + } + + void setGradientId(const QString &Id) + { + m_gradientId = Id; + } + + QString gradientId() const { - m_strokePresent = stroke; + return m_gradientId; } - bool strokePresent() const + void setGradientResolved(bool resolved) { - return m_strokePresent; + m_gradientResolved = resolved; } - const QPen & qpen() const + bool isGradientResolved() const + { + return m_gradientResolved; + } + + QPen stroke() const { return m_stroke; } + private: // stroke v v 'inherit' | <Paint.datatype> // stroke-dasharray v v 'inherit' | <StrokeDashArrayValue.datatype> @@ -425,22 +524,44 @@ private: // stroke-width v v 'inherit' | <StrokeWidthValue.datatype> QPen m_stroke; QPen m_oldStroke; - bool m_strokePresent; -}; + qreal m_strokeOpacity; + qreal m_oldStrokeOpacity; + qreal m_strokeDashOffset; + qreal m_oldStrokeDashOffset; + QSvgFillStyleProperty *m_style; + QString m_gradientId; + uint m_gradientResolved : 1; + uint m_vectorEffect : 1; + uint m_oldVectorEffect : 1; + + uint m_strokeSet : 1; + uint m_strokeDashArraySet : 1; + uint m_strokeDashOffsetSet : 1; + uint m_strokeLineCapSet : 1; + uint m_strokeLineJoinSet : 1; + uint m_strokeMiterLimitSet : 1; + uint m_strokeOpacitySet : 1; + uint m_strokeWidthSet : 1; + uint m_vectorEffectSet : 1; +}; -class QSvgSolidColorStyle : public QSvgStyleProperty +class QSvgSolidColorStyle : public QSvgFillStyleProperty { public: QSvgSolidColorStyle(const QColor &color); - virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states); - virtual void revert(QPainter *p, QSvgExtraStates &states); virtual Type type() const; const QColor & qcolor() const { return m_solidColor; } + + QBrush brush(QPainter *, QSvgExtraStates &) + { + return m_solidColor; + } + private: // solid-color v x 'inherit' | <SVGColor.datatype> // solid-opacity v x 'inherit' | <OpacityValue.datatype> @@ -450,13 +571,11 @@ private: QPen m_oldStroke; }; -class QSvgGradientStyle : public QSvgStyleProperty +class QSvgGradientStyle : public QSvgFillStyleProperty { public: QSvgGradientStyle(QGradient *grad); ~QSvgGradientStyle() { delete m_gradient; } - virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states); - virtual void revert(QPainter *p, QSvgExtraStates &states); virtual Type type() const; void setStopLink(const QString &link, QSvgTinyDocument *doc); @@ -474,8 +593,6 @@ public: return m_gradient; } - void addResolve(qreal offset); - bool gradientStopsSet() const { return m_gradientStopsSet; @@ -485,12 +602,10 @@ public: { m_gradientStopsSet = set; } + + QBrush brush(QPainter *, QSvgExtraStates &); private: QGradient *m_gradient; - QList<qreal> m_resolvePoints; - - QBrush m_oldFill; - QMatrix m_matrix; QSvgTinyDocument *m_doc; diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp index 614494f..e6b0e8e 100644 --- a/src/svg/qsvgtinydocument.cpp +++ b/src/svg/qsvgtinydocument.cpp @@ -240,7 +240,9 @@ void QSvgTinyDocument::draw(QPainter *p, const QRectF &bounds) //sets default style on the painter //### not the most optimal way mapSourceToTarget(p, bounds); - p->setPen(Qt::NoPen); + QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); + pen.setMiterLimit(4); + p->setPen(pen); p->setBrush(Qt::black); p->setRenderHint(QPainter::Antialiasing); p->setRenderHint(QPainter::SmoothPixmapTransform); @@ -281,7 +283,9 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id, QTransform originalTransform = p->worldTransform(); //XXX set default style on the painter - p->setPen(Qt::NoPen); + QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); + pen.setMiterLimit(4); + p->setPen(pen); p->setBrush(Qt::black); p->setRenderHint(QPainter::Antialiasing); p->setRenderHint(QPainter::SmoothPixmapTransform); diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 9a09c19..e0667bb 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1659,10 +1659,8 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) IOPMAssertionRelease(powerID); } #endif -//# ifdef Q_OS_WIN - // rethrow exception to make debugging easier + // Rethrow exception to make debugging easier. throw; -//# endif return 1; } # endif diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 130b565..c9322e9 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -309,6 +309,7 @@ void QTestLog::stopLogging() void QTestLog::warn(const char *msg) { + QTEST_ASSERT(QTest::testLogger); QTEST_ASSERT(msg); QTest::testLogger->addMessage(QAbstractTestLogger::Warn, msg); @@ -316,9 +317,10 @@ void QTestLog::warn(const char *msg) void QTestLog::info(const char *msg, const char *file, int line) { + QTEST_ASSERT(QTest::testLogger); QTEST_ASSERT(msg); + QTEST_ASSERT(file); - if (QTest::testLogger) QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line); } diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index 4c99eaa..a1f44ca 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -216,20 +216,6 @@ int runMoc(int _argc, char **_argv) } } - // report Qt usage for commercial customers with a "metered license" (currently experimental) -#if QT_EDITION != QT_EDITION_OPENSOURCE -#ifdef QT_CONFIGURE_BINARIES_PATH - const char *binariesPath = QT_CONFIGURE_BINARIES_PATH; - QString reporterPath = QString::fromLocal8Bit(binariesPath) + QDir::separator() - + QLatin1String("qtusagereporter"); -#if defined(Q_OS_WIN) - reporterPath += QLatin1String(".exe"); -#endif - if (QFile::exists(reporterPath)) - system(qPrintable(reporterPath + QLatin1String(" moc"))); -#endif -#endif - argc = argv.count(); for (int n = 0; n < argc; ++n) { diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index c03e874..0f3193d 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -58,7 +58,7 @@ struct Type enum ReferenceType { NoReference, Reference, Pointer }; inline Type() : isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {} - inline explicit Type(const QByteArray &_name) : name(_name), isVolatile(false), firstToken(NOTOKEN), referenceType(NoReference) {} + inline explicit Type(const QByteArray &_name) : name(_name), isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {} QByteArray name; uint isVolatile : 1; uint isScoped : 1; @@ -139,7 +139,7 @@ struct ClassInfoDef struct ClassDef { ClassDef(): - hasQObject(false), hasQGadget(false), notifyableProperties(0){} + hasQObject(false), hasQGadget(false), notifyableProperties(0), begin(0), end(0){} QByteArray classname; QByteArray qualified; QList<QPair<QByteArray, FunctionDef::Access> > superclassList; diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp index 9d97085..363f8af 100644 --- a/src/tools/uic/main.cpp +++ b/src/tools/uic/main.cpp @@ -138,21 +138,6 @@ int runUic(int argc, char *argv[]) ++arg; } - // report Qt usage for commercial customers with a "metered license" (currently experimental) -#if QT_EDITION != QT_EDITION_OPENSOURCE -#ifdef QT_CONFIGURE_BINARIES_PATH - const char *binariesPath = QT_CONFIGURE_BINARIES_PATH; - QString reporterPath = QString::fromLocal8Bit(binariesPath); - reporterPath += QDir::separator(); - reporterPath += QLatin1String("qtusagereporter"); -#if defined(Q_OS_WIN) - reporterPath += QLatin1String(".exe"); -#endif - if (QFile::exists(reporterPath)) - system(qPrintable(reporterPath + QLatin1String(" uic"))); -#endif -#endif - QString inputFile; if (fileName) inputFile = QString::fromLocal8Bit(fileName); diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index cd9f37e..ac6ba37 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -56,6 +56,7 @@ #include <qxml.h> #include <qvariant.h> #include <qmap.h> +#include <qshareddata.h> #include <qdebug.h> #include <stdio.h> @@ -124,7 +125,8 @@ static void qt_split_namespace(QString& prefix, QString& name, const QString& qN class QDomImplementationPrivate { public: - QDomImplementationPrivate() { ref = 1; } + inline QDomImplementationPrivate() {} + QDomImplementationPrivate* clone(); QAtomicInt ref; static QDomImplementation::InvalidDataPolicy invalidDataPolicy; @@ -537,8 +539,8 @@ public: void clear(); // Variables - QScopedSharedPointer<QDomImplementationPrivate> impl; - QScopedSharedPointer<QDomDocumentTypePrivate> type; + QExplicitlySharedDataPointer<QDomImplementationPrivate> impl; + QExplicitlySharedDataPointer<QDomDocumentTypePrivate> type; void saveDocument(QTextStream& stream, const int indent, QDomNode::EncodingPolicy encUsed) const; @@ -864,10 +866,7 @@ static QString fixedSystemLiteral(const QString &data, bool *ok) QDomImplementationPrivate* QDomImplementationPrivate::clone() { - QDomImplementationPrivate* p = new QDomImplementationPrivate; - // We are not interested in this node - p->ref.deref(); - return p; + return new QDomImplementationPrivate; } /************************************************************** @@ -6149,20 +6148,22 @@ void QDomProcessingInstruction::setData(const QString& d) QDomDocumentPrivate::QDomDocumentPrivate() : QDomNodePrivate(0), + impl(new QDomImplementationPrivate), nodeListTime(1) { - impl.reset(new QDomImplementationPrivate); - type.reset(new QDomDocumentTypePrivate(this, this)); + type = new QDomDocumentTypePrivate(this, this); + type->ref.deref(); name = QLatin1String("#document"); } QDomDocumentPrivate::QDomDocumentPrivate(const QString& aname) : QDomNodePrivate(0), + impl(new QDomImplementationPrivate), nodeListTime(1) { - impl.reset(new QDomImplementationPrivate); - type.reset(new QDomDocumentTypePrivate(this, this)); + type = new QDomDocumentTypePrivate(this, this); + type->ref.deref(); type->name = aname; name = QLatin1String("#document"); @@ -6170,13 +6171,14 @@ QDomDocumentPrivate::QDomDocumentPrivate(const QString& aname) QDomDocumentPrivate::QDomDocumentPrivate(QDomDocumentTypePrivate* dt) : QDomNodePrivate(0), + impl(new QDomImplementationPrivate), nodeListTime(1) { - impl.reset(new QDomImplementationPrivate); if (dt != 0) { - type.assign(dt); + type = dt; } else { - type.reset(new QDomDocumentTypePrivate(this, this)); + type = new QDomDocumentTypePrivate(this, this); + type->ref.deref(); } name = QLatin1String("#document"); @@ -6184,10 +6186,10 @@ QDomDocumentPrivate::QDomDocumentPrivate(QDomDocumentTypePrivate* dt) QDomDocumentPrivate::QDomDocumentPrivate(QDomDocumentPrivate* n, bool deep) : QDomNodePrivate(n, deep), + impl(n->impl->clone()), nodeListTime(1) { - impl.assign(n->impl->clone()); - type.assign((QDomDocumentTypePrivate*)n->type->cloneNode()); + type = static_cast<QDomDocumentTypePrivate*>(n->type->cloneNode()); type->setParent(this); } @@ -6197,8 +6199,8 @@ QDomDocumentPrivate::~QDomDocumentPrivate() void QDomDocumentPrivate::clear() { - impl.assign(0); - type.assign(0); + impl.reset(); + type.reset(); QDomNodePrivate::clear(); } @@ -6219,8 +6221,9 @@ bool QDomDocumentPrivate::setContent(QXmlInputSource *source, bool namespaceProc bool QDomDocumentPrivate::setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg, int *errorLine, int *errorColumn) { clear(); - impl.reset(new QDomImplementationPrivate); - type.reset(new QDomDocumentTypePrivate(this, this)); + impl = new QDomImplementationPrivate; + type = new QDomDocumentTypePrivate(this, this); + type->ref.deref(); bool namespaceProcessing = reader->feature(QLatin1String("http://xml.org/sax/features/namespaces")) && !reader->feature(QLatin1String("http://xml.org/sax/features/namespace-prefixes")); @@ -7369,11 +7372,9 @@ QDomComment QDomNode::toComment() const **************************************************************/ QDomHandler::QDomHandler(QDomDocumentPrivate* adoc, bool namespaceProcessing) + : errorLine(0), errorColumn(0), doc(adoc), node(adoc), cdata(false), + nsProcessing(namespaceProcessing), locator(0) { - doc = adoc; - node = doc; - cdata = false; - nsProcessing = namespaceProcessing; } QDomHandler::~QDomHandler() @@ -7405,7 +7406,9 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri } else { n = doc->createElement(qName); } - n->setLocation(locator->lineNumber(), locator->columnNumber()); + + if (n) + n->setLocation(locator->lineNumber(), locator->columnNumber()); node->appendChild(n); node = n; @@ -7425,7 +7428,7 @@ bool QDomHandler::startElement(const QString& nsURI, const QString&, const QStri bool QDomHandler::endElement(const QString&, const QString&, const QString&) { - if (node == doc) + if (!node || node == doc) return false; node = node->parent(); diff --git a/src/xmlpatterns/acceltree/qacceltree_p.h b/src/xmlpatterns/acceltree/qacceltree_p.h index 6dadf2f..a296213 100644 --- a/src/xmlpatterns/acceltree/qacceltree_p.h +++ b/src/xmlpatterns/acceltree/qacceltree_p.h @@ -121,6 +121,7 @@ namespace QPatternist class BasicNodeData { public: + /* No need to initialize the members. See AccelTreeBuilder. */ inline BasicNodeData() { } @@ -209,7 +210,7 @@ namespace QPatternist Depth m_depth; /** - * Technically it is sufficient with 8 bits. However, at least MSVC + * Technically it is sufficient with 7 bits. However, at least MSVC * 2005 miscompiles it such that QXmlNodeModelIndex::Text becomes * -64 instead of 64 with hilarious crashes as result. * diff --git a/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h b/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h index fb58a61..cbc8f59 100644 --- a/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h +++ b/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h @@ -99,7 +99,7 @@ public: typedef QList<QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<T> > > List; typedef QVector<QExplicitlySharedDataPointer<QAbstractXmlForwardIterator<T> > > Vector; - inline QAbstractXmlForwardIterator() {} + inline QAbstractXmlForwardIterator() : d_ptr(0) {} virtual ~QAbstractXmlForwardIterator() {} virtual T next() = 0; diff --git a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp index dc653d2..9760bdb 100644 --- a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp +++ b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp @@ -83,7 +83,7 @@ Item IdFN::mapToItem(const QString &id, * - Remove invalid @c NCName * - Split IDREFs into individual NCNames * - * @author Frans Englich + * @author Frans Englich <frans.englich@nokia.com> */ class StringSplitter : public QAbstractXmlForwardIterator<QString> { diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h index 195e597..7f68d92 100644 --- a/src/xmlpatterns/parser/qquerytransformparser_p.h +++ b/src/xmlpatterns/parser/qquerytransformparser_p.h @@ -49,57 +49,6 @@ // // We mean it. -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtXmlPatterns 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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. - /* A Bison parser, made by GNU Bison 2.3a. */ /* Skeleton interface for Bison's Yacc-like parsers in C diff --git a/tests/auto/atwrapper/scruffy.ini b/tests/auto/atwrapper/scruffy.ini index 1a99f89..329f537 100644 --- a/tests/auto/atwrapper/scruffy.ini +++ b/tests/auto/atwrapper/scruffy.ini @@ -1,7 +1,7 @@ [General] framework=data/framework.ini ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no +ftpHost=kramer.nokia.troll.no ftpPass=anonymouspass ftpUser=anonymous output=testresults diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index e16eb75..6a5ac9e 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -8,7 +8,7 @@ TEMPLATE = subdirs SUBDIRS += \ bic \ collections \ - compile \ + compiler \ compilerwarnings \ exceptionsafety \ linguist \ @@ -72,6 +72,8 @@ SUBDIRS += \ qabstractsocket \ qabstractspinbox \ qabstracttextdocumentlayout \ + qabstractvideobuffer \ + qabstractvideosurface \ qaccessibility \ qaction \ qactiongroup \ @@ -368,6 +370,8 @@ SUBDIRS += \ qvariant \ qvarlengtharray \ qvector \ + qvideoframe \ + qvideosurfaceformat \ qvectornd \ qwaitcondition \ qwidget \ diff --git a/tests/auto/compile/.gitignore b/tests/auto/compiler/.gitignore index bdcee46..bdcee46 100644 --- a/tests/auto/compile/.gitignore +++ b/tests/auto/compiler/.gitignore diff --git a/tests/auto/compile/baseclass.cpp b/tests/auto/compiler/baseclass.cpp index 5479532..5479532 100644 --- a/tests/auto/compile/baseclass.cpp +++ b/tests/auto/compiler/baseclass.cpp diff --git a/tests/auto/compile/baseclass.h b/tests/auto/compiler/baseclass.h index 25abbfe..25abbfe 100644 --- a/tests/auto/compile/baseclass.h +++ b/tests/auto/compiler/baseclass.h diff --git a/tests/auto/compile/compile.pro b/tests/auto/compiler/compiler.pro index 6c38078..c444c63 100644 --- a/tests/auto/compile/compile.pro +++ b/tests/auto/compiler/compiler.pro @@ -1,5 +1,5 @@ load(qttest_p4) -SOURCES += tst_compile.cpp baseclass.cpp derivedclass.cpp +SOURCES += tst_compiler.cpp baseclass.cpp derivedclass.cpp HEADERS += baseclass.h derivedclass.h QT = core diff --git a/tests/auto/compile/derivedclass.cpp b/tests/auto/compiler/derivedclass.cpp index 3b71861..3b71861 100644 --- a/tests/auto/compile/derivedclass.cpp +++ b/tests/auto/compiler/derivedclass.cpp diff --git a/tests/auto/compile/derivedclass.h b/tests/auto/compiler/derivedclass.h index 9396ff9..9396ff9 100644 --- a/tests/auto/compile/derivedclass.h +++ b/tests/auto/compiler/derivedclass.h diff --git a/tests/auto/compile/tst_compile.cpp b/tests/auto/compiler/tst_compiler.cpp index cef798a..78c1a56 100644 --- a/tests/auto/compile/tst_compile.cpp +++ b/tests/auto/compiler/tst_compiler.cpp @@ -653,4 +653,4 @@ void tst_Compiler::staticConstUnionWithInitializerList() const } QTEST_MAIN(tst_Compiler) -#include "tst_compile.moc" +#include "tst_compiler.moc" diff --git a/tests/auto/gestures/customgesturerecognizer.h b/tests/auto/gestures/customgesturerecognizer.h index 519aba8..83e85b1 100644 --- a/tests/auto/gestures/customgesturerecognizer.h +++ b/tests/auto/gestures/customgesturerecognizer.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef CUSTOMGESTURERECOGNIZER_H #define CUSTOMGESTURERECOGNIZER_H diff --git a/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp b/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp index 348a6be..805e87a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! // diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp index 2573fbb..c6275ca 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QtGui> #include <QtCore> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result index e746c7e..bc0d9bb 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result @@ -5,13 +5,13 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>abc</source> <comment>ascii</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>æøå</source> <comment>utf-8</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp index 79b0503..91b3678 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QtGui> #include <QtCore> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result index 9a082ef..91da744 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result @@ -5,7 +5,7 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="20"/> + <location filename="main.cpp" line="61"/> <source>Á</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp index 91af165..daabfe1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtCore> class FooBar : QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result index 5ffa2f3..26eb245 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result @@ -5,22 +5,22 @@ <context> <name>FooBar</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>random ascii only</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>this contains an umlaut ü &uuml;</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source>random ascii only in utf8</source> <translation type="unfinished"></translation> </message> <message utf8="true"> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>umlaut ü &uuml; in utf8</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp index 91af165..daabfe1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtCore> class FooBar : QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result index 0ebdbfd..e27c157 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result @@ -5,22 +5,22 @@ <context> <name>FooBar</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>random ascii only</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>this contains an umlaut ü &uuml;</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source>random ascii only in utf8</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>umlaut ü &uuml; in utf8</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp index 0e42d52..d30a10e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result index bab0881..bc876cd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result @@ -4,7 +4,7 @@ <context> <name>B</name> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source>Bla</source> <comment>::B</comment> <translation type="unfinished"></translation> @@ -13,7 +13,7 @@ <context> <name>C</name> <message> - <location filename="main.cpp" line="24"/> + <location filename="main.cpp" line="65"/> <source>Bla</source> <comment>::C</comment> <translation type="unfinished"></translation> @@ -22,7 +22,7 @@ <context> <name>nsB::B</name> <message> - <location filename="main.cpp" line="37"/> + <location filename="main.cpp" line="78"/> <source>Bla</source> <comment>nsB::B</comment> <translation type="unfinished"></translation> @@ -31,7 +31,7 @@ <context> <name>nsB::C</name> <message> - <location filename="main.cpp" line="43"/> + <location filename="main.cpp" line="84"/> <source>Bla</source> <comment>nsB::C</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp index af8534d..91484bf 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ // The first line in this file should always be empty, its part of the test!! class Foo : public QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before index d70193f..1762cc7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before @@ -3,22 +3,22 @@ <context> <name>Bar</name> <message> - <location filename="bar1.cpp" line="13"/> + <location filename="bar1.cpp" line="54"/> <source>Another alien.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="bar1.cpp" line="14"/> + <location filename="bar1.cpp" line="55"/> <source>They are coming!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="bar1.cpp" line="16"/> + <location filename="bar1.cpp" line="57"/> <source>They are everywhere!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="bar1.cpp" line="18"/> + <location filename="bar1.cpp" line="59"/> <source>This one moved in from another file.</source> <translation type="unfinished"></translation> </message> @@ -26,47 +26,47 @@ <context> <name>Foo</name> <message> - <location filename="foo1.cpp" line="13"/> + <location filename="foo1.cpp" line="54"/> <source>This is the first entry.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="14"/> + <location filename="foo1.cpp" line="55"/> <source>A second message.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="15"/> + <location filename="foo1.cpp" line="56"/> <source>Now again one which is just where it was.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="16"/> + <location filename="foo1.cpp" line="57"/> <source>Just as this one.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="17"/> + <location filename="foo1.cpp" line="58"/> <source>An earthling again.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="18"/> + <location filename="foo1.cpp" line="59"/> <source>This is from the bottom, too.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="19"/> + <location filename="foo1.cpp" line="60"/> <source>Third string from the bottom.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="20"/> + <location filename="foo1.cpp" line="61"/> <source>Fourth one!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="21"/> + <location filename="foo1.cpp" line="62"/> <source>This string did move from the bottom.</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result index 2027efd..5104860 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result @@ -4,7 +4,7 @@ <context> <name>Foo</name> <message> - <location filename="foo.cpp" line="+13"/> + <location filename="foo.cpp" line="+54"/> <source>This is the first entry.</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp index e058da0..4dddace 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QDebug> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before index 3acae3e..0f84fed 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before @@ -10,57 +10,57 @@ newline at the start</source> NEWLINE AT THE START</translation> </message> <message> - <location filename="main.cpp" line="8"/> + <location filename="main.cpp" line="49"/> <source>newline at the end </source> <translation>NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="9"/> + <location filename="main.cpp" line="50"/> <source>newline and space at the end </source> <translation>NEWLINE AND SPACE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>space and newline at the end </source> <translation>SPACE AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source><byte value="x9"/>Tab at the start and newline at the end </source> <translation><byte value="x9"/>TAB AT THE START AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source> <byte value="x9"/>newline and tab at the start</source> <translation> <byte value="x9"/>NEWLINE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source> <byte value="x9"/>space and tab at the start</source> <translation> <byte value="x9"/>SPACE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source> space_first</source> <translation> SPACE_FIRST</translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>space_last </source> <translation>SPACE_LAST </translation> </message> <message> - <location filename="main.cpp" line="21"/> + <location filename="main.cpp" line="62"/> <source>carriage return and line feed last<byte value="xd"/> </source> <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST<byte value="xd"/> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result index 6d6b469..776238d 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result @@ -4,64 +4,64 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source> newline at the start</source> <translation> NEWLINE AT THE START</translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>newline at the end </source> <translation>NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>newline and space at the end </source> <translation>NEWLINE AND SPACE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>space and newline at the end </source> <translation>SPACE AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="57"/> <source> Tab at the start and newline at the end </source> <translation> TAB AT THE START AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source> newline and tab at the start</source> <translation> NEWLINE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="18"/> + <location filename="main.cpp" line="59"/> <source> space and tab at the start</source> <translation> SPACE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="19"/> + <location filename="main.cpp" line="60"/> <source> space_first</source> <translation> SPACE_FIRST</translation> </message> <message> - <location filename="main.cpp" line="20"/> + <location filename="main.cpp" line="61"/> <source>space_last </source> <translation>SPACE_LAST </translation> </message> <message> - <location filename="main.cpp" line="21"/> + <location filename="main.cpp" line="62"/> <source>carriage return and line feed last </source> <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp index 7edb923..ce35e5b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp @@ -1,5 +1,47 @@ // The first line in this file should always be empty, its part of the test!! + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + class FindDialog : public QDialog { Q_OBJECT diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before index 474444f..d06252c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before @@ -9,27 +9,27 @@ <translation></translation> </message> <message> - <location filename="finddialog.cpp" line="14"/> + <location filename="finddialog.cpp" line="56"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="15"/> + <location filename="finddialog.cpp" line="57"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="16"/> + <location filename="finddialog.cpp" line="58"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="17"/> + <location filename="finddialog.cpp" line="59"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="22"/> + <location filename="finddialog.cpp" line="64"/> <source>%n item(s)</source> <comment>merge from singular to plural form</comment> <translation type="unfinished"> @@ -37,7 +37,7 @@ </translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="23"/> + <location filename="finddialog.cpp" line="65"/> <source>%n item(s)</source> <comment>merge from a finished singular form to an unfinished plural form</comment> <translation type="unfinished"> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result index 152b568..be4e02e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result @@ -10,27 +10,27 @@ <translation></translation> </message> <message> - <location filename="finddialog.cpp" line="14"/> + <location filename="finddialog.cpp" line="56"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="15"/> + <location filename="finddialog.cpp" line="57"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="16"/> + <location filename="finddialog.cpp" line="58"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="17"/> + <location filename="finddialog.cpp" line="59"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="22"/> + <location filename="finddialog.cpp" line="64"/> <source>%n item(s)</source> <comment>merge from singular to plural form</comment> <translation type="unfinished"> @@ -38,7 +38,7 @@ </translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="23"/> + <location filename="finddialog.cpp" line="65"/> <source>%n item(s)</source> <comment>merge from a finished singular form to an unfinished plural form</comment> <translation type="unfinished"> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp index 7215ebe..528e795 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" @@ -10,18 +51,83 @@ #include <QDateTime> #include <QGridLayout> +CaseSensitiveModel::CaseSensitiveModel(int rows, int columns, QObject *parent) + : QStandardItemModel(rows, columns, parent) +{} +QModelIndexList CaseSensitiveModel::match(const QModelIndex &start, int role, const QVariant &value, + int hits, Qt::MatchFlags flags) const +{ + if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) + flags |= Qt::MatchCaseSensitive; + + return QStandardItemModel::match(start, role, value, hits, flags); +} + FindDialog::FindDialog(MainWindow *parent) : QDialog(parent) { + contentsWidget = new QWidget(this); + ui.setupUi(contentsWidget); + ui.comboFind->setModel(new CaseSensitiveModel(0, 1, ui.comboFind)); + + QVBoxLayout *l = new QVBoxLayout(this); + l->setMargin(0); + l->setSpacing(0); + l->addWidget(contentsWidget); + + lastBrowser = 0; + onceFound = false; + findExpr.clear(); + sb = new QStatusBar(this); l->addWidget(sb); sb->showMessage(tr("Enter the text you want to find.")); + connect(ui.findButton, SIGNAL(clicked()), this, SLOT(findButtonClicked())); + connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(reject())); +} + +FindDialog::~FindDialog() +{ +} + +void FindDialog::findButtonClicked() +{ + doFind(ui.radioForward->isChecked()); } void FindDialog::doFind(bool forward) { + QTextBrowser *browser = static_cast<QTextBrowser*>(mainWindow()->browsers()->currentBrowser()); + sb->clearMessage(); + + if (ui.comboFind->currentText() != findExpr || lastBrowser != browser) + onceFound = false; + findExpr = ui.comboFind->currentText(); + + QTextDocument::FindFlags flags = 0; + + if (ui.checkCase->isChecked()) + flags |= QTextDocument::FindCaseSensitively; + + if (ui.checkWords->isChecked()) + flags |= QTextDocument::FindWholeWords; + + QTextCursor c = browser->textCursor(); + if (!c.hasSelection()) { + if (forward) + c.movePosition(QTextCursor::Start); + else + c.movePosition(QTextCursor::End); + + browser->setTextCursor(c); + } + + QTextDocument::FindFlags options; + if (forward == false) + flags |= QTextDocument::FindBackward; + QTextCursor found = browser->document()->find(findExpr, c, flags); if (found.isNull()) { if (onceFound) { @@ -35,6 +141,8 @@ void FindDialog::doFind(bool forward) } else { browser->setTextCursor(found); } + onceFound |= !found.isNull(); + lastBrowser = browser; } bool FindDialog::hasFindExpression() const diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before index 12e30b5..834f512 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before @@ -3,27 +3,27 @@ <context> <name>FindDialog</name> <message> - <location filename="finddialog.cpp" line="57"/> + <location filename="finddialog.cpp" line="85"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="107"/> + <location filename="finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="109"/> + <location filename="finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="111"/> + <location filename="finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="122"/> + <location filename="finddialog.cpp" line="150"/> <source>Should be obsolete</source> <translation type="unfinished">SHOULD BE OBSOLETE</translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp index 756c9a3..4abbda9 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" @@ -10,17 +51,86 @@ #include <QDateTime> #include <QGridLayout> +CaseSensitiveModel::CaseSensitiveModel(int rows, int columns, QObject *parent) + : QStandardItemModel(rows, columns, parent) +{} +QModelIndexList CaseSensitiveModel::match(const QModelIndex &start, int role, const QVariant &value, + int hits, Qt::MatchFlags flags) const +{ + if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) + flags |= Qt::MatchCaseSensitive; + + return QStandardItemModel::match(start, role, value, hits, flags); +} + FindDialog::FindDialog(MainWindow *parent) : QDialog(parent) { + contentsWidget = new QWidget(this); + ui.setupUi(contentsWidget); + ui.comboFind->setModel(new CaseSensitiveModel(0, 1, ui.comboFind)); + + QVBoxLayout *l = new QVBoxLayout(this); + l->setMargin(0); + l->setSpacing(0); + l->addWidget(contentsWidget); + + lastBrowser = 0; + onceFound = false; + findExpr.clear(); + + sb = new QStatusBar(this); + l->addWidget(sb); + + // Move it to another line and change the text, // then lupdate should add this one as a new one, and mark the old one as obsolete. sb->showMessage(tr("Enter the text you want to find.")); + connect(ui.findButton, SIGNAL(clicked()), this, SLOT(findButtonClicked())); + connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(reject())); +} + +FindDialog::~FindDialog() +{ +} + +void FindDialog::findButtonClicked() +{ + doFind(ui.radioForward->isChecked()); } void FindDialog::doFind(bool forward) { + QTextBrowser *browser = static_cast<QTextBrowser*>(mainWindow()->browsers()->currentBrowser()); + sb->clearMessage(); + + if (ui.comboFind->currentText() != findExpr || lastBrowser != browser) + onceFound = false; + findExpr = ui.comboFind->currentText(); + + QTextDocument::FindFlags flags = 0; + + if (ui.checkCase->isChecked()) + flags |= QTextDocument::FindCaseSensitively; + + if (ui.checkWords->isChecked()) + flags |= QTextDocument::FindWholeWords; + + QTextCursor c = browser->textCursor(); + if (!c.hasSelection()) { + if (forward) + c.movePosition(QTextCursor::Start); + else + c.movePosition(QTextCursor::End); + + browser->setTextCursor(c); + } + + QTextDocument::FindFlags options; + if (forward == false) + flags |= QTextDocument::FindBackward; + QTextCursor found = browser->document()->find(findExpr, c, flags); if (found.isNull()) { if (onceFound) { @@ -34,4 +144,31 @@ void FindDialog::doFind(bool forward) } else { browser->setTextCursor(found); } + onceFound |= !found.isNull(); + lastBrowser = browser; +} + +bool FindDialog::hasFindExpression() const +{ + return !findExpr.isEmpty(); +} + +void FindDialog::statusMessage(const QString &message) +{ + if (isVisible()) + sb->showMessage(message); + else + static_cast<MainWindow*>(parent())->statusBar()->showMessage(message, 2000); +} + +MainWindow *FindDialog::mainWindow() const +{ + return static_cast<MainWindow*>(parentWidget()); +} + +void FindDialog::reset() +{ + ui.comboFind->setFocus(); + ui.comboFind->lineEdit()->setSelection( + 0, ui.comboFind->lineEdit()->text().length()); } diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before index 271cc39..1fa0fd3 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before @@ -3,22 +3,22 @@ <context> <name>FindDialog</name> <message> - <location filename="finddialog.cpp" line="57"/> + <location filename="finddialog.cpp" line="85"/> <source>Enter the text you are looking for.</source> <translation type="unfinished">Skriv inn teksten du soker etter</translation> </message> <message> - <location filename="finddialog.cpp" line="107"/> + <location filename="finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="109"/> + <location filename="finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="111"/> + <location filename="finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp index c3881d3..5a69326 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ QT_TRANSLATE_NOOP("context", "just a message") diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp index 71d9085..e14b638 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result index dd013fa..ec1f02f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result @@ -4,9 +4,9 @@ <context> <name>context</name> <message> - <location filename="finddialog.cpp" line="2"/> - <location filename="finddialog.cpp" line="7"/> - <location filename="main.cpp" line="6"/> + <location filename="finddialog.cpp" line="43"/> + <location filename="finddialog.cpp" line="48"/> + <location filename="main.cpp" line="47"/> <source>just a message</source> <extracomment>This is one comment ---------- diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp index 9f5a98c..62b306f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtCore> class Class : public QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result index d1193d3..bb5b739 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result @@ -4,17 +4,17 @@ <context> <name>Class</name> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>nested class context</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source>just class context</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="77"/> + <location filename="main.cpp" line="118"/> <source>outestmost class</source> <translation type="unfinished"></translation> </message> @@ -22,7 +22,7 @@ <context> <name>Outer::Class</name> <message> - <location filename="main.cpp" line="78"/> + <location filename="main.cpp" line="119"/> <source>outer class</source> <translation type="unfinished"></translation> </message> @@ -30,7 +30,7 @@ <context> <name>Outer::Middle1::Different</name> <message> - <location filename="main.cpp" line="65"/> + <location filename="main.cpp" line="106/> <source>different namespaced class def</source> <translation type="unfinished"></translation> </message> @@ -38,22 +38,22 @@ <context> <name>Outer::Middle1::Inner1::Class</name> <message> - <location filename="main.cpp" line="79"/> + <location filename="main.cpp" line="120"/> <source>innermost one</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="80"/> + <location filename="main.cpp" line="121"/> <source>innermost two</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="81"/> + <location filename="main.cpp" line="122"/> <source>innermost three</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="83"/> + <location filename="main.cpp" line="124"/> <source>innermost four</source> <translation type="unfinished"></translation> </message> @@ -61,12 +61,12 @@ <context> <name>Outer::Middle1::Something</name> <message> - <location filename="main.cpp" line="90"/> + <location filename="main.cpp" line="131"/> <source>namespaced class def</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="93"/> + <location filename="main.cpp" line="134"/> <source>namespaced class def 2</source> <translation type="unfinished"></translation> </message> @@ -74,7 +74,7 @@ <context> <name>Outer::Middle2::Inner2::Class</name> <message> - <location filename="main.cpp" line="82"/> + <location filename="main.cpp" line="123"/> <source>innermost three b</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp index 72a1590..c64c111 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result index a49b47a..0394bea 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result @@ -4,12 +4,12 @@ <context> <name>Dialog2</name> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>catégorie</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>Für Èlise</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp index 65eeed5..c2eba71 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! #include <QtCore> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result index 04bb3ae..9b00d53 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result @@ -4,7 +4,7 @@ <context> <name>A1::AB</name> <message> - <location filename="main.cpp" line="137"/> + <location filename="main.cpp" line="178"/> <source>inlineFuncAfterFriendDeclaration</source> <comment>A1::AB</comment> <translation type="unfinished"></translation> @@ -13,7 +13,7 @@ <context> <name>A1::B</name> <message> - <location filename="main.cpp" line="143"/> + <location filename="main.cpp" line="184"/> <source>foo</source> <comment>A1::B</comment> <translation type="unfinished"></translation> @@ -22,19 +22,19 @@ <context> <name>A1::B2</name> <message> - <location filename="main.cpp" line="188"/> + <location filename="main.cpp" line="229"/> <source>test TRANSLATOR comment (2)</source> <comment>A1::B2</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="194"/> + <location filename="main.cpp" line="235"/> <source>test TRANSLATOR comment (4)</source> <comment>A1::B2</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="203"/> + <location filename="main.cpp" line="244"/> <source>test TRANSLATOR comment (5)</source> <comment>A1::B2</comment> <translation type="unfinished"></translation> @@ -43,7 +43,7 @@ <context> <name>A1::B3::C2</name> <message> - <location filename="main.cpp" line="220"/> + <location filename="main.cpp" line="261"/> <source>test TRANSLATOR comment (6)</source> <comment>A1::B3::C2</comment> <translation type="unfinished"></translation> @@ -52,7 +52,7 @@ <context> <name>A1::V</name> <message> - <location filename="main.cpp" line="150"/> + <location filename="main.cpp" line="191"/> <source>bar</source> <comment>A1::V</comment> <translation type="unfinished"></translation> @@ -61,7 +61,7 @@ <context> <name>A1::W</name> <message> - <location filename="main.cpp" line="156"/> + <location filename="main.cpp" line="197"/> <source>baz</source> <comment>A1::W</comment> <translation type="unfinished"></translation> @@ -70,14 +70,14 @@ <context> <name>A::C</name> <message> - <location filename="main.cpp" line="28"/> - <location filename="main.cpp" line="32"/> + <location filename="main.cpp" line="69"/> + <location filename="main.cpp" line="73"/> <source>Bla</source> <comment>A::C</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="37"/> + <location filename="main.cpp" line="78"/> <source>Bla 2</source> <comment>A::C</comment> <translation type="unfinished"></translation> @@ -86,7 +86,7 @@ <context> <name>B1</name> <message> - <location filename="main.cpp" line="178"/> + <location filename="main.cpp" line="219"/> <source>test TRANSLATOR comment (1)</source> <comment>B1</comment> <translation type="unfinished"></translation> @@ -95,7 +95,7 @@ <context> <name>B2</name> <message> - <location filename="main.cpp" line="197"/> + <location filename="main.cpp" line="238"/> <source></source> <comment>This is a comment to the translator.</comment> <translation type="unfinished"></translation> @@ -104,7 +104,7 @@ <context> <name>C1</name> <message> - <location filename="main.cpp" line="189"/> + <location filename="main.cpp" line="230"/> <source>test TRANSLATOR comment (3)</source> <comment>C1</comment> <translation type="unfinished"></translation> @@ -113,7 +113,7 @@ <context> <name>D</name> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>test</source> <comment>D</comment> <translation type="unfinished"></translation> @@ -122,7 +122,7 @@ <context> <name>Gui::MainWindow</name> <message> - <location filename="main.cpp" line="122"/> + <location filename="main.cpp" line="163"/> <source>More bla</source> <comment>Gui::MainWindow</comment> <translation type="unfinished"></translation> @@ -131,7 +131,7 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="100"/> + <location filename="main.cpp" line="141"/> <source>task 161186</source> <comment>QObject</comment> <translation type="unfinished"></translation> @@ -140,13 +140,13 @@ <context> <name>X::D</name> <message> - <location filename="main.cpp" line="54"/> + <location filename="main.cpp" line="95"/> <source>foo</source> <comment>D</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="74"/> + <location filename="main.cpp" line="115"/> <source>Bla</source> <comment>X::D</comment> <translation type="unfinished"></translation> @@ -155,7 +155,7 @@ <context> <name>X::F</name> <message> - <location filename="main.cpp" line="87"/> + <location filename="main.cpp" line="128"/> <source>inline function</source> <comment>X::F</comment> <translation type="unfinished"></translation> @@ -164,7 +164,7 @@ <context> <name>X::Y::C</name> <message> - <location filename="main.cpp" line="70"/> + <location filename="main.cpp" line="111"/> <source>Bla</source> <comment>X::Y::C</comment> <translation type="unfinished"></translation> @@ -173,8 +173,8 @@ <context> <name>X::Y::E</name> <message> - <location filename="main.cpp" line="78"/> - <location filename="main.cpp" line="79"/> + <location filename="main.cpp" line="119"/> + <location filename="main.cpp" line="120"/> <source>Bla</source> <comment>X::Y::E</comment> <translation type="unfinished"></translation> @@ -183,7 +183,7 @@ <context> <name>ico::foo::A</name> <message> - <location filename="main.cpp" line="99"/> + <location filename="main.cpp" line="140"/> <source>myfoo</source> <comment>ico::foo::A</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index 735e4cd..50b835b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! int main(char **argv, int argc) diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result index 8c48245..9e4e319 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -22,7 +22,7 @@ backslashed \ stuff.</source> <context> <name>Dialog2</name> <message numerus="yes"> - <location filename="main.cpp" line="29"/> + <location filename="main.cpp" line="70"/> <source>%n files</source> <comment>plural form</comment> <translation type="unfinished"> @@ -30,40 +30,40 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="30"/> + <location filename="main.cpp" line="71"/> <source>%n cars</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="31"/> + <location filename="main.cpp" line="72"/> <source>&Find %n cars</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="32"/> + <location filename="main.cpp" line="73"/> <source>Search in %n items?</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="33"/> + <location filename="main.cpp" line="74"/> <source>%1. Search in %n items?</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message> - <location filename="main.cpp" line="34"/> + <location filename="main.cpp" line="75"/> <source>Age: %1</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="35"/> + <location filename="main.cpp" line="76"/> <source>There are %n house(s)</source> <comment>Plurals and function call</comment> <translation type="unfinished"> @@ -71,7 +71,7 @@ backslashed \ stuff.</source> </translation> </message> <message> - <location filename="main.cpp" line="102"/> + <location filename="main.cpp" line="143"/> <source>func3</source> <translation type="unfinished"></translation> </message> @@ -115,7 +115,7 @@ backslashed \ stuff.</source> <context> <name>Plurals, QCoreApplication</name> <message numerus="yes"> - <location filename="main.cpp" line="40"/> + <location filename="main.cpp" line="81"/> <source>%n house(s)</source> <comment>Plurals and identifier</comment> <translation type="unfinished"> @@ -123,7 +123,7 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="41"/> + <location filename="main.cpp" line="82"/> <source>%n car(s)</source> <comment>Plurals and literal number</comment> <translation type="unfinished"> @@ -131,7 +131,7 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="42"/> + <location filename="main.cpp" line="83"/> <source>%n horse(s)</source> <comment>Plurals and function call</comment> <translation type="unfinished"> @@ -142,7 +142,7 @@ backslashed \ stuff.</source> <context> <name>QApplication</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>QT_LAYOUT_DIRECTION</source> <comment>Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment> <translation type="unfinished"></translation> @@ -180,26 +180,26 @@ backslashed \ stuff.</source> <context> <name>QTranslator</name> <message> - <location filename="main.cpp" line="52"/> - <location filename="main.cpp" line="53"/> + <location filename="main.cpp" line="93"/> + <location filename="main.cpp" line="94"/> <source>Simple</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="54"/> + <location filename="main.cpp" line="95"/> <source>Simple with comment</source> <comment>with comment</comment> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="55"/> + <location filename="main.cpp" line="96"/> <source>Plural without comment</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="56"/> + <location filename="main.cpp" line="97"/> <source>Plural with comment</source> <comment>comment 1</comment> <translation type="unfinished"> @@ -207,7 +207,7 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="57"/> + <location filename="main.cpp" line="98"/> <source>Plural with comment</source> <comment>comment 2</comment> <translation type="unfinished"> @@ -218,19 +218,19 @@ backslashed \ stuff.</source> <context> <name>TestClass</name> <message> - <location filename="main.cpp" line="116"/> + <location filename="main.cpp" line="157"/> <source>inline function</source> <comment>TestClass</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="120"/> + <location filename="main.cpp" line="161"/> <source>inline function 2</source> <comment>TestClass</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="124"/> + <location filename="main.cpp" line="165"/> <source>static inline function</source> <comment>TestClass</comment> <translation type="unfinished"></translation> @@ -239,18 +239,18 @@ backslashed \ stuff.</source> <context> <name>Testing</name> <message> - <location filename="main.cpp" line="141"/> + <location filename="main.cpp" line="182"/> <source>extra-commented string</source> <extracomment>this is an extra comment for the translator</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="142"/> + <location filename="main.cpp" line="183"/> <source>not extra-commented string</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="144"/> + <location filename="main.cpp" line="185"/> <source>another extra-commented string</source> <extracomment>another extra-comment</extracomment> <translation type="unfinished"></translation> @@ -280,7 +280,7 @@ backslashed \ stuff.</source> <context> <name>scope</name> <message numerus="yes"> - <location filename="main.cpp" line="146"/> + <location filename="main.cpp" line="187"/> <source>works in translate, too</source> <comment>blabb</comment> <extracomment>blah!</extracomment> @@ -289,20 +289,20 @@ backslashed \ stuff.</source> </translation> </message> <message> - <location filename="main.cpp" line="153"/> + <location filename="main.cpp" line="194"/> <source>string</source> <extracomment>extra comment for NOOP which spans multiple lines</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="155"/> + <location filename="main.cpp" line="196"/> <source>string</source> <comment>comment</comment> <extracomment>extra comment for NOOP3</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="157"/> + <location filename="main.cpp" line="198"/> <source>string continuation on next line</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java b/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java index 07681d2..1167e87 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java +++ b/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result index 69c0a00..0ce600c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result @@ -4,7 +4,7 @@ <context> <name>Plurals, QCoreApplication</name> <message numerus="yes"> - <location filename="main.java" line="47"/> + <location filename="main.java" line="88"/> <source>%n house(s)</source> <comment>Plurals and identifier</comment> <extracomment>with extra comment!</extracomment> @@ -16,26 +16,26 @@ <context> <name>QTranslator</name> <message> - <location filename="main.java" line="39"/> - <location filename="main.java" line="40"/> + <location filename="main.java" line="80"/> + <location filename="main.java" line="81"/> <source>Simple</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="41"/> + <location filename="main.java" line="82"/> <source>Simple with comment</source> <comment>with comment</comment> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.java" line="42"/> + <location filename="main.java" line="83"/> <source>Plural without comment</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.java" line="43"/> + <location filename="main.java" line="84"/> <source>Plural with comment</source> <comment>comment 1</comment> <translation type="unfinished"> @@ -43,7 +43,7 @@ </translation> </message> <message numerus="yes"> - <location filename="main.java" line="44"/> + <location filename="main.java" line="85"/> <source>Plural with comment</source> <comment>comment 2</comment> <translation type="unfinished"> @@ -54,18 +54,18 @@ <context> <name>com.trolltech.examples.I18N</name> <message> - <location filename="main.java" line="26"/> + <location filename="main.java" line="67"/> <source>pack class method</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="31"/> + <location filename="main.java" line="72"/> <source>QT_LAYOUT_DIRECTION</source> <comment>Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.java" line="33"/> + <location filename="main.java" line="74"/> <source>%n files</source> <comment>plural form</comment> <translation type="unfinished"> @@ -73,19 +73,19 @@ </translation> </message> <message numerus="yes"> - <location filename="main.java" line="34"/> + <location filename="main.java" line="75"/> <source>%n cars</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message> - <location filename="main.java" line="35"/> + <location filename="main.java" line="76"/> <source>Age: %1</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.java" line="36"/> + <location filename="main.java" line="77"/> <source>There are %n house(s)</source> <comment>Plurals and function call</comment> <translation type="unfinished"> @@ -96,18 +96,18 @@ <context> <name>com.trolltech.examples.I18N$MainWindow</name> <message> - <location filename="main.java" line="9"/> + <location filename="main.java" line="50"/> <source>pack class class</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="12"/> + <location filename="main.java" line="53"/> <source>pack class class extra</source> <extracomment>extra comment for t-tor</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="18"/> + <location filename="main.java" line="59"/> <source>pack class class method</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp index d845853..7ad8407 100644 --- a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp @@ -1,4 +1,43 @@ - +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ QString foo() diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result index 5ced00d..c15b986 100644 --- a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result @@ -4,18 +4,18 @@ <context> <name>Foo</name> <message> - <location filename="main.cpp" line="6"/> + <location filename="main.cpp" line="46"/> <source>XXX</source> <comment>YYY</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="51"/> <source>CTOR</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="56"/> <source>BAR</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp b/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp index 9abfa5e..c4f67a8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result index 3aec045..4d695e8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result @@ -4,30 +4,30 @@ <context> <name>QApplication</name> <message> - <location filename="main.cpp" line="6"/> + <location filename="main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>Kind</source> <comment>Windows only, see Type</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="57"/> <source>Type</source> <comment>Not used on windows, see Kind</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="25"/> + <location filename="main.cpp" line="66"/> <source>One string, three lines</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="29"/> + <location filename="main.cpp" line="70"/> <source>a backslash followed by newline should be ignored and the next line should be syntactically considered to be on the same line</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp index 845aaa6..4cfec14 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp index 229e154..c15c2f7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp index 4eb39f7..b879aa7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result index ef98596..556ca07 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result @@ -4,49 +4,49 @@ <context> <name>QApplication</name> <message> - <location filename="main.cpp" line="6"/> + <location filename="main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main_mac.cpp" line="6"/> + <location filename="main_mac.cpp" line="47"/> <source>Hello macworld</source> <comment>mac-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main_unix.cpp" line="6"/> + <location filename="main_unix.cpp" line="47"/> <source>Hello unixworld</source> <comment>unix-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main_win.cpp" line="6"/> + <location filename="main_win.cpp" line="47"/> <source>Hello windowsworld</source> <comment>Windows-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard/main1.cpp" line="6"/> + <location filename="wildcard/main1.cpp" line="47"/> <source>Hello world</source> <comment>wildcard/main1.cpp</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard/mainfile.cpp" line="6"/> + <location filename="wildcard/mainfile.cpp" line="47"/> <source>Hello world</source> <comment>wildcard/main2.cpp</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard1.cpp" line="6"/> + <location filename="wildcard1.cpp" line="47"/> <source>Hello world</source> <comment>wildcard1.cpp</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard99.cpp" line="6"/> + <location filename="wildcard99.cpp" line="47"/> <source>Hello world</source> <comment>wildcard99.cpp</comment> <translation type="unfinished"></translation> @@ -55,7 +55,7 @@ <context> <name>QCoreApplication</name> <message> - <location filename="vpaths/dependpath/main_dependpath.cpp" line="7"/> + <location filename="vpaths/dependpath/main_dependpath.cpp" line="48"/> <source>Hello from a DEPENDPATH</source> <comment>See if the DEPENDPATH thing works</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp index f019c79..f12ce98 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp index 506ae42..fdc5ca4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp index f4cd00a..a5d5783 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp index c7790c5..bfe651c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp index 93febda..9f7e3cd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a index 5966392..d3abf47 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("a"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp index 1d80ed3..5f0f7ef 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("a.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b index d0fe066..40ab4f4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("b"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp index a5c386d..5feb1e7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("b.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e index 66e89a8..ffb7dd6 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("e"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp index d86bee2..1eeac23 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("f/g.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result index 2e60696..3714d9b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result @@ -4,57 +4,57 @@ <context> <name>QLineEdit</name> <message> - <location filename="a" line="3"/> + <location filename="a" line="44"/> <source>a</source> <translation type="unfinished"></translation> </message> <message> - <location filename="a.cpp" line="3"/> + <location filename="a.cpp" line="44"/> <source>a.cpp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="b" line="3"/> + <location filename="b" line="44"/> <source>b</source> <translation type="unfinished"></translation> </message> <message> - <location filename="b.cpp" line="3"/> + <location filename="b.cpp" line="44"/> <source>b.cpp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="e" line="3"/> + <location filename="e" line="44"/> <source>e</source> <translation type="unfinished"></translation> </message> <message> - <location filename="f/g.cpp" line="3"/> + <location filename="f/g.cpp" line="44"/> <source>f/g.cpp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="spaces/z" line="3"/> + <location filename="spaces/z" line="44"/> <source>spaces/z</source> <translation type="unfinished"></translation> </message> <message> - <location filename="variable_with_spaces" line="3"/> + <location filename="variable_with_spaces" line="44"/> <source>variable with spaces</source> <translation type="unfinished"></translation> </message> <message> - <location filename="with" line="3"/> + <location filename="with" line="44"/> <source>with</source> <translation type="unfinished"></translation> </message> <message> - <location filename="x/d" line="3"/> + <location filename="x/d" line="44"/> <source>x/d</source> <translation type="unfinished"></translation> </message> <message> - <location filename="x/variable" line="3"/> + <location filename="x/variable" line="44"/> <source>x/variable</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z index 34364d6..4b237dc 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("spaces/z"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces index cf56fc4..6ce9ff0 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("variable with spaces"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with index a156ca1..b2a1e57 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("with"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d index e2effde..30ab25a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("x/d"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable index a86e387..a6093aa 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("x/variable"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp index ad87e70..e1876c8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp index 912963d..2e40b44 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result index 470d6eb..edc2fcb 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result @@ -4,25 +4,25 @@ <context> <name>QApplication</name> <message> - <location filename="file1.cpp" line="6"/> + <location filename="file1.cpp" line="47"/> <source>Hello world</source> <comment>top-level wildcard</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="filter.cpp" line="6"/> + <location filename="filter.cpp" line="47"/> <source>Hello world</source> <comment>top-level direct</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/subfile1.cpp" line="6"/> + <location filename="sub/subfile1.cpp" line="47"/> <source>Hello world</source> <comment>nested wildcard</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/subfilter.cpp" line="6"/> + <location filename="sub/subfilter.cpp" line="47"/> <source>Hello world</source> <comment>nested direct</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp index 807d296..91fe89e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp index 6e5dd25..b72253f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp index 845aaa6..4cfec14 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result index c64ba82..e01c533 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result @@ -4,31 +4,31 @@ <context> <name>QApplication</name> <message> - <location filename="common/main.cpp" line="6"/> + <location filename="common/main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="mac/main_mac.cpp" line="6"/> + <location filename="mac/main_mac.cpp" line="47"/> <source>Hello macworld</source> <comment>mac-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="relativity/relativity.cpp" line="6"/> + <location filename="relativity/relativity.cpp" line="47"/> <source>relativity.pri</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="unix/main_unix.cpp" line="6"/> + <location filename="unix/main_unix.cpp" line="47"/> <source>Hello unixworld</source> <comment>unix-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="win/main_win.cpp" line="6"/> + <location filename="win/main_win.cpp" line="47"/> <source>Hello windowsworld</source> <comment>Windows-only file</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp index 83ae7d5..a23e65a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp index 229e154..c15c2f7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp index 4eb39f7..b879aa7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result index 5914d0b..a6972bd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result @@ -4,7 +4,7 @@ <context> <name>QApplication</name> <message> - <location filename="sub1/main.cpp" line="6"/> + <location filename="sub1/main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp index 845aaa6..4cfec14 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result index c0352fb..6621de9 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result @@ -4,25 +4,25 @@ <context> <name>QApplication</name> <message> - <location filename="win/main_win.cpp" line="6"/> + <location filename="win/main_win.cpp" line="47"/> <source>Hello windowsworld</source> <comment>Windows-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="mac/main_mac.cpp" line="6"/> + <location filename="mac/main_mac.cpp" line="47"/> <source>Hello macworld</source> <comment>mac-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="unix/main_unix.cpp" line="6"/> + <location filename="unix/main_unix.cpp" line="47"/> <source>Hello unixworld</source> <comment>unix-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="common/main.cpp" line="6"/> + <location filename="common/main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp index 229e154..c15c2f7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp index 4eb39f7..b879aa7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result b/tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result index 7fde820..e398701 100644 --- a/tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result @@ -4,7 +4,7 @@ <context> <name>QApplication</name> <message> - <location filename="../main.cpp" line="6"/> + <location filename="../main.cpp" line="47"/> <source>Hello world</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp b/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp index 477f5ec..28c6373 100644 --- a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result b/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result index f6415bf..b86edae 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result @@ -4,22 +4,22 @@ <context> <name>FindDialog</name> <message> - <location filename="sub/finddialog.cpp" line="16"/> + <location filename="sub/finddialog.cpp" line="85"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="25"/> + <location filename="sub/finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="27"/> + <location filename="sub/finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="29"/> + <location filename="sub/finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result b/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result index 581e4b6..835b3e0 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result @@ -4,32 +4,32 @@ <context> <name>FindDialog</name> <message> - <location filename="project.ui" line="15"/> + <location filename="project.ui" line="55"/> <source>Qt Assistant - Finn text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="project.ui" line="18"/> + <location filename="project.ui" line="58"/> <source>Finn tekst</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="16"/> + <location filename="sub/finddialog.cpp" line="85"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="25"/> + <location filename="sub/finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="27"/> + <location filename="sub/finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/finddialog.cpp" line="29"/> + <location filename="sub/finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> @@ -37,53 +37,53 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source> newline at the start</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>newline at the end </source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>newline and space at the end </source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>space and newline at the end </source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="57"/> <source> Tab at the start and newline at the end </source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source> newline and tab at the start</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="18"/> + <location filename="main.cpp" line="59"/> <source> space and tab at the start</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="19"/> + <location filename="main.cpp" line="60"/> <source> space_first</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="20"/> + <location filename="main.cpp" line="61"/> <source>space_last </source> <translation type="unfinished"></translation> </message> @@ -91,7 +91,7 @@ newline at the start</source> <context> <name>text/c++</name> <message> - <location filename="sub/filetypes/main.c++" line="6"/> + <location filename="sub/filetypes/main.c++" line="47"/> <source>test</source> <translation type="unfinished"></translation> </message> @@ -99,7 +99,7 @@ newline at the start</source> <context> <name>text/cpp</name> <message> - <location filename="sub/filetypes/main.cpp" line="6"/> + <location filename="sub/filetypes/main.cpp" line="47"/> <source>test</source> <translation type="unfinished"></translation> </message> @@ -107,7 +107,7 @@ newline at the start</source> <context> <name>text/cxx</name> <message> - <location filename="sub/filetypes/main.cxx" line="6"/> + <location filename="sub/filetypes/main.cxx" line="47"/> <source>test</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/main.cpp b/tests/auto/linguist/lupdate/testdata/recursivescan/main.cpp index 905cccd..e028d95 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QDebug> diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui b/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui index 8dea10b..6da2699 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui @@ -1,5 +1,38 @@ <ui version="4.0" > <author></author> +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** This file is part of the test suite of the Qt Toolkit. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ <exportmacro></exportmacro> <class>FindDialog</class> <widget class="QWidget" name="FindDialog" > diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.c++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.c++ index 4da3ded..e6d0460 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.c++ +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.c++ @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> int main(int argc, char **argv) diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cpp b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cpp index 9b3207d..0bbe233 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> int main(int argc, char **argv) diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cxx b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cxx index b741ff0..2093042 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cxx +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/filetypes/main.cxx @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> int main(int argc, char **argv) diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp index 3875473..3aa483e 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp @@ -1,3 +1,36 @@ +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** This file is part of the test suite of the Qt Toolkit. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" diff --git a/tests/auto/mediaobject/dummy/audiooutput.h b/tests/auto/mediaobject/dummy/audiooutput.h index 39efb55..47fb9f0 100644 --- a/tests/auto/mediaobject/dummy/audiooutput.h +++ b/tests/auto/mediaobject/dummy/audiooutput.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef PHONON_DUMMY_AUDIOOUTPUT_H #define PHONON_DUMMY_AUDIOOUTPUT_H diff --git a/tests/auto/mediaobject/dummy/backend.h b/tests/auto/mediaobject/dummy/backend.h index 20af216..b7302dd 100644 --- a/tests/auto/mediaobject/dummy/backend.h +++ b/tests/auto/mediaobject/dummy/backend.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef PHONON_DUMMY_BACKEND_H #define PHONON_DUMMY_BACKEND_H diff --git a/tests/auto/mediaobject/dummy/mediaobject.h b/tests/auto/mediaobject/dummy/mediaobject.h index a87b32f..e4c7978 100644 --- a/tests/auto/mediaobject/dummy/mediaobject.h +++ b/tests/auto/mediaobject/dummy/mediaobject.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef PHONON_DUMMY_MEDIAOBJECT_H #define PHONON_DUMMY_MEDIAOBJECT_H diff --git a/tests/auto/mediaobject/dummy/videowidget.h b/tests/auto/mediaobject/dummy/videowidget.h index 2e5a2b8..a8416f9 100644 --- a/tests/auto/mediaobject/dummy/videowidget.h +++ b/tests/auto/mediaobject/dummy/videowidget.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test sutie 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef PHONON_DUMMY_VIDEOWIDGET_H #define PHONON_DUMMY_VIDEOWIDGET_H diff --git a/tests/auto/moc/testproject/Plugin/Plugin.h b/tests/auto/moc/testproject/Plugin/Plugin.h index da3fa16..90fd985 100644 --- a/tests/auto/moc/testproject/Plugin/Plugin.h +++ b/tests/auto/moc/testproject/Plugin/Plugin.h @@ -45,6 +45,8 @@ struct MyInterface virtual void blah() = 0; }; +QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(MyInterface, "MyInterface") +QT_END_NAMESPACE diff --git a/tests/auto/qabstractitemmodel/dynamictreemodel.cpp b/tests/auto/qabstractitemmodel/dynamictreemodel.cpp new file mode 100644 index 0000000..374b7db --- /dev/null +++ b/tests/auto/qabstractitemmodel/dynamictreemodel.cpp @@ -0,0 +1,309 @@ +/* + Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ + +#include "dynamictreemodel.h" + +#include <QHash> +#include <QList> +#include <QTimer> + +#include <QDebug> + +#include <kdebug.h> + +DynamicTreeModel::DynamicTreeModel(QObject *parent) + : QAbstractItemModel(parent), + nextId(1) +{ +} + +QModelIndex DynamicTreeModel::index(int row, int column, const QModelIndex &parent) const +{ +// if (column != 0) +// return QModelIndex(); + + + if ( column < 0 || row < 0 ) + return QModelIndex(); + + QList<QList<qint64> > childIdColumns = m_childItems.value(parent.internalId()); + + + if (childIdColumns.size() == 0) + return QModelIndex(); + + if (column >= childIdColumns.size()) + return QModelIndex(); + + QList<qint64> rowIds = childIdColumns.at(column); + + if ( row >= rowIds.size()) + return QModelIndex(); + + qint64 id = rowIds.at(row); + + return createIndex(row, column, reinterpret_cast<void *>(id)); + +} + +qint64 DynamicTreeModel::findParentId(qint64 searchId) const +{ + if (searchId <= 0) + return -1; + + QHashIterator<qint64, QList<QList<qint64> > > i(m_childItems); + while (i.hasNext()) + { + i.next(); + QListIterator<QList<qint64> > j(i.value()); + while (j.hasNext()) + { + QList<qint64> l = j.next(); + if (l.contains(searchId)) + { + return i.key(); + } + } + } + return -1; +} + +QModelIndex DynamicTreeModel::parent(const QModelIndex &index) const +{ + if (!index.isValid()) + return QModelIndex(); + + qint64 searchId = index.internalId(); + qint64 parentId = findParentId(searchId); + // Will never happen for valid index, but what the hey... + if (parentId <= 0) + return QModelIndex(); + + qint64 grandParentId = findParentId(parentId); + if (grandParentId < 0) + grandParentId = 0; + + int column = 0; + QList<qint64> childList = m_childItems.value(grandParentId).at(column); + + int row = childList.indexOf(parentId); + + return createIndex(row, column, reinterpret_cast<void *>(parentId)); + +} + +int DynamicTreeModel::rowCount(const QModelIndex &index ) const +{ + QList<QList<qint64> > cols = m_childItems.value(index.internalId()); + + if (cols.size() == 0 ) + return 0; + + if (index.column() > 0) + return 0; + + return cols.at(0).size(); +} + +int DynamicTreeModel::columnCount(const QModelIndex &index ) const +{ +// Q_UNUSED(index); + return m_childItems.value(index.internalId()).size(); +} + +QVariant DynamicTreeModel::data(const QModelIndex &index, int role) const +{ + if (!index.isValid()) + return QVariant(); + + if (Qt::DisplayRole == role) + { + return m_items.value(index.internalId()); + } + return QVariant(); +} + +void DynamicTreeModel::clear() +{ + m_items.clear(); + m_childItems.clear(); + nextId = 1; + reset(); +} + + +ModelChangeCommand::ModelChangeCommand( DynamicTreeModel *model, QObject *parent ) + : QObject(parent), m_model(model), m_numCols(1), m_startRow(-1), m_endRow(-1) +{ + +} + +QModelIndex ModelChangeCommand::findIndex(QList<int> rows) +{ + const int col = 0; + QModelIndex parent = QModelIndex(); + QListIterator<int> i(rows); + while (i.hasNext()) + { + parent = m_model->index(i.next(), col, parent); + Q_ASSERT(parent.isValid()); + } + return parent; +} + +ModelInsertCommand::ModelInsertCommand(DynamicTreeModel *model, QObject *parent ) + : ModelChangeCommand(model, parent) +{ + +} + +void ModelInsertCommand::doCommand() +{ + QModelIndex parent = findIndex(m_rowNumbers); + m_model->beginInsertRows(parent, m_startRow, m_endRow); + qint64 parentId = parent.internalId(); + for (int row = m_startRow; row <= m_endRow; row++) + { + for(int col = 0; col < m_numCols; col++ ) + { + if (m_model->m_childItems[parentId].size() <= col) + { + m_model->m_childItems[parentId].append(QList<qint64>()); + } +// QString name = QUuid::createUuid().toString(); + qint64 id = m_model->newId(); + QString name = QString::number(id); + + m_model->m_items.insert(id, name); + m_model->m_childItems[parentId][col].insert(row, id); + + } + } + m_model->endInsertRows(); +} + + +ModelMoveCommand::ModelMoveCommand(DynamicTreeModel *model, QObject *parent) + : ModelChangeCommand(model, parent) +{ + +} +bool ModelMoveCommand::emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow) +{ + return m_model->beginMoveRows(srcParent, srcStart, srcEnd, destParent, destRow); +} + +void ModelMoveCommand::doCommand() +{ + QModelIndex srcParent = findIndex(m_rowNumbers); + QModelIndex destParent = findIndex(m_destRowNumbers); + + if (!emitPreSignal(srcParent, m_startRow, m_endRow, destParent, m_destRow)) + { + return; + } + + for (int column = 0; column < m_numCols; ++column) + { + QList<qint64> l = m_model->m_childItems.value(srcParent.internalId())[column].mid(m_startRow, m_endRow - m_startRow + 1 ); + + for (int i = m_startRow; i <= m_endRow ; i++) + { + m_model->m_childItems[srcParent.internalId()][column].removeAt(m_startRow); + } + int d; + if (m_destRow < m_startRow) + d = m_destRow; + else + { + if (srcParent == destParent) + d = m_destRow - (m_endRow - m_startRow + 1); + else + d = m_destRow - (m_endRow - m_startRow) + 1; + } + + foreach(const qint64 id, l) + { + m_model->m_childItems[destParent.internalId()][column].insert(d++, id); + } + } + + emitPostSignal(); +} + +void ModelMoveCommand::emitPostSignal() +{ + m_model->endMoveRows(); +} + +ModelResetCommand::ModelResetCommand(DynamicTreeModel* model, QObject* parent) + : ModelMoveCommand(model, parent) +{ + +} + +ModelResetCommand::~ModelResetCommand() +{ + +} + +bool ModelResetCommand::emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow) +{ + Q_UNUSED(srcParent); + Q_UNUSED(srcStart); + Q_UNUSED(srcEnd); + Q_UNUSED(destParent); + Q_UNUSED(destRow); + + return true; +} + +void ModelResetCommand::emitPostSignal() +{ + m_model->reset(); +} + +ModelResetCommandFixed::ModelResetCommandFixed(DynamicTreeModel* model, QObject* parent) + : ModelMoveCommand(model, parent) +{ + +} + +ModelResetCommandFixed::~ModelResetCommandFixed() +{ + +} + +bool ModelResetCommandFixed::emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow) +{ + Q_UNUSED(srcParent); + Q_UNUSED(srcStart); + Q_UNUSED(srcEnd); + Q_UNUSED(destParent); + Q_UNUSED(destRow); + + m_model->beginResetModel(); + return true; +} + +void ModelResetCommandFixed::emitPostSignal() +{ + m_model->endResetModel(); +} + diff --git a/tests/auto/qabstractitemmodel/dynamictreemodel.h b/tests/auto/qabstractitemmodel/dynamictreemodel.h new file mode 100644 index 0000000..c19ed9d --- /dev/null +++ b/tests/auto/qabstractitemmodel/dynamictreemodel.h @@ -0,0 +1,180 @@ +/* + Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ + +#ifndef DYNAMICTREEMODEL_H +#define DYNAMICTREEMODEL_H + +#include <QAbstractItemModel> + +#include <QHash> +#include <QList> + +#include <QDebug> + +#include <kdebug.h> + +template<typename T> class QList; + +class DynamicTreeModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + DynamicTreeModel(QObject *parent = 0); + + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + QModelIndex parent(const QModelIndex &index) const; + int rowCount(const QModelIndex &index = QModelIndex()) const; + int columnCount(const QModelIndex &index = QModelIndex()) const; + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + + void clear(); + +protected slots: + + /** + Finds the parent id of the string with id @p searchId. + + Returns -1 if not found. + */ + qint64 findParentId(qint64 searchId) const; + +private: + QHash<qint64, QString> m_items; + QHash<qint64, QList<QList<qint64> > > m_childItems; + qint64 nextId; + qint64 newId() { return nextId++; }; + + QModelIndex m_nextParentIndex; + int m_nextRow; + + int m_depth; + int maxDepth; + + friend class ModelInsertCommand; + friend class ModelMoveCommand; + friend class ModelResetCommand; + friend class ModelResetCommandFixed; + +}; + + +class ModelChangeCommand : public QObject +{ + Q_OBJECT +public: + + ModelChangeCommand( DynamicTreeModel *model, QObject *parent = 0 ); + + virtual ~ModelChangeCommand() {} + + void setAncestorRowNumbers(QList<int> rowNumbers) { m_rowNumbers = rowNumbers; } + + QModelIndex findIndex(QList<int> rows); + + void setStartRow(int row) { m_startRow = row; } + + void setEndRow(int row) { m_endRow = row; } + + void setNumCols(int cols) { m_numCols = cols; } + + virtual void doCommand() = 0; + +protected: + DynamicTreeModel* m_model; + QList<int> m_rowNumbers; + int m_numCols; + int m_startRow; + int m_endRow; + +}; + +typedef QList<ModelChangeCommand*> ModelChangeCommandList; + +class ModelInsertCommand : public ModelChangeCommand +{ + Q_OBJECT + +public: + + ModelInsertCommand(DynamicTreeModel *model, QObject *parent = 0 ); + virtual ~ModelInsertCommand() {} + + virtual void doCommand(); +}; + + +class ModelMoveCommand : public ModelChangeCommand +{ + Q_OBJECT +public: + ModelMoveCommand(DynamicTreeModel *model, QObject *parent); + + virtual ~ModelMoveCommand() {} + + virtual bool emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow); + + virtual void doCommand(); + + virtual void emitPostSignal(); + + void setDestAncestors( QList<int> rows ) { m_destRowNumbers = rows; } + + void setDestRow(int row) { m_destRow = row; } + +protected: + QList<int> m_destRowNumbers; + int m_destRow; +}; + +/** + A command which does a move and emits a reset signal. +*/ +class ModelResetCommand : public ModelMoveCommand +{ + Q_OBJECT +public: + ModelResetCommand(DynamicTreeModel* model, QObject* parent = 0); + + virtual ~ModelResetCommand(); + + virtual bool emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow); + virtual void emitPostSignal(); + +}; + +/** + A command which does a move and emits a beginResetModel and endResetModel signals. +*/ +class ModelResetCommandFixed : public ModelMoveCommand +{ + Q_OBJECT +public: + ModelResetCommandFixed(DynamicTreeModel* model, QObject* parent = 0); + + virtual ~ModelResetCommandFixed(); + + virtual bool emitPreSignal(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destRow); + virtual void emitPostSignal(); + +}; + + +#endif diff --git a/tests/auto/qabstractitemmodel/qabstractitemmodel.pro b/tests/auto/qabstractitemmodel/qabstractitemmodel.pro index 5ad1020..84ed5a2 100644 --- a/tests/auto/qabstractitemmodel/qabstractitemmodel.pro +++ b/tests/auto/qabstractitemmodel/qabstractitemmodel.pro @@ -1,3 +1,6 @@ load(qttest_p4) -SOURCES += tst_qabstractitemmodel.cpp +SOURCES += tst_qabstractitemmodel.cpp dynamictreemodel.cpp +HEADERS += dynamictreemodel.h + QT = core + diff --git a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp index e99ce06..61eeae7 100644 --- a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -43,9 +43,15 @@ #include <QtTest/QtTest> #include <QtCore/QtCore> +#include <QSortFilterProxyModel> + //TESTED_CLASS=QAbstractListModel QAbstractTableModel //TESTED_FILES= +#include "dynamictreemodel.h" + +Q_DECLARE_METATYPE(QModelIndex) + /*! Note that this doesn't test models, but any functionality that QAbstractItemModel shoudl provide */ @@ -86,6 +92,32 @@ private slots: void complexChangesWithPersistent(); + void testMoveSameParentUp_data(); + void testMoveSameParentUp(); + + void testMoveSameParentDown_data(); + void testMoveSameParentDown(); + + void testMoveToGrandParent_data(); + void testMoveToGrandParent(); + + void testMoveToSibling_data(); + void testMoveToSibling(); + + void testMoveToUncle_data(); + void testMoveToUncle(); + + void testMoveToDescendants(); + + void testMoveWithinOwnRange_data(); + void testMoveWithinOwnRange(); + + void testReset(); + + +private: + DynamicTreeModel *m_model; + }; /*! @@ -242,7 +274,20 @@ void tst_QAbstractItemModel::cleanupTestCase() void tst_QAbstractItemModel::init() { - + m_model = new DynamicTreeModel(this); + + ModelInsertCommand *insertCommand = new ModelInsertCommand(m_model, this); + insertCommand->setNumCols(4); + insertCommand->setStartRow(0); + insertCommand->setEndRow(9); + insertCommand->doCommand(); + + insertCommand = new ModelInsertCommand(m_model, this); + insertCommand->setAncestorRowNumbers(QList<int>() << 5); + insertCommand->setNumCols(4); + insertCommand->setStartRow(0); + insertCommand->setEndRow(9); + insertCommand->doCommand(); } void tst_QAbstractItemModel::cleanup() @@ -773,7 +818,7 @@ void tst_QAbstractItemModel::complexChangesWithPersistent() //remove a bunch of columns model.removeColumns(2, 4); - + QVERIFY(a == model.index(1, 1, QModelIndex())); QVERIFY(b == model.index(9, 3, QModelIndex())); QVERIFY(c == model.index(5, 2, QModelIndex())); @@ -784,7 +829,7 @@ void tst_QAbstractItemModel::complexChangesWithPersistent() QVERIFY(!e[i].isValid()); for (int i=6; i <10 ; i++) QVERIFY(e[i] == model.index(2, i-4 , QModelIndex())); - + //move some indexes around model.setPersistent(model.index(1, 1 , QModelIndex()), model.index(9, 3 , QModelIndex())); model.setPersistent(model.index(9, 3 , QModelIndex()), model.index(8, 4 , QModelIndex())); @@ -815,5 +860,901 @@ void tst_QAbstractItemModel::complexChangesWithPersistent() } +void tst_QAbstractItemModel::testMoveSameParentDown_data() +{ + QTest::addColumn<int>("startRow"); + QTest::addColumn<int>("endRow"); + QTest::addColumn<int>("destRow"); + + // Move from the start to the middle + QTest::newRow("move01") << 0 << 2 << 8; + // Move from the start to the end + QTest::newRow("move02") << 0 << 2 << 10; + // Move from the middle to the middle + QTest::newRow("move03") << 3 << 5 << 8; + // Move from the middle to the end + QTest::newRow("move04") << 3 << 5 << 10; +} + +void tst_QAbstractItemModel::testMoveSameParentDown() +{ + QFETCH( int, startRow); + QFETCH( int, endRow); + QFETCH( int, destRow); + + QList<QPersistentModelIndex> persistentList; + QModelIndexList indexList; + + for (int column = 0; column < m_model->columnCount(); ++column) + { + for (int row= 0; row < m_model->rowCount(); ++row) + { + QModelIndex idx = m_model->index(row, column); + QVERIFY(idx.isValid()); + indexList << idx; + persistentList << QPersistentModelIndex(idx); + } + } + + QModelIndex parent = m_model->index(5, 0); + for (int column = 0; column < m_model->columnCount(); ++column) + { + for (int row= 0; row < m_model->rowCount(parent); ++row) + { + QModelIndex idx = m_model->index(row, column, parent); + QVERIFY(idx.isValid()); + indexList << idx; + persistentList << QPersistentModelIndex(idx); + } + } + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setNumCols(4); + moveCommand->setStartRow(startRow); + moveCommand->setEndRow(endRow); + moveCommand->setDestRow(destRow); + moveCommand->doCommand(); + + QVariantList beforeSignal = beforeSpy.takeAt(0); + QVariantList afterSignal = afterSpy.takeAt(0); + + QCOMPARE(beforeSignal.size(), 5); + QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), QModelIndex()); + QCOMPARE(beforeSignal.at(1).toInt(), startRow); + QCOMPARE(beforeSignal.at(2).toInt(), endRow); + QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), QModelIndex()); + QCOMPARE(beforeSignal.at(4).toInt(), destRow); + + QCOMPARE(afterSignal.size(), 5); + QCOMPARE(afterSignal.at(0).value<QModelIndex>(), QModelIndex()); + QCOMPARE(afterSignal.at(1).toInt(), startRow); + QCOMPARE(afterSignal.at(2).toInt(), endRow); + QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex()); + QCOMPARE(afterSignal.at(4).toInt(), destRow); + + for (int i = 0; i < indexList.size(); i++) + { + QModelIndex idx = indexList.at(i); + QModelIndex persistentIndex = persistentList.at(i); + if (idx.parent() == QModelIndex()) + { + int row = idx.row(); + if ( row >= startRow) + { + if (row <= endRow) + { + QCOMPARE(row + destRow - endRow - 1, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idx.parent(), persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else if ( row < destRow) + { + QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idx.parent(), persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + QCOMPARE(idx, persistentIndex); + } + } +} + +void tst_QAbstractItemModel::testMoveSameParentUp_data() +{ + QTest::addColumn<int>("startRow"); + QTest::addColumn<int>("endRow"); + QTest::addColumn<int>("destRow"); + + // Move from the middle to the start + QTest::newRow("move01") << 5 << 7 << 0; + // Move from the end to the start + QTest::newRow("move02") << 8 << 9 << 0; + // Move from the middle to the middle + QTest::newRow("move03") << 5 << 7 << 2; + // Move from the end to the middle + QTest::newRow("move04") << 8 << 9 << 5; +} + +void tst_QAbstractItemModel::testMoveSameParentUp() +{ + + QFETCH( int, startRow); + QFETCH( int, endRow); + QFETCH( int, destRow); + + QList<QPersistentModelIndex> persistentList; + QModelIndexList indexList; + + for (int column = 0; column < m_model->columnCount(); ++column) + { + for (int row= 0; row < m_model->rowCount(); ++row) + { + QModelIndex idx = m_model->index(row, column); + QVERIFY(idx.isValid()); + indexList << idx; + persistentList << QPersistentModelIndex(idx); + } + } + + QModelIndex parent = m_model->index(2, 0); + for (int column = 0; column < m_model->columnCount(); ++column) + { + for (int row= 0; row < m_model->rowCount(parent); ++row) + { + QModelIndex idx = m_model->index(row, column, parent); + QVERIFY(idx.isValid()); + indexList << idx; + persistentList << QPersistentModelIndex(idx); + } + } + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + + ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setNumCols(4); + moveCommand->setStartRow(startRow); + moveCommand->setEndRow(endRow); + moveCommand->setDestRow(destRow); + moveCommand->doCommand(); + + QVariantList beforeSignal = beforeSpy.takeAt(0); + QVariantList afterSignal = afterSpy.takeAt(0); + + QCOMPARE(beforeSignal.size(), 5); + QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), QModelIndex()); + QCOMPARE(beforeSignal.at(1).toInt(), startRow); + QCOMPARE(beforeSignal.at(2).toInt(), endRow); + QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), QModelIndex()); + QCOMPARE(beforeSignal.at(4).toInt(), destRow); + + QCOMPARE(afterSignal.size(), 5); + QCOMPARE(afterSignal.at(0).value<QModelIndex>(), QModelIndex()); + QCOMPARE(afterSignal.at(1).toInt(), startRow); + QCOMPARE(afterSignal.at(2).toInt(), endRow); + QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex()); + QCOMPARE(afterSignal.at(4).toInt(), destRow); + + + for (int i = 0; i < indexList.size(); i++) + { + QModelIndex idx = indexList.at(i); + QModelIndex persistentIndex = persistentList.at(i); + if (idx.parent() == QModelIndex()) + { + int row = idx.row(); + if ( row >= destRow) + { + if (row < startRow) + { + QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idx.parent(), persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else if ( row <= endRow) + { + QCOMPARE(row + destRow - startRow, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idx.parent(), persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + QCOMPARE(idx, persistentIndex); + } + } +} + +void tst_QAbstractItemModel::testMoveToGrandParent_data() +{ + QTest::addColumn<int>("startRow"); + QTest::addColumn<int>("endRow"); + QTest::addColumn<int>("destRow"); + + // Move from the start to the middle + QTest::newRow("move01") << 0 << 2 << 8; + // Move from the start to the end + QTest::newRow("move02") << 0 << 2 << 10; + // Move from the middle to the middle + QTest::newRow("move03") << 3 << 5 << 8; + // Move from the middle to the end + QTest::newRow("move04") << 3 << 5 << 10; + + // Move from the middle to the start + QTest::newRow("move05") << 5 << 7 << 0; + // Move from the end to the start + QTest::newRow("move06") << 8 << 9 << 0; + // Move from the middle to the middle + QTest::newRow("move07") << 5 << 7 << 2; + // Move from the end to the middle + QTest::newRow("move08") << 8 << 9 << 5; + + // Moving to the same row in a different parent doesn't confuse things. + QTest::newRow("move09") << 8 << 8 << 8; + + // Moving to the row of my parent and its neighbours doesn't confuse things + QTest::newRow("move09") << 8 << 8 << 4; + QTest::newRow("move10") << 8 << 8 << 5; + QTest::newRow("move11") << 8 << 8 << 6; + + // Moving everything from one parent to another + QTest::newRow("move12") << 0 << 9 << 10; +} + +void tst_QAbstractItemModel::testMoveToGrandParent() +{ + + QFETCH( int, startRow); + QFETCH( int, endRow); + QFETCH( int, destRow); + + QList<QPersistentModelIndex> persistentList; + QModelIndexList indexList; + QModelIndexList parentsList; + + for (int column = 0; column < m_model->columnCount(); ++column) + { + for (int row= 0; row < m_model->rowCount(); ++row) + { + QModelIndex idx = m_model->index(row, column); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + } + + QModelIndex sourceIndex = m_model->index(5, 0); + for (int column = 0; column < m_model->columnCount(); ++column) + { + for (int row= 0; row < m_model->rowCount(sourceIndex); ++row) + { + QModelIndex idx = m_model->index(row, column, sourceIndex); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + } + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + + ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setAncestorRowNumbers(QList<int>() << 5); + moveCommand->setNumCols(4); + moveCommand->setStartRow(startRow); + moveCommand->setEndRow(endRow); + moveCommand->setDestRow(destRow); + moveCommand->doCommand(); + + QVariantList beforeSignal = beforeSpy.takeAt(0); + QVariantList afterSignal = afterSpy.takeAt(0); + + QCOMPARE(beforeSignal.size(), 5); + QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), sourceIndex); + QCOMPARE(beforeSignal.at(1).toInt(), startRow); + QCOMPARE(beforeSignal.at(2).toInt(), endRow); + QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), QModelIndex()); + QCOMPARE(beforeSignal.at(4).toInt(), destRow); + + QCOMPARE(afterSignal.size(), 5); + QCOMPARE(afterSignal.at(0).value<QModelIndex>(), sourceIndex); + QCOMPARE(afterSignal.at(1).toInt(), startRow); + QCOMPARE(afterSignal.at(2).toInt(), endRow); + QCOMPARE(afterSignal.at(3).value<QModelIndex>(), QModelIndex()); + QCOMPARE(afterSignal.at(4).toInt(), destRow); + + for (int i = 0; i < indexList.size(); i++) + { + QModelIndex idx = indexList.at(i); + QModelIndex idxParent = parentsList.at(i); + QModelIndex persistentIndex = persistentList.at(i); + int row = idx.row(); + if (idxParent == QModelIndex()) + { + if ( row >= destRow) + { + QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idxParent, persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + if (row < startRow) + { + QCOMPARE(idx, persistentIndex); + } else if (row <= endRow) + { + QCOMPARE(row + destRow - startRow, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(QModelIndex(), persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else { + QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + + if (idxParent.row() >= destRow) + { + QModelIndex adjustedParent; + adjustedParent = idxParent.sibling( idxParent.row() + endRow - startRow + 1, idxParent.column()); + QCOMPARE(adjustedParent, persistentIndex.parent()); + } else + { + QCOMPARE(idxParent, persistentIndex.parent()); + } + QCOMPARE(idx.model(), persistentIndex.model()); + } + } + } +} + +void tst_QAbstractItemModel::testMoveToSibling_data() +{ + QTest::addColumn<int>("startRow"); + QTest::addColumn<int>("endRow"); + QTest::addColumn<int>("destRow"); + + // Move from the start to the middle + QTest::newRow("move01") << 0 << 2 << 8; + // Move from the start to the end + QTest::newRow("move02") << 0 << 2 << 10; + // Move from the middle to the middle + QTest::newRow("move03") << 2 << 4 << 8; + // Move from the middle to the end + QTest::newRow("move04") << 2 << 4 << 10; + + // Move from the middle to the start + QTest::newRow("move05") << 8 << 8 << 0; + // Move from the end to the start + QTest::newRow("move06") << 8 << 9 << 0; + // Move from the middle to the middle + QTest::newRow("move07") << 6 << 8 << 2; + // Move from the end to the middle + QTest::newRow("move08") << 8 << 9 << 5; + + // Moving to the same row in a different parent doesn't confuse things. + QTest::newRow("move09") << 8 << 8 << 8; + + // Moving to the row of my target and its neighbours doesn't confuse things + QTest::newRow("move09") << 8 << 8 << 4; + QTest::newRow("move10") << 8 << 8 << 5; + QTest::newRow("move11") << 8 << 8 << 6; +} + +void tst_QAbstractItemModel::testMoveToSibling() +{ + + QFETCH( int, startRow); + QFETCH( int, endRow); + QFETCH( int, destRow); + + QList<QPersistentModelIndex> persistentList; + QModelIndexList indexList; + QModelIndexList parentsList; + + const int column = 0; + + for (int i= 0; i < m_model->rowCount(); ++i) + { + QModelIndex idx = m_model->index(i, column); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + + QModelIndex destIndex = m_model->index(5, 0); + QModelIndex sourceIndex; + for (int i= 0; i < m_model->rowCount(destIndex); ++i) + { + QModelIndex idx = m_model->index(i, column, destIndex); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + + ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setNumCols(4); + moveCommand->setStartRow(startRow); + moveCommand->setEndRow(endRow); + moveCommand->setDestAncestors(QList<int>() << 5); + moveCommand->setDestRow(destRow); + moveCommand->doCommand(); + + QVariantList beforeSignal = beforeSpy.takeAt(0); + QVariantList afterSignal = afterSpy.takeAt(0); + + QCOMPARE(beforeSignal.size(), 5); + QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), sourceIndex); + QCOMPARE(beforeSignal.at(1).toInt(), startRow); + QCOMPARE(beforeSignal.at(2).toInt(), endRow); + QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), destIndex); + QCOMPARE(beforeSignal.at(4).toInt(), destRow); + + QCOMPARE(afterSignal.size(), 5); + QCOMPARE(afterSignal.at(0).value<QModelIndex>(), sourceIndex); + QCOMPARE(afterSignal.at(1).toInt(), startRow); + QCOMPARE(afterSignal.at(2).toInt(), endRow); + QCOMPARE(afterSignal.at(3).value<QModelIndex>(), destIndex); + QCOMPARE(afterSignal.at(4).toInt(), destRow); + + for (int i = 0; i < indexList.size(); i++) + { + QModelIndex idx = indexList.at(i); + QModelIndex idxParent = parentsList.at(i); + QModelIndex persistentIndex = persistentList.at(i); + + QModelIndex adjustedDestination = destIndex.sibling(destIndex.row() - (endRow - startRow + 1), destIndex.column()); + int row = idx.row(); + if (idxParent == destIndex) + { + if ( row >= destRow) + { + QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + if (idxParent.row() > startRow) + { + QCOMPARE(adjustedDestination, persistentIndex.parent()); + } else { + QCOMPARE(destIndex, persistentIndex.parent()); + } + QCOMPARE(idx.model(), persistentIndex.model()); + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + if (row < startRow) + { + QCOMPARE(idx, persistentIndex); + } else if (row <= endRow) + { + QCOMPARE(row + destRow - startRow, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + if (destIndex.row() > startRow) + { + QCOMPARE(adjustedDestination, persistentIndex.parent()); + } else { + QCOMPARE(destIndex, persistentIndex.parent()); + } + + QCOMPARE(idx.model(), persistentIndex.model()); + + } else { + QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idxParent, persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } + } + } +} + +void tst_QAbstractItemModel::testMoveToUncle_data() +{ + + QTest::addColumn<int>("startRow"); + QTest::addColumn<int>("endRow"); + QTest::addColumn<int>("destRow"); + + // Move from the start to the middle + QTest::newRow("move01") << 0 << 2 << 8; + // Move from the start to the end + QTest::newRow("move02") << 0 << 2 << 10; + // Move from the middle to the middle + QTest::newRow("move03") << 3 << 5 << 8; + // Move from the middle to the end + QTest::newRow("move04") << 3 << 5 << 10; + + // Move from the middle to the start + QTest::newRow("move05") << 5 << 7 << 0; + // Move from the end to the start + QTest::newRow("move06") << 8 << 9 << 0; + // Move from the middle to the middle + QTest::newRow("move07") << 5 << 7 << 2; + // Move from the end to the middle + QTest::newRow("move08") << 8 << 9 << 5; + + // Moving to the same row in a different parent doesn't confuse things. + QTest::newRow("move09") << 8 << 8 << 8; + + // Moving to the row of my parent and its neighbours doesn't confuse things + QTest::newRow("move09") << 8 << 8 << 4; + QTest::newRow("move10") << 8 << 8 << 5; + QTest::newRow("move11") << 8 << 8 << 6; + + // Moving everything from one parent to another + QTest::newRow("move12") << 0 << 9 << 10; +} + +void tst_QAbstractItemModel::testMoveToUncle() +{ + // Need to have some extra rows available. + ModelInsertCommand *insertCommand = new ModelInsertCommand(m_model, this); + insertCommand->setAncestorRowNumbers(QList<int>() << 9); + insertCommand->setNumCols(4); + insertCommand->setStartRow(0); + insertCommand->setEndRow(9); + insertCommand->doCommand(); + + QFETCH( int, startRow); + QFETCH( int, endRow); + QFETCH( int, destRow); + + QList<QPersistentModelIndex> persistentList; + QModelIndexList indexList; + QModelIndexList parentsList; + + const int column = 0; + + QModelIndex sourceIndex = m_model->index(9, 0); + for (int i= 0; i < m_model->rowCount(sourceIndex); ++i) + { + QModelIndex idx = m_model->index(i, column, sourceIndex); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + + QModelIndex destIndex = m_model->index(5, 0); + for (int i= 0; i < m_model->rowCount(destIndex); ++i) + { + QModelIndex idx = m_model->index(i, column, destIndex); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setAncestorRowNumbers(QList<int>() << 9); + moveCommand->setNumCols(4); + moveCommand->setStartRow(startRow); + moveCommand->setEndRow(endRow); + moveCommand->setDestAncestors(QList<int>() << 5); + moveCommand->setDestRow(destRow); + moveCommand->doCommand(); + + QVariantList beforeSignal = beforeSpy.takeAt(0); + QVariantList afterSignal = afterSpy.takeAt(0); + + QCOMPARE(beforeSignal.size(), 5); + QCOMPARE(beforeSignal.at(0).value<QModelIndex>(), sourceIndex); + QCOMPARE(beforeSignal.at(1).toInt(), startRow); + QCOMPARE(beforeSignal.at(2).toInt(), endRow); + QCOMPARE(beforeSignal.at(3).value<QModelIndex>(), destIndex); + QCOMPARE(beforeSignal.at(4).toInt(), destRow); + + QCOMPARE(afterSignal.size(), 5); + QCOMPARE(afterSignal.at(0).value<QModelIndex>(), sourceIndex); + QCOMPARE(afterSignal.at(1).toInt(), startRow); + QCOMPARE(afterSignal.at(2).toInt(), endRow); + QCOMPARE(afterSignal.at(3).value<QModelIndex>(), destIndex); + QCOMPARE(afterSignal.at(4).toInt(), destRow); + + for (int i = 0; i < indexList.size(); i++) + { + QModelIndex idx = indexList.at(i); + QModelIndex idxParent = parentsList.at(i); + QModelIndex persistentIndex = persistentList.at(i); + + int row = idx.row(); + if (idxParent == destIndex) + { + if ( row >= destRow) + { + QCOMPARE(row + endRow - startRow + 1, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(destIndex, persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } else + { + QCOMPARE(idx, persistentIndex); + } + } else + { + if (row < startRow) + { + QCOMPARE(idx, persistentIndex); + } else if (row <= endRow) + { + QCOMPARE(row + destRow - startRow, persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(destIndex, persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + + } else { + QCOMPARE(row - (endRow - startRow + 1), persistentIndex.row() ); + QCOMPARE(idx.column(), persistentIndex.column()); + QCOMPARE(idxParent, persistentIndex.parent()); + QCOMPARE(idx.model(), persistentIndex.model()); + } + } + } +} + +void tst_QAbstractItemModel::testMoveToDescendants() +{ + // Attempt to move a row to its ancestors depth rows deep. + const int depth = 6; + + // Need to have some extra rows available in a tree. + QList<int> rows; + ModelInsertCommand *insertCommand; + for (int i = 0; i < depth; i++) + { + insertCommand = new ModelInsertCommand(m_model, this); + insertCommand->setAncestorRowNumbers(rows); + insertCommand->setNumCols(4); + insertCommand->setStartRow(0); + insertCommand->setEndRow(9); + insertCommand->doCommand(); + rows << 9; + } + + QList<QPersistentModelIndex> persistentList; + QModelIndexList indexList; + QModelIndexList parentsList; + + const int column = 0; + + QModelIndex sourceIndex = m_model->index(9, 0); + for (int i= 0; i < m_model->rowCount(sourceIndex); ++i) + { + QModelIndex idx = m_model->index(i, column, sourceIndex); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + + QModelIndex destIndex = m_model->index(5, 0); + for (int i= 0; i < m_model->rowCount(destIndex); ++i) + { + QModelIndex idx = m_model->index(i, column, destIndex); + QVERIFY(idx.isValid()); + indexList << idx; + parentsList << idx.parent(); + persistentList << QPersistentModelIndex(idx); + } + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + ModelMoveCommand *moveCommand; + QList<int> ancestors; + while (ancestors.size() < depth) + { + ancestors << 9; + for (int row = 0; row <= 9; row++) + { + moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setNumCols(4); + moveCommand->setStartRow(9); + moveCommand->setEndRow(9); + moveCommand->setDestAncestors(ancestors); + moveCommand->setDestRow(row); + moveCommand->doCommand(); + + QVERIFY(beforeSpy.size() == 0); + QVERIFY(afterSpy.size() == 0); + } + } +} + +void tst_QAbstractItemModel::testMoveWithinOwnRange_data() +{ + QTest::addColumn<int>("startRow"); + QTest::addColumn<int>("endRow"); + QTest::addColumn<int>("destRow"); + + QTest::newRow("move01") << 0 << 0 << 0; + QTest::newRow("move02") << 0 << 0 << 1; + QTest::newRow("move03") << 0 << 5 << 0; + QTest::newRow("move04") << 0 << 5 << 1; + QTest::newRow("move05") << 0 << 5 << 2; + QTest::newRow("move06") << 0 << 5 << 3; + QTest::newRow("move07") << 0 << 5 << 4; + QTest::newRow("move08") << 0 << 5 << 5; + QTest::newRow("move09") << 0 << 5 << 6; + QTest::newRow("move08") << 3 << 5 << 5; + QTest::newRow("move08") << 3 << 5 << 6; + QTest::newRow("move09") << 4 << 5 << 5; + QTest::newRow("move10") << 4 << 5 << 6; + QTest::newRow("move11") << 5 << 5 << 5; + QTest::newRow("move12") << 5 << 5 << 6; + QTest::newRow("move13") << 5 << 9 << 9; + QTest::newRow("move14") << 5 << 9 << 10; + QTest::newRow("move15") << 6 << 9 << 9; + QTest::newRow("move16") << 6 << 9 << 10; + QTest::newRow("move17") << 7 << 9 << 9; + QTest::newRow("move18") << 7 << 9 << 10; + QTest::newRow("move19") << 8 << 9 << 9; + QTest::newRow("move20") << 8 << 9 << 10; + QTest::newRow("move21") << 9 << 9 << 9; + QTest::newRow("move22") << 0 << 9 << 10; + +} + +void tst_QAbstractItemModel::testMoveWithinOwnRange() +{ + + QFETCH( int, startRow); + QFETCH( int, endRow); + QFETCH( int, destRow); + + + QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int))); + + ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this); + moveCommand->setNumCols(4); + moveCommand->setStartRow(startRow); + moveCommand->setEndRow(endRow); + moveCommand->setDestRow(destRow); + moveCommand->doCommand(); + + QVERIFY(beforeSpy.size() == 0); + QVERIFY(afterSpy.size() == 0); + + +} + +class ListenerObject : public QObject +{ + Q_OBJECT +public: + ListenerObject(QAbstractProxyModel *parent); + +protected: + void fillIndexStores(const QModelIndex &parent); + +public slots: + void slotAboutToBeReset(); + void slotReset(); + +private: + QAbstractProxyModel *m_model; + QList<QPersistentModelIndex> m_persistentIndexes; + QModelIndexList m_nonPersistentIndexes; +}; + + +ListenerObject::ListenerObject(QAbstractProxyModel *parent) + : QObject(parent), m_model(parent) +{ + connect(m_model, SIGNAL(modelAboutToBeReset()), SLOT(slotAboutToBeReset())); + connect(m_model, SIGNAL(modelReset()), SLOT(slotReset())); + + fillIndexStores(QModelIndex()); +} + +void ListenerObject::fillIndexStores(const QModelIndex &parent) +{ + const int column = 0; + int row = 0; + QModelIndex idx = m_model->index(row, column, parent); + while (idx.isValid()) + { + m_persistentIndexes << QPersistentModelIndex(idx); + m_nonPersistentIndexes << idx; + if (m_model->hasChildren(idx)) + { + fillIndexStores(idx); + } + ++row; + idx = m_model->index(row, column, parent); + } +} + +void ListenerObject::slotAboutToBeReset() +{ + // Nothing has been changed yet. All indexes should be the same. + for (int i = 0; i < m_persistentIndexes.size(); ++i) + { + QModelIndex idx = m_persistentIndexes.at(i); + QVERIFY(idx == m_nonPersistentIndexes.at(i)); + QVERIFY(m_model->mapToSource(idx).isValid()); + } +} + +void ListenerObject::slotReset() +{ + foreach(const QModelIndex &idx, m_persistentIndexes) + { + QVERIFY(!idx.isValid()); + } +} + + +void tst_QAbstractItemModel::testReset() +{ + QSignalSpy beforeResetSpy(m_model, SIGNAL(modelAboutToBeReset())); + QSignalSpy afterResetSpy(m_model, SIGNAL(modelReset())); + + + QSortFilterProxyModel *nullProxy = new QSortFilterProxyModel(this); + nullProxy->setSourceModel(m_model); + + // Makes sure the model and proxy are in a consistent state. before and after reset. + new ListenerObject(nullProxy); + + ModelResetCommandFixed *resetCommand = new ModelResetCommandFixed(m_model, this); + + resetCommand->setNumCols(4); + resetCommand->setStartRow(0); + resetCommand->setEndRow(0); + resetCommand->setDestRow(0); + resetCommand->setDestAncestors(QList<int>() << 5); + resetCommand->doCommand(); + + // Verify that the correct signals were emitted + QVERIFY(beforeResetSpy.size() == 1); + QVERIFY(afterResetSpy.size() == 1); + + // Verify that the move actually happened. + QVERIFY(m_model->rowCount() == 9); + QModelIndex destIndex = m_model->index(4, 0); + QVERIFY(m_model->rowCount(destIndex) == 11); + +} + + QTEST_MAIN(tst_QAbstractItemModel) #include "tst_qabstractitemmodel.moc" diff --git a/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro b/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro new file mode 100644 index 0000000..080719a --- /dev/null +++ b/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qabstractvideobuffer.cpp + +QT += multimedia +requires(contains(QT_CONFIG, multimedia)) diff --git a/tests/auto/qabstractvideobuffer/tst_qabstractvideobuffer.cpp b/tests/auto/qabstractvideobuffer/tst_qabstractvideobuffer.cpp new file mode 100644 index 0000000..2f376d5 --- /dev/null +++ b/tests/auto/qabstractvideobuffer/tst_qabstractvideobuffer.cpp @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> + +#include <QtMultimedia/QAbstractVideoBuffer> + +class tst_QAbstractVideoBuffer : public QObject +{ + Q_OBJECT +public: + tst_QAbstractVideoBuffer(); + ~tst_QAbstractVideoBuffer(); + +public slots: + void initTestCase(); + void cleanupTestCase(); + void init(); + void cleanup(); + +private slots: + void handleType_data(); + void handleType(); + void handle(); +}; + +class QtTestVideoBuffer : public QAbstractVideoBuffer +{ +public: + QtTestVideoBuffer(QAbstractVideoBuffer::HandleType type) : QAbstractVideoBuffer(type) {} + + MapMode mapMode() const { return NotMapped; } + + uchar *map(MapMode, int *, int *) { return 0; } + void unmap() {} +}; + +tst_QAbstractVideoBuffer::tst_QAbstractVideoBuffer() +{ +} + +tst_QAbstractVideoBuffer::~tst_QAbstractVideoBuffer() +{ +} + +void tst_QAbstractVideoBuffer::initTestCase() +{ +} + +void tst_QAbstractVideoBuffer::cleanupTestCase() +{ +} + +void tst_QAbstractVideoBuffer::init() +{ +} + +void tst_QAbstractVideoBuffer::cleanup() +{ +} + +void tst_QAbstractVideoBuffer::handleType_data() +{ + QTest::addColumn<QAbstractVideoBuffer::HandleType>("type"); + + QTest::newRow("none") + << QAbstractVideoBuffer::NoHandle; + QTest::newRow("opengl") + << QAbstractVideoBuffer::GLTextureHandle; + QTest::newRow("user1") + << QAbstractVideoBuffer::UserHandle; + QTest::newRow("user2") + << QAbstractVideoBuffer::HandleType(QAbstractVideoBuffer::UserHandle + 1); +} + +void tst_QAbstractVideoBuffer::handleType() +{ + QFETCH(QAbstractVideoBuffer::HandleType, type); + + QtTestVideoBuffer buffer(type); + + QCOMPARE(buffer.handleType(), type); +} + +void tst_QAbstractVideoBuffer::handle() +{ + QtTestVideoBuffer buffer(QAbstractVideoBuffer::NoHandle); + + QVERIFY(buffer.handle().isNull()); +} + +QTEST_MAIN(tst_QAbstractVideoBuffer) + +#include "tst_qabstractvideobuffer.moc" diff --git a/tests/auto/qabstractvideosurface/qabstractvideosurface.pro b/tests/auto/qabstractvideosurface/qabstractvideosurface.pro new file mode 100644 index 0000000..4e14542 --- /dev/null +++ b/tests/auto/qabstractvideosurface/qabstractvideosurface.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qabstractvideosurface.cpp + +QT += multimedia +requires(contains(QT_CONFIG, multimedia)) diff --git a/tests/auto/qabstractvideosurface/tst_qabstractvideosurface.cpp b/tests/auto/qabstractvideosurface/tst_qabstractvideosurface.cpp new file mode 100644 index 0000000..0c46ff1 --- /dev/null +++ b/tests/auto/qabstractvideosurface/tst_qabstractvideosurface.cpp @@ -0,0 +1,292 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> + +#include <QtMultimedia/QAbstractVideoSurface> +#include <QtMultimedia/QVideoSurfaceFormat> + +class tst_QAbstractVideoSurface : public QObject +{ + Q_OBJECT +public: + tst_QAbstractVideoSurface(); + ~tst_QAbstractVideoSurface(); + +public slots: + void initTestCase(); + void cleanupTestCase(); + void init(); + void cleanup(); + +private slots: + void setError(); + void isFormatSupported_data(); + void isFormatSupported(); + void start_data(); + void start(); +}; + +typedef QMap<QAbstractVideoBuffer::HandleType, QVideoFrame::PixelFormat> SupportedFormatMap; + +Q_DECLARE_METATYPE(SupportedFormatMap) +Q_DECLARE_METATYPE(QVideoSurfaceFormat) +Q_DECLARE_METATYPE(QAbstractVideoSurface::Error); + +class QtTestVideoSurface : public QAbstractVideoSurface +{ + Q_OBJECT +public: + explicit QtTestVideoSurface(QObject *parent = 0) : QAbstractVideoSurface(parent) {} + explicit QtTestVideoSurface(SupportedFormatMap formats, QObject *parent = 0) + : QAbstractVideoSurface(parent), supportedFormats(formats) {} + + QList<QVideoFrame::PixelFormat> supportedPixelFormats( + QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const + { + return supportedFormats.values(handleType); + } + + bool present(const QVideoFrame &) { return false; } + + using QAbstractVideoSurface::setError; + +private: + SupportedFormatMap supportedFormats; +}; + +tst_QAbstractVideoSurface::tst_QAbstractVideoSurface() +{ +} + +tst_QAbstractVideoSurface::~tst_QAbstractVideoSurface() +{ +} + +void tst_QAbstractVideoSurface::initTestCase() +{ +} + +void tst_QAbstractVideoSurface::cleanupTestCase() +{ +} + +void tst_QAbstractVideoSurface::init() +{ +} + +void tst_QAbstractVideoSurface::cleanup() +{ +} + +void tst_QAbstractVideoSurface::setError() +{ + qRegisterMetaType<QAbstractVideoSurface::Error>(); + + QtTestVideoSurface surface; + + QCOMPARE(surface.error(), QAbstractVideoSurface::NoError); + + surface.setError(QAbstractVideoSurface::StoppedError); + QCOMPARE(surface.error(), QAbstractVideoSurface::StoppedError); + + surface.setError(QAbstractVideoSurface::ResourceError); + QCOMPARE(surface.error(), QAbstractVideoSurface::ResourceError); + + surface.setError(QAbstractVideoSurface::NoError); + QCOMPARE(surface.error(), QAbstractVideoSurface::NoError); +} + +void tst_QAbstractVideoSurface::isFormatSupported_data() +{ + QTest::addColumn<SupportedFormatMap>("supportedFormats"); + QTest::addColumn<QVideoSurfaceFormat>("format"); + QTest::addColumn<bool>("supported"); + + SupportedFormatMap formats; + + QTest::newRow("no formats: rgb32") + << formats + << QVideoSurfaceFormat(QSize(800, 600), QVideoFrame::Format_RGB32) + << false; + QTest::newRow("no formats: yv12") + << formats + << QVideoSurfaceFormat(QSize(800, 600), QVideoFrame::Format_YV12) + << false; + QTest::newRow("no formats: rgb32 gl") + << formats + << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB32, + QAbstractVideoBuffer::GLTextureHandle) + << false; + QTest::newRow("no formats: rgb24 gl") + << formats + << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB24, + QAbstractVideoBuffer::GLTextureHandle) + << false; + + formats.insertMulti(QAbstractVideoBuffer::NoHandle, QVideoFrame::Format_RGB32); + formats.insertMulti(QAbstractVideoBuffer::NoHandle, QVideoFrame::Format_RGB24); + formats.insertMulti(QAbstractVideoBuffer::NoHandle, QVideoFrame::Format_YUV444); + formats.insertMulti(QAbstractVideoBuffer::GLTextureHandle, QVideoFrame::Format_RGB32); + + QTest::newRow("supported: rgb32") + << formats + << QVideoSurfaceFormat(QSize(800, 600), QVideoFrame::Format_RGB32) + << true; + QTest::newRow("supported: rgb24") + << formats + << QVideoSurfaceFormat(QSize(800, 600), QVideoFrame::Format_RGB24) + << true; + QTest::newRow("unsupported: yv12") + << formats + << QVideoSurfaceFormat(QSize(800, 600), QVideoFrame::Format_YV12) + << false; + QTest::newRow("supported: rgb32 gl") + << formats + << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB32, + QAbstractVideoBuffer::GLTextureHandle) + << true; + QTest::newRow("unsupported: rgb24 gl") + << formats + << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB24, + QAbstractVideoBuffer::GLTextureHandle) + << false; + QTest::newRow("unsupported: yv12 gl") + << formats + << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_YV12, + QAbstractVideoBuffer::GLTextureHandle) + << false; + + formats.insertMulti(QAbstractVideoBuffer::NoHandle, QVideoFrame::Format_YV12); + formats.insertMulti(QAbstractVideoBuffer::GLTextureHandle, QVideoFrame::Format_RGB24); + + QTest::newRow("supported: yv12") + << formats + << QVideoSurfaceFormat(QSize(800, 600), QVideoFrame::Format_YV12) + << true; + QTest::newRow("supported: rgb24 gl") + << formats + << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB24, + QAbstractVideoBuffer::GLTextureHandle) + << true; +} + +void tst_QAbstractVideoSurface::isFormatSupported() +{ + QFETCH(SupportedFormatMap, supportedFormats); + QFETCH(QVideoSurfaceFormat, format); + QFETCH(bool, supported); + + QtTestVideoSurface surface(supportedFormats); + + QCOMPARE(surface.isFormatSupported(format), supported); +} + +void tst_QAbstractVideoSurface::start_data() +{ + QTest::addColumn<QVideoSurfaceFormat>("format"); + + QTest::newRow("rgb32") << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB32); + QTest::newRow("yv12") << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_YV12); + QTest::newRow("rgb32 gl") << QVideoSurfaceFormat( + QSize(800, 600), + QVideoFrame::Format_RGB32, + QAbstractVideoBuffer::GLTextureHandle); +} + +void tst_QAbstractVideoSurface::start() +{ + QFETCH(QVideoSurfaceFormat, format); + + QtTestVideoSurface surface; + surface.setError(QAbstractVideoSurface::ResourceError); + + QSignalSpy formatSpy(&surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat))); + QSignalSpy startedSpy(&surface, SIGNAL(startedChanged(bool))); + + QVERIFY(!surface.isStarted()); + QCOMPARE(surface.surfaceFormat(), QVideoSurfaceFormat()); + + QVERIFY(surface.start(format)); + + QVERIFY(surface.isStarted()); + QCOMPARE(surface.surfaceFormat(), format); + + QCOMPARE(formatSpy.count(), 1); + QCOMPARE(qvariant_cast<QVideoSurfaceFormat>(formatSpy.at(0).at(0)), format); + + QCOMPARE(startedSpy.count(), 1); + QCOMPARE(startedSpy.at(0).at(0).toBool(), true); + + // error() is reset on a successful start. + QCOMPARE(surface.error(), QAbstractVideoSurface::NoError); + + surface.stop(); + + QVERIFY(!surface.isStarted()); + QCOMPARE(surface.surfaceFormat(), QVideoSurfaceFormat()); + + QCOMPARE(formatSpy.count(), 2); + QCOMPARE(qvariant_cast<QVideoSurfaceFormat>(formatSpy.at(1).at(0)), QVideoSurfaceFormat()); + + QCOMPARE(startedSpy.count(), 2); + QCOMPARE(startedSpy.at(1).at(0).toBool(), false); +} + +QTEST_MAIN(tst_QAbstractVideoSurface) + +#include "tst_qabstractvideosurface.moc" diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 4ec02bc..7951864 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -90,6 +90,8 @@ private slots: void split(); void base64_data(); void base64(); + void fromBase64_data(); + void fromBase64(); void qvsnprintf(); void qstrlen(); void qstrnlen(); @@ -460,6 +462,10 @@ void tst_QByteArray::base64_data() for (int i = 0; i < 256; ++i) ba[i] = i; QTest::newRow("f") << ba << QByteArray("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w=="); + + QTest::newRow("g") << QByteArray("foo\0bar", 7) << QByteArray("Zm9vAGJhcg=="); + QTest::newRow("h") << QByteArray("f\xd1oo\x9cbar") << QByteArray("ZtFvb7py"); + QTest::newRow("i") << QByteArray("\"\0\0\0\0\0\0\"", 8) << QByteArray("IgAAAAAAACI="); } @@ -475,6 +481,54 @@ void tst_QByteArray::base64() QCOMPARE(arr64, base64); } +//different from the previous test as the input are invalid +void tst_QByteArray::fromBase64_data() +{ + QTest::addColumn<QByteArray>("rawdata"); + QTest::addColumn<QByteArray>("base64"); + + QTest::newRow("1") << QByteArray("") << QByteArray(" "); + QTest::newRow("2") << QByteArray("1") << QByteArray("MQ"); + QTest::newRow("3") << QByteArray("12") << QByteArray("MTI "); + QTest::newRow("4") << QByteArray("123") << QByteArray("M=TIz"); + QTest::newRow("5") << QByteArray("1234") << QByteArray("MTI zN A "); + QTest::newRow("6") << QByteArray("\n") << QByteArray("Cg"); + QTest::newRow("7") << QByteArray("a\n") << QByteArray("======YQo="); + QTest::newRow("8") << QByteArray("ab\n") << QByteArray("Y\nWIK"); + QTest::newRow("9") << QByteArray("abc\n") << QByteArray("YWJjCg=="); + QTest::newRow("a") << QByteArray("abcd\n") << QByteArray("YWJ\1j\x9cZAo="); + QTest::newRow("b") << QByteArray("abcde\n") << QByteArray("YW JjZ\n G\tUK"); + QTest::newRow("c") << QByteArray("abcdef\n") << QByteArray("YWJjZGVmCg="); + QTest::newRow("d") << QByteArray("abcdefg\n") << QByteArray("YWJ\rjZGVmZwo"); + QTest::newRow("e") << QByteArray("abcdefgh\n") << QByteArray("YWJjZGVmZ2gK"); + + QByteArray ba; + ba.resize(256); + for (int i = 0; i < 256; ++i) + ba[i] = i; + QTest::newRow("f") << ba << QByteArray("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Nj\n" + "c4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1u\n" + "b3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpa\n" + "anqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd\n" + "3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w== "); + + + QTest::newRow("g") << QByteArray("foo\0bar", 7) << QByteArray("Zm9vAGJhcg"); + QTest::newRow("h") << QByteArray("f\xd1oo\x9cbar") << QByteArray("ZtFv\0b7py", 9); + QTest::newRow("i") << QByteArray("\"\0\0\0\0\0\0\"", 8) << QByteArray("IgAAAAAAACI"); + +} + + +void tst_QByteArray::fromBase64() +{ + QFETCH(QByteArray, rawdata); + QFETCH(QByteArray, base64); + + QByteArray arr = QByteArray::fromBase64(base64); + QCOMPARE(arr, rawdata); +} + void tst_QByteArray::qvsnprintf() { char buf[20]; diff --git a/tests/auto/qcolor/tst_qcolor.cpp b/tests/auto/qcolor/tst_qcolor.cpp index bc0901a..b61c98d 100644 --- a/tests/auto/qcolor/tst_qcolor.cpp +++ b/tests/auto/qcolor/tst_qcolor.cpp @@ -109,6 +109,13 @@ private slots: void getCmyk(); void setCmyk(); + void hueHsl(); + void saturationHsl(); + void lightness(); + + void getHsl(); + void setHsl(); + void toRgb_data(); void toRgb(); void toRgbNonDestructive(); @@ -121,11 +128,16 @@ private slots: void toCmyk(); void toCmykNonDestructive(); + void toHsl_data(); + void toHsl();; + void toHslNonDestructive(); + void convertTo(); void fromRgb(); void fromHsv(); void fromCmyk(); + void fromHsl(); void light(); void dark(); @@ -556,6 +568,10 @@ void tst_QColor::spec() QColor cmyk = QColor::fromCmyk(0, 0, 0, 0); QCOMPARE(cmyk.spec(), QColor::Cmyk); + + QColor hsl = QColor::fromHsl(0, 0, 0, 0); + QCOMPARE(hsl.spec(), QColor::Hsl); + } void tst_QColor::alpha() @@ -1044,56 +1060,179 @@ void tst_QColor::setCmyk() } } +void tst_QColor::hueHsl() +{ DEPENDS_ON(setHsl()); } + +void tst_QColor::saturationHsl() +{ DEPENDS_ON(setHsl()); } + +void tst_QColor::lightness() +{ DEPENDS_ON(setHsl()); } + +void tst_QColor::getHsl() +{ DEPENDS_ON(setHsl()); } + +void tst_QColor::setHsl() +{ + QColor color; + + for (int A = 0; A <= USHRT_MAX; ++A) { + { + // 0-255 + int a = A >> 8; + color.setHsl(0, 0, 0, a); + QCOMPARE(color.alpha(), a); + + int h, s, l, a2; + color.getHsv(&h, &s, &l, &a2); + QCOMPARE(a2, a); + } + + { + // 0.0-1.0 + qreal a = A / qreal(USHRT_MAX); + color.setHslF(0.0, 0.0, 0.0, a); QCOMPARE(color.alphaF(), a); + + qreal h, s, l, a2; + color.getHslF(&h, &s, &l, &a2); + QCOMPARE(a2, a); + } + } + + for (int H = 0; H < 36000; ++H) { + { + // 0-255 + int h = H / 100; + + color.setHsl(h, 0, 0, 0); + QCOMPARE(color.hslHue(), h); + + int h2, s, l, a; + color.getHsl(&h2, &s, &l, &a); + QCOMPARE(h2, h); + } + + { + // 0.0-1.0 + qreal h = H / 36000.0; + color.setHslF(h, 0.0, 0.0, 0.0); + QCOMPARE(color.hslHueF(), h); + + qreal h2, s, l, a; + color.getHslF(&h2, &s, &l, &a); + QCOMPARE(h2, h); + } + } + + for (int S = 0; S <= USHRT_MAX; ++S) { + { + // 0-255 + int s = S >> 8; + color.setHsl(0, s, 0, 0); + QCOMPARE(color.hslSaturation(), s); + + int h, s2, l, a; + color.getHsl(&h, &s2, &l, &a); + QCOMPARE(s2, s); + } + + { + // 0.0-1.0 + qreal s = S / qreal(USHRT_MAX); + color.setHslF(0.0, s, 0.0, 0.0); + QCOMPARE(color.hslSaturationF(), s); + + qreal h, s2, l, a; + color.getHslF(&h, &s2, &l, &a); + QCOMPARE(s2, s); + } + } + + for (int L = 0; L <= USHRT_MAX; ++L) { + { + // 0-255 + int l = L >> 8; + color.setHsl(0, 0, l, 0); + QCOMPARE(color.lightness(), l); + + int h, s, l2, a; + color.getHsl(&h, &s, &l2, &a); + QCOMPARE(l2, l); + } + + { + // 0.0-1.0 + qreal l = L / qreal(USHRT_MAX); + color.setHslF(0.0, 0.0, l, 0.0); + QCOMPARE(color.lightnessF(), l); + + qreal h, s, l2, a; + color.getHslF(&h, &s, &l2, &a); + QCOMPARE(l2, l); + } + } +} + void tst_QColor::toRgb_data() { QTest::addColumn<QColor>("expectedColor"); QTest::addColumn<QColor>("hsvColor"); QTest::addColumn<QColor>("cmykColor"); + QTest::addColumn<QColor>("hslColor"); QTest::newRow("black") << QColor::fromRgbF(0.0, 0.0, 0.0) << QColor::fromHsvF(-1.0, 0.0, 0.0) - << QColor::fromCmykF(0.0, 0.0, 0.0, 1.0); + << QColor::fromCmykF(0.0, 0.0, 0.0, 1.0) + << QColor::fromHslF(-1.0, 0.0, 0.0); QTest::newRow("white") << QColor::fromRgbF(1.0, 1.0, 1.0) << QColor::fromHsvF(-1.0, 0.0, 1.0) - << QColor::fromCmykF(0.0, 0.0, 0.0, 0.0); + << QColor::fromCmykF(0.0, 0.0, 0.0, 0.0) + << QColor::fromHslF(-1.0, 0.0, 1.0); QTest::newRow("red") << QColor::fromRgbF(1.0, 0.0, 0.0) << QColor::fromHsvF(0.0, 1.0, 1.0) - << QColor::fromCmykF(0.0, 1.0, 1.0, 0.0); + << QColor::fromCmykF(0.0, 1.0, 1.0, 0.0) + << QColor::fromHslF(0.0, 1.0, 0.5, 1.0); QTest::newRow("green") << QColor::fromRgbF(0.0, 1.0, 0.0) << QColor::fromHsvF(0.33333, 1.0, 1.0) - << QColor::fromCmykF(1.0, 0.0, 1.0, 0.0); + << QColor::fromCmykF(1.0, 0.0, 1.0, 0.0) + << QColor::fromHslF(0.33333, 1.0, 0.5); QTest::newRow("blue") << QColor::fromRgbF(0.0, 0.0, 1.0) << QColor::fromHsvF(0.66667, 1.0, 1.0) - << QColor::fromCmykF(1.0, 1.0, 0.0, 0.0); + << QColor::fromCmykF(1.0, 1.0, 0.0, 0.0) + << QColor::fromHslF(0.66667, 1.0, 0.5); QTest::newRow("cyan") << QColor::fromRgbF(0.0, 1.0, 1.0) << QColor::fromHsvF(0.5, 1.0, 1.0) - << QColor::fromCmykF(1.0, 0.0, 0.0, 0.0); + << QColor::fromCmykF(1.0, 0.0, 0.0, 0.0) + << QColor::fromHslF(0.5, 1.0, 0.5); QTest::newRow("magenta") << QColor::fromRgbF(1.0, 0.0, 1.0) << QColor::fromHsvF(0.83333, 1.0, 1.0) - << QColor::fromCmykF(0.0, 1.0, 0.0, 0.0); + << QColor::fromCmykF(0.0, 1.0, 0.0, 0.0) + << QColor::fromHslF(0.83333, 1.0, 0.5); QTest::newRow("yellow") << QColor::fromRgbF(1.0, 1.0, 0.0) << QColor::fromHsvF(0.16667, 1.0, 1.0) - << QColor::fromCmykF(0.0, 0.0, 1.0, 0.0); + << QColor::fromCmykF(0.0, 0.0, 1.0, 0.0) + << QColor::fromHslF(0.16667, 1.0, 0.5); QTest::newRow("gray") << QColor::fromRgbF(0.6431375, 0.6431375, 0.6431375) << QColor::fromHsvF(-1.0, 0.0, 0.6431375) - << QColor::fromCmykF(0.0, 0.0, 0.0, 0.356863); + << QColor::fromCmykF(0.0, 0.0, 0.0, 0.356863) + << QColor::fromHslF(-1.0, 0.0, 0.6431375); // ### add colors using the 0-255 functions } @@ -1106,8 +1245,11 @@ void tst_QColor::toRgb() QFETCH(QColor, expectedColor); QFETCH(QColor, hsvColor); QFETCH(QColor, cmykColor); + QFETCH(QColor, hslColor); QCOMPARE(hsvColor.toRgb(), expectedColor); QCOMPARE(cmykColor.toRgb(), expectedColor); + QCOMPARE(hslColor.toRgb(), expectedColor); + } void tst_QColor::toHsv_data() @@ -1115,16 +1257,19 @@ void tst_QColor::toHsv_data() QTest::addColumn<QColor>("expectedColor"); QTest::addColumn<QColor>("rgbColor"); QTest::addColumn<QColor>("cmykColor"); + QTest::addColumn<QColor>("hslColor"); QTest::newRow("data0") << QColor::fromHsv(300, 255, 255) << QColor(255, 0, 255) - << QColor::fromCmyk(0, 255, 0, 0); + << QColor::fromCmyk(0, 255, 0, 0) + << QColor::fromHslF(300./360., 1., 0.5, 1.0); QTest::newRow("data1") << QColor::fromHsvF(1., 1., 1., 1.) << QColor(255, 0, 0, 255) - << QColor::fromCmykF(0., 1., 1., 0.); + << QColor::fromCmykF(0., 1., 1., 0.) + << QColor::fromHsvF(1., 1., 1., 1.); } void tst_QColor::toRgbNonDestructive() @@ -1141,8 +1286,10 @@ void tst_QColor::toHsv() QFETCH(QColor, expectedColor); QFETCH(QColor, rgbColor); QFETCH(QColor, cmykColor); + QFETCH(QColor, hslColor); QCOMPARE(rgbColor.toHsv(), expectedColor); QCOMPARE(cmykColor.toHsv(), expectedColor); + QCOMPARE(hslColor.toHsv(), expectedColor); } void tst_QColor::toHsvNonDestructive() @@ -1156,16 +1303,19 @@ void tst_QColor::toCmyk_data() QTest::addColumn<QColor>("expectedColor"); QTest::addColumn<QColor>("rgbColor"); QTest::addColumn<QColor>("hsvColor"); + QTest::addColumn<QColor>("hslColor"); QTest::newRow("data0") << QColor::fromCmykF(1.0, 0.0, 0.0, 0.0) << QColor(0, 255, 255) - << QColor::fromHsv(180, 255, 255); + << QColor::fromHsv(180, 255, 255) + << QColor::fromHslF(180./360., 1., 0.5, 1.0); QTest::newRow("data1") << QColor::fromCmyk(255, 255, 255, 255) << QColor::fromRgb(0, 0, 0) - << QColor::fromRgb(0, 0, 0).toHsv(); + << QColor::fromRgb(0, 0, 0).toHsv() + << QColor::fromRgb(0, 0, 0).toHsl(); } void tst_QColor::toCmyk() @@ -1176,8 +1326,10 @@ void tst_QColor::toCmyk() QFETCH(QColor, expectedColor); QFETCH(QColor, rgbColor); QFETCH(QColor, hsvColor); + QFETCH(QColor, hslColor); QCOMPARE(rgbColor.toHsv().toCmyk(), expectedColor); QCOMPARE(hsvColor.toCmyk(), expectedColor); + QCOMPARE(hslColor.toCmyk(), expectedColor); } void tst_QColor::toCmykNonDestructive() @@ -1186,6 +1338,51 @@ void tst_QColor::toCmykNonDestructive() QCOMPARE(aColor, aColor.toCmyk()); } +void tst_QColor::toHsl_data() +{ + QTest::addColumn<QColor>("expectedColor"); + QTest::addColumn<QColor>("hsvColor"); + QTest::addColumn<QColor>("rgbColor"); + QTest::addColumn<QColor>("cmykColor"); + + + QTest::newRow("data0") + << QColor::fromHslF(300./360., 1., 0.5, 1.0) + << QColor::fromHsv(300, 255, 255) + << QColor(255, 0, 255) + << QColor::fromCmyk(0, 255, 0, 0); + + QTest::newRow("data1") + << QColor::fromHslF(1., 1., 0.5, 1.0) + << QColor::fromHsvF(1., 1., 1., 1.) + << QColor(255, 0, 0, 255) + << QColor::fromCmykF(0., 1., 1., 0.); +} + +void tst_QColor::toHsl() +{ + // invalid should remain invalid + QVERIFY(!QColor().toHsl().isValid()); + + QFETCH(QColor, expectedColor); + QFETCH(QColor, rgbColor); + QFETCH(QColor, cmykColor); + QFETCH(QColor, hsvColor); + + QCOMPARE(rgbColor.toHsl(), expectedColor); + QCOMPARE(cmykColor.toHsl(), expectedColor); + QCOMPARE(hsvColor.toHsl(), expectedColor); + +} + + +void tst_QColor::toHslNonDestructive() +{ + QColor aColor = QColor::fromHslF(0.11, 0.22, 0.33, 0.44); + QCOMPARE(aColor, aColor.toHsl()); +} + + void tst_QColor::convertTo() { QColor color(Qt::black); @@ -1199,12 +1396,16 @@ void tst_QColor::convertTo() QColor cmyk = color.convertTo(QColor::Cmyk); QVERIFY(cmyk.spec() == QColor::Cmyk); + QColor hsl = color.convertTo(QColor::Hsl); + QVERIFY(hsl.spec() == QColor::Hsl); + QColor invalid = color.convertTo(QColor::Invalid); QVERIFY(invalid.spec() == QColor::Invalid); DEPENDS_ON(toRgb()); DEPENDS_ON(toHsv()); DEPENDS_ON(toCmyk()); + DEPENDS_ON(toHsl()); } void tst_QColor::fromRgb() @@ -1216,6 +1417,9 @@ void tst_QColor::fromHsv() void tst_QColor::fromCmyk() { DEPENDS_ON(convertTo()); } +void tst_QColor::fromHsl() +{ DEPENDS_ON(convertTo()); } + void tst_QColor::light() { QColor gray(Qt::gray); diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index b568c60..dac32bb 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -145,6 +145,8 @@ private slots: void noScrollbar(); void setItemDelegate(); void task253944_itemDelegateIsReset(); + void subControlRectsWithOffset_data(); + void subControlRectsWithOffset(); protected slots: void onEditTextChanged( const QString &newString ); @@ -2289,5 +2291,53 @@ void tst_QComboBox::task253944_itemDelegateIsReset() } +void tst_QComboBox::subControlRectsWithOffset_data() +{ + QTest::addColumn<bool>("editable"); + + QTest::newRow("editable = true") << true; + QTest::newRow("editable = false") << false; +} + +void tst_QComboBox::subControlRectsWithOffset() +{ + // The sub control rect relative position should not depends + // on the position of the combobox + + class FriendlyCombo : public QComboBox { + public: + void styleOption(QStyleOptionComboBox *optCombo) { + initStyleOption(optCombo); + } + } combo; + QStyleOptionComboBox optCombo; + combo.styleOption(&optCombo); + + + const QRect rectAtOrigin(0, 0, 80, 30); + const QPoint offset(25, 50); + const QRect rectWithOffset = rectAtOrigin.translated(offset); + + QStyle *style = combo.style(); + + QFETCH(bool, editable); + optCombo.editable = editable; + + optCombo.rect = rectAtOrigin; + QRect editFieldRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxEditField, 0); + QRect arrowRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxArrow, 0); + QRect listboxRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxListBoxPopup, 0); + + optCombo.rect = rectWithOffset; + QRect editFieldRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxEditField, 0); + QRect arrowRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxArrow, 0); + QRect listboxRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxListBoxPopup, 0); + + QCOMPARE(editFieldRect, editFieldRectWithOffset.translated(-offset)); + QCOMPARE(arrowRect, arrowRectWithOffset.translated(-offset)); + QCOMPARE(listboxRect, listboxRectWithOffset.translated(-offset)); + +} + QTEST_MAIN(tst_QComboBox) #include "tst_qcombobox.moc" diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index f92670d..ae31572 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -46,9 +46,11 @@ #include <qdebug.h> #include <qgl.h> #include <qglcolormap.h> +#include <qpaintengine.h> #include <QGraphicsView> #include <QGraphicsProxyWidget> +#include <QVBoxLayout> //TESTED_CLASS= //TESTED_FILES= @@ -67,6 +69,8 @@ private slots: void graphicsViewClipping(); void partialGLWidgetUpdates_data(); void partialGLWidgetUpdates(); + void glWidgetRendering(); + void glWidgetReparent(); void colormap(); }; @@ -625,6 +629,116 @@ void tst_QGL::partialGLWidgetUpdates() QCOMPARE(widget.paintEventRegion, QRegion(widget.rect())); } + +class GLWidget : public QGLWidget +{ +public: + GLWidget(QWidget* p = 0) + : QGLWidget(p), beginOk(false), engineType(QPaintEngine::MaxUser) {} + bool beginOk; + QPaintEngine::Type engineType; + void paintGL() + { + QPainter p; + beginOk = p.begin(this); + QPaintEngine* pe = p.paintEngine(); + engineType = pe->type(); + + // This test only ensures it's possible to paint onto a QGLWidget. Full + // paint engine feature testing is way out of scope! + + p.fillRect(0, 0, width(), height(), Qt::red); + // No p.end() or swap buffers, should be done automatically + } + +}; + +void tst_QGL::glWidgetRendering() +{ + GLWidget w; + w.show(); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&w); +#endif + QTest::qWait(200); + + QVERIFY(w.beginOk); + QVERIFY(w.engineType == QPaintEngine::OpenGL || w.engineType == QPaintEngine::OpenGL2); + + QImage fb = w.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32); + QImage reference(fb.size(), QImage::Format_RGB32); + reference.fill(0xffff0000); + + QCOMPARE(fb, reference); +} + +void tst_QGL::glWidgetReparent() +{ + // Try it as a top-level first: + GLWidget *widget = new GLWidget; + widget->setGeometry(0, 0, 200, 30); + widget->show(); + + QWidget grandParentWidget; + grandParentWidget.setPalette(Qt::blue); + QVBoxLayout grandParentLayout(&grandParentWidget); + + QWidget parentWidget(&grandParentWidget); + grandParentLayout.addWidget(&parentWidget); + parentWidget.setPalette(Qt::green); + parentWidget.setAutoFillBackground(true); + QVBoxLayout parentLayout(&parentWidget); + + grandParentWidget.setGeometry(0, 100, 200, 200); + grandParentWidget.show(); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(widget); + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(200); + + QVERIFY(parentWidget.children().count() == 1); // The layout + + // Now both widgets should be created & shown, time to re-parent: + parentLayout.addWidget(widget); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(200); + + QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget + QVERIFY(parentWidget.children().contains(widget)); + QVERIFY(widget->height() > 30); + + delete widget; + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(200); + + QVERIFY(parentWidget.children().count() == 1); // The layout + + // Now do pretty much the same thing, but don't show the + // widget first: + widget = new GLWidget; + parentLayout.addWidget(widget); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(200); + + QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget + QVERIFY(parentWidget.children().contains(widget)); + QVERIFY(widget->height() > 30); + + delete widget; +} + class ColormapExtended : public QGLColormap { public: diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp index a579ba5..0d82182 100644 --- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp +++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtTest/QtTest> #include <qgraphicsanchorlayout.h> #include <qgraphicswidget.h> diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index 1e62bf8..cdd1b1d 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp index e7f7ba5..e8af634 100644 --- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp +++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index e9154d4..ba27c85 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -287,6 +287,8 @@ private slots: void focusProxyDeletion(); void negativeZStacksBehindParent(); void setGraphicsEffect(); + void panel(); + void addPanelToActiveScene(); // task specific tests below me void task141694_textItemEnsureVisible(); @@ -2922,7 +2924,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() int npaints = tester->repaints; qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 2); // enter + move + QCOMPARE(tester->events.size(), 3); // activate + enter + move QCOMPARE(tester->repaints, npaints + 1); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove); @@ -2936,7 +2938,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 3); + QCOMPARE(tester->events.size(), 4); QCOMPARE(tester->repaints, npaints + 1); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove); @@ -2950,7 +2952,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 4); + QCOMPARE(tester->events.size(), 5); QCOMPARE(tester->repaints, npaints + 2); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverLeave); } @@ -7764,5 +7766,181 @@ void tst_QGraphicsItem::setGraphicsEffect() delete anotherItem; } +void tst_QGraphicsItem::panel() +{ + QGraphicsScene scene; + + QGraphicsRectItem *panel1 = new QGraphicsRectItem; + QGraphicsRectItem *panel2 = new QGraphicsRectItem; + QGraphicsRectItem *panel3 = new QGraphicsRectItem; + QGraphicsRectItem *panel4 = new QGraphicsRectItem; + QGraphicsRectItem *notPanel1 = new QGraphicsRectItem; + QGraphicsRectItem *notPanel2 = new QGraphicsRectItem; + panel1->setFlag(QGraphicsItem::ItemIsPanel); + panel2->setFlag(QGraphicsItem::ItemIsPanel); + panel3->setFlag(QGraphicsItem::ItemIsPanel); + panel4->setFlag(QGraphicsItem::ItemIsPanel); + scene.addItem(panel1); + scene.addItem(panel2); + scene.addItem(panel3); + scene.addItem(panel4); + scene.addItem(notPanel1); + scene.addItem(notPanel2); + + EventSpy spy_activate_panel1(&scene, panel1, QEvent::WindowActivate); + EventSpy spy_deactivate_panel1(&scene, panel1, QEvent::WindowDeactivate); + EventSpy spy_activate_panel2(&scene, panel2, QEvent::WindowActivate); + EventSpy spy_deactivate_panel2(&scene, panel2, QEvent::WindowDeactivate); + EventSpy spy_activate_panel3(&scene, panel3, QEvent::WindowActivate); + EventSpy spy_deactivate_panel3(&scene, panel3, QEvent::WindowDeactivate); + EventSpy spy_activate_panel4(&scene, panel4, QEvent::WindowActivate); + EventSpy spy_deactivate_panel4(&scene, panel4, QEvent::WindowDeactivate); + EventSpy spy_activate_notPanel1(&scene, notPanel1, QEvent::WindowActivate); + EventSpy spy_deactivate_notPanel1(&scene, notPanel1, QEvent::WindowDeactivate); + EventSpy spy_activate_notPanel2(&scene, notPanel1, QEvent::WindowActivate); + EventSpy spy_deactivate_notPanel2(&scene, notPanel1, QEvent::WindowDeactivate); + + QCOMPARE(spy_activate_panel1.count(), 0); + QCOMPARE(spy_deactivate_panel1.count(), 0); + QCOMPARE(spy_activate_panel2.count(), 0); + QCOMPARE(spy_deactivate_panel2.count(), 0); + QCOMPARE(spy_activate_panel3.count(), 0); + QCOMPARE(spy_deactivate_panel3.count(), 0); + QCOMPARE(spy_activate_panel4.count(), 0); + QCOMPARE(spy_deactivate_panel4.count(), 0); + QCOMPARE(spy_activate_notPanel1.count(), 0); + QCOMPARE(spy_deactivate_notPanel1.count(), 0); + QCOMPARE(spy_activate_notPanel2.count(), 0); + QCOMPARE(spy_deactivate_notPanel2.count(), 0); + + QVERIFY(!scene.activePanel()); + QVERIFY(!scene.isActive()); + + QEvent activate(QEvent::WindowActivate); + QEvent deactivate(QEvent::WindowDeactivate); + + QApplication::sendEvent(&scene, &activate); + + // No previous activation, so the scene is active. + QVERIFY(scene.isActive()); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(notPanel1->isActive()); + QVERIFY(notPanel2->isActive()); + QCOMPARE(spy_activate_notPanel1.count(), 1); + QCOMPARE(spy_activate_notPanel2.count(), 1); + + // Switch to panel1. + scene.setActivePanel(panel1); + QVERIFY(panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(!notPanel1->isActive()); + QVERIFY(!notPanel2->isActive()); + QCOMPARE(spy_deactivate_notPanel1.count(), 1); + QCOMPARE(spy_deactivate_notPanel2.count(), 1); + QCOMPARE(spy_activate_panel1.count(), 1); + QCOMPARE(spy_activate_panel2.count(), 0); + QCOMPARE(spy_activate_panel3.count(), 0); + QCOMPARE(spy_activate_panel4.count(), 0); + + // Switch back to scene. + scene.setActivePanel(0); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(notPanel1->isActive()); + QVERIFY(notPanel2->isActive()); + QCOMPARE(spy_activate_notPanel1.count(), 2); + QCOMPARE(spy_activate_notPanel2.count(), 2); + + // Deactivate the scene + QApplication::sendEvent(&scene, &deactivate); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(!notPanel1->isActive()); + QVERIFY(!notPanel2->isActive()); + QCOMPARE(spy_deactivate_notPanel1.count(), 2); + QCOMPARE(spy_deactivate_notPanel2.count(), 2); + + // Reactivate the scene + QApplication::sendEvent(&scene, &activate); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(notPanel1->isActive()); + QVERIFY(notPanel2->isActive()); + QCOMPARE(spy_activate_notPanel1.count(), 3); + QCOMPARE(spy_activate_notPanel2.count(), 3); + + // Switch to panel1 + scene.setActivePanel(panel1); + QVERIFY(panel1->isActive()); + QCOMPARE(spy_deactivate_notPanel1.count(), 3); + QCOMPARE(spy_deactivate_notPanel2.count(), 3); + QCOMPARE(spy_activate_panel1.count(), 2); + + // Deactivate the scene + QApplication::sendEvent(&scene, &deactivate); + QVERIFY(!panel1->isActive()); + QCOMPARE(spy_deactivate_panel1.count(), 2); + + // Reactivate the scene + QApplication::sendEvent(&scene, &activate); + QVERIFY(panel1->isActive()); + QCOMPARE(spy_activate_panel1.count(), 3); + + // Deactivate the scene + QApplication::sendEvent(&scene, &deactivate); + QVERIFY(!panel1->isActive()); + QVERIFY(!scene.activePanel()); + scene.setActivePanel(0); + + // Reactivate the scene + QApplication::sendEvent(&scene, &activate); + QVERIFY(!panel1->isActive()); +} + +void tst_QGraphicsItem::addPanelToActiveScene() +{ + QGraphicsScene scene; + QVERIFY(!scene.isActive()); + + QGraphicsRectItem *rect = new QGraphicsRectItem; + scene.addItem(rect); + QVERIFY(!rect->isActive()); + scene.removeItem(rect); + + QEvent activate(QEvent::WindowActivate); + QEvent deactivate(QEvent::WindowDeactivate); + + QApplication::sendEvent(&scene, &activate); + QVERIFY(scene.isActive()); + scene.addItem(rect); + QVERIFY(rect->isActive()); + scene.removeItem(rect); + + rect->setFlag(QGraphicsItem::ItemIsPanel); + scene.addItem(rect); + QVERIFY(rect->isActive()); + QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect); + + QGraphicsRectItem *rect2 = new QGraphicsRectItem; + scene.addItem(rect2); + QVERIFY(rect->isActive()); + QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index 1d81ac8..51c96b1 100644 --- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -76,6 +76,7 @@ private slots: void invalidate(); void itemAt_data(); void itemAt(); + void itemAt_visualOrder(); void orientation_data(); void orientation(); void removeAt_data(); @@ -537,7 +538,7 @@ void tst_QGraphicsLinearLayout::insertItem() QCOMPARE(layout.count(), itemCount + layoutCount + 1); if (insertItemAt >= 0 && (itemCount + layoutCount >= 0)) { - QCOMPARE(layout.itemAt(itemCount + layoutCount), item); + QCOMPARE(layout.itemAt(insertItemAt), item); } layout.activate(); @@ -686,6 +687,28 @@ void tst_QGraphicsLinearLayout::itemAt() QVERIFY(layout.itemAt(index) != 0); } +void tst_QGraphicsLinearLayout::itemAt_visualOrder() +{ + QGraphicsLinearLayout *l = new QGraphicsLinearLayout; + + QGraphicsWidget *w1 = new QGraphicsWidget; + l->addItem(w1); + + QGraphicsWidget *w3 = new QGraphicsWidget; + l->addItem(w3); + + QGraphicsWidget *w0 = new QGraphicsWidget; + l->insertItem(0, w0); + + QGraphicsWidget *w2 = new QGraphicsWidget; + l->insertItem(2, w2); + + QCOMPARE(l->itemAt(0), w0); + QCOMPARE(l->itemAt(1), w1); + QCOMPARE(l->itemAt(2), w2); + QCOMPARE(l->itemAt(3), w3); +} + void tst_QGraphicsLinearLayout::orientation_data() { QTest::addColumn<Qt::Orientation>("orientation"); diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 7536855..462dbfa 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -180,6 +180,7 @@ private slots: void comboboxWindowFlags(); void updateAndDelete(); void inputMethod(); + void clickFocus(); }; // Subclass that exposes the protected functions. @@ -3299,6 +3300,90 @@ void tst_QGraphicsProxyWidget::inputMethod() } } +void tst_QGraphicsProxyWidget::clickFocus() +{ + QGraphicsScene scene; + scene.setItemIndexMethod(QGraphicsScene::NoIndex); + QGraphicsProxyWidget *proxy = scene.addWidget(new QLineEdit); + + EventSpy proxySpy(proxy); + EventSpy widgetSpy(proxy->widget()); + + QGraphicsView view(&scene); + view.setFrameStyle(0); + view.resize(300, 300); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + QTest::qWait(250); + + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0); + + // Spontaneous mouse click sets focus on a clickable widget. + QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center()); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); + QVERIFY(proxy->hasFocus()); + QVERIFY(proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1); + + scene.setFocusItem(0); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 1); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 1); + + // Non-spontaneous mouse click sets focus if the widget has been clicked before + { + QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); + event.setScenePos(lineEditCenter); + event.setButton(Qt::LeftButton); + qApp->sendEvent(&scene, &event); + QVERIFY(proxy->hasFocus()); + QVERIFY(proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2); + } + + scene.setFocusItem(0); + proxy->setWidget(new QLineEdit); // resets focusWidget + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 2); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 2); + + // Non-spontaneous mouse click does not set focus on the embedded widget. + { + QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); + event.setScenePos(lineEditCenter); + event.setButton(Qt::LeftButton); + qApp->sendEvent(&scene, &event); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2); + } + + scene.setFocusItem(0); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 2); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 2); + + // Spontaneous click on non-clickable widget does not give focus. + proxy->widget()->setFocusPolicy(Qt::NoFocus); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); +} + QTEST_MAIN(tst_QGraphicsProxyWidget) #include "tst_qgraphicsproxywidget.moc" diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 505f9a4..afd8668 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -217,6 +217,7 @@ private slots: void task245469_itemsAtPointWithClip(); void task253415_reconnectUpdateSceneOnSceneChanged(); void task255529_transformationAnchorMouseAndViewportMargins(); + void task259503_scrollingArtifacts(); }; void tst_QGraphicsView::initTestCase() @@ -376,7 +377,7 @@ void tst_QGraphicsView::interactive() view.show(); QTestEventLoop::instance().enterLoop(1); - QCOMPARE(item->events.size(), 0); + QCOMPARE(item->events.size(), 1); // activate QPoint itemPoint = view.mapFromScene(item->scenePos()); @@ -384,16 +385,16 @@ void tst_QGraphicsView::interactive() for (int i = 0; i < 100; ++i) { sendMousePress(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), i * 5 + 2); + QCOMPARE(item->events.size(), i * 5 + 3); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GrabMouse); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::GraphicsSceneMousePress); sendMouseRelease(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), i * 5 + 4); + QCOMPARE(item->events.size(), i * 5 + 5); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GraphicsSceneMouseRelease); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::UngrabMouse); QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, itemPoint, view.mapToGlobal(itemPoint)); QApplication::sendEvent(view.viewport(), &contextEvent); - QCOMPARE(item->events.size(), i * 5 + 5); + QCOMPARE(item->events.size(), i * 5 + 6); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); } @@ -401,14 +402,14 @@ void tst_QGraphicsView::interactive() for (int i = 0; i < 100; ++i) { sendMousePress(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), 500); + QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); sendMouseRelease(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), 500); + QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, itemPoint, view.mapToGlobal(itemPoint)); QApplication::sendEvent(view.viewport(), &contextEvent); - QCOMPARE(item->events.size(), 500); + QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); } } @@ -1872,32 +1873,32 @@ void tst_QGraphicsView::sendEvent() item->setFocus(); QCOMPARE(scene.focusItem(), (QGraphicsItem *)item); - QCOMPARE(item->events.size(), 1); + QCOMPARE(item->events.size(), 2); QCOMPARE(item->events.last(), QEvent::FocusIn); QPoint itemPoint = view.mapFromScene(item->scenePos()); sendMousePress(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), 3); + QCOMPARE(item->events.size(), 4); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GrabMouse); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::GraphicsSceneMousePress); QMouseEvent mouseMoveEvent(QEvent::MouseMove, itemPoint, view.viewport()->mapToGlobal(itemPoint), Qt::LeftButton, Qt::LeftButton, 0); QApplication::sendEvent(view.viewport(), &mouseMoveEvent); - QCOMPARE(item->events.size(), 4); + QCOMPARE(item->events.size(), 5); QCOMPARE(item->events.last(), QEvent::GraphicsSceneMouseMove); QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, itemPoint, view.viewport()->mapToGlobal(itemPoint), Qt::LeftButton, 0, 0); QApplication::sendEvent(view.viewport(), &mouseReleaseEvent); - QCOMPARE(item->events.size(), 6); + QCOMPARE(item->events.size(), 7); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GraphicsSceneMouseRelease); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::UngrabMouse); QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Space, 0); QApplication::sendEvent(view.viewport(), &keyPress); - QCOMPARE(item->events.size(), 8); + QCOMPARE(item->events.size(), 9); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::ShortcutOverride); QCOMPARE(item->events.last(), QEvent::KeyPress); } @@ -3663,6 +3664,65 @@ void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins() QVERIFY(qAbs(newMouseScenePos.y() - mouseScenePos.y()) < slack); } +void tst_QGraphicsView::task259503_scrollingArtifacts() +{ + QGraphicsScene scene(0, 0, 800, 600); + + QGraphicsRectItem card; + card.setRect(0, 0, 50, 50); + card.setPen(QPen(Qt::darkRed)); + card.setBrush(QBrush(Qt::cyan)); + card.setZValue(2.0); + card.setPos(300, 300); + scene.addItem(&card); + + class SAGraphicsView: public QGraphicsView + { + public: + SAGraphicsView(QGraphicsScene *scene) + : QGraphicsView(scene) + , itSTimeToTest(false) + { + setViewportUpdateMode( QGraphicsView::MinimalViewportUpdate ); + resize(QSize(640, 480)); + } + + QRegion updateRegion; + bool itSTimeToTest; + + void paintEvent(QPaintEvent *event) + { + QGraphicsView::paintEvent(event); + + if (itSTimeToTest) + { + qDebug() << event->region(); + qDebug() << updateRegion; + QCOMPARE(event->region(), updateRegion); + } + } + }; + + SAGraphicsView view(&scene); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + + int hsbValue = view.horizontalScrollBar()->value(); + view.horizontalScrollBar()->setValue(hsbValue / 2); + QTest::qWait(10); + view.horizontalScrollBar()->setValue(0); + QTest::qWait(10); + + QRect itemDeviceBoundingRect = card.deviceTransform(view.viewportTransform()).mapRect(card.boundingRect()).toRect(); + itemDeviceBoundingRect.adjust(-2, -2, 2, 2); + view.updateRegion = itemDeviceBoundingRect; + view.updateRegion += itemDeviceBoundingRect.translated(-100, 0); + view.itSTimeToTest = true; + card.setPos(200, 300); + QTest::qWait(10); +} QTEST_MAIN(tst_QGraphicsView) #include "tst_qgraphicsview.moc" diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 6adcdfe..effa876 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -156,6 +156,7 @@ private slots: void windowFlags(); void shortcutsDeletion(); void painterStateProtectionOnWindowFrame(); + void ensureClipping(); // Task fixes void task236127_bspTreeIndexFails(); @@ -2459,6 +2460,87 @@ void tst_QGraphicsWidget::task250119_shortcutContext() scene.removeItem(&w_signal); } +class ClippingAndTransformsScene : public QGraphicsScene +{ +public: + QList<QGraphicsItem *> drawnItems; +protected: + void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[], + const QStyleOptionGraphicsItem options[], QWidget *widget = 0) + { + drawnItems.clear(); + for (int i = 0; i < numItems; ++i) + drawnItems << items[i]; + QGraphicsScene::drawItems(painter, numItems, items, options, widget); + } +}; + +class RectWidget : public QGraphicsWidget +{ +public: + + RectWidget(Qt::GlobalColor color, QGraphicsItem *parent=0) : QGraphicsWidget(parent), mColor(color) {} + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) + { + painter->setBrush(QBrush(mColor)); + painter->drawRect(boundingRect()); + } + + Qt::GlobalColor mColor; +}; + +class RectItem : public QGraphicsItem +{ +public: + + RectItem(Qt::GlobalColor color, QGraphicsItem *parent=0) : QGraphicsItem(parent), mColor(color) {} + + QRectF boundingRect() const + {return QRectF(10,10,50,50);} + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) + { + painter->setBrush(QBrush(mColor)); + painter->drawRect(boundingRect()); + } + + Qt::GlobalColor mColor; +}; + +void tst_QGraphicsWidget::ensureClipping() +{ + ClippingAndTransformsScene scene; + scene.setSceneRect(-50, -50, 200, 200); + + //A root that clip children + RectWidget *clipWidget = new RectWidget(Qt::black); + scene.addItem(clipWidget); + + clipWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + + //a child + RectWidget *childWidget = new RectWidget(Qt::red, clipWidget); + clipWidget->setGeometry(QRectF(10, 10, 100, 100)); + childWidget->setGeometry(QRectF(25, 25, 50, 50)); + + //We put a QGraphicsItem to be sure this one is also paint + RectItem *childitem = new RectItem(Qt::blue, clipWidget); + + QGraphicsView view(&scene); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + QTest::qWait(250); + + QList<QGraphicsItem *> expected; + expected << clipWidget << childWidget << childitem; + QVERIFY(scene.drawnItems.contains(clipWidget)); + QVERIFY(scene.drawnItems.contains(childWidget)); + QVERIFY(scene.drawnItems.contains(childitem)); +} + QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" diff --git a/tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp index 5806ca9..595c757 100644 --- a/tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp +++ b/tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp @@ -91,6 +91,7 @@ private slots: void task119433_isRowSelected(); void task252069_rowIntersectsSelection(); void task232634_childrenDeselectionSignal(); + void task260134_layoutChangedWithAllSelected(); private: QAbstractItemModel *model; @@ -2241,5 +2242,37 @@ void tst_QItemSelectionModel::task232634_childrenDeselectionSignal() QVERIFY(selectionModel.selection().contains(sel2)); } +void tst_QItemSelectionModel::task260134_layoutChangedWithAllSelected() +{ + QStringListModel model( QStringList() << "foo" << "bar" << "foo2"); + QSortFilterProxyModel proxy; + proxy.setSourceModel(&model); + QItemSelectionModel selection(&proxy); + + + QCOMPARE(model.rowCount(), 3); + QCOMPARE(proxy.rowCount(), 3); + proxy.setFilterRegExp( QRegExp("f")); + QCOMPARE(proxy.rowCount(), 2); + + QList<QPersistentModelIndex> indexList; + indexList << proxy.index(0,0) << proxy.index(1,0); + selection.select( QItemSelection(indexList.first(), indexList.last()), QItemSelectionModel::Select); + + //let's check the selection hasn't changed + QCOMPARE(selection.selectedIndexes().count(), indexList.count()); + foreach(QPersistentModelIndex index, indexList) + QVERIFY(selection.isSelected(index)); + + proxy.setFilterRegExp(QRegExp()); + QCOMPARE(proxy.rowCount(), 3); + + //let's check the selection hasn't changed + QCOMPARE(selection.selectedIndexes().count(), indexList.count()); + foreach(QPersistentModelIndex index, indexList) + QVERIFY(selection.isSelected(index)); +} + + QTEST_MAIN(tst_QItemSelectionModel) #include "tst_qitemselectionmodel.moc" diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 1616154..93aa64c 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -190,6 +190,7 @@ private slots: void selectedText(); void hasSelectedText(); + void deleteSelectedText(); void textChangedAndTextEdited(); void returnPressed(); @@ -2054,6 +2055,32 @@ void tst_QLineEdit::hasSelectedText() DEPENDS_ON("selectedText"); } +void tst_QLineEdit::deleteSelectedText() +{ + const QString text = QString::fromLatin1("bar"); + QLineEdit edit( text ); + QCOMPARE(edit.text(), text); + + edit.selectAll(); + + QTest::keyClick(&edit, Qt::Key_Delete, 0); + QVERIFY(edit.text().isEmpty()); + + edit.setText(text); + edit.selectAll(); + + QMenu *menu = edit.createStandardContextMenu(); + for (int i = 0; i < menu->actions().count(); ++i) { + QAction *current = menu->actions().at(i); + if (current->text() == QLineEdit::tr("Delete")) { + current->trigger(); //this will delete the whole text selected + QVERIFY(edit.text().isEmpty()); + } + } + +} + + void tst_QLineEdit::textChangedAndTextEdited() { changed_count = 0; diff --git a/tests/auto/qmainwindow/tst_qmainwindow.cpp b/tests/auto/qmainwindow/tst_qmainwindow.cpp index e118c65..9156e5e 100644 --- a/tests/auto/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/qmainwindow/tst_qmainwindow.cpp @@ -106,6 +106,7 @@ private slots: void isSeparator(); void setCursor(); void addToolbarAfterShow(); + void centralWidgetSize(); }; // Testing get/set functions @@ -1336,6 +1337,19 @@ public: } }; +class MyWidget : public QWidget +{ +public: + MyWidget(QWidget *parent = 0) : QWidget(parent) + { + } + + QSize sizeHint() const + { + return QSize(200, 200); + } +}; + void tst_QMainWindow::hideBeforeLayout() { QMainWindow win; @@ -1650,6 +1664,18 @@ void tst_QMainWindow::addToolbarAfterShow() QVERIFY(!toolBar.isHidden()); } +void tst_QMainWindow::centralWidgetSize() +{ + QMainWindow mainWindow; + mainWindow.menuBar()->addMenu("menu"); + + MyWidget widget; + mainWindow.setCentralWidget(&widget); + + mainWindow.show(); + QTest::qWait(100); + QCOMPARE(widget.size(), widget.sizeHint()); +} QTEST_MAIN(tst_QMainWindow) diff --git a/tests/auto/qmake/testcompiler.cpp b/tests/auto/qmake/testcompiler.cpp index 8d7c9d2..4e1d9ba 100644 --- a/tests/auto/qmake/testcompiler.cpp +++ b/tests/auto/qmake/testcompiler.cpp @@ -261,3 +261,17 @@ bool TestCompiler::removeMakefile( const QString &workPath ) else return true; } + +QString TestCompiler::commandOutput() const +{ +#ifndef Q_OS_WIN + return testOutput_.join("\n"); +#else + return testOutput_.join("\r\n"); +#endif +} + +void TestCompiler::clearCommandOutput() +{ + testOutput_.clear(); +} diff --git a/tests/auto/qmake/testcompiler.h b/tests/auto/qmake/testcompiler.h index 76d9ee5..026344f 100644 --- a/tests/auto/qmake/testcompiler.h +++ b/tests/auto/qmake/testcompiler.h @@ -70,6 +70,10 @@ public: bool exists( const QString &destDir, const QString &exeName, BuildType buildType, const QString &version ); // removes the makefile bool removeMakefile( const QString &workPath ); + // returns each line of stdout of the last command append with a "new line" character(s) to suit the platform + QString commandOutput() const; + // clear the results of storage of stdout for running previous commands + void clearCommandOutput(); private: bool runCommand( QString cmdLine ); diff --git a/tests/auto/qmake/testdata/include_function/existing_file.pri b/tests/auto/qmake/testdata/include_function/existing_file.pri new file mode 100644 index 0000000..8b9aaca --- /dev/null +++ b/tests/auto/qmake/testdata/include_function/existing_file.pri @@ -0,0 +1,3 @@ +QT = +CONFIG = console +SOURCES = main.cpp diff --git a/tests/auto/qmake/testdata/include_function/include_existing_file.pro b/tests/auto/qmake/testdata/include_function/include_existing_file.pro new file mode 100644 index 0000000..424062a --- /dev/null +++ b/tests/auto/qmake/testdata/include_function/include_existing_file.pro @@ -0,0 +1,7 @@ +# Test to see if include(), by default, succeeds when the specific file +# to include exists +include(existing_file.pri) + +# Test to see if by specifying full set of parameters to include() +# succeeds when the specified filed to include exists +include(existing_file.pri, "", false) diff --git a/tests/auto/qmake/testdata/include_function/include_missing_file.pro b/tests/auto/qmake/testdata/include_function/include_missing_file.pro new file mode 100644 index 0000000..0b59981 --- /dev/null +++ b/tests/auto/qmake/testdata/include_function/include_missing_file.pro @@ -0,0 +1,3 @@ +# Test to see if include(), by default, fails when the specific file +# to include does not exist +include(missing_file.pri) diff --git a/tests/auto/qmake/testdata/include_function/include_missing_file2.pro b/tests/auto/qmake/testdata/include_function/include_missing_file2.pro new file mode 100644 index 0000000..542b9ff --- /dev/null +++ b/tests/auto/qmake/testdata/include_function/include_missing_file2.pro @@ -0,0 +1,3 @@ +# Specifying full set of parameters to include() to test that a warning +# is shown for this non-existing file. +include(missing_file.pri, "", false) diff --git a/tests/auto/qmake/testdata/include_function/main.cpp b/tests/auto/qmake/testdata/include_function/main.cpp new file mode 100644 index 0000000..0a8e3d3 --- /dev/null +++ b/tests/auto/qmake/testdata/include_function/main.cpp @@ -0,0 +1,4 @@ +int main(int /*argc*/, char ** /*argv*/) +{ + return 0; +} diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp index 168fcfd..50ea5b9 100644 --- a/tests/auto/qmake/tst_qmake.cpp +++ b/tests/auto/qmake/tst_qmake.cpp @@ -88,6 +88,7 @@ private slots: // Test requires make void bundle_spaces(); #endif + void includefunction(); private: TestCompiler test_compiler; @@ -125,10 +126,12 @@ void tst_qmake::cleanupTestCase() void tst_qmake::init() { + test_compiler.clearCommandOutput(); } void tst_qmake::cleanup() { + test_compiler.clearCommandOutput(); } void tst_qmake::simple_app() @@ -438,6 +441,26 @@ void tst_qmake::bundle_spaces() } #endif // Q_OS_WIN +void tst_qmake::includefunction() +{ + QString workDir = base_path + "/testdata/include_function"; + QString warningMsg("Unable to find file for inclusion"); + QVERIFY(test_compiler.qmake( workDir, "include_existing_file")); + QVERIFY(!test_compiler.commandOutput().contains(warningMsg)); + + // test include() usage on a missing file + test_compiler.clearCommandOutput(); + workDir = base_path + "/testdata/include_function"; + QVERIFY(test_compiler.qmake( workDir, "include_missing_file" )); + QVERIFY(test_compiler.commandOutput().contains(warningMsg)); + + // test include() usage on a missing file when all function parameters are used + test_compiler.clearCommandOutput(); + workDir = base_path + "/testdata/include_function"; + QVERIFY(test_compiler.qmake( workDir, "include_missing_file2" )); + QVERIFY(test_compiler.commandOutput().contains(warningMsg)); +} + QTEST_MAIN(tst_qmake) #include "tst_qmake.moc" diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 13aa2b8..8590eac 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -266,6 +266,9 @@ tst_QMenu::addActionsAndClear() void tst_QMenu::mouseActivation() { +#ifdef Q_OS_WINCE_WM + QSKIP("We have a separate mouseActivation test for Windows mobile.", SkipAll); +#endif QMenu menu; menu.addAction("Menu Action"); menu.show(); diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index a08f620..b20c0e0 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -120,6 +120,7 @@ private slots: void uniqConnection(); void interfaceIid(); void deleteQObjectWhenDeletingEvent(); + void overloads(); protected: }; @@ -2903,11 +2904,11 @@ void tst_QObject::uniqConnection() void tst_QObject::interfaceIid() { - QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bleh *>()), + QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bleh *>()), QByteArray(Bleh_iid)); - QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bar *>()), + QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bar *>()), QByteArray("com.qtest.foobar")); - QCOMPARE(QByteArray(qobject_interface_iid<FooObject *>()), + QCOMPARE(QByteArray(qobject_interface_iid<FooObject *>()), QByteArray()); } @@ -2927,6 +2928,93 @@ void tst_QObject::deleteQObjectWhenDeletingEvent() QCoreApplication::removePostedEvents(&o); // here you would get a deadlock } +class OverloadObject : public QObject +{ + friend class tst_QObject; + Q_OBJECT + signals: + void sig(int i, char c, qreal m = 12); + void sig(int i, int j = 12); + void sig(QObject *o, QObject *p, QObject *q = 0, QObject *r = 0) const; + void other(int a = 0); + void sig(QObject *o, OverloadObject *p = 0, QObject *q = 0, QObject *r = 0); + void sig(double r = 0.5); + public slots: + void slo(int i, int j = 43) + { + s_num += 1; + i1_num = i; + i2_num = j; + } + void slo(QObject *o, QObject *p = qApp, QObject *q = qApp, QObject *r = qApp) + { + s_num += 10; + o1_obj = o; + o2_obj = p; + o3_obj = q; + o4_obj = r; + } + void slo() + { + s_num += 100; + } + + public: + int s_num; + int i1_num; + int i2_num; + QObject *o1_obj; + QObject *o2_obj; + QObject *o3_obj; + QObject *o4_obj; +}; + +void tst_QObject::overloads() +{ + OverloadObject obj1; + OverloadObject obj2; + QObject obj3; + obj1.s_num = 0; + obj2.s_num = 0; + + connect (&obj1, SIGNAL(sig(int)) , &obj1, SLOT(slo(int))); + connect (&obj1, SIGNAL(sig(QObject *, QObject *, QObject *)) , &obj1, SLOT(slo(QObject * , QObject *, QObject *))); + + connect (&obj1, SIGNAL(sig(QObject *, QObject *, QObject *, QObject *)) , &obj2, SLOT(slo(QObject * , QObject *, QObject *))); + connect (&obj1, SIGNAL(sig(QObject *)) , &obj2, SLOT(slo())); + connect (&obj1, SIGNAL(sig(int, int)) , &obj2, SLOT(slo(int, int))); + + emit obj1.sig(0.5); //connected to nothing + emit obj1.sig(1, 'a'); //connected to nothing + QCOMPARE(obj1.s_num, 0); + QCOMPARE(obj2.s_num, 0); + + emit obj1.sig(1); //this signal is connected + QCOMPARE(obj1.s_num, 1); + QCOMPARE(obj1.i1_num, 1); + QCOMPARE(obj1.i2_num, 43); //default argument of the slot + + QCOMPARE(obj2.s_num, 1); + QCOMPARE(obj2.i1_num, 1); + QCOMPARE(obj2.i2_num, 12); //default argument of the signal + + + emit obj1.sig(&obj2); //this signal is conencted to obj2 + QCOMPARE(obj1.s_num, 1); + QCOMPARE(obj2.s_num, 101); + emit obj1.sig(&obj2, &obj3); //this signal is connected + QCOMPARE(obj1.s_num, 11); + QCOMPARE(obj1.o1_obj, &obj2); + QCOMPARE(obj1.o2_obj, &obj3); + QCOMPARE(obj1.o3_obj, (QObject *)0); //default arg of the signal + QCOMPARE(obj1.o4_obj, qApp); //default arg of the slot + + QCOMPARE(obj2.s_num, 111); + QCOMPARE(obj2.o1_obj, &obj2); + QCOMPARE(obj2.o2_obj, &obj3); + QCOMPARE(obj2.o3_obj, (QObject *)0); //default arg of the signal + QCOMPARE(obj2.o4_obj, qApp); //default arg of the slot +} QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" diff --git a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp index 410d868..66c6693 100644 --- a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp +++ b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp @@ -342,39 +342,44 @@ void tst_QPixmapFilter::dropShadowBoundingRectFor() QPixmapDropShadowFilter filter; filter.setBlurRadius(0); - QCOMPARE(filter.blurRadius(), 0.0); + QCOMPARE(filter.blurRadius(), 0); + + const QRectF rect1(0, 0, 50, 50); + const QRectF rect2(30, 20, 10, 40); + const QRectF rect3(2.2, 6.3, 11.4, 47.5); filter.setOffset(QPointF(0,0)); - QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(0, 0, 50, 50)); - QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(30, 20, 10, 40)); - QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(2.2, 6.3, 11.4, 47.5)); + QCOMPARE(filter.boundingRectFor(rect1), rect1); + QCOMPARE(filter.boundingRectFor(rect2), rect2); + QCOMPARE(filter.boundingRectFor(rect3), rect3); filter.setOffset(QPointF(1,1)); QCOMPARE(filter.offset(), QPointF(1, 1)); - QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(0, 0, 51, 51)); - QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(30, 20, 11, 41)); - QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(2.2, 6.3, 12.4, 48.5)); + QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(0, 0, 1, 1)); + QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(0, 0, 1, 1)); + QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(0, 0, 1, 1)); filter.setOffset(QPointF(-1,-1)); - QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-1, -1, 51, 51)); - QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(29, 19, 11, 41)); - QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(1.2, 5.3, 12.4, 48.5)); + QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-1, -1, 0, 0)); + QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-1, -1, 0, 0)); + QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-1, -1, 0, 0)); filter.setBlurRadius(2); filter.setOffset(QPointF(0,0)); - QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-2, -2, 54, 54)); - QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(28, 18, 14, 44)); - QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(0.2, 4.3, 15.4, 51.5)); + int delta = 2 * 2; + QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta, -delta, delta, delta)); + QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta, -delta, delta, delta)); + QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta, -delta, delta, delta)); filter.setOffset(QPointF(1,1)); - QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-1, -1, 54, 54)); - QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(29, 19, 14, 44)); - QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(1.2, 5.3, 15.4, 51.5)); + QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1)); + QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1)); + QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1)); filter.setOffset(QPointF(-10,-10)); - QCOMPARE(filter.boundingRectFor(QRectF(0, 0, 50, 50)), QRectF(-12, -12, 62, 62)); - QCOMPARE(filter.boundingRectFor(QRectF(30, 20, 10, 40)), QRectF(18, 8, 22, 52)); - QCOMPARE(filter.boundingRectFor(QRectF(2.2, 6.3, 11.4, 47.5)), QRectF(-9.8, -5.7, 23.4, 59.5)); + QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta - 10, -delta - 10, 0, 0)); + QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta - 10, -delta - 10, 0, 0)); + QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta - 10, -delta - 10, 0, 0)); } diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 3ff177a..57fca9d 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -66,7 +66,7 @@ protected: class MyObject : public QObject { Q_OBJECT - Q_PROPERTY(qreal x READ x WRITE setX) + Q_PROPERTY(qreal x READ x WRITE setX) public: MyObject() : m_x(0) { } qreal x() const { return m_x; } @@ -114,6 +114,8 @@ private slots: void updateOnSetKeyValues(); void restart(); void valueChanged(); + void twoAnimations(); + void deletedInUpdateCurrentTime(); }; tst_QPropertyAnimation::tst_QPropertyAnimation() @@ -141,7 +143,7 @@ class AnimationObject : public QObject Q_PROPERTY(qreal realValue READ realValue WRITE setRealValue) public: AnimationObject(int startValue = 0) - : v(startValue) + : v(startValue), rv(startValue) { } int value() const { return v; } @@ -401,7 +403,7 @@ void tst_QPropertyAnimation::duration0() animation.setStartValue(42); QVERIFY(animation.currentValue().isValid()); QCOMPARE(animation.currentValue().toInt(), 42); - + QCOMPARE(o.property("ole").toInt(), 42); animation.setDuration(0); QCOMPARE(animation.currentValue().toInt(), 43); //it is at the end @@ -1079,7 +1081,100 @@ void tst_QPropertyAnimation::valueChanged() } } +//this class will help us make sure that 2 animations started +//at the same time also end at the same time +class MySyncObject : public MyErrorObject +{ + Q_OBJECT +public: + MySyncObject() : anim(this, "ole") + { + anim.setEndValue(1000); + } +public slots: + void checkAnimationFinished() + { + QCOMPARE(anim.state(), QAbstractAnimation::Stopped); + QCOMPARE(ole(), 1000); + } + +public: + QPropertyAnimation anim; +}; + +void tst_QPropertyAnimation::twoAnimations() +{ + MySyncObject o1, o2; + o1.setOle(0); + o2.setOle(0); + + //when the animation in o1 is finished + //the animation in o2 should stop around the same time + //We use a queued connection to check just after the tick from the common timer + //the other way is true too + QObject::connect(&o1.anim, SIGNAL(finished()), + &o2, SLOT(checkAnimationFinished()), Qt::QueuedConnection); + QObject::connect(&o2.anim, SIGNAL(finished()), + &o1, SLOT(checkAnimationFinished()), Qt::QueuedConnection); + + o1.anim.start(); + o2.anim.start(); + + QTest::qWait(o1.anim.duration() + 50); + QCOMPARE(o1.anim.state(), QAbstractAnimation::Stopped); + QCOMPARE(o2.anim.state(), QAbstractAnimation::Stopped); + + QCOMPARE(o1.ole(), 1000); + QCOMPARE(o2.ole(), 1000); +} + +class MyComposedAnimation : public QPropertyAnimation +{ + Q_OBJECT +public: + MyComposedAnimation(QObject *target, const QByteArray &propertyName, const QByteArray &innerPropertyName) + : QPropertyAnimation(target, propertyName) + { + innerAnim = new QPropertyAnimation(target, innerPropertyName); + this->setEndValue(1000); + innerAnim->setEndValue(1000); + innerAnim->setDuration(duration() + 100); + } + + void start() + { + QPropertyAnimation::start(); + innerAnim->start(); + } + void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState) + { + QPropertyAnimation::updateState(oldState, newState); + if (newState == QAbstractAnimation::Stopped) + delete innerAnim; + } + +public: + QPropertyAnimation *innerAnim; +}; + +void tst_QPropertyAnimation::deletedInUpdateCurrentTime() +{ + // this test case reproduces an animation being deleted in the updateCurrentTime of + // another animation(was causing segfault). + // the deleted animation must have been started after the animation that is deleting. + AnimationObject o; + o.setValue(0); + o.setRealValue(0.0); + + MyComposedAnimation composedAnimation(&o, "value", "realValue"); + composedAnimation.start(); + QCOMPARE(composedAnimation.state(), QAbstractAnimation::Running); + QTest::qWait(composedAnimation.duration() + 50); + + QCOMPARE(composedAnimation.state(), QAbstractAnimation::Stopped); + QCOMPARE(o.value(), 1000); +} QTEST_MAIN(tst_QPropertyAnimation) #include "tst_qpropertyanimation.moc" diff --git a/tests/auto/qregion/tst_qregion.cpp b/tests/auto/qregion/tst_qregion.cpp index 8c49146..063b024 100644 --- a/tests/auto/qregion/tst_qregion.cpp +++ b/tests/auto/qregion/tst_qregion.cpp @@ -965,10 +965,15 @@ void tst_QRegion::regionToPath_data() } } +#ifdef QT_BUILD_INTERNAL +QT_BEGIN_NAMESPACE +extern QPainterPath qt_regionToPath(const QRegion ®ion); +QT_END_NAMESPACE +#endif + void tst_QRegion::regionToPath() { #ifdef QT_BUILD_INTERNAL - extern QPainterPath qt_regionToPath(const QRegion ®ion); QFETCH(QPainterPath, path); diff --git a/tests/auto/qscriptclass/tst_qscriptclass.cpp b/tests/auto/qscriptclass/tst_qscriptclass.cpp index 11c7f56..33c2c35 100644 --- a/tests/auto/qscriptclass/tst_qscriptclass.cpp +++ b/tests/auto/qscriptclass/tst_qscriptclass.cpp @@ -606,6 +606,7 @@ void tst_QScriptClass::newInstance() QScriptValue arr = eng.newArray(); QVERIFY(arr.isArray()); QCOMPARE(arr.scriptClass(), (QScriptClass*)0); + QTest::ignoreMessage(QtWarningMsg, "QScriptValue::setScriptClass() failed: cannot change class of non-QScriptObject"); arr.setScriptClass(&cls); QEXPECT_FAIL("", "Changing class of arbitrary script object is not allowed (it's OK)", Continue); QCOMPARE(arr.scriptClass(), (QScriptClass*)&cls); diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index a0c56ed..a85c0bd 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -559,6 +559,11 @@ static QScriptValue custom_eval(QScriptContext *ctx, QScriptEngine *eng) return eng->evaluate(ctx->argumentsObject().property(0).toString(), ctx->argumentsObject().property(1).toString()); } +static QScriptValue custom_call(QScriptContext *ctx, QScriptEngine *) +{ + return ctx->argumentsObject().property(0).call(QScriptValue(), QScriptValueList() << ctx->argumentsObject().property(1)); +} + void tst_QScriptContext::backtrace_data() { QTest::addColumn<QString>("code"); @@ -593,8 +598,11 @@ void tst_QScriptContext::backtrace_data() expected << "<native>('hey') at -1" << "<eval>() at 3" - //### line number should be 2 but the line number information is not kept for eval call +#ifdef ENABLE_JIT + << "foo(arg1 = 'hello', arg2 = 456) at testfile:2" +#else //### interpreter unfortunately does store information about line number for eval() << "foo(arg1 = 'hello', arg2 = 456) at testfile:-1" +#endif << "<global>() at testfile:4"; QTest::newRow("eval") << source << expected; @@ -653,8 +661,11 @@ void tst_QScriptContext::backtrace_data() expected << "<native>('hey') at -1" << "<eval>() at 3" - //### line number should be 3 but the line number information is not kept for eval call +#ifdef ENABLE_JIT + << "plop('hello', 456) at testfile:3" +#else //### interpreter unfortunately does store information about line number for eval() << "plop('hello', 456) at testfile:-1" +#endif << "<global>() at testfile:5"; QTest::newRow("eval in member") << source << expected; @@ -681,7 +692,36 @@ void tst_QScriptContext::backtrace_data() QTest::newRow("two function") << source << expected; } + { + QString func("function foo(a, b) {\n" + " return bt(a);\n" + "}"); + + QString source = func + QString::fromLatin1("\n" + "custom_call(foo, 'hello');\n" + "var a = 1\n"); + + QStringList expected; + expected << "<native>('hello') at -1" + << "foo(a = 'hello') at testfile:2" + << QString("<native>(%1, 'hello') at -1").arg(func) + << "<global>() at testfile:4"; + QTest::newRow("call") << source << expected; + } + + { + QString source = QString::fromLatin1("\n" + "custom_call(bt, 'hello_world');\n" + "var a = 1\n"); + + QStringList expected; + expected << "<native>('hello_world') at -1" + << "<native>(function () {\n [native code]\n}, 'hello_world') at -1" + << "<global>() at testfile:2"; + + QTest::newRow("call native") << source << expected; + } } @@ -693,6 +733,7 @@ void tst_QScriptContext::backtrace() QScriptEngine eng; eng.globalObject().setProperty("bt", eng.newFunction(getBacktrace)); eng.globalObject().setProperty("custom_eval", eng.newFunction(custom_eval)); + eng.globalObject().setProperty("custom_call", eng.newFunction(custom_call)); QString fileName = "testfile"; QScriptValue ret = eng.evaluate(code, fileName); diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 85cee28..b0ba922 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -1107,6 +1107,31 @@ void tst_QScriptEngine::globalObjectProperties() } } QVERIFY(remainingNames.isEmpty()); + + // create property with no attributes + { + QString name = QString::fromLatin1("foo"); + QVERIFY(!global.property(name).isValid()); + QScriptValue val(123); + global.setProperty(name, val); + QVERIFY(global.property(name).equals(val)); + QVERIFY(global.propertyFlags(name) == 0); + global.setProperty(name, QScriptValue()); + QVERIFY(!global.property(name).isValid()); + } + // create property with attributes + { + QString name = QString::fromLatin1("bar"); + QVERIFY(!global.property(name).isValid()); + QScriptValue val(QString::fromLatin1("ciao")); + QScriptValue::PropertyFlags flags = QScriptValue::ReadOnly | QScriptValue::SkipInEnumeration; + global.setProperty(name, val, flags); + QVERIFY(global.property(name).equals(val)); + QEXPECT_FAIL("", "custom Global Object properties don't retain attributes", Continue); + QCOMPARE(global.propertyFlags(name), flags); + global.setProperty(name, QScriptValue()); + QVERIFY(!global.property(name).isValid()); + } } void tst_QScriptEngine::globalObjectGetterSetterProperty() @@ -1518,15 +1543,29 @@ static QScriptValue eval_nested(QScriptContext *ctx, QScriptEngine *eng) void tst_QScriptEngine::nestedEvaluate() { QScriptEngine eng; - eng.globalObject().setProperty("fun", eng.newFunction(eval_nested)); - QScriptValue result = eng.evaluate("o = { id:'foo'}; o.fun = fun; o.fun()"); - QCOMPARE(result.property("local_bar").toString(), QString("local")); - QCOMPARE(result.property("thisObjectIdBefore").toString(), QString("foo")); - QCOMPARE(result.property("thisObjectIdAfter").toString(), QString("foo")); - QCOMPARE(result.property("evaluatedThisObjectId").toString(), QString("foo")); - QScriptValue bar = eng.evaluate("bar"); - QVERIFY(bar.isError()); - QCOMPARE(bar.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bar")); + QScriptValue fun = eng.newFunction(eval_nested); + eng.globalObject().setProperty("fun", fun); + { + QScriptValue result = eng.evaluate("o = { id:'foo'}; o.fun = fun; o.fun()"); + QCOMPARE(result.property("local_bar").toString(), QString("local")); + QCOMPARE(result.property("thisObjectIdBefore").toString(), QString("foo")); + QCOMPARE(result.property("thisObjectIdAfter").toString(), QString("foo")); + QCOMPARE(result.property("evaluatedThisObjectId").toString(), QString("foo")); + QScriptValue bar = eng.evaluate("bar"); + QVERIFY(bar.isError()); + QCOMPARE(bar.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bar")); + } + + { + QScriptValue result = fun.call(eng.evaluate("p = { id:'foo' }") , QScriptValueList() ); + QCOMPARE(result.property("local_bar").toString(), QString("local")); + QCOMPARE(result.property("thisObjectIdBefore").toString(), QString("foo")); + QCOMPARE(result.property("thisObjectIdAfter").toString(), QString("foo")); + QCOMPARE(result.property("evaluatedThisObjectId").toString(), QString("foo")); + QScriptValue bar = eng.evaluate("bar"); + QVERIFY(bar.isError()); + QCOMPARE(bar.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bar")); + } } void tst_QScriptEngine::uncaughtException() @@ -3899,6 +3938,7 @@ void tst_QScriptEngine::getSetAgent() TestAgent *agent = new TestAgent(&eng); QTest::ignoreMessage(QtWarningMsg, "QScriptEngine::setAgent(): cannot set agent belonging to different engine"); eng2.setAgent(agent); + QCOMPARE(eng2.agent(), (QScriptEngineAgent*)0); } } diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp index 70a198d..5cf27d3 100644 --- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp +++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp @@ -745,6 +745,9 @@ private: void tst_QScriptEngineDebugger::multithreadedDebugging() { +#ifdef Q_OS_WINCE + QSKIP("This tests uses too much memory for Windows CE", SkipAll); +#endif ScriptEvaluator eval; QThread thread; eval.moveToThread(&thread); diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp index f77738f..56b7df8 100644 --- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp +++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp @@ -400,7 +400,6 @@ tst_Suite::tst_Suite() } QString willFixInNextReleaseMessage = QString::fromLatin1("Will fix in next release"); - QString brokenOnSomePlatformsMessage = QString::fromLatin1("Doesn't behave the same on all platforms"); QString fromCharCodeMessage = QString::fromLatin1("Test is wrong?"); for (int i = 4256; i < 4294; ++i) { addExpectedFailure("ecma/String/15.5.4.11-2.js", QString::fromLatin1("var s = new String( String.fromCharCode(%0) ); s.toLowerCase().charCodeAt(0)").arg(i), fromCharCodeMessage); @@ -418,61 +417,15 @@ tst_Suite::tst_Suite() addExpectedFailure("ecma/extensions/15.1.2.1-1.js", "var PROPS = ''; for ( p in eval ) { PROPS += p }; PROPS", willFixInNextReleaseMessage); addExpectedFailure("ecma/GlobalObject/15.1.2.2-1.js", "var PROPS=''; for ( var p in parseInt ) { PROPS += p; }; PROPS", willFixInNextReleaseMessage); - addSkip("ecma/GlobalObject/15.1.2.2-2.js", "parseInt(s,36)", brokenOnSomePlatformsMessage); - addExpectedFailure("ecma/GlobalObject/15.1.2.3-1.js", "var MYPROPS=''; for ( var p in parseFloat ) { MYPROPS += p }; MYPROPS", willFixInNextReleaseMessage); addExpectedFailure("ecma/GlobalObject/15.1.2.4.js", "var MYPROPS=''; for ( var p in escape ) { MYPROPS+= p}; MYPROPS", willFixInNextReleaseMessage); addExpectedFailure("ecma/GlobalObject/15.1.2.5-1.js", "var MYPROPS=''; for ( var p in unescape ) { MYPROPS+= p }; MYPROPS", willFixInNextReleaseMessage); addExpectedFailure("ecma/GlobalObject/15.1.2.6.js", "var MYPROPS=''; for ( var p in isNaN ) { MYPROPS+= p }; MYPROPS", willFixInNextReleaseMessage); addExpectedFailure("ecma/GlobalObject/15.1.2.7.js", "var MYPROPS=''; for ( p in isFinite ) { MYPROPS+= p }; MYPROPS", willFixInNextReleaseMessage); - // qstrtod() has problems parsing reaaaaally big numbers -- they come out as NaN rather than Infinity or Number.MAX_VALUE - addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s1,10) == 1.7976931348623157e+308 || parseInt(s1,10) == Infinity", brokenOnSomePlatformsMessage); - addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s2,10) == Infinity || parseInt(s2,10) == 1.7976931348623157e+308", brokenOnSomePlatformsMessage); - addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s1) == 1.7976931348623157e+308 || parseInt(s1) == Infinity", brokenOnSomePlatformsMessage); - addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s2) == Infinity || parseInt(s2) == 1.7976931348623157e+308", brokenOnSomePlatformsMessage); - addSkip("ecma/TypeConversion/9.3.1-3.js", "parseInt(s,36)", brokenOnSomePlatformsMessage); - -#if defined(Q_OS_SOLARIS) - addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(11.00000001)", "Fails on Solaris"); - addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(-1.000001)", "Fails on Solaris"); -#endif - addExpectedFailure(QRegExp(), "NO TESTS EXIST", willFixInNextReleaseMessage); - addExpectedFailure("ecma_2/RegExp/multiline-001.js", "/.*[y]$/m.exec(ivory-billed\ndowny\nhairy\nacorn\nyellow-bellied sapsucker\nnorthern flicker\npileated\n)", willFixInNextReleaseMessage); - addExpectedFailure("ecma_2/RegExp/multiline-001.js", "/.*[d]$/m.exec(ivory-billed\ndowny\nhairy\nacorn\nyellow-bellied sapsucker\nnorthern flicker\npileated\n)", willFixInNextReleaseMessage); - addExpectedFailure("ecma_2/String/match-002.js", "//.toString()", willFixInNextReleaseMessage); - -#if defined(Q_WS_WIN) - addExpectedFailure(QRegExp(), "VAR1 = 0; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = -0; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = 0; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = -0; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = 1; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = -1; VAR2= Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = -1; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "VAR1 = 1; VAR2= -Infinity; VAR1 %= VAR2;VAR1", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "1 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "1 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "-1 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "-1 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "Number.MAX_VALUE % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "Number.MAX_VALUE % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "-Number.MAX_VALUE % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "-Number.MAX_VALUE % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "0 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "0 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "-0 % Number.POSITIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "-0 % Number.NEGATIVE_INFINITY", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "Math.atan2(Infinity, Infinity)", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "Math.atan2(Infinity, -Infinity)", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "Math.atan2(-Infinity, Infinity)", willFixInNextReleaseMessage); - addExpectedFailure(QRegExp(), "Math.atan2(-Infinity, -Infinity)", willFixInNextReleaseMessage); -#endif - addExpectedFailure("ecma_3/Array/15.4.5.1-01.js", "15.4.5.1 - array.length coverage", willFixInNextReleaseMessage); - addExpectedFailure("ecma_3/ExecutionContexts/10.1.4-1.js", "Expected to be able to delete x", willFixInNextReleaseMessage); addExpectedFailure("ecma_3/extensions/regress-228087-002.js", "Section 1 of test - \nregexp = /{1.*}/g\n" diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index 16a9e87..1c09693 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -447,6 +447,8 @@ void tst_QScriptValue::toString() variant = eng.newVariant(QVariant(QPoint(10, 20))); QVERIFY(variant.isVariant()); QCOMPARE(variant.toString(), QString::fromLatin1("QVariant(QPoint)")); + variant = eng.newVariant(QUrl()); + QVERIFY(variant.toString().isEmpty()); } void tst_QScriptValue::toNumber() @@ -2106,6 +2108,7 @@ void tst_QScriptValue::getSetProperty() object.setProperty(foo, num); QVERIFY(object.property(foo).strictlyEquals(num)); QVERIFY(object.property("foo").strictlyEquals(num)); + QVERIFY(object.propertyFlags(foo) == 0); } void tst_QScriptValue::getSetPrototype() @@ -2219,13 +2222,30 @@ void tst_QScriptValue::getSetScriptClass() QCOMPARE(inv.scriptClass(), (QScriptClass*)0); QScriptValue num(123); QCOMPARE(num.scriptClass(), (QScriptClass*)0); - QScriptValue obj = eng.newObject(); - QCOMPARE(obj.scriptClass(), (QScriptClass*)0); + TestScriptClass testClass(&eng); - obj.setScriptClass(&testClass); - QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass); - obj.setScriptClass(0); - QCOMPARE(obj.scriptClass(), (QScriptClass*)0); + // object created in C++ (newObject()) + { + QScriptValue obj = eng.newObject(); + QCOMPARE(obj.scriptClass(), (QScriptClass*)0); + obj.setScriptClass(&testClass); + QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass); + obj.setScriptClass(0); + QCOMPARE(obj.scriptClass(), (QScriptClass*)0); + } + // object created in JS + { + QScriptValue obj = eng.evaluate("new Object"); + QVERIFY(!eng.hasUncaughtException()); + QVERIFY(obj.isObject()); + QCOMPARE(obj.scriptClass(), (QScriptClass*)0); + QTest::ignoreMessage(QtWarningMsg, "QScriptValue::setScriptClass() failed: cannot change class of non-QScriptObject"); + obj.setScriptClass(&testClass); + QEXPECT_FAIL("", "With JSC back-end, the class of a plain object created in JS can't be changed", Continue); + QCOMPARE(obj.scriptClass(), (QScriptClass*)&testClass); + obj.setScriptClass(0); + QCOMPARE(obj.scriptClass(), (QScriptClass*)0); + } } static QScriptValue getArg(QScriptContext *ctx, QScriptEngine *) @@ -2504,6 +2524,13 @@ void tst_QScriptValue::call() QScriptValue ret5 = fun.call(QScriptValue(), QScriptValue(&eng, 123.0)); QCOMPARE(ret5.isError(), true); } + + // calling things that are not functions + QVERIFY(!QScriptValue(false).call().isValid()); + QVERIFY(!QScriptValue(123).call().isValid()); + QVERIFY(!QScriptValue(QString::fromLatin1("ciao")).call().isValid()); + QVERIFY(!QScriptValue(QScriptValue::UndefinedValue).call().isValid()); + QVERIFY(!QScriptValue(QScriptValue::NullValue).call().isValid()); } static QScriptValue ctorReturningUndefined(QScriptContext *ctx, QScriptEngine *) @@ -2629,6 +2656,13 @@ void tst_QScriptValue::construct() QScriptValue ret5 = fun.construct(QScriptValue(&eng, 123.0)); QCOMPARE(ret5.isError(), true); } + + // construct on things that are not functions + QVERIFY(!QScriptValue(false).construct().isValid()); + QVERIFY(!QScriptValue(123).construct().isValid()); + QVERIFY(!QScriptValue(QString::fromLatin1("ciao")).construct().isValid()); + QVERIFY(!QScriptValue(QScriptValue::UndefinedValue).construct().isValid()); + QVERIFY(!QScriptValue(QScriptValue::NullValue).construct().isValid()); } void tst_QScriptValue::lessThan() @@ -3263,6 +3297,8 @@ void tst_QScriptValue::engineDeleted() QVERIFY(v4.engine() == 0); QVERIFY(v5.isValid()); QVERIFY(v5.engine() == 0); + + QVERIFY(!v3.property("foo").isValid()); } void tst_QScriptValue::valueOfWithClosure() diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 50818fe..93f5b6e 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -51,9 +51,11 @@ #include <stdlib.h> #include <time.h> +QT_BEGIN_NAMESPACE namespace QtSharedPointer { Q_CORE_EXPORT void internalSafetyCheckCleanCheck(); } +QT_END_NAMESPACE #ifdef Q_OS_SYMBIAN #define SRCDIR "." diff --git a/tests/auto/qsharedpointer/wrapper.h b/tests/auto/qsharedpointer/wrapper.h index c006686..4445860 100644 --- a/tests/auto/qsharedpointer/wrapper.h +++ b/tests/auto/qsharedpointer/wrapper.h @@ -41,7 +41,10 @@ #ifndef WRAPPER_H #define WRAPPER_H +QT_BEGIN_NAMESPACE template <class T> class QSharedPointer; +QT_END_NAMESPACE + class Wrapper { public: diff --git a/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp b/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp index d03b999..744e86a 100644 --- a/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp +++ b/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp @@ -43,9 +43,11 @@ #include <QtGui/QPushButton> #include <QtTest/QtTest> +QT_BEGIN_NAMESPACE namespace QtSharedPointer { Q_CORE_EXPORT void internalSafetyCheckCleanCheck(); } +QT_END_NAMESPACE class tst_QSharedPointer_and_QWidget: public QObject { diff --git a/tests/auto/qsqldriver/tst_qsqldriver.cpp b/tests/auto/qsqldriver/tst_qsqldriver.cpp index 5af56c7..4857295 100644 --- a/tests/auto/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/qsqldriver/tst_qsqldriver.cpp @@ -144,9 +144,11 @@ void tst_QSqlDriver::record() else if (db.driverName().startsWith("QPSQL")) tablename = tablename.toLower(); - //check we can get records using a properly quoted table name - rec = db.driver()->record(db.driver()->escapeIdentifier(tablename,QSqlDriver::TableName)); - QCOMPARE(rec.count(), 4); + if(!db.driverName().startsWith("QODBC") && !db.databaseName().contains("PostgreSql")) { + //check we can get records using a properly quoted table name + rec = db.driver()->record(db.driver()->escapeIdentifier(tablename,QSqlDriver::TableName)); + QCOMPARE(rec.count(), 4); + } for (int i = 0; i < fields.count(); ++i) QCOMPARE(rec.fieldName(i), fields[i]); @@ -188,8 +190,10 @@ void tst_QSqlDriver::primaryIndex() else if (db.driverName().startsWith("QPSQL")) tablename = tablename.toLower(); - index = db.driver()->primaryIndex(db.driver()->escapeIdentifier(tablename, QSqlDriver::TableName)); - QCOMPARE(index.count(), 1); + if(!db.driverName().startsWith("QODBC") && !db.databaseName().contains("PostgreSql")) { + index = db.driver()->primaryIndex(db.driver()->escapeIdentifier(tablename, QSqlDriver::TableName)); + QCOMPARE(index.count(), 1); + } if( db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2")) QCOMPARE(index.fieldName(0), QString::fromLatin1("ID")); else diff --git a/tests/auto/qsslcertificate/more-certificates/badguy-nul-san.crt b/tests/auto/qsslcertificate/more-certificates/badguy-nul-san.crt new file mode 100644 index 0000000..d897c39 --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/badguy-nul-san.crt @@ -0,0 +1,83 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd, OU=CA, CN=NULL-friendly CA + Validity + Not Before: Aug 4 06:53:05 2009 GMT + Not After : Aug 2 06:53:05 2019 GMT + Subject: CN=www.badguy.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:cd:26:70:96:a9:a6:5d:3e:9c:ed:0f:08:15:5a: + 7c:17:25:68:68:af:13:b9:ad:41:fa:12:54:e2:84: + 72:7d:58:d1:e2:40:42:c1:59:ed:05:3d:aa:10:53: + 70:00:88:3a:77:a0:c0:56:9e:ac:7d:21:2a:71:44: + 51:08:bc:17:07:da:a8:a3:76:dc:51:bc:1b:8a:f6: + 02:1a:55:bf:46:b4:44:6b:27:5e:be:e5:17:8b:56: + b2:c6:82:36:11:83:a8:bf:f7:2f:0d:17:f6:cd:47: + b5:6f:2b:a6:41:b6:8d:33:5f:ea:ea:8b:b1:1a:e2: + 99:38:ff:59:5b:0a:a1:71:13:ca:37:3f:b9:b0:1e: + 91:9a:c8:93:35:0c:4a:e0:9d:f4:d2:61:c7:4e:5b: + 41:0a:7c:31:54:99:db:f5:65:ce:80:d3:c2:02:37: + 64:fd:54:12:7b:ea:ac:85:59:5c:17:e1:2e:f6:d0: + a8:f2:d0:2e:94:59:2f:c2:a6:5f:da:07:de:7b:2e: + 14:07:ed:e4:27:24:37:9d:09:2e:b1:f9:5a:48:b9: + 80:24:43:e6:cb:c7:6e:35:df:d5:69:34:ff:e6:d6: + 9e:e8:76:66:6e:5f:59:01:3c:96:3b:ec:72:0b:3c: + 1e:95:0f:ce:68:13:9c:22:dd:1b:b5:44:28:50:4a: + 05:7f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + Netscape Comment: + OpenSSL Generated Certificate + X509v3 Subject Key Identifier: + 33:15:24:BE:DA:66:3A:06:8B:D9:27:34:3A:AF:62:40:E4:95:66:5D + X509v3 Authority Key Identifier: + keyid:0A:69:39:5F:9D:30:04:18:08:2E:02:0E:E6:EA:9D:B2:26:F6:E2:6A + + X509v3 Subject Alternative Name: + DNS:www.bank.com + Signature Algorithm: sha1WithRSAEncryption + 27:6e:7d:b3:a9:86:52:57:6a:a0:c6:30:6c:1e:94:09:a7:6f: + ad:fe:11:9f:be:32:8d:01:7b:8b:94:66:d7:7c:b6:b1:90:fc: + e4:f5:b6:32:bc:6c:71:23:b1:18:88:d6:47:bc:da:07:c7:5e: + 46:71:3a:e6:40:6e:c1:7f:1d:56:96:70:65:d8:51:a9:dc:9e: + a5:06:00:98:e7:1e:10:bc:82:ba:00:e5:4e:a2:0f:3e:ec:8a: + dd:6f:c6:c9:c1:ec:ed:6d:7c:31:3e:66:87:47:a1:8b:15:3c: + 21:7e:ec:21:78:3d:21:70:72:ba:70:c3:64:f8:1d:4f:d9:d0: + 27:3c:3e:7e:a2:59:ae:be:9a:d3:00:44:a7:72:3a:e3:3f:c8: + 9b:c5:8f:b1:94:fe:00:0f:6e:b8:14:88:f1:03:50:91:51:af: + f0:1e:f7:b8:5a:a4:57:35:2d:f1:ad:c8:ae:dd:29:61:14:7d: + ea:d1:34:80:5c:1b:fd:eb:43:dc:21:6d:c6:44:f9:3b:54:76: + c4:91:5b:ac:a4:8e:72:e7:d8:24:ff:a7:5a:c0:ef:27:c3:d7: + e4:f9:7f:55:8d:0d:30:ec:a2:d9:6d:c8:76:f4:be:94:3d:12: + 32:4a:91:4f:db:c3:e7:76:07:5a:12:97:18:b7:15:00:98:59: + 21:89:3e:35 +-----BEGIN CERTIFICATE----- +MIIDrTCCApWgAwIBAgIBADANBgkqhkiG9w0BAQUFADB0MQswCQYDVQQGEwJHQjES +MBAGA1UECBMJQmVya3NoaXJlMRAwDgYDVQQHEwdOZXdidXJ5MRcwFQYDVQQKEw5N +eSBDb21wYW55IEx0ZDELMAkGA1UECxMCQ0ExGTAXBgNVBAMTEE5VTEwtZnJpZW5k +bHkgQ0EwHhcNMDkwODA0MDY1MzA1WhcNMTkwODAyMDY1MzA1WjAZMRcwFQYDVQQD +Ew53d3cuYmFkZ3V5LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AM0mcJappl0+nO0PCBVafBclaGivE7mtQfoSVOKEcn1Y0eJAQsFZ7QU9qhBTcACI +OnegwFaerH0hKnFEUQi8FwfaqKN23FG8G4r2AhpVv0a0RGsnXr7lF4tWssaCNhGD +qL/3Lw0X9s1HtW8rpkG2jTNf6uqLsRrimTj/WVsKoXETyjc/ubAekZrIkzUMSuCd +9NJhx05bQQp8MVSZ2/VlzoDTwgI3ZP1UEnvqrIVZXBfhLvbQqPLQLpRZL8KmX9oH +3nsuFAft5CckN50JLrH5Wki5gCRD5svHbjXf1Wk0/+bWnuh2Zm5fWQE8ljvscgs8 +HpUPzmgTnCLdG7VEKFBKBX8CAwEAAaOBpDCBoTAJBgNVHRMEAjAAMCwGCWCGSAGG ++EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQU +MxUkvtpmOgaL2Sc0Oq9iQOSVZl0wHwYDVR0jBBgwFoAUCmk5X50wBBgILgIO5uqd +sib24mowJgYDVR0RBB8wHYIbd3d3LmJhbmsuY29tAHd3dy5iYWRndXkuY29tMA0G +CSqGSIb3DQEBBQUAA4IBAQAnbn2zqYZSV2qgxjBsHpQJp2+t/hGfvjKNAXuLlGbX +fLaxkPzk9bYyvGxxI7EYiNZHvNoHx15GcTrmQG7Bfx1WlnBl2FGp3J6lBgCY5x4Q +vIK6AOVOog8+7Irdb8bJweztbXwxPmaHR6GLFTwhfuwheD0hcHK6cMNk+B1P2dAn +PD5+olmuvprTAESncjrjP8ibxY+xlP4AD264FIjxA1CRUa/wHve4WqRXNS3xrciu +3SlhFH3q0TSAXBv960PcIW3GRPk7VHbEkVuspI5y59gk/6dawO8nw9fk+X9VjQ0w +7KLZbch29L6UPRIySpFP28PndgdaEpcYtxUAmFkhiT41 +-----END CERTIFICATE----- diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index c046e38..9cd5c72 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -107,6 +107,7 @@ private slots: void certInfo(); void task256066toPem(); void nulInCN(); + void nulInSan(); // ### add tests for certificate bundles (multiple certificates concatenated into a single // structure); both PEM and DER formatted #endif @@ -750,6 +751,26 @@ void tst_QSslCertificate::nulInCN() QCOMPARE(cn, QString::fromLatin1(realCN, sizeof realCN - 1)); } +void tst_QSslCertificate::nulInSan() +{ + QList<QSslCertificate> certList = + QSslCertificate::fromPath(SRCDIR "more-certificates/badguy-nul-san.crt"); + QCOMPARE(certList.size(), 1); + + const QSslCertificate &cert = certList.at(0); + QVERIFY(!cert.isNull()); + + QMultiMap<QSsl::AlternateNameEntryType, QString> san = cert.alternateSubjectNames(); + QVERIFY(!san.isEmpty()); + + QString dnssan = san.value(QSsl::DnsEntry); + QVERIFY(!dnssan.isEmpty()); + QVERIFY(dnssan != "www.bank.com"); + + static const char realSAN[] = "www.bank.com\0.badguy.com"; + QCOMPARE(dnssan, QString::fromLatin1(realSAN, sizeof realSAN - 1)); +} + #endif // QT_NO_OPENSSL QTEST_MAIN(tst_QSslCertificate) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index ba5ef70..85ecf6b 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -181,6 +181,7 @@ private slots: void ignoreSslErrorsList(); void ignoreSslErrorsListWithSlot_data(); void ignoreSslErrorsListWithSlot(); + void readFromClosedSocket(); static void exitLoop() { @@ -1668,6 +1669,34 @@ void tst_QSslSocket::ignoreSslErrorsListWithSlot() QCOMPARE(socket.waitForEncrypted(10000), expectEncryptionSuccess); } +// make sure a closed socket has no bytesAvailable() +// related to https://bugs.webkit.org/show_bug.cgi?id=28016 +void tst_QSslSocket::readFromClosedSocket() +{ + QSslSocketPtr socket = newSocket(); + socket->ignoreSslErrors(); + socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443); + socket->ignoreSslErrors(); + socket->waitForConnected(); + socket->waitForEncrypted(); + // provoke a response by sending a request + socket->write("GET /gif/fluke.gif HTTP/1.1\n"); + socket->write("Host: "); + socket->write(QtNetworkSettings::serverName().toLocal8Bit().constData()); + socket->write("\n"); + socket->write("\n"); + socket->waitForBytesWritten(); + socket->waitForReadyRead(); + QVERIFY(socket->state() == QAbstractSocket::ConnectedState); + QVERIFY(socket->bytesAvailable()); + socket->close(); + QVERIFY(!socket->bytesAvailable()); + QVERIFY(!socket->bytesToWrite()); + socket->waitForDisconnected(); + QVERIFY(!socket->bytesAvailable()); + QVERIFY(!socket->bytesToWrite()); +} + #endif // QT_NO_OPENSSL QTEST_MAIN(tst_QSslSocket) diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index 20e69ce..643daa2 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -93,10 +93,13 @@ Q_OBJECT { emit signalWithIntArg(arg); } void emitSignalWithStringArg(const QString &arg) { emit signalWithStringArg(arg); } + void emitSignalWithDefaultArg() + { emit signalWithDefaultArg(); } Q_SIGNALS: void signalWithNoArg(); void signalWithIntArg(int); void signalWithStringArg(const QString &); + void signalWithDefaultArg(int i = 42); }; class tst_QStateMachine : public QObject @@ -193,6 +196,8 @@ private slots: void nestedStateMachines(); void goToState(); + + void task260403_clonedSignals(); }; tst_QStateMachine::tst_QStateMachine() @@ -3937,5 +3942,42 @@ void tst_QStateMachine::goToState() QVERIFY(machine.configuration().contains(s2_1)); } +class CloneSignalTransition : public QSignalTransition +{ +public: + CloneSignalTransition(QObject *sender, const char *signal, QAbstractState *target) + : QSignalTransition(sender, signal) + { + setTargetState(target); + } + + void onTransition(QEvent *e) + { + QSignalTransition::onTransition(e); + QSignalEvent *se = static_cast<QSignalEvent*>(e); + eventSignalIndex = se->signalIndex(); + } + + int eventSignalIndex; +}; + +void tst_QStateMachine::task260403_clonedSignals() +{ + SignalEmitter emitter; + QStateMachine machine; + QState *s1 = new QState(&machine); + QState *s2 = new QState(&machine); + CloneSignalTransition *t1 = new CloneSignalTransition(&emitter, SIGNAL(signalWithDefaultArg()), s2); + s1->addTransition(t1); + + machine.setInitialState(s1); + machine.start(); + QTest::qWait(1); + + emitter.emitSignalWithDefaultArg(); + QTest::qWait(1); + QCOMPARE(t1->eventSignalIndex, emitter.metaObject()->indexOfSignal("signalWithDefaultArg()")); +} + QTEST_MAIN(tst_QStateMachine) #include "tst_qstatemachine.moc" diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp index cbeaebb..60d9787 100644 --- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -831,7 +831,7 @@ void tst_QStyleSheetStyle::hoverColors() QDialog frame; QLayout* layout = new QGridLayout; - QLineEdit* dummy = new QLineEdit; + QLineEdit* dummy = new QLineEdit; widget->setStyleSheet("*:hover { border:none; background: #e8ff66; color: #ff0084 }"); @@ -1210,6 +1210,7 @@ void tst_QStyleSheetStyle::proxyStyle() QTest::qWait(100); delete w; delete proxy; + delete newProxy; } void tst_QStyleSheetStyle::dialogButtonBox() @@ -1400,7 +1401,7 @@ void tst_QStyleSheetStyle::opaquePaintEvent() QWidget tl; QWidget cl(&tl); cl.setAttribute(Qt::WA_OpaquePaintEvent, true); - cl.setAutoFillBackground(true); + cl.setAutoFillBackground(true); cl.setStyleSheet(stylesheet); cl.ensurePolished(); QCOMPARE(cl.testAttribute(Qt::WA_OpaquePaintEvent), !transparent); @@ -1415,7 +1416,7 @@ void tst_QStyleSheetStyle::task188195_baseBackground() tree.show(); QTest::qWait(20); QImage image(tree.width(), tree.height(), QImage::Format_ARGB32); - + tree.render(&image); QVERIFY(testForColors(image, tree.palette().base().color())); QVERIFY(!testForColors(image, QColor(0xab, 0x12, 0x51))); diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index 73955fd..a57e793 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -83,6 +83,7 @@ private slots: void strokeInherit(); void testFillInheritance(); void testStopOffsetOpacity(); + void testUseElement(); #ifndef QT_NO_COMPRESS void testGzLoading(); @@ -755,7 +756,7 @@ static void opacity_drawSvgAndVerify(const QByteArray &data) void tst_QSvgRenderer::opacity() { - static const char *opacities[] = {"-1,4641", "0", "0.5", "1", "1.337"}; + static const char *opacities[] = {"-1.4641", "0", "0.5", "1", "1.337"}; static const char *firstColors[] = {"#7f7f7f", "#7f7f7f", "#402051", "blue", "#123456"}; static const char *secondColors[] = {"red", "#bad", "#bedead", "#7f7f7f", "#7f7f7f"}; @@ -795,8 +796,6 @@ void tst_QSvgRenderer::opacity() data.append("\"/></svg>"); opacity_drawSvgAndVerify(data); } - // When support for gradients on strokes has been implemented, add the code below. - /* // Stroke-opacity for (int i = 0; i < 5; ++i) { QByteArray data("<svg viewBox=\"0 0 10 10\"><defs><linearGradient id=\"grad\"><stop offset=\"0\" stop-color=\""); @@ -810,7 +809,6 @@ void tst_QSvgRenderer::opacity() data.append("\" /></svg>"); opacity_drawSvgAndVerify(data); } - */ } void tst_QSvgRenderer::paths() @@ -1205,5 +1203,106 @@ void tst_QSvgRenderer::testStopOffsetOpacity() QCOMPARE(images[0], images[3]); } +void tst_QSvgRenderer::testUseElement() +{ + static const char *svgs[] = { + //Use refering to non group node (1) + "<svg viewBox = \"0 0 200 200\">" + " <polygon points=\"20,20 50,120 100,10 40,80 50,80\"/>" + " <polygon points=\"20,80 50,180 100,70 40,140 50,140\" fill= \"red\" stroke = \"blue\" fill-opacity = \"0.7\" fill-rule = \"evenodd\" stroke-width = \"3\"/>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <polygon id = \"usedPolyline\" points=\"20,20 50,120 100,10 40,80 50,80\"/>" + " <use y = \"60\" xlink:href = \"#usedPolyline\" fill= \"red\" stroke = \"blue\" fill-opacity = \"0.7\" fill-rule = \"evenodd\" stroke-width = \"3\"/>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <polygon id = \"usedPolyline\" points=\"20,20 50,120 100,10 40,80 50,80\"/>" + " <g fill = \" red\" fill-opacity =\"0.2\">" + "<use y = \"60\" xlink:href = \"#usedPolyline\" stroke = \"blue\" fill-opacity = \"0.7\" fill-rule = \"evenodd\" stroke-width = \"3\"/>" + "</g>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <polygon id = \"usedPolyline\" points=\"20,20 50,120 100,10 40,80 50,80\"/>" + " <g stroke-width = \"3\" stroke = \"yellow\">" + " <use y = \"60\" xlink:href = \"#usedPolyline\" fill = \" red\" stroke = \"blue\" fill-opacity = \"0.7\" fill-rule = \"evenodd\"/>" + " </g>" + "</svg>", + //Use refering to non group node (2) + "<svg viewBox = \"0 0 200 200\">" + " <polygon points=\"20,20 50,120 100,10 40,80 50,80\" fill = \"green\" fill-rule = \"nonzero\" stroke = \"purple\" stroke-width = \"4\" stroke-dasharray = \"1,1,3,1\" stroke-offset = \"3\" stroke-miterlimit = \"6\" stroke-linecap = \"butt\" stroke-linejoin = \"round\"/>" + " <polygon points=\"20,80 50,180 100,70 40,140 50,140\" fill= \"red\" stroke = \"blue\" fill-opacity = \"0.7\" fill-rule = \"evenodd\" stroke-width = \"3\" stroke-dasharray = \"1,1,1,1\" stroke-offset = \"5\" stroke-miterlimit = \"3\" stroke-linecap = \"butt\" stroke-linejoin = \"square\"/>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <g fill = \"green\" fill-rule = \"nonzero\" stroke = \"purple\" stroke-width = \"4\" stroke-dasharray = \"1,1,3,1\" stroke-offset = \"3\" stroke-miterlimit = \"6\" stroke-linecap = \"butt\" stroke-linejoin = \"round\">" + " <polygon id = \"usedPolyline\" points=\"20,20 50,120 100,10 40,80 50,80\" />" + " </g>" + " <g stroke = \"blue\" stroke-width = \"3\" stroke-dasharray = \"1,1,1,1\" stroke-offset = \"5\" stroke-miterlimit = \"3\" stroke-linecap = \"butt\" stroke-linejoin = \"square\">" + " <use y = \"60\" xlink:href = \"#usedPolyline\" fill-opacity = \"0.7\" fill= \"red\" stroke = \"blue\" fill-rule = \"evenodd\"/>" + " </g>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <g fill = \"green\" fill-rule = \"nonzero\" stroke = \"purple\" stroke-width = \"4\" stroke-dasharray = \"1,1,3,1\" stroke-offset = \"3\" stroke-miterlimit = \"6\" stroke-linecap = \"butt\" stroke-linejoin = \"round\">" + " <polygon id = \"usedPolyline\" points=\"20,20 50,120 100,10 40,80 50,80\" />" + " </g>" + " <g stroke-width = \"3\" stroke-dasharray = \"1,1,1,1\" stroke-offset = \"5\" stroke-miterlimit = \"3\" stroke-linecap = \"butt\" stroke-linejoin = \"square\" >" + " <use y = \"60\" xlink:href = \"#usedPolyline\" fill= \"red\" stroke = \"blue\" fill-opacity = \"0.7\" fill-rule = \"evenodd\" />" + " </g>" + "</svg>", + //Use refering to group node + "<svg viewBox = \"0 0 200 200\">" + " <g>" + " <circle cx=\"0\" cy=\"0\" r=\"100\" fill = \"red\" fill-opacity = \"0.6\"/>" + " <rect x = \"10\" y = \"10\" width = \"30\" height = \"30\" fill = \"red\" fill-opacity = \"0.5\"/>" + " <circle fill=\"#a6ce39\" cx=\"0\" cy=\"0\" r=\"33\" fill-opacity = \"0.5\"/>" + " </g>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <defs>" + " <g id=\"usedG\">" + " <circle cx=\"0\" cy=\"0\" r=\"100\" fill-opacity = \"0.6\"/>" + " <rect x = \"10\" y = \"10\" width = \"30\" height = \"30\"/>" + " <circle fill=\"#a6ce39\" cx=\"0\" cy=\"0\" r=\"33\" />" + " </g>" + " </defs>" + " <use xlink:href =\"#usedG\" fill = \"red\" fill-opacity =\"0.5\"/>" + "</svg>", + "<svg viewBox = \"0 0 200 200\">" + " <defs>" + " <g fill = \"blue\" fill-opacity = \"0.3\">" + " <g id=\"usedG\">" + " <circle cx=\"0\" cy=\"0\" r=\"100\" fill-opacity = \"0.6\"/>" + " <rect x = \"10\" y = \"10\" width = \"30\" height = \"30\"/>" + " <circle fill=\"#a6ce39\" cx=\"0\" cy=\"0\" r=\"33\" />" + " </g>" + " </g>" + " </defs>" + " <g fill = \"red\" fill-opacity =\"0.5\">" + " <use xlink:href =\"#usedG\" />" + " </g>" + "</svg>" + }; + + const int COUNT = sizeof(svgs) / sizeof(svgs[0]); + QImage images[COUNT]; + QPainter p; + + for (int i = 0; i < COUNT; ++i) { + QByteArray data(svgs[i]); + QSvgRenderer renderer(data); + images[i] = QImage(200, 200, QImage::Format_ARGB32_Premultiplied); + images[i].fill(-1); + p.begin(&images[i]); + renderer.render(&p); + p.end(); + if (i < 4 && i != 0) { + QCOMPARE(images[0], images[i]); + } else if (i > 4 && i < 7) { + QCOMPARE(images[4], images[i]); + } else if (i > 7) { + QCOMPARE(images[8], images[i]); + } + } +} + QTEST_MAIN(tst_QSvgRenderer) #include "tst_qsvgrenderer.moc" diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp index 041836c..3f77b7a 100644 --- a/tests/auto/qtabbar/tst_qtabbar.cpp +++ b/tests/auto/qtabbar/tst_qtabbar.cpp @@ -94,6 +94,7 @@ private slots: void moveTab(); void task251184_removeTab(); + void changeTitleWhileDoubleClickingTab(); }; // Testing get/set functions @@ -535,5 +536,38 @@ void tst_QTabBar::task251184_removeTab() } +class TitleChangeTabBar : public QTabBar +{ + Q_OBJECT + + QTimer timer; + int count; + +public: + TitleChangeTabBar(QWidget * parent = 0) : QTabBar(parent), count(0) + { + setMovable(true); + addTab("0"); + connect(&timer, SIGNAL(timeout()), this, SLOT(updateTabText())); + timer.start(1); + } + +public slots: + void updateTabText() + { + count++; + setTabText(0, QString("%1").arg(count)); + } +}; + +void tst_QTabBar::changeTitleWhileDoubleClickingTab() +{ + TitleChangeTabBar bar; + QPoint tabPos = bar.tabRect(0).center(); + + for(int i=0; i < 10; i++) + QTest::mouseDClick(&bar, Qt::LeftButton, 0, tabPos); +} + QTEST_MAIN(tst_QTabBar) #include "tst_qtabbar.moc" diff --git a/tests/auto/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/qtextdocumentlayout/tst_qtextdocumentlayout.cpp index d8c4f51..dbba9ef 100644 --- a/tests/auto/qtextdocumentlayout/tst_qtextdocumentlayout.cpp +++ b/tests/auto/qtextdocumentlayout/tst_qtextdocumentlayout.cpp @@ -71,6 +71,7 @@ private slots: void wrapAtWordBoundaryOrAnywhere(); void inlineImage(); void clippedTableCell(); + void floatingTablePageBreak(); private: QTextDocument *doc; @@ -250,5 +251,25 @@ void tst_QTextDocumentLayout::clippedTableCell() QCOMPARE(img, expected); } +void tst_QTextDocumentLayout::floatingTablePageBreak() +{ + doc->clear(); + + QTextCursor cursor(doc); + + QTextTableFormat tableFormat; + tableFormat.setPosition(QTextFrameFormat::FloatLeft); + QTextTable *table = cursor.insertTable(50, 1, tableFormat); + + // Make height of document 2/3 of the table, fitting the table into two pages + QSizeF documentSize = doc->size(); + documentSize.rheight() *= 2.0 / 3.0; + + doc->setPageSize(documentSize); + + QCOMPARE(doc->pageCount(), 2); +} + + QTEST_MAIN(tst_QTextDocumentLayout) #include "tst_qtextdocumentlayout.moc" diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index d28c3c3..44185e7 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -232,6 +232,7 @@ private slots: void task250683_wrongSectionSize(); void task239271_addRowsWithFirstColumnHidden(); void task254234_proxySort(); + void task248022_changeSelection(); }; class QtTestModel: public QAbstractItemModel @@ -3435,5 +3436,33 @@ void tst_QTreeView::task254234_proxySort() QCOMPARE(view.model()->data(view.model()->index(1,1)).toString(), QString::fromLatin1("g")); } +class TreeView : public QTreeView +{ + Q_OBJECT +public slots: + void handleSelectionChanged() + { + //let's select the last item + QModelIndex idx = model()->index(0, 0); + selectionModel()->select(QItemSelection(idx, idx), QItemSelectionModel::Select); + disconnect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(handleSelectionChanged())); + } +}; + +void tst_QTreeView::task248022_changeSelection() +{ + //we check that changing the selection between the mouse press and the mouse release + //works correctly + TreeView view; + QStringList list = QStringList() << "1" << "2"; + QStringListModel model(list); + view.setSelectionMode(QAbstractItemView::ExtendedSelection); + view.setModel(&model); + view.connect(view.selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(handleSelectionChanged())); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.visualRect(model.index(1)).center()); + QCOMPARE(view.selectionModel()->selectedIndexes().count(), list.count()); +} + + QTEST_MAIN(tst_QTreeView) #include "tst_qtreeview.moc" diff --git a/tests/auto/qtwidgets/tst_qtwidgets.cpp b/tests/auto/qtwidgets/tst_qtwidgets.cpp index 0ccc0aa..9473648 100644 --- a/tests/auto/qtwidgets/tst_qtwidgets.cpp +++ b/tests/auto/qtwidgets/tst_qtwidgets.cpp @@ -86,9 +86,9 @@ void tst_QtWidgets::snapshot() QString filename = "qtwidgets_" + QHostInfo::localHostName() + "_" + QDateTime::currentDateTime().toString("yyyy.MM.dd_hh.mm.ss") + ".png"; QFtp ftp; - ftp.connectToHost("kramer.troll.no"); - ftp.login("anonymous"); - ftp.cd("pics"); + ftp.connectToHost("qt-test-server.qt-test-net"); + ftp.login("ftptest", "password"); + ftp.cd("qtest/pics"); ftp.put(buf.data(), filename, QFtp::Binary); ftp.close(); diff --git a/tests/auto/qvideoframe/qvideoframe.pro b/tests/auto/qvideoframe/qvideoframe.pro new file mode 100644 index 0000000..a735352 --- /dev/null +++ b/tests/auto/qvideoframe/qvideoframe.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qvideoframe.cpp + +QT += multimedia +requires(contains(QT_CONFIG, multimedia)) diff --git a/tests/auto/qvideoframe/tst_qvideoframe.cpp b/tests/auto/qvideoframe/tst_qvideoframe.cpp new file mode 100644 index 0000000..4fa89ee --- /dev/null +++ b/tests/auto/qvideoframe/tst_qvideoframe.cpp @@ -0,0 +1,663 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> + +#include <QtMultimedia/QVideoFrame> +#include <QtGui/QImage> +#include <QtCore/QPointer> + +class tst_QVideoFrame : public QObject +{ + Q_OBJECT +public: + tst_QVideoFrame(); + ~tst_QVideoFrame(); + +public slots: + void initTestCase(); + void cleanupTestCase(); + void init(); + void cleanup(); + +private slots: + void create_data(); + void create(); + void createInvalid_data(); + void createInvalid(); + void createFromBuffer_data(); + void createFromBuffer(); + void createFromImage_data(); + void createFromImage(); + void createFromIncompatibleImage(); + void createNull(); + void destructor(); + void copy_data(); + void copy(); + void assign_data(); + void assign(); + void map_data(); + void map(); + void mapImage_data(); + void mapImage(); + void imageDetach(); +}; + +Q_DECLARE_METATYPE(QImage::Format) +Q_DECLARE_METATYPE(QVideoFrame) + +class QtTestVideoBuffer : public QObject, public QAbstractVideoBuffer +{ + Q_OBJECT +public: + QtTestVideoBuffer() + : QAbstractVideoBuffer(NoHandle) {} + explicit QtTestVideoBuffer(QAbstractVideoBuffer::HandleType type) + : QAbstractVideoBuffer(type) {} + + MapMode mapMode() const { return NotMapped; } + + uchar *map(MapMode, int *, int *) { return 0; } + void unmap() {} +}; + +tst_QVideoFrame::tst_QVideoFrame() +{ +} + +tst_QVideoFrame::~tst_QVideoFrame() +{ +} + +void tst_QVideoFrame::initTestCase() +{ +} + +void tst_QVideoFrame::cleanupTestCase() +{ +} + +void tst_QVideoFrame::init() +{ +} + +void tst_QVideoFrame::cleanup() +{ +} + +void tst_QVideoFrame::create_data() +{ + QTest::addColumn<QSize>("size"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + QTest::addColumn<int>("bytes"); + QTest::addColumn<int>("bytesPerLine"); + + QTest::newRow("64x64 ARGB32") + << QSize(64, 64) + << QVideoFrame::Format_ARGB32 + << 16384 + << 256; + QTest::newRow("32x256 YUV420P") + << QSize(32, 256) + << QVideoFrame::Format_YUV420P + << 13288 + << 32; +} + +void tst_QVideoFrame::create() +{ + QFETCH(QSize, size); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + QFETCH(int, bytes); + QFETCH(int, bytesPerLine); + + QVideoFrame frame(bytes, size, bytesPerLine, pixelFormat); + + QVERIFY(frame.isValid()); + QCOMPARE(frame.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::createInvalid_data() +{ + QTest::addColumn<QSize>("size"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + QTest::addColumn<int>("bytes"); + QTest::addColumn<int>("bytesPerLine"); + + QTest::newRow("64x64 ARGB32 0 size") + << QSize(64, 64) + << QVideoFrame::Format_ARGB32 + << 0 + << 45; + QTest::newRow("32x256 YUV420P negative size") + << QSize(32, 256) + << QVideoFrame::Format_YUV420P + << -13288 + << 32; +} + +void tst_QVideoFrame::createInvalid() +{ + QFETCH(QSize, size); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + QFETCH(int, bytes); + QFETCH(int, bytesPerLine); + + QVideoFrame frame(bytes, size, bytesPerLine, pixelFormat); + + QVERIFY(!frame.isValid()); + QCOMPARE(frame.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::createFromBuffer_data() +{ + QTest::addColumn<QAbstractVideoBuffer::HandleType>("handleType"); + QTest::addColumn<QSize>("size"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + + QTest::newRow("64x64 ARGB32 no handle") + << QAbstractVideoBuffer::NoHandle + << QSize(64, 64) + << QVideoFrame::Format_ARGB32; + QTest::newRow("64x64 ARGB32 gl handle") + << QAbstractVideoBuffer::GLTextureHandle + << QSize(64, 64) + << QVideoFrame::Format_ARGB32; + QTest::newRow("64x64 ARGB32 user handle") + << QAbstractVideoBuffer::UserHandle + << QSize(64, 64) + << QVideoFrame::Format_ARGB32; +} + +void tst_QVideoFrame::createFromBuffer() +{ + QFETCH(QAbstractVideoBuffer::HandleType, handleType); + QFETCH(QSize, size); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + + QVideoFrame frame(new QtTestVideoBuffer(handleType), size, pixelFormat); + + QVERIFY(frame.isValid()); + QCOMPARE(frame.handleType(), handleType); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::createFromImage_data() +{ + QTest::addColumn<QSize>("size"); + QTest::addColumn<QImage::Format>("imageFormat"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + + QTest::newRow("64x64 RGB32") + << QSize(64, 64) + << QImage::Format_RGB32 + << QVideoFrame::Format_RGB32; + QTest::newRow("12x45 RGB16") + << QSize(12, 45) + << QImage::Format_RGB16 + << QVideoFrame::Format_RGB565; + QTest::newRow("19x46 ARGB32_Premultiplied") + << QSize(19, 46) + << QImage::Format_ARGB32_Premultiplied + << QVideoFrame::Format_ARGB32_Premultiplied; +} + +void tst_QVideoFrame::createFromImage() +{ + QFETCH(QSize, size); + QFETCH(QImage::Format, imageFormat); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + + const QImage image(size.width(), size.height(), imageFormat); + + QVideoFrame frame(image); + + QVERIFY(frame.isValid()); + QCOMPARE(frame.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::createFromIncompatibleImage() +{ + const QImage image(64, 64, QImage::Format_Mono); + + QVideoFrame frame(image); + + QVERIFY(!frame.isValid()); + QCOMPARE(frame.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(frame.pixelFormat(), QVideoFrame::Format_Invalid); + QCOMPARE(frame.size(), QSize(64, 64)); + QCOMPARE(frame.width(), 64); + QCOMPARE(frame.height(), 64); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::createNull() +{ + QVideoFrame frame; + + QVERIFY(!frame.isValid()); + QCOMPARE(frame.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(frame.pixelFormat(), QVideoFrame::Format_Invalid); + QCOMPARE(frame.size(), QSize()); + QCOMPARE(frame.width(), -1); + QCOMPARE(frame.height(), -1); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::destructor() +{ + QPointer<QtTestVideoBuffer> buffer = new QtTestVideoBuffer; + + { + QVideoFrame frame(buffer, QSize(4, 1), QVideoFrame::Format_ARGB32); + } + + QVERIFY(buffer.isNull()); +} + +void tst_QVideoFrame::copy_data() +{ + QTest::addColumn<QAbstractVideoBuffer::HandleType>("handleType"); + QTest::addColumn<QSize>("size"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + QTest::addColumn<QVideoFrame::FieldType>("fieldType"); + QTest::addColumn<qint64>("startTime"); + QTest::addColumn<qint64>("endTime"); + + QTest::newRow("64x64 ARGB32") + << QAbstractVideoBuffer::GLTextureHandle + << QSize(64, 64) + << QVideoFrame::Format_ARGB32 + << QVideoFrame::TopField + << qint64(63641740) + << qint64(63641954); + QTest::newRow("32x256 YUV420P") + << QAbstractVideoBuffer::UserHandle + << QSize(32, 256) + << QVideoFrame::Format_YUV420P + << QVideoFrame::InterlacedFrame + << qint64(12345) + << qint64(12389); +} + +void tst_QVideoFrame::copy() +{ + QFETCH(QAbstractVideoBuffer::HandleType, handleType); + QFETCH(QSize, size); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + QFETCH(QVideoFrame::FieldType, fieldType); + QFETCH(qint64, startTime); + QFETCH(qint64, endTime); + + QPointer<QtTestVideoBuffer> buffer = new QtTestVideoBuffer(handleType); + + { + QVideoFrame frame(buffer, size, pixelFormat); + frame.setFieldType(QVideoFrame::FieldType(fieldType)); + frame.setStartTime(startTime); + frame.setEndTime(endTime); + + QVERIFY(frame.isValid()); + QCOMPARE(frame.handleType(), handleType); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), fieldType); + QCOMPARE(frame.startTime(), startTime); + QCOMPARE(frame.endTime(), endTime); + + { + QVideoFrame otherFrame(frame); + + QVERIFY(!buffer.isNull()); + + QVERIFY(otherFrame.isValid()); + QCOMPARE(otherFrame.handleType(), handleType); + QCOMPARE(otherFrame.pixelFormat(), pixelFormat); + QCOMPARE(otherFrame.size(), size); + QCOMPARE(otherFrame.width(), size.width()); + QCOMPARE(otherFrame.height(), size.height()); + QCOMPARE(otherFrame.fieldType(), fieldType); + QCOMPARE(otherFrame.startTime(), startTime); + QCOMPARE(otherFrame.endTime(), endTime); + + otherFrame.setEndTime(-1); + + QVERIFY(!buffer.isNull()); + + QVERIFY(otherFrame.isValid()); + QCOMPARE(otherFrame.handleType(), handleType); + QCOMPARE(otherFrame.pixelFormat(), pixelFormat); + QCOMPARE(otherFrame.size(), size); + QCOMPARE(otherFrame.width(), size.width()); + QCOMPARE(otherFrame.height(), size.height()); + QCOMPARE(otherFrame.fieldType(), fieldType); + QCOMPARE(otherFrame.startTime(), startTime); + QCOMPARE(otherFrame.endTime(), qint64(-1)); + } + + QVERIFY(!buffer.isNull()); + + QVERIFY(frame.isValid()); + QCOMPARE(frame.handleType(), handleType); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), fieldType); + QCOMPARE(frame.startTime(), startTime); + QCOMPARE(frame.endTime(), qint64(-1)); // Explicitly shared. + } + + QVERIFY(buffer.isNull()); +} + +void tst_QVideoFrame::assign_data() +{ + QTest::addColumn<QAbstractVideoBuffer::HandleType>("handleType"); + QTest::addColumn<QSize>("size"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + QTest::addColumn<QVideoFrame::FieldType>("fieldType"); + QTest::addColumn<qint64>("startTime"); + QTest::addColumn<qint64>("endTime"); + + QTest::newRow("64x64 ARGB32") + << QAbstractVideoBuffer::GLTextureHandle + << QSize(64, 64) + << QVideoFrame::Format_ARGB32 + << QVideoFrame::TopField + << qint64(63641740) + << qint64(63641954); + QTest::newRow("32x256 YUV420P") + << QAbstractVideoBuffer::UserHandle + << QSize(32, 256) + << QVideoFrame::Format_YUV420P + << QVideoFrame::InterlacedFrame + << qint64(12345) + << qint64(12389); +} + +void tst_QVideoFrame::assign() +{ + QFETCH(QAbstractVideoBuffer::HandleType, handleType); + QFETCH(QSize, size); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + QFETCH(QVideoFrame::FieldType, fieldType); + QFETCH(qint64, startTime); + QFETCH(qint64, endTime); + + QPointer<QtTestVideoBuffer> buffer = new QtTestVideoBuffer(handleType); + + QVideoFrame frame; + { + QVideoFrame otherFrame(buffer, size, pixelFormat); + otherFrame.setFieldType(fieldType); + otherFrame.setStartTime(startTime); + otherFrame.setEndTime(endTime); + + frame = otherFrame; + + QVERIFY(!buffer.isNull()); + + QVERIFY(otherFrame.isValid()); + QCOMPARE(otherFrame.handleType(), handleType); + QCOMPARE(otherFrame.pixelFormat(), pixelFormat); + QCOMPARE(otherFrame.size(), size); + QCOMPARE(otherFrame.width(), size.width()); + QCOMPARE(otherFrame.height(), size.height()); + QCOMPARE(otherFrame.fieldType(), fieldType); + QCOMPARE(otherFrame.startTime(), startTime); + QCOMPARE(otherFrame.endTime(), endTime); + + otherFrame.setStartTime(-1); + + QVERIFY(!buffer.isNull()); + + QVERIFY(otherFrame.isValid()); + QCOMPARE(otherFrame.handleType(), handleType); + QCOMPARE(otherFrame.pixelFormat(), pixelFormat); + QCOMPARE(otherFrame.size(), size); + QCOMPARE(otherFrame.width(), size.width()); + QCOMPARE(otherFrame.height(), size.height()); + QCOMPARE(otherFrame.fieldType(), fieldType); + QCOMPARE(otherFrame.startTime(), qint64(-1)); + QCOMPARE(otherFrame.endTime(), endTime); + } + + QVERIFY(!buffer.isNull()); + + QVERIFY(frame.isValid()); + QCOMPARE(frame.handleType(), handleType); + QCOMPARE(frame.pixelFormat(), pixelFormat); + QCOMPARE(frame.size(), size); + QCOMPARE(frame.width(), size.width()); + QCOMPARE(frame.height(), size.height()); + QCOMPARE(frame.fieldType(), fieldType); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), endTime); + + frame = QVideoFrame(); + + QVERIFY(buffer.isNull()); + + QVERIFY(!frame.isValid()); + QCOMPARE(frame.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(frame.pixelFormat(), QVideoFrame::Format_Invalid); + QCOMPARE(frame.size(), QSize()); + QCOMPARE(frame.width(), -1); + QCOMPARE(frame.height(), -1); + QCOMPARE(frame.fieldType(), QVideoFrame::ProgressiveFrame); + QCOMPARE(frame.startTime(), qint64(-1)); + QCOMPARE(frame.endTime(), qint64(-1)); +} + +void tst_QVideoFrame::map_data() +{ + QTest::addColumn<QSize>("size"); + QTest::addColumn<int>("numBytes"); + QTest::addColumn<int>("bytesPerLine"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + QTest::addColumn<QAbstractVideoBuffer::MapMode>("mode"); + + QTest::newRow("read-only") + << QSize(64, 64) + << 16384 + << 256 + << QVideoFrame::Format_ARGB32 + << QAbstractVideoBuffer::ReadOnly; + + QTest::newRow("write-only") + << QSize(64, 64) + << 16384 + << 256 + << QVideoFrame::Format_ARGB32 + << QAbstractVideoBuffer::WriteOnly; + + QTest::newRow("read-write") + << QSize(64, 64) + << 16384 + << 256 + << QVideoFrame::Format_ARGB32 + << QAbstractVideoBuffer::ReadWrite; +} + +void tst_QVideoFrame::map() +{ + QFETCH(QSize, size); + QFETCH(int, numBytes); + QFETCH(int, bytesPerLine); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + QFETCH(QAbstractVideoBuffer::MapMode, mode); + + QVideoFrame frame(numBytes, size, bytesPerLine, pixelFormat); + + QVERIFY(!frame.bits()); + QCOMPARE(frame.numBytes(), 0); + QCOMPARE(frame.bytesPerLine(), 0); + QCOMPARE(frame.mapMode(), QAbstractVideoBuffer::NotMapped); + + QVERIFY(frame.map(mode)); + + QVERIFY(frame.bits()); + QCOMPARE(frame.numBytes(), numBytes); + QCOMPARE(frame.bytesPerLine(), bytesPerLine); + QCOMPARE(frame.mapMode(), mode); + + frame.unmap(); + + QVERIFY(!frame.bits()); + QCOMPARE(frame.numBytes(), 0); + QCOMPARE(frame.bytesPerLine(), 0); + QCOMPARE(frame.mapMode(), QAbstractVideoBuffer::NotMapped); +} + +void tst_QVideoFrame::mapImage_data() +{ + QTest::addColumn<QSize>("size"); + QTest::addColumn<QImage::Format>("format"); + QTest::addColumn<QAbstractVideoBuffer::MapMode>("mode"); + + QTest::newRow("read-only") + << QSize(64, 64) + << QImage::Format_ARGB32 + << QAbstractVideoBuffer::ReadOnly; + + QTest::newRow("write-only") + << QSize(15, 106) + << QImage::Format_RGB32 + << QAbstractVideoBuffer::WriteOnly; + + QTest::newRow("read-write") + << QSize(23, 111) + << QImage::Format_RGB16 + << QAbstractVideoBuffer::ReadWrite; +} + +void tst_QVideoFrame::mapImage() +{ + QFETCH(QSize, size); + QFETCH(QImage::Format, format); + QFETCH(QAbstractVideoBuffer::MapMode, mode); + + QImage image(size.width(), size.height(), format); + + QVideoFrame frame(image); + + QVERIFY(!frame.bits()); + QCOMPARE(frame.numBytes(), 0); + QCOMPARE(frame.bytesPerLine(), 0); + QCOMPARE(frame.mapMode(), QAbstractVideoBuffer::NotMapped); + + QVERIFY(frame.map(mode)); + + QVERIFY(frame.bits()); + QCOMPARE(frame.numBytes(), image.numBytes()); + QCOMPARE(frame.bytesPerLine(), image.bytesPerLine()); + QCOMPARE(frame.mapMode(), mode); + + frame.unmap(); + + QVERIFY(!frame.bits()); + QCOMPARE(frame.numBytes(), 0); + QCOMPARE(frame.bytesPerLine(), 0); + QCOMPARE(frame.mapMode(), QAbstractVideoBuffer::NotMapped); +} + +void tst_QVideoFrame::imageDetach() +{ + const uint red = qRgb(255, 0, 0); + const uint blue = qRgb(0, 0, 255); + + QImage image(8, 8, QImage::Format_RGB32); + + image.fill(red); + QCOMPARE(image.pixel(4, 4), red); + + QVideoFrame frame(image); + + QVERIFY(frame.map(QAbstractVideoBuffer::ReadWrite)); + + QImage frameImage(frame.bits(), 8, 8, frame.bytesPerLine(), QImage::Format_RGB32); + + QCOMPARE(frameImage.pixel(4, 4), red); + + frameImage.fill(blue); + QCOMPARE(frameImage.pixel(4, 4), blue); + + // Original image has detached and is therefore unchanged. + QCOMPARE(image.pixel(4, 4), red); +} + +QTEST_MAIN(tst_QVideoFrame) + +#include "tst_qvideoframe.moc" diff --git a/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro b/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro new file mode 100644 index 0000000..830b3d7 --- /dev/null +++ b/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +SOURCES += tst_qvideosurfaceformat.cpp + +QT += multimedia +requires(contains(QT_CONFIG, multimedia)) diff --git a/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp b/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp new file mode 100644 index 0000000..1bab37b --- /dev/null +++ b/tests/auto/qvideosurfaceformat/tst_qvideosurfaceformat.cpp @@ -0,0 +1,745 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> + +#include <QtMultimedia/QVideoSurfaceFormat> + +class tst_QVideoSurfaceFormat : public QObject +{ + Q_OBJECT +public: + tst_QVideoSurfaceFormat(); + ~tst_QVideoSurfaceFormat(); + +public slots: + void initTestCase(); + void cleanupTestCase(); + void init(); + void cleanup(); + +private slots: + void constructNull(); + void construct_data(); + void construct(); + void frameSize_data(); + void frameSize(); + void viewport_data(); + void viewport(); + void scanLineDirection_data(); + void scanLineDirection(); + void frameRate_data(); + void frameRate(); + void yuvColorSpace_data(); + void yuvColorSpace(); + void pixelAspectRatio_data(); + void pixelAspectRatio(); + void sizeHint_data(); + void sizeHint(); + void staticPropertyNames(); + void dynamicProperty(); + void compare(); + void copy(); + void assign(); +}; + +Q_DECLARE_METATYPE(QVideoSurfaceFormat::ViewportMode) + + +tst_QVideoSurfaceFormat::tst_QVideoSurfaceFormat() +{ +} + +tst_QVideoSurfaceFormat::~tst_QVideoSurfaceFormat() +{ +} + +void tst_QVideoSurfaceFormat::initTestCase() +{ +} + +void tst_QVideoSurfaceFormat::cleanupTestCase() +{ +} + +void tst_QVideoSurfaceFormat::init() +{ +} + +void tst_QVideoSurfaceFormat::cleanup() +{ +} + +void tst_QVideoSurfaceFormat::constructNull() +{ + QVideoSurfaceFormat format; + + QVERIFY(!format.isValid()); + QCOMPARE(format.handleType(), QAbstractVideoBuffer::NoHandle); + QCOMPARE(format.pixelFormat(), QVideoFrame::Format_Invalid); + QCOMPARE(format.frameSize(), QSize()); + QCOMPARE(format.frameWidth(), -1); + QCOMPARE(format.frameHeight(), -1); + QCOMPARE(format.viewport(), QRect()); + QCOMPARE(format.scanLineDirection(), QVideoSurfaceFormat::TopToBottom); + QCOMPARE(format.frameRate(), QVideoSurfaceFormat::FrameRate()); + QCOMPARE(format.pixelAspectRatio(), QSize(1, 1)); + QCOMPARE(format.yuvColorSpace(), QVideoSurfaceFormat::YCbCr_Undefined); +} + +void tst_QVideoSurfaceFormat::construct_data() +{ + QTest::addColumn<QSize>("frameSize"); + QTest::addColumn<QVideoFrame::PixelFormat>("pixelFormat"); + QTest::addColumn<QAbstractVideoBuffer::HandleType>("handleType"); + + QTest::newRow("32x32 rgb32 no handle") + << QSize(32, 32) + << QVideoFrame::Format_RGB32 + << QAbstractVideoBuffer::NoHandle; + + QTest::newRow("1024x768 YUV444 GL texture") + << QSize(32, 32) + << QVideoFrame::Format_YUV444 + << QAbstractVideoBuffer::GLTextureHandle; +} + +void tst_QVideoSurfaceFormat::construct() +{ + QFETCH(QSize, frameSize); + QFETCH(QVideoFrame::PixelFormat, pixelFormat); + QFETCH(QAbstractVideoBuffer::HandleType, handleType); + + QRect viewport(QPoint(0, 0), frameSize); + + QVideoSurfaceFormat format(frameSize, pixelFormat, handleType); + + QCOMPARE(format.handleType(), handleType); + QCOMPARE(format.pixelFormat(), pixelFormat); + QCOMPARE(format.frameSize(), frameSize); + QCOMPARE(format.frameWidth(), frameSize.width()); + QCOMPARE(format.frameHeight(), frameSize.height()); + QCOMPARE(format.viewport(), viewport); + QCOMPARE(format.scanLineDirection(), QVideoSurfaceFormat::TopToBottom); + QCOMPARE(format.frameRate(), QVideoSurfaceFormat::FrameRate()); + QCOMPARE(format.pixelAspectRatio(), QSize(1, 1)); + QCOMPARE(format.yuvColorSpace(), QVideoSurfaceFormat::YCbCr_Undefined); +} + +void tst_QVideoSurfaceFormat::frameSize_data() +{ + QTest::addColumn<QSize>("initialSize"); + QTest::addColumn<QSize>("newSize"); + + QTest::newRow("grow") + << QSize(64, 64) + << QSize(1024, 1024); + QTest::newRow("shrink") + << QSize(1024, 1024) + << QSize(64, 64); + QTest::newRow("unchanged") + << QSize(512, 512) + << QSize(512, 512); +} + +void tst_QVideoSurfaceFormat::frameSize() +{ + QFETCH(QSize, initialSize); + QFETCH(QSize, newSize); + + QVideoSurfaceFormat format(initialSize, QVideoFrame::Format_RGB32); + + format.setFrameSize(newSize); + + QCOMPARE(format.frameSize(), newSize); + QCOMPARE(format.property("frameSize").toSize(), newSize); + QCOMPARE(format.frameWidth(), newSize.width()); + QCOMPARE(format.property("frameWidth").toInt(), newSize.width()); + QCOMPARE(format.frameHeight(), newSize.height()); + QCOMPARE(format.property("frameHeight").toInt(), newSize.height()); +} + +void tst_QVideoSurfaceFormat::viewport_data() +{ + QTest::addColumn<QSize>("initialSize"); + QTest::addColumn<QRect>("viewport"); + QTest::addColumn<QSize>("newSize"); + QTest::addColumn<QVideoSurfaceFormat::ViewportMode>("viewportMode"); + QTest::addColumn<QRect>("expectedViewport"); + + QTest::newRow("grow reset") + << QSize(64, 64) + << QRect(8, 8, 48, 48) + << QSize(1024, 1024) + << QVideoSurfaceFormat::ResetViewport + << QRect(0, 0, 1024, 1024); + QTest::newRow("grow keep") + << QSize(64, 64) + << QRect(8, 8, 48, 48) + << QSize(1024, 1024) + << QVideoSurfaceFormat::KeepViewport + << QRect(8, 8, 48, 48); + QTest::newRow("shrink reset") + << QSize(1024, 1024) + << QRect(8, 8, 1008, 1008) + << QSize(64, 64) + << QVideoSurfaceFormat::ResetViewport + << QRect(0, 0, 64, 64); + QTest::newRow("shrink keep") + << QSize(1024, 1024) + << QRect(8, 8, 1008, 1008) + << QSize(64, 64) + << QVideoSurfaceFormat::KeepViewport + << QRect(8, 8, 56, 56); + QTest::newRow("unchanged reset") + << QSize(512, 512) + << QRect(8, 8, 496, 496) + << QSize(512, 512) + << QVideoSurfaceFormat::ResetViewport + << QRect(0, 0, 512, 512); + QTest::newRow("unchanged keep") + << QSize(512, 512) + << QRect(8, 8, 496, 496) + << QSize(512, 512) + << QVideoSurfaceFormat::KeepViewport + << QRect(8, 8, 496, 496); +} + +void tst_QVideoSurfaceFormat::viewport() +{ + QFETCH(QSize, initialSize); + QFETCH(QRect, viewport); + QFETCH(QSize, newSize); + QFETCH(QVideoSurfaceFormat::ViewportMode, viewportMode); + QFETCH(QRect, expectedViewport); + + { + QRect initialViewport(QPoint(0, 0), initialSize); + + QVideoSurfaceFormat format(initialSize, QVideoFrame::Format_RGB32); + + format.setViewport(viewport); + + QCOMPARE(format.viewport(), viewport); + QCOMPARE(format.property("viewport").toRect(), viewport); + + format.setFrameSize(newSize, viewportMode); + + QCOMPARE(format.viewport(), expectedViewport); + QCOMPARE(format.property("viewport").toRect(), expectedViewport); + } + { + QVideoSurfaceFormat format(initialSize, QVideoFrame::Format_RGB32); + + format.setProperty("viewport", viewport); + + QCOMPARE(format.viewport(), viewport); + QCOMPARE(format.property("viewport").toRect(), viewport); + } +} + +void tst_QVideoSurfaceFormat::scanLineDirection_data() +{ + QTest::addColumn<QVideoSurfaceFormat::Direction>("direction"); + + QTest::newRow("top to bottom") + << QVideoSurfaceFormat::TopToBottom; + + QTest::newRow("bottom to top") + << QVideoSurfaceFormat::BottomToTop; +} + +void tst_QVideoSurfaceFormat::scanLineDirection() +{ + QFETCH(QVideoSurfaceFormat::Direction, direction); + + { + QVideoSurfaceFormat format(QSize(16, 16), QVideoFrame::Format_RGB32); + + format.setScanLineDirection(direction); + + QCOMPARE(format.scanLineDirection(), direction); + QCOMPARE( + qvariant_cast<QVideoSurfaceFormat::Direction>(format.property("scanLineDirection")), + direction); + } + { + QVideoSurfaceFormat format(QSize(16, 16), QVideoFrame::Format_RGB32); + + format.setProperty("scanLineDirection", qVariantFromValue(direction)); + + QCOMPARE(format.scanLineDirection(), direction); + QCOMPARE( + qvariant_cast<QVideoSurfaceFormat::Direction>(format.property("scanLineDirection")), + direction); + } +} + +void tst_QVideoSurfaceFormat::frameRate_data() +{ + QTest::addColumn<QVideoSurfaceFormat::FrameRate>("frameRate"); + + QTest::newRow("null") + << QVideoSurfaceFormat::FrameRate(0, 0); + QTest::newRow("1/1") + << QVideoSurfaceFormat::FrameRate(1, 1); + QTest::newRow("24/1") + << QVideoSurfaceFormat::FrameRate(24, 1); + QTest::newRow("15/2") + << QVideoSurfaceFormat::FrameRate(15, 2); +} + +void tst_QVideoSurfaceFormat::frameRate() +{ + QFETCH(QVideoSurfaceFormat::FrameRate, frameRate); + + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + + format.setFrameRate(frameRate); + + QCOMPARE(format.frameRate(), frameRate); + QCOMPARE(qvariant_cast<QVideoSurfaceFormat::FrameRate>(format.property("frameRate")), + frameRate); + } + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + + format.setFrameRate(frameRate.first, frameRate.second); + + QCOMPARE(format.frameRate(), frameRate); + QCOMPARE( + qvariant_cast<QVideoSurfaceFormat::FrameRate>(format.property("frameRate")), + frameRate); + } + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + + format.setFrameRate(frameRate); + format.setProperty( + "frameRate", qVariantFromValue<QVideoSurfaceFormat::FrameRate>(frameRate)); + + QCOMPARE(format.frameRate(), frameRate); + QCOMPARE(qvariant_cast<QVideoSurfaceFormat::FrameRate>(format.property("frameRate")), + frameRate); + } +} + +void tst_QVideoSurfaceFormat::yuvColorSpace_data() +{ + QTest::addColumn<QVideoSurfaceFormat::YuvColorSpace>("colorspace"); + + QTest::newRow("undefined") + << QVideoSurfaceFormat::YCbCr_Undefined; + QTest::newRow("bt709") + << QVideoSurfaceFormat::YCbCr_BT709; + QTest::newRow("xvYCC601") + << QVideoSurfaceFormat::YCbCr_xvYCC601; + QTest::newRow("JPEG") + << QVideoSurfaceFormat::YCbCr_JPEG; +} + +void tst_QVideoSurfaceFormat::yuvColorSpace() +{ + QFETCH(QVideoSurfaceFormat::YuvColorSpace, colorspace); + + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + format.setYuvColorSpace(colorspace); + + QCOMPARE(format.yuvColorSpace(), colorspace); + QCOMPARE(qvariant_cast<QVideoSurfaceFormat::YuvColorSpace>(format.property("yuvColorSpace")), + colorspace); + } + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + format.setProperty("yuvColorSpace", qVariantFromValue(colorspace)); + + QCOMPARE(format.yuvColorSpace(), colorspace); + QCOMPARE(qvariant_cast<QVideoSurfaceFormat::YuvColorSpace>(format.property("yuvColorSpace")), + colorspace); + } +} + +void tst_QVideoSurfaceFormat::pixelAspectRatio_data() +{ + QTest::addColumn<QSize>("aspectRatio"); + + QTest::newRow("1:1") + << QSize(1, 1); + QTest::newRow("4:3") + << QSize(4, 3); + QTest::newRow("16:9") + << QSize(16, 9); +} + +void tst_QVideoSurfaceFormat::pixelAspectRatio() +{ + QFETCH(QSize, aspectRatio); + + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + format.setPixelAspectRatio(aspectRatio); + + QCOMPARE(format.pixelAspectRatio(), aspectRatio); + QCOMPARE(format.property("pixelAspectRatio").toSize(), aspectRatio); + } + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + format.setPixelAspectRatio(aspectRatio.width(), aspectRatio.height()); + + QCOMPARE(format.pixelAspectRatio(), aspectRatio); + QCOMPARE(format.property("pixelAspectRatio").toSize(), aspectRatio); + } + { + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + format.setProperty("pixelAspectRatio", aspectRatio); + + QCOMPARE(format.pixelAspectRatio(), aspectRatio); + QCOMPARE(format.property("pixelAspectRatio").toSize(), aspectRatio); + } +} + +void tst_QVideoSurfaceFormat::sizeHint_data() +{ + QTest::addColumn<QSize>("frameSize"); + QTest::addColumn<QRect>("viewport"); + QTest::addColumn<QSize>("aspectRatio"); + QTest::addColumn<QSize>("sizeHint"); + + QTest::newRow("(0, 0, 1024x768), 1:1") + << QSize(1024, 768) + << QRect(0, 0, 1024, 768) + << QSize(1, 1) + << QSize(1024, 768); + QTest::newRow("0, 0, 1024x768), 4:3") + << QSize(1024, 768) + << QRect(0, 0, 1024, 768) + << QSize(4, 3) + << QSize(1365, 768); + QTest::newRow("(168, 84, 800x600), 1:1") + << QSize(1024, 768) + << QRect(168, 84, 800, 600) + << QSize(1, 1) + << QSize(800, 600); + QTest::newRow("(168, 84, 800x600), 4:3") + << QSize(1024, 768) + << QRect(168, 84, 800, 600) + << QSize(4, 3) + << QSize(1066, 600); +} + +void tst_QVideoSurfaceFormat::sizeHint() +{ + QFETCH(QSize, frameSize); + QFETCH(QRect, viewport); + QFETCH(QSize, aspectRatio); + QFETCH(QSize, sizeHint); + + QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_RGB32); + format.setViewport(viewport); + format.setPixelAspectRatio(aspectRatio); + + QCOMPARE(format.sizeHint(), sizeHint); + QCOMPARE(format.property("sizeHint").toSize(), sizeHint); +} + +void tst_QVideoSurfaceFormat::staticPropertyNames() +{ + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + + QList<QByteArray> propertyNames = format.propertyNames(); + + QVERIFY(propertyNames.contains("handleType")); + QVERIFY(propertyNames.contains("pixelFormat")); + QVERIFY(propertyNames.contains("frameSize")); + QVERIFY(propertyNames.contains("frameWidth")); + QVERIFY(propertyNames.contains("viewport")); + QVERIFY(propertyNames.contains("scanLineDirection")); + QVERIFY(propertyNames.contains("frameRate")); + QVERIFY(propertyNames.contains("pixelAspectRatio")); + QVERIFY(propertyNames.contains("yuvColorSpace")); + QVERIFY(propertyNames.contains("sizeHint")); + QCOMPARE(propertyNames.count(), 10); +} + +void tst_QVideoSurfaceFormat::dynamicProperty() +{ + QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32); + + QCOMPARE(format.property("integer"), QVariant()); + QCOMPARE(format.property("size"), QVariant()); + QCOMPARE(format.property("string"), QVariant()); + QCOMPARE(format.property("null"), QVariant()); + + QList<QByteArray> propertyNames = format.propertyNames(); + + QCOMPARE(propertyNames.count(QByteArray("integer")), 0); + QCOMPARE(propertyNames.count(QByteArray("string")), 0); + QCOMPARE(propertyNames.count(QByteArray("size")), 0); + QCOMPARE(propertyNames.count(QByteArray("null")), 0); + + format.setProperty("string", QString::fromLatin1("Hello")); + format.setProperty("integer", 198); + format.setProperty("size", QSize(43, 65)); + + QCOMPARE(format.property("integer").toInt(), 198); + QCOMPARE(format.property("size").toSize(), QSize(43, 65)); + QCOMPARE(format.property("string").toString(), QString::fromLatin1("Hello")); + + propertyNames = format.propertyNames(); + + QCOMPARE(propertyNames.count(QByteArray("integer")), 1); + QCOMPARE(propertyNames.count(QByteArray("string")), 1); + QCOMPARE(propertyNames.count(QByteArray("size")), 1); + + format.setProperty("integer", 125423); + format.setProperty("size", QSize(1, 986)); + + QCOMPARE(format.property("integer").toInt(), 125423); + QCOMPARE(format.property("size").toSize(), QSize(1, 986)); + QCOMPARE(format.property("string").toString(), QString::fromLatin1("Hello")); + + propertyNames = format.propertyNames(); + + QCOMPARE(propertyNames.count(QByteArray("integer")), 1); + QCOMPARE(propertyNames.count(QByteArray("string")), 1); + QCOMPARE(propertyNames.count(QByteArray("size")), 1); + + format.setProperty("string", QVariant()); + format.setProperty("size", QVariant()); + format.setProperty("null", QVariant()); + + QCOMPARE(format.property("integer").toInt(), 125423); + QCOMPARE(format.property("size"), QVariant()); + QCOMPARE(format.property("string"), QVariant()); + QCOMPARE(format.property("null"), QVariant()); + + propertyNames = format.propertyNames(); + + QCOMPARE(propertyNames.count(QByteArray("integer")), 1); + QCOMPARE(propertyNames.count(QByteArray("string")), 0); + QCOMPARE(propertyNames.count(QByteArray("size")), 0); + QCOMPARE(propertyNames.count(QByteArray("null")), 0); +} + +void tst_QVideoSurfaceFormat::compare() +{ + QVideoSurfaceFormat format1( + QSize(16, 16), QVideoFrame::Format_RGB32, QAbstractVideoBuffer::GLTextureHandle); + QVideoSurfaceFormat format2( + QSize(16, 16), QVideoFrame::Format_RGB32, QAbstractVideoBuffer::GLTextureHandle); + QVideoSurfaceFormat format3( + QSize(32, 32), QVideoFrame::Format_YUV444, QAbstractVideoBuffer::GLTextureHandle); + QVideoSurfaceFormat format4( + QSize(16, 16), QVideoFrame::Format_RGB32, QAbstractVideoBuffer::UserHandle); + + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + QCOMPARE(format1 == format3, false); + QCOMPARE(format1 != format3, true); + QCOMPARE(format1 == format4, false); + QCOMPARE(format1 != format4, true); + + format2.setFrameSize(1024, 768, QVideoSurfaceFormat::ResetViewport); + + // Not equal, frame size differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format1.setFrameSize(1024, 768, QVideoSurfaceFormat::KeepViewport); + + // Not equal, viewport differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format1.setViewport(QRect(0, 0, 1024, 768)); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format2.setScanLineDirection(QVideoSurfaceFormat::BottomToTop); + + // Not equal scan line direction differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format1.setScanLineDirection(QVideoSurfaceFormat::BottomToTop); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format1.setFrameRate(QVideoSurfaceFormat::FrameRate(15, 2)); + + // Not equal frame rate differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format2.setFrameRate(15, 2); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format2.setPixelAspectRatio(4, 3); + + // Not equal pixel aspect ratio differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format1.setPixelAspectRatio(QSize(4, 3)); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format2.setYuvColorSpace(QVideoSurfaceFormat::YCbCr_xvYCC601); + + // Not equal yuv color space differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format1.setYuvColorSpace(QVideoSurfaceFormat::YCbCr_xvYCC601); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format1.setProperty("integer", 12); + + // Not equal, property mismatch. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format2.setProperty("integer", 45); + + // Not equal, integer differs. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format2.setProperty("integer", 12); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format1.setProperty("string", QString::fromLatin1("Hello")); + format2.setProperty("size", QSize(12, 54)); + + // Not equal, property mismatch. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); + + format2.setProperty("string", QString::fromLatin1("Hello")); + format1.setProperty("size", QSize(12, 54)); + + // Equal. + QCOMPARE(format1 == format2, true); + QCOMPARE(format1 != format2, false); + + format1.setProperty("string", QVariant()); + + // Not equal, property mismatch. + QCOMPARE(format1 == format2, false); + QCOMPARE(format1 != format2, true); +} + + +void tst_QVideoSurfaceFormat::copy() +{ + QVideoSurfaceFormat original( + QSize(1024, 768), QVideoFrame::Format_ARGB32, QAbstractVideoBuffer::GLTextureHandle); + original.setScanLineDirection(QVideoSurfaceFormat::BottomToTop); + + QVideoSurfaceFormat copy(original); + + QCOMPARE(copy.handleType(), QAbstractVideoBuffer::GLTextureHandle); + QCOMPARE(copy.pixelFormat(), QVideoFrame::Format_ARGB32); + QCOMPARE(copy.frameSize(), QSize(1024, 768)); + QCOMPARE(copy.scanLineDirection(), QVideoSurfaceFormat::BottomToTop); + + QCOMPARE(original == copy, true); + QCOMPARE(original != copy, false); + + copy.setScanLineDirection(QVideoSurfaceFormat::TopToBottom); + + QCOMPARE(copy.scanLineDirection(), QVideoSurfaceFormat::TopToBottom); + + QCOMPARE(original.scanLineDirection(), QVideoSurfaceFormat::BottomToTop); + + QCOMPARE(original == copy, false); + QCOMPARE(original != copy, true); +} + +void tst_QVideoSurfaceFormat::assign() +{ + QVideoSurfaceFormat copy( + QSize(64, 64), QVideoFrame::Format_AYUV444, QAbstractVideoBuffer::UserHandle); + + QVideoSurfaceFormat original( + QSize(1024, 768), QVideoFrame::Format_ARGB32, QAbstractVideoBuffer::GLTextureHandle); + original.setScanLineDirection(QVideoSurfaceFormat::BottomToTop); + + copy = original; + + QCOMPARE(copy.handleType(), QAbstractVideoBuffer::GLTextureHandle); + QCOMPARE(copy.pixelFormat(), QVideoFrame::Format_ARGB32); + QCOMPARE(copy.frameSize(), QSize(1024, 768)); + QCOMPARE(copy.scanLineDirection(), QVideoSurfaceFormat::BottomToTop); + + QCOMPARE(original == copy, true); + QCOMPARE(original != copy, false); + + copy.setScanLineDirection(QVideoSurfaceFormat::TopToBottom); + + QCOMPARE(copy.scanLineDirection(), QVideoSurfaceFormat::TopToBottom); + + QCOMPARE(original.scanLineDirection(), QVideoSurfaceFormat::BottomToTop); + + QCOMPARE(original == copy, false); + QCOMPARE(original != copy, true); +} + +QTEST_MAIN(tst_QVideoSurfaceFormat) + +#include "tst_qvideosurfaceformat.moc" diff --git a/tests/auto/symbian/qsymbiantests.pro b/tests/auto/symbian/qsymbiantests.pro index 648335e..a752c86 100644 --- a/tests/auto/symbian/qsymbiantests.pro +++ b/tests/auto/symbian/qsymbiantests.pro @@ -1,2 +1,4 @@ TEMPLATE = subdirs -SUBDIRS = qmainexceptions orientationchange
\ No newline at end of file +SUBDIRS = qmainexceptions orientationchange + +requires(symbian) diff --git a/tests/auto/windowsmobile/test/ddhelper.cpp b/tests/auto/windowsmobile/test/ddhelper.cpp index 482f8dd..627b802 100644 --- a/tests/auto/windowsmobile/test/ddhelper.cpp +++ b/tests/auto/windowsmobile/test/ddhelper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tests/auto/windowsmobile/test/ddhelper.h b/tests/auto/windowsmobile/test/ddhelper.h index 3dfa9e6..36963d4 100644 --- a/tests/auto/windowsmobile/test/ddhelper.h +++ b/tests/auto/windowsmobile/test/ddhelper.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef __DDHELPER__ #define __DDHELPER__ diff --git a/tests/auto/windowsmobile/test/testSimpleWidget_current.png b/tests/auto/windowsmobile/test/testSimpleWidget_current.png Binary files differindex 5cbc2bb..09a10a3 100644 --- a/tests/auto/windowsmobile/test/testSimpleWidget_current.png +++ b/tests/auto/windowsmobile/test/testSimpleWidget_current.png diff --git a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp index 73ea0a6..091504c 100644 --- a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp +++ b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp @@ -62,14 +62,14 @@ public: #endif } -#ifdef Q_OS_WINCE_WM +#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501 private slots: void testMainWindowAndMenuBar(); void testSimpleWidget(); #endif }; -#ifdef Q_OS_WINCE_WM +#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501 bool qt_wince_is_platform(const QString &platformString) { wchar_t tszPlatform[64]; @@ -120,8 +120,6 @@ void openMenu() void compareScreenshots(const QString &image1, const QString &image2) { - if (qt_wince_is_smartphone()) - QSKIP("This test is only for Windows Mobile", SkipAll); QImage screenShot(image1); QImage original(image2); @@ -145,6 +143,9 @@ void takeScreenShot(const QString filename) void tst_WindowsMobile::testMainWindowAndMenuBar() { + if (qt_wince_is_smartphone()) + QSKIP("This test is only for Windows Mobile", SkipAll); + QProcess process; process.start("testQMenuBar.exe"); QCOMPARE(process.state(), QProcess::Running); @@ -158,6 +159,9 @@ void tst_WindowsMobile::testMainWindowAndMenuBar() void tst_WindowsMobile::testSimpleWidget() { + if (qt_wince_is_smartphone()) + QSKIP("This test is only for Windows Mobile", SkipAll); + QMenuBar menubar; menubar.show(); QWidget maximized; diff --git a/tests/auto/windowsmobile/testQMenuBar/main.cpp b/tests/auto/windowsmobile/testQMenuBar/main.cpp index 4949dbb..e9cb0bb 100644 --- a/tests/auto/windowsmobile/testQMenuBar/main.cpp +++ b/tests/auto/windowsmobile/testQMenuBar/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -48,8 +48,6 @@ int main(int argc, char * argv[]) { - int widgetNum = 20; - QList<QWidget*> widgets; QApplication app(argc, argv); diff --git a/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h index ff02f21..8ccd346 100644 --- a/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h +++ b/tests/auto/xmlpatternsview/view/FunctionSignaturesView.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_FunctionSignaturesView_H #define PatternistSDK_FunctionSignaturesView_H diff --git a/tests/auto/xmlpatternsview/view/MainWindow.h b/tests/auto/xmlpatternsview/view/MainWindow.h index 71bfec2..9aa1d1a 100644 --- a/tests/auto/xmlpatternsview/view/MainWindow.h +++ b/tests/auto/xmlpatternsview/view/MainWindow.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_MainWindow_H #define PatternistSDK_MainWindow_H diff --git a/tests/auto/xmlpatternsview/view/TestCaseView.h b/tests/auto/xmlpatternsview/view/TestCaseView.h index 601422d..9329242 100644 --- a/tests/auto/xmlpatternsview/view/TestCaseView.h +++ b/tests/auto/xmlpatternsview/view/TestCaseView.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestCaseView_H #define PatternistSDK_TestCaseView_H diff --git a/tests/auto/xmlpatternsview/view/TestResultView.h b/tests/auto/xmlpatternsview/view/TestResultView.h index 6f5583f..006c690 100644 --- a/tests/auto/xmlpatternsview/view/TestResultView.h +++ b/tests/auto/xmlpatternsview/view/TestResultView.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestResultView_H #define PatternistSDK_TestResultView_H diff --git a/tests/auto/xmlpatternsview/view/TreeSortFilter.h b/tests/auto/xmlpatternsview/view/TreeSortFilter.h index c6d9432..a083b0a 100644 --- a/tests/auto/xmlpatternsview/view/TreeSortFilter.h +++ b/tests/auto/xmlpatternsview/view/TreeSortFilter.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TreeSortFilter_H #define PatternistSDK_TreeSortFilter_H diff --git a/tests/auto/xmlpatternsview/view/UserTestCase.h b/tests/auto/xmlpatternsview/view/UserTestCase.h index 8da081a..39ef38e 100644 --- a/tests/auto/xmlpatternsview/view/UserTestCase.h +++ b/tests/auto/xmlpatternsview/view/UserTestCase.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_UserTestCase_H #define PatternistSDK_UserTestCase_H diff --git a/tests/auto/xmlpatternsview/view/XDTItemItem.h b/tests/auto/xmlpatternsview/view/XDTItemItem.h index 0e0f06e..240d1bb 100644 --- a/tests/auto/xmlpatternsview/view/XDTItemItem.h +++ b/tests/auto/xmlpatternsview/view/XDTItemItem.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_XDTItemItem_H #define PatternistSDK_XDTItemItem_H diff --git a/tests/auto/xmlpatternsxqts/lib/ASTItem.cpp b/tests/auto/xmlpatternsxqts/lib/ASTItem.cpp index e663409..64967e1 100644 --- a/tests/auto/xmlpatternsxqts/lib/ASTItem.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ASTItem.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QList> #include <QPointer> diff --git a/tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.cpp b/tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.cpp index 03e70bd..38cc6cd 100644 --- a/tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.cpp +++ b/tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QStringList> #include <QVariant> diff --git a/tests/auto/xmlpatternsxqts/lib/ErrorHandler.cpp b/tests/auto/xmlpatternsxqts/lib/ErrorHandler.cpp index f78827a..4eef53a 100644 --- a/tests/auto/xmlpatternsxqts/lib/ErrorHandler.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ErrorHandler.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <cstdio> diff --git a/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h b/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h index c056ac4..81f4c73 100644 --- a/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h +++ b/tests/auto/xmlpatternsxqts/lib/ErrorHandler.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_ErrorHandler_H #define PatternistSDK_ErrorHandler_H diff --git a/tests/auto/xmlpatternsxqts/lib/ErrorItem.cpp b/tests/auto/xmlpatternsxqts/lib/ErrorItem.cpp index c2b2d1c..3b434fb 100644 --- a/tests/auto/xmlpatternsxqts/lib/ErrorItem.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ErrorItem.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QList> #include <QPointer> diff --git a/tests/auto/xmlpatternsxqts/lib/ErrorItem.h b/tests/auto/xmlpatternsxqts/lib/ErrorItem.h index f8cfa63..be28892 100644 --- a/tests/auto/xmlpatternsxqts/lib/ErrorItem.h +++ b/tests/auto/xmlpatternsxqts/lib/ErrorItem.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_ErrorItem_H #define PatternistSDK_ErrorItem_H diff --git a/tests/auto/xmlpatternsxqts/lib/ExitCode.h b/tests/auto/xmlpatternsxqts/lib/ExitCode.h index daed618..c23bd4b 100644 --- a/tests/auto/xmlpatternsxqts/lib/ExitCode.h +++ b/tests/auto/xmlpatternsxqts/lib/ExitCode.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_ExitCode_H #define PatternistSDK_ExitCode_H diff --git a/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.cpp b/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.cpp index ea58087..6ca6ef9 100644 --- a/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h b/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h index 3877674..973f347 100644 --- a/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h +++ b/tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_ExpressionInfo_H #define PatternistSDK_ExpressionInfo_H diff --git a/tests/auto/xmlpatternsxqts/lib/ExpressionNamer.cpp b/tests/auto/xmlpatternsxqts/lib/ExpressionNamer.cpp index 5fbbe07..e5e7991 100644 --- a/tests/auto/xmlpatternsxqts/lib/ExpressionNamer.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ExpressionNamer.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.cpp b/tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.cpp index 25ecd87..594123a 100644 --- a/tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QCoreApplication> #include <QFile> diff --git a/tests/auto/xmlpatternsxqts/lib/Global.cpp b/tests/auto/xmlpatternsxqts/lib/Global.cpp index 4fa8e10..72dbd4b 100644 --- a/tests/auto/xmlpatternsxqts/lib/Global.cpp +++ b/tests/auto/xmlpatternsxqts/lib/Global.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QXmlNamePool> diff --git a/tests/auto/xmlpatternsxqts/lib/ResultThreader.cpp b/tests/auto/xmlpatternsxqts/lib/ResultThreader.cpp index c128798..4edf068 100644 --- a/tests/auto/xmlpatternsxqts/lib/ResultThreader.cpp +++ b/tests/auto/xmlpatternsxqts/lib/ResultThreader.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QEventLoop> diff --git a/tests/auto/xmlpatternsxqts/lib/TestBaseLine.cpp b/tests/auto/xmlpatternsxqts/lib/TestBaseLine.cpp index f677aec..49e326c 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestBaseLine.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestBaseLine.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QDomDocument> #include <QFile> diff --git a/tests/auto/xmlpatternsxqts/lib/TestCase.cpp b/tests/auto/xmlpatternsxqts/lib/TestCase.cpp index 018a566..d7da43f 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestCase.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestCase.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QBuffer> #include <QUrl> diff --git a/tests/auto/xmlpatternsxqts/lib/TestContainer.cpp b/tests/auto/xmlpatternsxqts/lib/TestContainer.cpp index e2e666f..7ad52b5 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestContainer.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestContainer.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QPair> #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/TestContainer.h b/tests/auto/xmlpatternsxqts/lib/TestContainer.h index 91a8641..9ed87bf 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestContainer.h +++ b/tests/auto/xmlpatternsxqts/lib/TestContainer.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestContainer_H #define PatternistSDK_TestContainer_H diff --git a/tests/auto/xmlpatternsxqts/lib/TestGroup.cpp b/tests/auto/xmlpatternsxqts/lib/TestGroup.cpp index 9c34246..1014ea4 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestGroup.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestGroup.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QColor> #include <QPair> diff --git a/tests/auto/xmlpatternsxqts/lib/TestGroup.h b/tests/auto/xmlpatternsxqts/lib/TestGroup.h index 6946fac..8c5cbf6 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestGroup.h +++ b/tests/auto/xmlpatternsxqts/lib/TestGroup.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestGroup_H #define PatternistSDK_TestGroup_H diff --git a/tests/auto/xmlpatternsxqts/lib/TestItem.h b/tests/auto/xmlpatternsxqts/lib/TestItem.h index 6d151b8..4266480 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestItem.h +++ b/tests/auto/xmlpatternsxqts/lib/TestItem.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestItem_H #define PatternistSDK_TestItem_H diff --git a/tests/auto/xmlpatternsxqts/lib/TestResult.cpp b/tests/auto/xmlpatternsxqts/lib/TestResult.cpp index ece714a..7ab2b4e 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestResult.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestResult.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QXmlAttributes> #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/TestResultHandler.cpp b/tests/auto/xmlpatternsxqts/lib/TestResultHandler.cpp index 3000ccf..bdf6abb 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestResultHandler.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestResultHandler.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuite.cpp b/tests/auto/xmlpatternsxqts/lib/TestSuite.cpp index 27df5e3..5f22457 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestSuite.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestSuite.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QFileInfo> #include <QVariant> diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuite.h b/tests/auto/xmlpatternsxqts/lib/TestSuite.h index 638caad..70aefc0 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestSuite.h +++ b/tests/auto/xmlpatternsxqts/lib/TestSuite.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestSuite_H #define PatternistSDK_TestSuite_H diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.cpp b/tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.cpp index 2706314..d522ba4 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.cpp b/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.cpp index f6f61d7..6721970 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QXmlContentHandler> diff --git a/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h b/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h index 492f4ae..62d204e 100644 --- a/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h +++ b/tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TestSuiteResult_H #define PatternistSDK_TestSuiteResult_H diff --git a/tests/auto/xmlpatternsxqts/lib/TreeItem.cpp b/tests/auto/xmlpatternsxqts/lib/TreeItem.cpp index 1e6e528..3e41177 100644 --- a/tests/auto/xmlpatternsxqts/lib/TreeItem.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TreeItem.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include "TestContainer.h" diff --git a/tests/auto/xmlpatternsxqts/lib/TreeItem.h b/tests/auto/xmlpatternsxqts/lib/TreeItem.h index bebc7d3..9275828 100644 --- a/tests/auto/xmlpatternsxqts/lib/TreeItem.h +++ b/tests/auto/xmlpatternsxqts/lib/TreeItem.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TreeItem_H #define PatternistSDK_TreeItem_H diff --git a/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp b/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp index bb25127..9255a73 100644 --- a/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp +++ b/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/TreeModel.h b/tests/auto/xmlpatternsxqts/lib/TreeModel.h index 39a3173..181f25e 100644 --- a/tests/auto/xmlpatternsxqts/lib/TreeModel.h +++ b/tests/auto/xmlpatternsxqts/lib/TreeModel.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_TreeModel_H #define PatternistSDK_TreeModel_H diff --git a/tests/auto/xmlpatternsxqts/lib/Worker.cpp b/tests/auto/xmlpatternsxqts/lib/Worker.cpp index f72c163..5d6d402 100644 --- a/tests/auto/xmlpatternsxqts/lib/Worker.cpp +++ b/tests/auto/xmlpatternsxqts/lib/Worker.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QDir> #include <QEventLoop> diff --git a/tests/auto/xmlpatternsxqts/lib/XMLWriter.cpp b/tests/auto/xmlpatternsxqts/lib/XMLWriter.cpp index 8f495a4..f2c6ba7 100644 --- a/tests/auto/xmlpatternsxqts/lib/XMLWriter.cpp +++ b/tests/auto/xmlpatternsxqts/lib/XMLWriter.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QCoreApplication> #include <QDateTime> diff --git a/tests/auto/xmlpatternsxqts/lib/XQTSTestCase.cpp b/tests/auto/xmlpatternsxqts/lib/XQTSTestCase.cpp index 0cd84f6..6966d40 100644 --- a/tests/auto/xmlpatternsxqts/lib/XQTSTestCase.cpp +++ b/tests/auto/xmlpatternsxqts/lib/XQTSTestCase.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QColor> #include <QFile> diff --git a/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.cpp b/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.cpp index 2957da4..eeff16f 100644 --- a/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.cpp +++ b/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.cpp @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #include <QtDebug> diff --git a/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h b/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h index eb9d604..8447cff 100644 --- a/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h +++ b/tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** -*/ #ifndef PatternistSDK_XSLTTestSuiteHandler_H #define PatternistSDK_XSLTTestSuiteHandler_H diff --git a/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h b/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h index 5314a10..b8ff3ad 100644 --- a/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h +++ b/tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h @@ -38,47 +38,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Patternist project on Qt Labs. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** 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.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -*************************************************************************** - */ #ifndef PatternistSDK_XMLWriterTest_H #define PatternistSDK_XMLWriterTest_H diff --git a/tests/benchmarks/qanimation/dummyanimation.h b/tests/benchmarks/qanimation/dummyanimation.h index fe6592b..6318a32 100644 --- a/tests/benchmarks/qanimation/dummyanimation.h +++ b/tests/benchmarks/qanimation/dummyanimation.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #ifndef _DUMMYANIMATION_H__ @@ -16,4 +57,4 @@ private: DummyObject *m_dummy; }; -#endif
\ No newline at end of file +#endif diff --git a/tests/benchmarks/qanimation/dummyobject.h b/tests/benchmarks/qanimation/dummyobject.h index c989662..bf5b60c6 100644 --- a/tests/benchmarks/qanimation/dummyobject.h +++ b/tests/benchmarks/qanimation/dummyobject.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #ifndef _DUMMYOBJECT_H__ @@ -20,4 +61,4 @@ private: }; -#endif
\ No newline at end of file +#endif diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/qanimation/rectanimation.h index 99b82b4..5e088ea 100644 --- a/tests/benchmarks/qanimation/rectanimation.h +++ b/tests/benchmarks/qanimation/rectanimation.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtGui> #ifndef _RECTANIMATION_H__ diff --git a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp index 7a5caa4..172f7d4 100644 --- a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp @@ -166,6 +166,8 @@ void tst_QGraphicsScene::addItem() } scene.itemAt(0, 0); } + //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list + qApp->processEvents(); } void tst_QGraphicsScene::itemAt_data() @@ -220,6 +222,9 @@ void tst_QGraphicsScene::itemAt() QBENCHMARK { scene.itemAt(0, 0); } + + //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list + qApp->processEvents(); } QTEST_MAIN(tst_QGraphicsScene) diff --git a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp index 07d8312..5c6e523 100644 --- a/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/benchmarks/qgraphicswidget/tst_qgraphicswidget.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp index 904674e..b637591 100644 --- a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp @@ -68,6 +68,7 @@ private slots: void toQObject(); void property(); void setProperty(); + void propertyFlags(); }; tst_QScriptValue::tst_QScriptValue() @@ -189,5 +190,16 @@ void tst_QScriptValue::setProperty() } } +void tst_QScriptValue::propertyFlags() +{ + QScriptEngine engine; + QScriptValue obj = engine.newObject(); + QString propertyName = QString::fromLatin1("foo"); + obj.setProperty(propertyName, 123, QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly); + QBENCHMARK { + (void)obj.propertyFlags(propertyName); + } +} + QTEST_MAIN(tst_QScriptValue) #include "tst_qscriptvalue.moc" diff --git a/tests/benchmarks/qstringlist/main.cpp b/tests/benchmarks/qstringlist/main.cpp index 9d5dd49..6af41c0 100644 --- a/tests/benchmarks/qstringlist/main.cpp +++ b/tests/benchmarks/qstringlist/main.cpp @@ -38,32 +38,61 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include <QStringList> -#include <qtest.h> +#include <QtTest> + +#include <sstream> +#include <string> +#include <vector> class tst_QStringList: public QObject { Q_OBJECT + private slots: void join() const; void join_data() const; + void split() const; + void split_data() const; + + void split_std() const; + void split_std_data() const { return split_data(); } + + void split_stdw() const; + void split_stdw_data() const { return split_data(); } + + void split_ba() const; + void split_ba_data() const { return split_data(); } + private: - static QStringList populate(const unsigned int count, - const QString &unit); + static QStringList populateList(const int count, const QString &unit); + static QString populateString(const int count, const QString &unit); }; -QStringList tst_QStringList::populate(const unsigned int count, - const QString &unit) +QStringList tst_QStringList::populateList(const int count, const QString &unit) { QStringList retval; - for(unsigned int i = 0; i < count; ++i) + for (int i = 0; i < count; ++i) retval.append(unit); return retval; } +QString tst_QStringList::populateString(const int count, const QString &unit) +{ + QString retval; + + for (int i = 0; i < count; ++i) { + retval.append(unit); + retval.append(QLatin1Char(':')); + } + + return retval; +} + void tst_QStringList::join() const { QFETCH(QStringList, input); @@ -80,22 +109,85 @@ void tst_QStringList::join_data() const QTest::addColumn<QString>("separator"); QTest::newRow("") - << populate(100, QLatin1String("unit")) + << populateList(100, QLatin1String("unit")) << QString(); QTest::newRow("") - << populate(1000, QLatin1String("unit")) + << populateList(1000, QLatin1String("unit")) << QString(); QTest::newRow("") - << populate(10000, QLatin1String("unit")) + << populateList(10000, QLatin1String("unit")) << QString(); QTest::newRow("") - << populate(100000, QLatin1String("unit")) + << populateList(100000, QLatin1String("unit")) << QString(); } +void tst_QStringList::split() const +{ + QFETCH(QString, input); + const QChar splitChar = ':'; + + QBENCHMARK { + input.split(splitChar); + } +} + +void tst_QStringList::split_data() const +{ + QTest::addColumn<QString>("input"); + QString unit = QLatin1String("unit"); + QTest::newRow("") << populateString(10, unit); + QTest::newRow("") << populateString(100, unit); + QTest::newRow("") << populateString(1000, unit); + QTest::newRow("") << populateString(10000, unit); +} + +void tst_QStringList::split_std() const +{ + QFETCH(QString, input); + const char split_char = ':'; + std::string stdinput = input.toStdString(); + + QBENCHMARK { + std::istringstream split(stdinput); + std::vector<std::string> token; + for (std::string each; + std::getline(split, each, split_char); + token.push_back(each)) + ; + } +} + +void tst_QStringList::split_stdw() const +{ + QFETCH(QString, input); + const wchar_t split_char = ':'; + std::wstring stdinput = input.toStdWString(); + + QBENCHMARK { + std::wistringstream split(stdinput); + std::vector<std::wstring> token; + for (std::wstring each; + std::getline(split, each, split_char); + token.push_back(each)) + ; + } +} + +void tst_QStringList::split_ba() const +{ + QFETCH(QString, input); + const char splitChar = ':'; + QByteArray ba = input.toLatin1(); + + QBENCHMARK { + ba.split(splitChar); + } +} + QTEST_MAIN(tst_QStringList) #include "main.moc" diff --git a/tests/manual/qimagereader/Qt_logostrap_CMYK.jpg b/tests/manual/qimagereader/Qt_logostrap_CMYK.jpg Binary files differnew file mode 100644 index 0000000..6a7bb1f --- /dev/null +++ b/tests/manual/qimagereader/Qt_logostrap_CMYK.jpg diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp new file mode 100644 index 0000000..a17c203 --- /dev/null +++ b/tests/manual/qimagereader/main.cpp @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui> + +class MyWidget : public QWidget +{ +public: + MyWidget(QWidget * parent, const QString &imagefname, bool scaleImage) + : QWidget(parent), fileName(imagefname), scale(scaleImage) + { + + } + + virtual void paintEvent(QPaintEvent * /*event*/) + { + QPainter painter(this); + QImageReader reader(fileName); + if (!reader.canRead()) { + qWarning("Unable to read image file %s", fileName.toLocal8Bit().constData()); + return; + } + if (!scale){ + QImage image = reader.read(); + painter.drawImage(rect(), image); + }else{ + reader.setScaledSize( QSize(rect().width(), rect().height()) ); + QImage image = reader.read(); + painter.drawImage(rect(), image); + } + } + +private: + QString fileName; + bool scale; + +}; + + + +// both the scaled and unscaled version of the CMYK encoded JPEG +// should have the same colors and not look corrupted. + +int main(int argc, char** argv) +{ + QApplication app(argc, argv); + + QWidget mainWidget; + mainWidget.setWindowTitle("Colors in images are identical?"); + mainWidget.setMinimumSize(400,400); + QHBoxLayout *l = new QHBoxLayout; + MyWidget *w1 = new MyWidget(&mainWidget,"Qt_logostrap_CMYK.jpg", false); + MyWidget *w2 = new MyWidget(&mainWidget,"Qt_logostrap_CMYK.jpg", true); + l->addWidget(w1); + l->addWidget(w2); + mainWidget.setLayout(l); + mainWidget.show(); + + return app.exec(); +} + diff --git a/tests/manual/qimagereader/qimagereader.pro b/tests/manual/qimagereader/qimagereader.pro new file mode 100644 index 0000000..b8293b9 --- /dev/null +++ b/tests/manual/qimagereader/qimagereader.pro @@ -0,0 +1,8 @@ + +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp diff --git a/tests/manual/qtabletevent/tabletwidget.h b/tests/manual/qtabletevent/tabletwidget.h index b0efef2..b16e9ed 100644 --- a/tests/manual/qtabletevent/tabletwidget.h +++ b/tests/manual/qtabletevent/tabletwidget.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef TABLETWIDGET_H #define TABLETWIDGET_H diff --git a/tests/manual/qtouchevent/touchwidget.h b/tests/manual/qtouchevent/touchwidget.h index 2726deb..7f7e0ff 100644 --- a/tests/manual/qtouchevent/touchwidget.h +++ b/tests/manual/qtouchevent/touchwidget.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef TOUCHWIDGET_H #define TOUCHWIDGET_H diff --git a/tools/assistant/lib/qhelpprojectdata.cpp b/tools/assistant/lib/qhelpprojectdata.cpp index 4f2a3dc..fcd6bc9 100644 --- a/tools/assistant/lib/qhelpprojectdata.cpp +++ b/tools/assistant/lib/qhelpprojectdata.cpp @@ -369,7 +369,7 @@ QString QHelpProjectData::errorMessage() const } /*! - \reimp + \internal */ QString QHelpProjectData::namespaceName() const { @@ -377,7 +377,7 @@ QString QHelpProjectData::namespaceName() const } /*! - \reimp + \internal */ QString QHelpProjectData::virtualFolder() const { @@ -385,7 +385,7 @@ QString QHelpProjectData::virtualFolder() const } /*! - \reimp + \internal */ QList<QHelpDataCustomFilter> QHelpProjectData::customFilters() const { @@ -393,7 +393,7 @@ QList<QHelpDataCustomFilter> QHelpProjectData::customFilters() const } /*! - \reimp + \internal */ QList<QHelpDataFilterSection> QHelpProjectData::filterSections() const { @@ -401,7 +401,7 @@ QList<QHelpDataFilterSection> QHelpProjectData::filterSections() const } /*! - \reimp + \internal */ QMap<QString, QVariant> QHelpProjectData::metaData() const { @@ -409,7 +409,7 @@ QMap<QString, QVariant> QHelpProjectData::metaData() const } /*! - \reimp + \internal */ QString QHelpProjectData::rootPath() const { diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 365167e..4fe70e3 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3154,7 +3154,7 @@ void Configure::displayConfig() cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl; cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl; cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl; - cout << "Multimedia support.........." << dictionary[ "MULTIMEDIA" ] << endl; + cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp index 7200225..b34595f 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp +++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp @@ -262,7 +262,7 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare configureMenu->addAction(m_sortingAction); configureMenu->addAction(m_coloringAction); -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= 0x04FF00 configureMenu->addSeparator(); configureMenu->addAction(m_treeAction); configureMenu->addAction(m_buttonAction); diff --git a/tools/designer/src/designer/main.cpp b/tools/designer/src/designer/main.cpp index f76a68a..87f2536 100644 --- a/tools/designer/src/designer/main.cpp +++ b/tools/designer/src/designer/main.cpp @@ -51,20 +51,6 @@ int main(int argc, char *argv[]) { Q_INIT_RESOURCE(designer); - // report Qt usage for commercial customers with a "metered license" (currently experimental) -#if QT_EDITION != QT_EDITION_OPENSOURCE - QString reporterPath = QLibraryInfo::location(QLibraryInfo::BinariesPath); - reporterPath += QDir::separator(); - reporterPath += QLatin1String("qtusagereporter"); -#if defined(Q_OS_WIN) - reporterPath += QLatin1String(".exe"); -#endif -#ifndef Q_OS_WINCE - if (QFile::exists(reporterPath)) - ::system(qPrintable(reporterPath + QLatin1String(" designer"))); -#endif -#endif - QDesigner app(argc, argv); app.setQuitOnLastWindowClosed(false); diff --git a/tools/designer/src/lib/shared/previewmanager.cpp b/tools/designer/src/lib/shared/previewmanager.cpp index d6e8d9a..a7d6f43 100644 --- a/tools/designer/src/lib/shared/previewmanager.cpp +++ b/tools/designer/src/lib/shared/previewmanager.cpp @@ -689,6 +689,7 @@ QWidget *PreviewManager::createPreview(const QDesignerFormWindowInterface *fw, const QString title = tr("%1 - [Preview]").arg(formWidget->windowTitle()); formWidget = fakeContainer(formWidget); + formWidget->setWindowTitle(title); // Clear any modality settings, child widget modalities must not be higher than parent's formWidget->setWindowModality(Qt::NonModal); diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp index 8c0d379..a0c88de 100644 --- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp +++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp @@ -2825,13 +2825,6 @@ QMetaEnum QAbstractFormBuilder::toolBarAreaMetaEnum() return metaEnum<QAbstractFormBuilderGadget>("toolBarArea"); } -namespace { - // set forward slashes in image path. - inline void fixImagePath(QString &p) { - p.replace(QLatin1Char('\\'), QLatin1Char('/')); - } -} - /*! \internal Return paths of an icon. diff --git a/tools/installer/nsis/includes/qtcommon.nsh b/tools/installer/nsis/includes/qtcommon.nsh index df1ebdf..9c0756a 100644 --- a/tools/installer/nsis/includes/qtcommon.nsh +++ b/tools/installer/nsis/includes/qtcommon.nsh @@ -72,28 +72,6 @@ FunctionEnd !insertmacro MakeQtDirectory "" !insertmacro MakeQtDirectory "un." -Function DeleteFloatingLicenseProgram - exch $1 - push $0 - - StrCmp $LICENSE_KEY "" end - - ClearErrors - !ifndef OPENSOURCE_BUILD - qtnsisext::IsFloatingLicense $LICENSE_KEY - !endif - IfErrors end - pop $0 - - StrCmp $0 "1" end - IfFileExists "$1\bin\qtusagereporter.exe" 0 end - Delete "$1\bin\qtusagereporter.exe" - - end: - pop $0 - pop $1 -FunctionEnd - Function AddStartmenuApplication exch $0 IfFileExists "$0\assistant.exe" 0 +2 @@ -571,4 +549,4 @@ directoryOk: done: FunctionEnd -!endif ;QTCOMMON_INCLUDE
\ No newline at end of file +!endif ;QTCOMMON_INCLUDE diff --git a/tools/installer/nsis/modules/mingw.nsh b/tools/installer/nsis/modules/mingw.nsh index 386d7d7..d294cb8 100644 --- a/tools/installer/nsis/modules/mingw.nsh +++ b/tools/installer/nsis/modules/mingw.nsh @@ -107,9 +107,6 @@ Section "${MODULE_MINGW_NAME} ${MODULE_MINGW_VERSION}" MINGW_SEC01 SetOverwrite ifnewer !insertmacro MODULE_MINGW_INSTALLFILES - push "$MINGW_INSTDIR" - call DeleteFloatingLicenseProgram - push "$MINGW_INSTDIR\bin" call AddStartmenuApplication diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro index 890b252..314163c 100644 --- a/tools/linguist/linguist/linguist.pro +++ b/tools/linguist/linguist/linguist.pro @@ -2,8 +2,7 @@ TEMPLATE = app LANGUAGE = C++ DESTDIR = ../../../bin -QT += xml \ - network +QT += xml CONFIG += qt \ warn_on \ diff --git a/tools/linguist/tests/data/main.cpp b/tools/linguist/tests/data/main.cpp index 6e09e3e..59c3075 100644 --- a/tools/linguist/tests/data/main.cpp +++ b/tools/linguist/tests/data/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tools/linguist/tests/tst_linguist.cpp b/tools/linguist/tests/tst_linguist.cpp index c3f4eb6..5961db2 100644 --- a/tools/linguist/tests/tst_linguist.cpp +++ b/tools/linguist/tests/tst_linguist.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tools/linguist/tests/tst_linguist.h b/tools/linguist/tests/tst_linguist.h index 27a53bb..60902ad 100644 --- a/tools/linguist/tests/tst_linguist.h +++ b/tools/linguist/tests/tst_linguist.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef TST_LINGUIST #define TST_LINGUIST diff --git a/tools/linguist/tests/tst_lupdate.cpp b/tools/linguist/tests/tst_lupdate.cpp index 4114bf9..9ef00b3 100644 --- a/tools/linguist/tests/tst_lupdate.cpp +++ b/tools/linguist/tests/tst_lupdate.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtXmlPatterns module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tools/linguist/tests/tst_simtexth.cpp b/tools/linguist/tests/tst_simtexth.cpp index b71896c..b332bb1 100644 --- a/tools/linguist/tests/tst_simtexth.cpp +++ b/tools/linguist/tests/tst_simtexth.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 21b3bb9..bacef3f 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -7,7 +7,7 @@ DEFINES += QT_NO_CAST_TO_ASCII QT = core xml CONFIG += console CONFIG -= debug_and_release_target -DESTDIR = $$QT_BUILD_TREE/bin +!isEmpty(QT_BUILD_TREE):DESTDIR = $$QT_BUILD_TREE/bin #CONFIG += debug build_all:!build_pass { CONFIG -= build_all diff --git a/tools/qtestlib/wince/cetest/bootstrapped.pri b/tools/qtestlib/wince/cetest/bootstrapped.pri index 3a0ce24..b9c4b2b 100644 --- a/tools/qtestlib/wince/cetest/bootstrapped.pri +++ b/tools/qtestlib/wince/cetest/bootstrapped.pri @@ -36,4 +36,7 @@ SOURCES += \ $$QT_SOURCE_TREE/src/corelib/tools/qbitarray.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qmetatype.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qvariant.cpp \ - $$QT_SOURCE_TREE/src/corelib/codecs/qutfcodec.cpp + $$QT_SOURCE_TREE/src/corelib/codecs/qutfcodec.cpp \ + $$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.cpp \ + $$QT_SOURCE_TREE/src/corelib/xml/qxmlutils.cpp + diff --git a/tools/qtestlib/wince/cetest/cetest.pro b/tools/qtestlib/wince/cetest/cetest.pro index a6b79da..5cd52cf 100644 --- a/tools/qtestlib/wince/cetest/cetest.pro +++ b/tools/qtestlib/wince/cetest/cetest.pro @@ -18,9 +18,9 @@ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED QT_NO_CODECS QT_LITE_UNICODE QT INCLUDEPATH = \ $$QT_SOURCE_TREE/tools/qtestlib/ce/cetest \ $$QT_SOURCE_TREE/qmake \ + $$QT_SOURCE_TREE/qmake/generators/symbian \ $$QT_BUILD_TREE/include \ $$QT_BUILD_TREE/include/QtCore \ - $$QT_BUILD_TREE/include/QtScript \ $$QT_BUILD_TREE/src/corelib/global DEPENDPATH += $$QT_BUILD_TREE/src/corelib/tools $$QT_BUILD_TREE/src/corelib/io @@ -51,4 +51,3 @@ isEmpty(QT_CE_RAPI_INC) { include(qmake_include.pri) include(bootstrapped.pri) -include($$QT_SOURCE_TREE/src/script/script.pri) diff --git a/tools/qtestlib/wince/cetest/qmake_include.pri b/tools/qtestlib/wince/cetest/qmake_include.pri index 3831634..aa32653 100644 --- a/tools/qtestlib/wince/cetest/qmake_include.pri +++ b/tools/qtestlib/wince/cetest/qmake_include.pri @@ -4,4 +4,6 @@ HEADERS += \ SOURCES += \ $$QT_SOURCE_TREE/qmake/option.cpp \ $$QT_SOURCE_TREE/qmake/project.cpp \ - $$QT_SOURCE_TREE/qmake/property.cpp + $$QT_SOURCE_TREE/qmake/property.cpp \ + $$QT_SOURCE_TREE/qmake/generators/symbian/initprojectdeploy_symbian.cpp + diff --git a/tools/xmlpatterns/main.h b/tools/xmlpatterns/main.h index cccf4a7..10ab6cb 100644 --- a/tools/xmlpatterns/main.h +++ b/tools/xmlpatterns/main.h @@ -1,9 +1,11 @@ /**************************************************************************** - * ** * ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - * ** - * ** This file is part of the Patternist project on Qt Labs. * ** - * ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the XMLPatterns module 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 @@ -34,11 +36,8 @@ ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ - * ** - * ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * ** - * ****************************************************************************/ +** +****************************************************************************/ // // W A R N I N G diff --git a/tools/xmlpatterns/qcoloringmessagehandler_p.h b/tools/xmlpatterns/qcoloringmessagehandler_p.h index d03a062..57553dc 100644 --- a/tools/xmlpatterns/qcoloringmessagehandler_p.h +++ b/tools/xmlpatterns/qcoloringmessagehandler_p.h @@ -1,9 +1,11 @@ /**************************************************************************** - * ** * ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - * ** - * ** This file is part of the Patternist project on Qt Labs. * ** - * ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the XMLPatterns module 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 @@ -34,11 +36,8 @@ ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ - * ** - * ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * ** - * ****************************************************************************/ +** +****************************************************************************/ // // W A R N I N G diff --git a/tools/xmlpatterns/qcoloroutput_p.h b/tools/xmlpatterns/qcoloroutput_p.h index 49a515e..0d7eb8b 100644 --- a/tools/xmlpatterns/qcoloroutput_p.h +++ b/tools/xmlpatterns/qcoloroutput_p.h @@ -1,9 +1,11 @@ /**************************************************************************** - * ** * ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) - * ** - * ** This file is part of the Patternist project on Qt Labs. * ** - * ** $QT_BEGIN_LICENSE:LGPL$ +** +** This file is part of the XMLPatterns module 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 @@ -34,11 +36,8 @@ ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ - * ** - * ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * ** - * ****************************************************************************/ +** +****************************************************************************/ // // W A R N I N G diff --git a/util/qlalr/cppgenerator.h b/util/qlalr/cppgenerator.h index ce81a73..4531b8d 100644 --- a/util/qlalr/cppgenerator.h +++ b/util/qlalr/cppgenerator.h @@ -58,23 +58,22 @@ public: aut (aut), verbose (verbose), debug_info (false), - troll_copyright (false) {} + copyright (false) {} void operator () (); bool debugInfo () const { return debug_info; } void setDebugInfo (bool d) { debug_info = d; } - bool trollCopyright () const { return troll_copyright; } - void setTrollCopyright (bool t) { troll_copyright = t; } + void setCopyright (bool t) { copyright = t; } private: void generateDecl (QTextStream &out); void generateImpl (QTextStream &out); QString debugInfoProt() const; - QString trollCopyrightHeader() const; - QString trollPrivateCopyrightHeader() const; + QString copyrightHeader() const; + QString privateCopyrightHeader() const; private: static QString startIncludeGuard(const QString &fileName); @@ -89,7 +88,7 @@ private: int terminal_count; int non_terminal_count; bool debug_info; - bool troll_copyright; + bool copyright; Compress compressed_action; Compress compressed_goto; QVector<int> count; diff --git a/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp b/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp index b60e7e2..56f0e4f 100644 --- a/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp +++ b/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the QLALR module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/util/qlalr/examples/lambda/main.cpp b/util/qlalr/examples/lambda/main.cpp index bfae333..1e0adb4 100644 --- a/util/qlalr/examples/lambda/main.cpp +++ b/util/qlalr/examples/lambda/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the test suite module of the Qt Toolkit. +** This file is part of the QLALR module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -41,7 +41,6 @@ #include "lambda.h" - #include <cstdio> #include <cstdlib> #include <cstring> diff --git a/util/qlalr/examples/qparser/qparser.cpp b/util/qlalr/examples/qparser/qparser.cpp index 4e58e14..30b5b0a 100644 --- a/util/qlalr/examples/qparser/qparser.cpp +++ b/util/qlalr/examples/qparser/qparser.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the utils module of the Qt Toolkit. +** This file is part of the QLALR module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/util/qlalr/examples/qparser/qparser.h b/util/qlalr/examples/qparser/qparser.h index e3ff61d..f630221 100644 --- a/util/qlalr/examples/qparser/qparser.h +++ b/util/qlalr/examples/qparser/qparser.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QLALR module 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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** 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.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef QPARSER_H #define QPARSER_H diff --git a/util/xkbdatagen/main.cpp b/util/xkbdatagen/main.cpp index eaf770b..80b8981 100644 --- a/util/xkbdatagen/main.cpp +++ b/util/xkbdatagen/main.cpp @@ -417,13 +417,41 @@ int main(int argc, char **argv) printf("/****************************************************************************\n" "**\n" "** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n" + "** Contact: Nokia Corporation (qt-info@nokia.com)\n" "**\n" - "** This file is part of the $MODULE$ of the Qt Toolkit.\n" + "** This file is part of the QtGui module of the Qt Toolkit.\n" "**\n" - "** $TROLLTECH_DUAL_LICENSE$\n" + "** $QT_BEGIN_LICENSE:LGPL$\n" + "** No Commercial Usage\n" + "** This file contains pre-release code and may not be distributed.\n" + "** You may use this file in accordance with the terms and conditions\n" + "** contained in the either Technology Preview License Agreement or the\n" + "** Beta Release License Agreement.\n" "**\n" - "** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE\n" - "** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n" + "** GNU Lesser General Public License Usage\n" + "** Alternatively, this file may be used under the terms of the GNU Lesser\n" + "** General Public License version 2.1 as published by the Free Software\n" + "** Foundation and appearing in the file LICENSE.LGPL included in the\n" + "** packaging of this file. Please review the following information to\n" + "** ensure the GNU Lesser General Public License version 2.1 requirements\n" + "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n" + "**\n" + "** In addition, as a special exception, Nokia gives you certain\n" + "** additional rights. These rights are described in the Nokia Qt LGPL\n" + "** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this\n" + "** package.\n" + "**\n" + "** GNU General Public License Usage\n" + "** Alternatively, this file may be used under the terms of the GNU\n" + "** General Public License version 3.0 as published by the Free Software\n" + "** Foundation and appearing in the file LICENSE.GPL included in the\n" + "** packaging of this file. Please review the following information to\n" + "** ensure the GNU General Public License version 3.0 requirements will be\n" + "** met: http://www.gnu.org/copyleft/gpl.html.\n" + "**\n" + "** If you are unsure which license is appropriate for your use, please\n" + "** contact the sales department at http://qt.nokia.com/contact.\n" + "** $QT_END_LICENSE$\n" "**\n" "****************************************************************************/\n" "\n" |