diff options
Diffstat (limited to 'src/plugins/platforms/qnx')
74 files changed, 1133 insertions, 2959 deletions
diff --git a/src/plugins/platforms/qnx/main.cpp b/src/plugins/platforms/qnx/main.cpp index 55e9714f97..b5869fa603 100644 --- a/src/plugins/platforms/qnx/main.cpp +++ b/src/plugins/platforms/qnx/main.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/main.h b/src/plugins/platforms/qnx/main.h index 955bef471c..8d99d2432e 100644 --- a/src/plugins/platforms/qnx/main.h +++ b/src/plugins/platforms/qnx/main.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qblackberrytheme.cpp b/src/plugins/platforms/qnx/qblackberrytheme.cpp deleted file mode 100644 index f75e8f3766..0000000000 --- a/src/plugins/platforms/qnx/qblackberrytheme.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qblackberrytheme.h" - -#include "qqnxfiledialoghelper.h" -#include "qqnxsystemsettings.h" -#include "qqnxintegration.h" - -QT_BEGIN_NAMESPACE - -QBlackberryTheme::QBlackberryTheme(const QQnxIntegration *integration) : m_integration(integration) -{ - // Set the dark theme as default palette - QColor color = QColor(211, 211, 211); - m_defaultPalette.setBrush(QPalette::ButtonText, color); - m_defaultPalette.setBrush(QPalette::WindowText, color); - m_defaultPalette.setBrush(QPalette::Text, color); - - color.setAlpha(179); - m_defaultPalette.setBrush(QPalette::Disabled, QPalette::ButtonText, color); - m_defaultPalette.setBrush(QPalette::Disabled, QPalette::WindowText, color); - m_defaultPalette.setBrush(QPalette::Disabled, QPalette::Text, color); - - color.setRgb(18, 18, 18); - m_defaultPalette.setColor(QPalette::Window, color); - m_defaultPalette.setColor(QPalette::Base, color); - m_defaultPalette.setColor(QPalette::AlternateBase, QColor(50, 50, 50)); - m_defaultPalette.setColor(QPalette::Button, color); - - m_defaultPalette.setBrush(QPalette::Highlight, QColor(0, 168, 223)); - m_defaultPalette.setBrush(QPalette::HighlightedText, QColor(250, 250,250)); -} - -QBlackberryTheme::~QBlackberryTheme() -{ - qDeleteAll(m_fonts); -} - -bool QBlackberryTheme::usePlatformNativeDialog(DialogType type) const -{ - if (type == QPlatformTheme::FileDialog) - return true; -#if !defined(QT_NO_COLORDIALOG) - if (type == QPlatformTheme::ColorDialog) - return false; -#endif -#if !defined(QT_NO_FONTDIALOG) - if (type == QPlatformTheme::FontDialog) - return false; -#endif - return false; -} - -QPlatformDialogHelper *QBlackberryTheme::createPlatformDialogHelper(DialogType type) const -{ - switch (type) { - case QPlatformTheme::FileDialog: - return new QQnxFileDialogHelper(m_integration); -#if !defined(QT_NO_COLORDIALOG) - case QPlatformTheme::ColorDialog: -#endif -#if !defined(QT_NO_FONTDIALOG) - case QPlatformTheme::FontDialog: -#endif - default: - return 0; - } -} - -const QFont *QBlackberryTheme::font(Font type) const -{ - QPlatformFontDatabase *fontDatabase = m_integration->fontDatabase(); - - if (fontDatabase && m_fonts.isEmpty()) - m_fonts = qt_qnx_createRoleFonts(fontDatabase); - return m_fonts.value(type, 0); -} - -const QPalette *QBlackberryTheme::palette(Palette type) const -{ - // Return the default palette - if (type == SystemPalette) - return &m_defaultPalette; - - return QPlatformTheme::palette(type); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qblackberrytheme.h b/src/plugins/platforms/qnx/qblackberrytheme.h deleted file mode 100644 index bcef4e5ef4..0000000000 --- a/src/plugins/platforms/qnx/qblackberrytheme.h +++ /dev/null @@ -1,73 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QBLACKBERRYTHEME_H -#define QBLACKBERRYTHEME_H - -#include <qpa/qplatformtheme.h> - -#include <QtGui/qfont.h> - -#include <QtCore/qhash.h> -#include <QtCore/qstring.h> - -#include <QtGui/QPalette> - -QT_BEGIN_NAMESPACE - -class QQnxIntegration; - -class QBlackberryTheme : public QPlatformTheme -{ -public: - explicit QBlackberryTheme(const QQnxIntegration *); - ~QBlackberryTheme(); - - static QString name() { return QStringLiteral("blackberry"); } - - bool usePlatformNativeDialog(DialogType type) const; - QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const; - - const QFont *font(Font type = SystemFont) const; - - const QPalette *palette(Palette type = SystemPalette) const; - -private: - mutable QHash<QPlatformTheme::Font, QFont*> m_fonts; - const QQnxIntegration *m_integration; - QPalette m_defaultPalette; -}; - -QT_END_NAMESPACE - -#endif // QBLACKBERRYTHEME_H diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro index 95a8e44cb8..5a0f4f5c98 100644 --- a/src/plugins/platforms/qnx/qnx.pro +++ b/src/plugins/platforms/qnx/qnx.pro @@ -5,10 +5,9 @@ QT += platformsupport-private core-private gui-private # Uncomment this to build with support for IMF once it becomes available in the BBNDK #CONFIG += qqnx_imf -!blackberry:CONFIG += qqnx_screeneventthread +CONFIG += qqnx_screeneventthread # Uncomment these to enable debugging output for various aspects of the plugin -#DEFINES += QQNXBPSEVENTFILTER_DEBUG #DEFINES += QQNXBUFFER_DEBUG #DEFINES += QQNXBUTTON_DEBUG #DEFINES += QQNXCLIPBOARD_DEBUG @@ -86,52 +85,20 @@ contains(QT_CONFIG, opengles2) { LIBS += -lEGL } -CONFIG(blackberry) { - SOURCES += qqnxnavigatorbps.cpp \ - qqnxeventdispatcher_blackberry.cpp \ - qqnxbpseventfilter.cpp \ - qqnxvirtualkeyboardbps.cpp \ - qblackberrytheme.cpp \ - qqnxsystemsettings.cpp - - HEADERS += qqnxnavigatorbps.h \ - qqnxeventdispatcher_blackberry.h \ - qqnxbpseventfilter.h \ - qqnxvirtualkeyboardbps.h \ - qblackberrytheme.h \ - qqnxsystemsettings.h \ - qqnxfiledialoghelper.h - - LIBS += -lbps -} - -CONFIG(blackberry) { - SOURCES += qqnxfiledialoghelper_bb10.cpp \ - qqnxfilepicker.cpp \ - qqnxnavigatorcover.cpp - - HEADERS += qqnxfilepicker.h \ - qqnxnavigatorcover.h -} - CONFIG(qqnx_pps) { DEFINES += QQNX_PPS SOURCES += qqnxclipboard.cpp \ - qqnxbuttoneventnotifier.cpp + qqnxbuttoneventnotifier.cpp \ + qqnxnavigatorpps.cpp \ + qqnxnavigatoreventnotifier.cpp \ + qqnxvirtualkeyboardpps.cpp HEADERS += qqnxclipboard.h \ - qqnxbuttoneventnotifier.h - - !blackberry { - SOURCES += qqnxnavigatorpps.cpp \ - qqnxnavigatoreventnotifier.cpp \ - qqnxvirtualkeyboardpps.cpp - - HEADERS += qqnxnavigatorpps.h \ - qqnxnavigatoreventnotifier.h \ - qqnxvirtualkeyboardpps.h - } + qqnxbuttoneventnotifier.h \ + qqnxnavigatorpps.h \ + qqnxnavigatoreventnotifier.h \ + qqnxvirtualkeyboardpps.h LIBS += -lpps !contains(DEFINES, QT_NO_CLIPBOARD): LIBS += -lclipboard diff --git a/src/plugins/platforms/qnx/qqnxabstractcover.h b/src/plugins/platforms/qnx/qqnxabstractcover.h index 6028508cd4..f2838c8477 100644 --- a/src/plugins/platforms/qnx/qqnxabstractcover.h +++ b/src/plugins/platforms/qnx/qqnxabstractcover.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp index 7bec1fb603..a395599832 100644 --- a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp +++ b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxabstractnavigator.h b/src/plugins/platforms/qnx/qqnxabstractnavigator.h index c4851ac9a1..24e28dae96 100644 --- a/src/plugins/platforms/qnx/qqnxabstractnavigator.h +++ b/src/plugins/platforms/qnx/qqnxabstractnavigator.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.cpp b/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.cpp index 04e264860e..7e639a7ea6 100644 --- a/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.cpp +++ b/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h b/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h index 2fa2ed7291..24be03b46c 100644 --- a/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h +++ b/src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp deleted file mode 100644 index 66843283b6..0000000000 --- a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxbpseventfilter.h" -#include "qqnxnavigatoreventhandler.h" -#include "qqnxscreen.h" -#include "qqnxscreeneventhandler.h" -#include "qqnxvirtualkeyboardbps.h" -#include "qqnxfiledialoghelper.h" - -#include <QCoreApplication> -#include <QAbstractEventDispatcher> -#include <QDebug> - -#include <bps/event.h> -#include <bps/navigator.h> -#include <bps/screen.h> - -#if defined(QQNXBPSEVENTFILTER_DEBUG) -#define qBpsEventFilterDebug qDebug -#else -#define qBpsEventFilterDebug QT_NO_QDEBUG_MACRO -#endif - -QT_BEGIN_NAMESPACE - -static QQnxBpsEventFilter *s_instance = 0; - -QQnxBpsEventFilter::QQnxBpsEventFilter(QQnxNavigatorEventHandler *navigatorEventHandler, - QQnxScreenEventHandler *screenEventHandler, - QQnxVirtualKeyboardBps *virtualKeyboard, QObject *parent) - : QObject(parent) - , m_navigatorEventHandler(navigatorEventHandler) - , m_screenEventHandler(screenEventHandler) - , m_virtualKeyboard(virtualKeyboard) -{ - Q_ASSERT(s_instance == 0); - - s_instance = this; -} - -QQnxBpsEventFilter::~QQnxBpsEventFilter() -{ - Q_ASSERT(s_instance == this); - - s_instance = 0; -} - -void QQnxBpsEventFilter::installOnEventDispatcher(QAbstractEventDispatcher *dispatcher) -{ - qBpsEventFilterDebug() << "dispatcher=" << dispatcher; - - if (navigator_request_events(NAVIGATOR_EXTENDED_DATA) != BPS_SUCCESS) - qWarning("QQNX: failed to register for navigator events"); - - dispatcher->installNativeEventFilter(this); -} - -void QQnxBpsEventFilter::registerForScreenEvents(QQnxScreen *screen) -{ - if (!m_screenEventHandler) { - qWarning("QQNX: trying to register for screen events, but no handler provided."); - return; - } - - int attached; - if (screen_get_display_property_iv(screen->nativeDisplay(), SCREEN_PROPERTY_ATTACHED, &attached) != BPS_SUCCESS) { - qWarning() << "QQNX: unable to query display attachment"; - return; - } - - if (!attached) { - qBpsEventFilterDebug() << "skipping event registration for non-attached screen"; - return; - } - - if (screen_request_events(screen->nativeContext()) != BPS_SUCCESS) - qWarning("QQNX: failed to register for screen events on screen %p", screen->nativeContext()); -} - -void QQnxBpsEventFilter::unregisterForScreenEvents(QQnxScreen *screen) -{ - if (!m_screenEventHandler) { - qWarning("QQNX: trying to unregister for screen events, but no handler provided."); - return; - } - - if (screen_stop_events(screen->nativeContext()) != BPS_SUCCESS) - qWarning("QQNX: failed to unregister for screen events on screen %p", screen->nativeContext()); -} - -bool QQnxBpsEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result) -{ - Q_UNUSED(eventType); - Q_UNUSED(result); - bps_event_t *event = static_cast<bps_event_t *>(message); - const int eventDomain = bps_event_get_domain(event); - qBpsEventFilterDebug() << "event=" << event << "domain=" << eventDomain; - - if (eventDomain == screen_get_domain()) { - if (!m_screenEventHandler) { - qWarning("QQNX: registered for screen events, but no handler provided."); - return false; - } - - screen_event_t screenEvent = screen_event_get_event(event); - return m_screenEventHandler->handleEvent(screenEvent); - } - - if (eventDomain == navigator_get_domain()) - return handleNavigatorEvent(event); - - if (m_virtualKeyboard->handleEvent(event)) - return true; - - return false; -} - -bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event) -{ - switch (bps_event_get_code(event)) { - case NAVIGATOR_ORIENTATION_CHECK: { - const int angle = navigator_event_get_orientation_angle(event); - qBpsEventFilterDebug() << "ORIENTATION CHECK event. angle=" << angle; - - const bool result = m_navigatorEventHandler->handleOrientationCheck(angle); - qBpsEventFilterDebug() << "ORIENTATION CHECK event. result=" << result; - - // reply to navigator whether orientation is acceptable - navigator_orientation_check_response(event, result); - break; - } - - case NAVIGATOR_ORIENTATION: { - const int angle = navigator_event_get_orientation_angle(event); - qBpsEventFilterDebug() << "ORIENTATION event. angle=" << angle; - m_navigatorEventHandler->handleOrientationChange(angle); - - navigator_done_orientation(event); - break; - } - - case NAVIGATOR_SWIPE_DOWN: - qBpsEventFilterDebug("SWIPE DOWN event"); - m_navigatorEventHandler->handleSwipeDown(); - break; - - case NAVIGATOR_EXIT: - qBpsEventFilterDebug("EXIT event"); - m_navigatorEventHandler->handleExit(); - break; - - case NAVIGATOR_WINDOW_STATE: { - qBpsEventFilterDebug("WINDOW STATE event"); - const navigator_window_state_t state = navigator_event_get_window_state(event); - const QByteArray id(navigator_event_get_groupid(event)); - - switch (state) { - case NAVIGATOR_WINDOW_FULLSCREEN: - m_navigatorEventHandler->handleWindowGroupStateChanged(id, Qt::WindowFullScreen); - break; - case NAVIGATOR_WINDOW_THUMBNAIL: - m_navigatorEventHandler->handleWindowGroupStateChanged(id, Qt::WindowMinimized); - break; - case NAVIGATOR_WINDOW_INVISIBLE: - break; - } - - break; - } - - case NAVIGATOR_WINDOW_ACTIVE: { - qBpsEventFilterDebug("WINDOW ACTIVE event"); - const QByteArray id(navigator_event_get_groupid(event)); - m_navigatorEventHandler->handleWindowGroupActivated(id); - break; - } - - case NAVIGATOR_WINDOW_INACTIVE: { - qBpsEventFilterDebug("WINDOW INACTIVE event"); - const QByteArray id(navigator_event_get_groupid(event)); - m_navigatorEventHandler->handleWindowGroupDeactivated(id); - break; - } - - case NAVIGATOR_LOW_MEMORY: - qWarning() << "QGuiApplication based process" << QCoreApplication::applicationPid() - << "received \"NAVIGATOR_LOW_MEMORY\" event"; - return false; - - default: - qBpsEventFilterDebug() << "Unhandled navigator event. code=" << bps_event_get_code(event); - return false; - } - - return true; -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxbpseventfilter.h b/src/plugins/platforms/qnx/qqnxbpseventfilter.h deleted file mode 100644 index f1d67848e8..0000000000 --- a/src/plugins/platforms/qnx/qqnxbpseventfilter.h +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXBPSEVENTFILTER_H -#define QQNXBPSEVENTFILTER_H - -#include <QObject> -#include <QHash> -#include <QAbstractNativeEventFilter> - -#include <bps/dialog.h> - -struct bps_event_t; - -QT_BEGIN_NAMESPACE - -class QAbstractEventDispatcher; -class QQnxNavigatorEventHandler; -class QQnxFileDialogHelper; -class QQnxScreen; -class QQnxScreenEventHandler; -class QQnxVirtualKeyboardBps; - -class QQnxBpsEventFilter : public QObject, public QAbstractNativeEventFilter -{ - Q_OBJECT -public: - QQnxBpsEventFilter(QQnxNavigatorEventHandler *navigatorEventHandler, - QQnxScreenEventHandler *screenEventHandler, - QQnxVirtualKeyboardBps *virtualKeyboard, QObject *parent = 0); - ~QQnxBpsEventFilter(); - - void installOnEventDispatcher(QAbstractEventDispatcher *dispatcher); - - void registerForScreenEvents(QQnxScreen *screen); - void unregisterForScreenEvents(QQnxScreen *screen); - -private: - bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE; - - bool handleNavigatorEvent(bps_event_t *event); - -private: - QQnxNavigatorEventHandler *m_navigatorEventHandler; - QQnxScreenEventHandler *m_screenEventHandler; - QQnxVirtualKeyboardBps *m_virtualKeyboard; - QHash<dialog_instance_t, QQnxFileDialogHelper*> m_dialogMapper; -}; - -QT_END_NAMESPACE - -#endif // QQNXBPSEVENTFILTER_H diff --git a/src/plugins/platforms/qnx/qqnxbuffer.cpp b/src/plugins/platforms/qnx/qqnxbuffer.cpp index 7ee6664676..cd05a679b1 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.cpp +++ b/src/plugins/platforms/qnx/qqnxbuffer.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -76,7 +82,7 @@ QQnxBuffer::QQnxBuffer(screen_buffer_t buffer) screen_get_buffer_property_pv(buffer, SCREEN_PROPERTY_POINTER, (void **)&dataPtr), "Failed to query buffer pointer"); - if (dataPtr == 0) + if (Q_UNLIKELY(!dataPtr)) qFatal("QQNX: buffer pointer is NULL, errno=%d", errno); // Get format of buffer @@ -131,13 +137,13 @@ void QQnxBuffer::invalidateInCache() qBufferDebug(); // Verify native buffer exists - if (m_buffer == 0) + if (Q_UNLIKELY(!m_buffer)) qFatal("QQNX: can't invalidate cache for null buffer"); // Evict buffer's data from cache errno = 0; int result = msync(m_image.bits(), m_image.height() * m_image.bytesPerLine(), MS_INVALIDATE | MS_CACHE_ONLY); - if (result != 0) + if (Q_UNLIKELY(result != 0)) qFatal("QQNX: failed to invalidate cache, errno=%d", errno); } diff --git a/src/plugins/platforms/qnx/qqnxbuffer.h b/src/plugins/platforms/qnx/qqnxbuffer.h index 1d86e1f0df..9ee0d5d60c 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.h +++ b/src/plugins/platforms/qnx/qqnxbuffer.h @@ -1,31 +1,37 @@ /**************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp index 614bfc381f..a08ac2b839 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -82,7 +88,7 @@ void QQnxButtonEventNotifier::start() errno = 0; m_fd = qt_safe_open(ppsPath, O_RDONLY); if (m_fd == -1) { -#if defined(Q_OS_BLACKBERRY) || defined (QQNXBUTTON_DEBUG) +#if defined (QQNXBUTTON_DEBUG) qWarning("QQNX: failed to open buttons pps, errno=%d", errno); #endif return; @@ -156,7 +162,7 @@ void QQnxButtonEventNotifier::updateButtonStates() break; default: - qButtonDebug() << "Unknown hardware button"; + qButtonDebug("Unknown hardware button"); continue; } diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h index 40f8a1ebcc..aa2c118b3a 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxclipboard.cpp b/src/plugins/platforms/qnx/qqnxclipboard.cpp index 30af5a04a5..0d2cc45c30 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.cpp +++ b/src/plugins/platforms/qnx/qqnxclipboard.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxclipboard.h b/src/plugins/platforms/qnx/qqnxclipboard.h index c2325ecece..5113742087 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.h +++ b/src/plugins/platforms/qnx/qqnxclipboard.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxcursor.cpp b/src/plugins/platforms/qnx/qqnxcursor.cpp index fb44e5692e..7da965d636 100644 --- a/src/plugins/platforms/qnx/qqnxcursor.cpp +++ b/src/plugins/platforms/qnx/qqnxcursor.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxcursor.h b/src/plugins/platforms/qnx/qqnxcursor.h index 1bb00e200f..5c0d582107 100644 --- a/src/plugins/platforms/qnx/qqnxcursor.h +++ b/src/plugins/platforms/qnx/qqnxcursor.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp index 00eaf2bf03..aa2e4db193 100644 --- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 - 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -59,7 +65,7 @@ QQnxEglWindow::QQnxEglWindow(QWindow *window, screen_context_t context, bool nee // Set window usage const int val = SCREEN_USAGE_OPENGL_ES2; const int result = screen_set_window_property_iv(nativeHandle(), SCREEN_PROPERTY_USAGE, &val); - if (result != 0) + if (Q_UNLIKELY(result != 0)) qFatal("QQnxEglWindow: failed to set window alpha usage, errno=%d", errno); m_requestedBufferSize = shouldMakeFullScreen() ? screen()->geometry().size() : window->geometry().size(); @@ -106,7 +112,7 @@ void QQnxEglWindow::destroyEGLSurface() // Destroy EGL surface if it exists if (m_eglSurface != EGL_NO_SURFACE) { EGLBoolean eglResult = eglDestroySurface(platformOpenGLContext()->getEglDisplay(), m_eglSurface); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to destroy EGL surface, err=%d", eglGetError()); } @@ -118,12 +124,12 @@ void QQnxEglWindow::swapEGLBuffers() qEglWindowDebug(); // Set current rendering API EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to set EGL API, err=%d", eglGetError()); // Post EGL surface to window eglResult = eglSwapBuffers(m_platformOpenGLContext->getEglDisplay(), m_eglSurface); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to swap EGL buffers, err=%d", eglGetError()); windowPosted(); @@ -178,15 +184,15 @@ int QQnxEglWindow::pixelFormat() const const QSurfaceFormat format = m_platformOpenGLContext->format(); // Extract size of color channels from window format const int redSize = format.redBufferSize(); - if (redSize == -1) + if (Q_UNLIKELY(redSize == -1)) qFatal("QQnxWindow: red size not defined"); const int greenSize = format.greenBufferSize(); - if (greenSize == -1) + if (Q_UNLIKELY(greenSize == -1)) qFatal("QQnxWindow: green size not defined"); const int blueSize = format.blueBufferSize(); - if (blueSize == -1) + if (Q_UNLIKELY(blueSize == -1)) qFatal("QQnxWindow: blue size not defined"); // select matching native format diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.h b/src/plugins/platforms/qnx/qqnxeglwindow.h index b570c7c82a..943ae44bd9 100644 --- a/src/plugins/platforms/qnx/qqnxeglwindow.h +++ b/src/plugins/platforms/qnx/qqnxeglwindow.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxeventdispatcher_blackberry.cpp b/src/plugins/platforms/qnx/qqnxeventdispatcher_blackberry.cpp deleted file mode 100644 index 30596fe08f..0000000000 --- a/src/plugins/platforms/qnx/qqnxeventdispatcher_blackberry.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxeventdispatcher_blackberry.h" - -#include <qpa/qwindowsysteminterface.h> -#include <private/qguiapplication_p.h> - -QT_BEGIN_NAMESPACE - - -QQnxEventDispatcherBlackberry::QQnxEventDispatcherBlackberry(QObject *parent) - : QEventDispatcherBlackberry(parent) -{ -} - -QQnxEventDispatcherBlackberry::~QQnxEventDispatcherBlackberry() -{ -} - -bool QQnxEventDispatcherBlackberry::processEvents(QEventLoop::ProcessEventsFlags flags) -{ - const bool didSendEvents = QEventDispatcherBlackberry::processEvents(flags); - return QWindowSystemInterface::sendWindowSystemEvents(flags) || didSendEvents; -} - -bool QQnxEventDispatcherBlackberry::hasPendingEvents() -{ - return QEventDispatcherBlackberry::hasPendingEvents() || QWindowSystemInterface::windowSystemEventsQueued(); -} - -void QQnxEventDispatcherBlackberry::flush() -{ - if (qApp) - qApp->sendPostedEvents(); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxeventdispatcher_blackberry.h b/src/plugins/platforms/qnx/qqnxeventdispatcher_blackberry.h deleted file mode 100644 index 036bf126ab..0000000000 --- a/src/plugins/platforms/qnx/qqnxeventdispatcher_blackberry.h +++ /dev/null @@ -1,58 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXEVENTDISPATCHER_BLACKBERRY_H -#define QQNXEVENTDISPATCHER_BLACKBERRY_H - -#include <qglobal.h> -#include <private/qeventdispatcher_blackberry_p.h> - -QT_BEGIN_NAMESPACE - -class QQnxEventDispatcherBlackberry : public QEventDispatcherBlackberry -{ - Q_OBJECT - -public: - explicit QQnxEventDispatcherBlackberry(QObject *parent = 0); - ~QQnxEventDispatcherBlackberry(); - - bool processEvents(QEventLoop::ProcessEventsFlags flags); - bool hasPendingEvents(); - - void flush(); -}; - -QT_END_NAMESPACE - -#endif // QQNXEVENTDISPATCHER_BLACKBERRY_H diff --git a/src/plugins/platforms/qnx/qqnxfiledialoghelper.h b/src/plugins/platforms/qnx/qqnxfiledialoghelper.h deleted file mode 100644 index 76cceafcfe..0000000000 --- a/src/plugins/platforms/qnx/qqnxfiledialoghelper.h +++ /dev/null @@ -1,87 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXFILEDIALOGHELPER_H -#define QQNXFILEDIALOGHELPER_H - -#include <qpa/qplatformdialoghelper.h> - - -QT_BEGIN_NAMESPACE - -class QQnxIntegration; - -class QQnxFilePicker; - -class QQnxFileDialogHelper : public QPlatformFileDialogHelper -{ - Q_OBJECT -public: - explicit QQnxFileDialogHelper(const QQnxIntegration *); - ~QQnxFileDialogHelper(); - - void exec(); - - bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent); - void hide(); - - bool defaultNameFilterDisables() const; - void setDirectory(const QUrl &directory) Q_DECL_OVERRIDE; - QUrl directory() const Q_DECL_OVERRIDE; - void selectFile(const QUrl &fileName) Q_DECL_OVERRIDE; - QList<QUrl> selectedFiles() const Q_DECL_OVERRIDE; - void setFilter(); - void selectNameFilter(const QString &filter); - QString selectedNameFilter() const; - - QQnxFilePicker *nativeDialog() const { return m_dialog; } - -Q_SIGNALS: - void dialogClosed(); - -private Q_SLOTS: - void emitSignals(); - -private: - void setNameFilter(const QString &filter); - void setNameFilters(const QStringList &filters); - - const QQnxIntegration *m_integration; - QQnxFilePicker *m_dialog; - QFileDialogOptions::AcceptMode m_acceptMode; - QString m_selectedFilter; -}; - -QT_END_NAMESPACE - -#endif // QQNXFILEDIALOGHELPER_H diff --git a/src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp b/src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp deleted file mode 100644 index 3bc84686e0..0000000000 --- a/src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2013 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxfiledialoghelper.h" - -#include "qqnxfilepicker.h" -#include "qqnxbpseventfilter.h" -#include "qqnxscreen.h" -#include "qqnxintegration.h" - -#include <QDebug> -#include <QEventLoop> -#include <QScreen> -#include <QTimer> -#include <QWindow> - -#ifdef QQNXFILEDIALOGHELPER_DEBUG -#define qFileDialogHelperDebug qDebug -#else -#define qFileDialogHelperDebug QT_NO_QDEBUG_MACRO -#endif - -QT_BEGIN_NAMESPACE - -QQnxFileDialogHelper::QQnxFileDialogHelper(const QQnxIntegration *integration) - : QPlatformFileDialogHelper(), - m_integration(integration), - m_dialog(new QQnxFilePicker), - m_acceptMode(QFileDialogOptions::AcceptOpen), - m_selectedFilter() -{ - connect(m_dialog, &QQnxFilePicker::closed, this, &QQnxFileDialogHelper::emitSignals); -} - -QQnxFileDialogHelper::~QQnxFileDialogHelper() -{ - delete m_dialog; -} - -void QQnxFileDialogHelper::exec() -{ - qFileDialogHelperDebug(); - - // Clear any previous results - m_dialog->setDirectories(QStringList()); - - QEventLoop loop; - connect(m_dialog, SIGNAL(closed()), &loop, SLOT(quit())); - loop.exec(); -} - -bool QQnxFileDialogHelper::show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) -{ - Q_UNUSED(flags); - Q_UNUSED(parent); - Q_UNUSED(modality); - - qFileDialogHelperDebug(); - - // Create dialog - const QSharedPointer<QFileDialogOptions> &opts = options(); - if (opts->acceptMode() == QFileDialogOptions::AcceptOpen) { - // Select one or many files? - const QQnxFilePicker::Mode mode = (opts->fileMode() == QFileDialogOptions::ExistingFiles) - ? QQnxFilePicker::PickerMultiple : QQnxFilePicker::Picker; - - m_dialog->setMode(mode); - - // Set the actual list of extensions - if (!opts->nameFilters().isEmpty()) - setNameFilters(opts->nameFilters()); - else - setNameFilter(tr("All files (*.*)")); - } else { - const QQnxFilePicker::Mode mode = (opts->initiallySelectedFiles().count() >= 2) - ? QQnxFilePicker::SaverMultiple : QQnxFilePicker::Saver; - - m_dialog->setMode(mode); - - if (!opts->initiallySelectedFiles().isEmpty()) { - QStringList files; - Q_FOREACH ( const QUrl &url, opts->initiallySelectedFiles() ) - files.append(url.toLocalFile()); - m_dialog->setDefaultSaveFileNames(files); - } - } - - // Cache the accept mode so we know which functions to use to get the results back - m_acceptMode = opts->acceptMode(); - m_dialog->setTitle(opts->windowTitle()); - m_dialog->open(); - - return true; -} - -void QQnxFileDialogHelper::hide() -{ - qFileDialogHelperDebug(); - m_dialog->close(); -} - -bool QQnxFileDialogHelper::defaultNameFilterDisables() const -{ - qFileDialogHelperDebug(); - return false; -} - -void QQnxFileDialogHelper::setDirectory(const QUrl &directory) -{ - m_dialog->addDirectory(directory.toLocalFile()); -} - -QUrl QQnxFileDialogHelper::directory() const -{ - qFileDialogHelperDebug(); - if (!m_dialog->directories().isEmpty()) - return QUrl::fromLocalFile(m_dialog->directories().first()); - - return QUrl(); -} - -void QQnxFileDialogHelper::selectFile(const QUrl &fileName) -{ - m_dialog->addDefaultSaveFileName(fileName.toLocalFile()); -} - -QList<QUrl> QQnxFileDialogHelper::selectedFiles() const -{ - qFileDialogHelperDebug(); - QList<QUrl> urls; - QStringList files = m_dialog->selectedFiles(); - Q_FOREACH (const QString &file, files) - urls.append(QUrl::fromLocalFile(file)); - return urls; -} - -void QQnxFileDialogHelper::setFilter() -{ - // No native api to support setting a filter from QDir::Filters - qFileDialogHelperDebug(); -} - -void QQnxFileDialogHelper::selectNameFilter(const QString &filter) -{ - qFileDialogHelperDebug() << "filter =" << filter; - setNameFilter(filter); -} - -QString QQnxFileDialogHelper::selectedNameFilter() const -{ - // For now there is no way for the user to change the selected filter - // so this just reflects what the developer has set programmatically. - qFileDialogHelperDebug(); - return m_selectedFilter; -} - -void QQnxFileDialogHelper::emitSignals() -{ - if (m_dialog->selectedFiles().isEmpty()) - Q_EMIT reject(); - else - Q_EMIT accept(); -} - -void QQnxFileDialogHelper::setNameFilter(const QString &filter) -{ - qFileDialogHelperDebug() << "filter =" << filter; - - setNameFilters(QPlatformFileDialogHelper::cleanFilterList(filter)); -} - -void QQnxFileDialogHelper::setNameFilters(const QStringList &filters) -{ - qFileDialogHelperDebug() << "filters =" << filters; - - Q_ASSERT(!filters.isEmpty()); - - m_dialog->setFilters(filters); - m_selectedFilter = filters.first(); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxfilepicker.cpp b/src/plugins/platforms/qnx/qqnxfilepicker.cpp deleted file mode 100644 index ca8d731e66..0000000000 --- a/src/plugins/platforms/qnx/qqnxfilepicker.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2013 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxfilepicker.h" - -#include <QAbstractEventDispatcher> -#include <QCoreApplication> -#include <QDebug> -#include <QJsonDocument> -#include <QJsonObject> -#include <QJsonArray> -#include <QJsonParseError> -#include <QMimeDatabase> -#include <QUrl> -#include <private/qppsobject_p.h> - -#include <bps/navigator.h> -#include <bps/navigator_invoke.h> - -#include <errno.h> - -#ifdef QQNXFILEPICKER_DEBUG -#define qFilePickerDebug qDebug -#else -#define qFilePickerDebug QT_NO_QDEBUG_MACRO -#endif - -QT_BEGIN_NAMESPACE - -static const char s_filePickerTarget[] = "sys.filepicker.target"; - -QQnxFilePicker::QQnxFilePicker(QObject *parent) - : QObject(parent) - , m_invocationHandle(0) - , m_mode(QQnxFilePicker::Picker) - , m_title(tr("Pick a file")) -{ - QCoreApplication::eventDispatcher()->installNativeEventFilter(this); -} - -QQnxFilePicker::~QQnxFilePicker() -{ - cleanup(); - - QCoreApplication::eventDispatcher()->removeNativeEventFilter(this); -} - -void QQnxFilePicker::open() -{ - if (m_invocationHandle) - return; - - // Clear any previous results - m_selectedFiles.clear(); - - int errorCode = BPS_SUCCESS; - - errorCode = navigator_invoke_invocation_create(&m_invocationHandle); - if (errorCode != BPS_SUCCESS) { - qWarning() << "QQnxFilePicker: unable to create invocation:" << strerror(errno); - return; - } - - errorCode = navigator_invoke_invocation_set_target(m_invocationHandle, s_filePickerTarget); - - if (errorCode != BPS_SUCCESS) { - cleanup(); - qWarning() << "QQnxFilePicker: unable to set target:" << strerror(errno); - return; - } - - errorCode = navigator_invoke_invocation_set_action(m_invocationHandle, "bb.action.OPEN"); - if (errorCode != BPS_SUCCESS) { - cleanup(); - qWarning() << "QQnxFilePicker: unable to set action:" << strerror(errno); - return; - } - - errorCode = navigator_invoke_invocation_set_type(m_invocationHandle, "application/vnd.blackberry.file_picker"); - if (errorCode != BPS_SUCCESS) { - cleanup(); - qWarning() << "QQnxFilePicker: unable to set mime type:" << strerror(errno); - return; - } - - QVariantMap map; - map[QStringLiteral("Type")] = filePickerType(); - map[QStringLiteral("Mode")] = modeToString(m_mode); - map[QStringLiteral("Title")] = m_title; - map[QStringLiteral("ViewMode")] = QStringLiteral("Default"); - map[QStringLiteral("SortBy")] = QStringLiteral("Default"); - map[QStringLiteral("SortOrder")] = QStringLiteral("Default"); - map[QStringLiteral("ImageCrop")] = false; - map[QStringLiteral("AllowOverwrite")] = false; - - if (!m_defaultSaveFileNames.isEmpty()) - map[QStringLiteral("DefaultFileNames")] = m_defaultSaveFileNames.join(QLatin1Char(',')); - if (!m_filters.isEmpty()) - map[QStringLiteral("Filter")] = m_filters.join(QLatin1Char(';')); - - QByteArray ppsData; - ppsData = QPpsObject::encode(map); - - errorCode = navigator_invoke_invocation_set_data(m_invocationHandle, ppsData.constData(), ppsData.size()); - if (errorCode != BPS_SUCCESS) { - cleanup(); - qWarning() << "QQnxFilePicker: unable to set data:" << strerror(errno); - return; - } - - navigator_invoke_invocation_send(m_invocationHandle); -} - -void QQnxFilePicker::close() -{ - navigator_card_close_child(); - cleanup(); -} - -bool QQnxFilePicker::nativeEventFilter(const QByteArray&, void *message, long*) -{ - bps_event_t * const event = static_cast<bps_event_t*>(message); - if (!event) - return false; - - if (bps_event_get_code(event) == NAVIGATOR_INVOKE_TARGET_RESULT) { - const char *id = navigator_event_get_id(event); - const char *err = navigator_event_get_err(event); - qFilePickerDebug("received invocation response: id=%s err=%s", id, err); - } else if (bps_event_get_code(event) == NAVIGATOR_CHILD_CARD_CLOSED) { - const char *data = navigator_event_get_card_closed_data(event); - qFilePickerDebug("received data: data='%s'", data); - handleFilePickerResponse(data); - } - - return false; // do not drop the event -} - -void QQnxFilePicker::setMode(QQnxFilePicker::Mode mode) -{ - m_mode = mode; -} - -void QQnxFilePicker::setDefaultSaveFileNames(const QStringList &fileNames) -{ - m_defaultSaveFileNames = fileNames; -} - -void QQnxFilePicker::addDefaultSaveFileName(const QString &fileName) -{ - m_defaultSaveFileNames.append(fileName); -} - -void QQnxFilePicker::setDirectories(const QStringList &directories) -{ - m_directories = directories; -} - -void QQnxFilePicker::addDirectory(const QString &directory) -{ - m_directories.append(directory); -} - -void QQnxFilePicker::setFilters(const QStringList &filters) -{ - m_filters = filters; -} - -void QQnxFilePicker::setTitle(const QString &title) -{ - m_title = title; -} - -QQnxFilePicker::Mode QQnxFilePicker::mode() const -{ - return m_mode; -} - -QStringList QQnxFilePicker::defaultSaveFileNames() const -{ - return m_defaultSaveFileNames; -} - -QStringList QQnxFilePicker::directories() const -{ - return m_directories; -} - -QStringList QQnxFilePicker::filters() const -{ - return m_filters; -} - -QStringList QQnxFilePicker::selectedFiles() const -{ - return m_selectedFiles; -} - -QString QQnxFilePicker::title() const -{ - return m_title; -} - -void QQnxFilePicker::cleanup() -{ - if (m_invocationHandle) { - navigator_invoke_invocation_destroy(m_invocationHandle); - m_invocationHandle = 0; - } -} - -void QQnxFilePicker::handleFilePickerResponse(const char *data) -{ - QJsonParseError jsonError; - QJsonDocument document = QJsonDocument::fromJson(data, &jsonError); - - if (jsonError.error != QJsonParseError::NoError) { - qFilePickerDebug() << "Error parsing FilePicker response: " - << jsonError.errorString(); - Q_EMIT closed(); - cleanup(); - return; - } - - // The response is a list of Json objects. - const QVariantList array = document.array().toVariantList(); - - foreach (const QVariant &variant, array) { - const QJsonObject object = QJsonObject::fromVariantMap(variant.toMap()); - const QUrl url(object.value(QStringLiteral("uri")).toString()); - const QString localFile = url.toLocalFile(); // strip "file://" - - if (!localFile.isEmpty()) - m_selectedFiles << localFile; - - qFilePickerDebug() << "FilePicker uri response:" << localFile; - } - - Q_EMIT closed(); - cleanup(); -} - -QString QQnxFilePicker::filePickerType() const -{ - bool images = false; - bool video = false; - bool music = false; - QMimeDatabase mimeDb; - for (int i = 0; i < m_filters.count(); i++) { - QList<QMimeType> mimeTypes = mimeDb.mimeTypesForFileName(m_filters.at(i)); - if (mimeTypes.isEmpty()) - return QStringLiteral("Other"); - - if (mimeTypes.first().name().startsWith(QLatin1String("image"))) - images = true; - else if (mimeTypes.first().name().startsWith(QLatin1String("audio"))) - music = true; - else if (mimeTypes.first().name().startsWith(QLatin1String("video"))) - video = true; - else - return QStringLiteral("Other"); - } - - if (!video && !music) - return QStringLiteral("Picture"); - - if (!images && !music) - return QStringLiteral("Video"); - - if (!images && !video) - return QStringLiteral("Music"); - - return QStringLiteral("Other"); -} - -QString QQnxFilePicker::modeToString(QQnxFilePicker::Mode mode) const -{ - switch (mode) { - case Picker: - return QStringLiteral("Picker"); - case Saver: - return QStringLiteral("Saver"); - case PickerMultiple: - return QStringLiteral("PickerMultiple"); - case SaverMultiple: - return QStringLiteral("SaverMultiple"); - } - - return QStringLiteral("Picker"); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxfilepicker.h b/src/plugins/platforms/qnx/qqnxfilepicker.h deleted file mode 100644 index 7e4f9010cc..0000000000 --- a/src/plugins/platforms/qnx/qqnxfilepicker.h +++ /dev/null @@ -1,107 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2013 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXFILEPICKER_H -#define QQNXFILEPICKER_H - -#include <QAbstractNativeEventFilter> -#include <QObject> -#include <QStringList> - -QT_BEGIN_NAMESPACE - -struct navigator_invoke_invocation_t; - -class QQnxFilePicker : public QObject, public QAbstractNativeEventFilter -{ - Q_OBJECT - -public: - explicit QQnxFilePicker(QObject *parent = 0); - ~QQnxFilePicker(); - - enum Mode { - Picker, - Saver, - PickerMultiple, - SaverMultiple - }; - - bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE; - - void setMode(Mode mode); - void setDefaultSaveFileNames(const QStringList &fileNames); - void addDefaultSaveFileName(const QString &fileName); - void setDirectories(const QStringList &directories); - void addDirectory(const QString &directory); - void setFilters(const QStringList &filters); - void setTitle(const QString &title); - - Mode mode() const; - - QStringList defaultSaveFileNames() const; - QStringList directories() const; - QStringList filters() const; - QStringList selectedFiles() const; - - QString title() const; - -Q_SIGNALS: - void closed(); - -public Q_SLOTS: - void open(); - void close(); - -private: - void cleanup(); - void handleFilePickerResponse(const char *data); - QString filePickerType() const; - - QString modeToString(Mode mode) const; - - navigator_invoke_invocation_t *m_invocationHandle; - - Mode m_mode; - - QStringList m_defaultSaveFileNames; - QStringList m_directories; - QStringList m_filters; - QStringList m_selectedFiles; - - QString m_title; -}; - -QT_END_NAMESPACE - -#endif // QQNXFILEPICKER_H diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp index 5ef8d72926..0d3076a743 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.cpp +++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -61,7 +67,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext) // Set current rendering API EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to set EGL API, err=%d", eglGetError()); // Get colour channel sizes from window format @@ -113,7 +119,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext) // Select EGL config based on requested window format m_eglConfig = q_configFromGLFormat(ms_eglDisplay, format); - if (m_eglConfig == 0) + if (Q_UNLIKELY(m_eglConfig == 0)) qFatal("QQnxGLContext: failed to find EGL config"); QQnxGLContext *glShareContext = static_cast<QQnxGLContext*>(m_glContext->shareHandle()); @@ -121,7 +127,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext) m_eglContext = eglCreateContext(ms_eglDisplay, m_eglConfig, m_eglShareContext, contextAttrs(format)); - if (m_eglContext == EGL_NO_CONTEXT) { + if (Q_UNLIKELY(m_eglContext == EGL_NO_CONTEXT)) { checkEGLError("eglCreateContext"); qFatal("QQnxGLContext: failed to create EGL context, err=%d", eglGetError()); } @@ -170,13 +176,13 @@ void QQnxGLContext::initializeContext() // Initialize connection to EGL ms_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); - if (ms_eglDisplay == EGL_NO_DISPLAY) { + if (Q_UNLIKELY(ms_eglDisplay == EGL_NO_DISPLAY)) { checkEGLError("eglGetDisplay"); qFatal("QQnxGLContext: failed to obtain EGL display"); } EGLBoolean eglResult = eglInitialize(ms_eglDisplay, 0, 0); - if (eglResult != EGL_TRUE) { + if (Q_UNLIKELY(eglResult != EGL_TRUE)) { checkEGLError("eglInitialize"); qFatal("QQnxGLContext: failed to initialize EGL display, err=%d", eglGetError()); } @@ -198,7 +204,7 @@ bool QQnxGLContext::makeCurrent(QPlatformSurface *surface) // Set current rendering API EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQnxGLContext: failed to set EGL API, err=%d", eglGetError()); QQnxEglWindow *platformWindow = dynamic_cast<QQnxEglWindow*>(surface); @@ -227,12 +233,12 @@ void QQnxGLContext::doneCurrent() // set current rendering API EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to set EGL API, err=%d", eglGetError()); // clear curent EGL context and unbind EGL surface eglResult = eglMakeCurrent(ms_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to clear current EGL context, err=%d", eglGetError()); } @@ -246,17 +252,17 @@ void QQnxGLContext::swapBuffers(QPlatformSurface *surface) platformWindow->swapEGLBuffers(); } -QFunctionPointer QQnxGLContext::getProcAddress(const QByteArray &procName) +QFunctionPointer QQnxGLContext::getProcAddress(const char *procName) { qGLContextDebug(); // Set current rendering API EGLBoolean eglResult = eglBindAPI(EGL_OPENGL_ES_API); - if (eglResult != EGL_TRUE) + if (Q_UNLIKELY(eglResult != EGL_TRUE)) qFatal("QQNX: failed to set EGL API, err=%d", eglGetError()); // Lookup EGL extension function pointer - return static_cast<QFunctionPointer>(eglGetProcAddress(procName.constData())); + return static_cast<QFunctionPointer>(eglGetProcAddress(procName)); } bool QQnxGLContext::isSharing() const diff --git a/src/plugins/platforms/qnx/qqnxglcontext.h b/src/plugins/platforms/qnx/qqnxglcontext.h index 70a5dce2e1..74cd3b4c48 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.h +++ b/src/plugins/platforms/qnx/qqnxglcontext.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -61,7 +67,7 @@ public: bool makeCurrent(QPlatformSurface *surface); void doneCurrent(); void swapBuffers(QPlatformSurface *surface); - QFunctionPointer getProcAddress(const QByteArray &procName); + QFunctionPointer getProcAddress(const char *procName); virtual QSurfaceFormat format() const { return m_windowFormat; } bool isSharing() const; diff --git a/src/plugins/platforms/qnx/qqnxglobal.cpp b/src/plugins/platforms/qnx/qqnxglobal.cpp index 01e7675839..6b3cc6bebf 100644 --- a/src/plugins/platforms/qnx/qqnxglobal.cpp +++ b/src/plugins/platforms/qnx/qqnxglobal.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -44,8 +50,8 @@ void qScreenCheckError(int rc, const char *funcInfo, const char *message, bool c rc = screen_flush_context(QQnxIntegration::screenContext(), 0); } - if (rc) { - if (critical) + if (Q_UNLIKELY(rc)) { + if (Q_UNLIKELY(critical)) qCritical("%s - Screen: %s - Error: %s (%i)", funcInfo, message, strerror(errno), errno); else qWarning("%s - Screen: %s - Error: %s (%i)", funcInfo, message, strerror(errno), errno); diff --git a/src/plugins/platforms/qnx/qqnxglobal.h b/src/plugins/platforms/qnx/qqnxglobal.h index 6c9a7be129..db11ffc228 100644 --- a/src/plugins/platforms/qnx/qqnxglobal.h +++ b/src/plugins/platforms/qnx/qqnxglobal.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp index 3af481b991..79ff74b113 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -379,7 +385,7 @@ static int32_t ic_perform_editor_action(input_session_t *ic, int32_t editor_acti Q_UNUSED(ic); Q_UNUSED(editor_action); - qCritical() << "ic_perform_editor_action not implemented"; + qCritical("ic_perform_editor_action not implemented"); return 0; } @@ -389,7 +395,7 @@ static int32_t ic_report_fullscreen_mode(input_session_t *ic, int32_t enabled) Q_UNUSED(ic); Q_UNUSED(enabled); - qCritical() << "ic_report_fullscreen_mode not implemented"; + qCritical("ic_report_fullscreen_mode not implemented"); return 0; } @@ -400,7 +406,7 @@ static extracted_text_t *ic_get_extracted_text(input_session_t *ic, extracted_te Q_UNUSED(request); Q_UNUSED(flags); - qCritical() << "ic_get_extracted_text not implemented"; + qCritical("ic_get_extracted_text not implemented"); return 0; } @@ -410,7 +416,7 @@ static spannable_string_t *ic_get_selected_text(input_session_t *ic, int32_t fla Q_UNUSED(ic); Q_UNUSED(flags); - qCritical() << "ic_get_selected_text not implemented"; + qCritical("ic_get_selected_text not implemented"); return 0; } @@ -420,7 +426,7 @@ static int32_t ic_get_cursor_caps_mode(input_session_t *ic, int32_t req_modes) Q_UNUSED(ic); Q_UNUSED(req_modes); - qCritical() << "ic_get_cursor_caps_mode not implemented"; + qCritical("ic_get_cursor_caps_mode not implemented"); return 0; } @@ -430,7 +436,7 @@ static int32_t ic_clear_meta_key_states(input_session_t *ic, int32_t states) Q_UNUSED(ic); Q_UNUSED(states); - qCritical() << "ic_clear_meta_key_states not implemented"; + qCritical("ic_clear_meta_key_states not implemented"); return 0; } @@ -441,7 +447,7 @@ static int32_t ic_set_selection(input_session_t *ic, int32_t start, int32_t end) Q_UNUSED(start); Q_UNUSED(end); - qCritical() << "ic_set_selection not implemented"; + qCritical("ic_set_selection not implemented"); return 0; } @@ -530,29 +536,28 @@ static bool imfAvailable() if ( p_imf_client_init == 0 ) { void *handle = dlopen("libinput_client.so.1", 0); - if ( handle ) { - p_imf_client_init = (int32_t (*)()) dlsym(handle, "imf_client_init"); - p_imf_client_disconnect = (void (*)()) dlsym(handle, "imf_client_disconnect"); - p_ictrl_open_session = (const input_session_t *(*)(connection_interface_t *))dlsym(handle, "ictrl_open_session"); - p_ictrl_close_session = (void (*)(input_session_t *))dlsym(handle, "ictrl_close_session"); - p_ictrl_dispatch_event = (int32_t (*)(event_t *))dlsym(handle, "ictrl_dispatch_event"); - p_vkb_init_selection_service = (int32_t (*)())dlsym(handle, "vkb_init_selection_service"); - p_ictrl_get_num_active_sessions = (int32_t (*)())dlsym(handle, "ictrl_get_num_active_sessions"); - } else { + if (Q_UNLIKELY(!handle)) { qCritical("libinput_client.so.1 is not present - IMF services are disabled."); s_imfDisabled = true; return false; } - - if ( p_imf_client_init && p_ictrl_open_session && p_ictrl_dispatch_event ) { - s_imfReady = true; - } else { + p_imf_client_init = (int32_t (*)()) dlsym(handle, "imf_client_init"); + p_imf_client_disconnect = (void (*)()) dlsym(handle, "imf_client_disconnect"); + p_ictrl_open_session = (const input_session_t *(*)(connection_interface_t *))dlsym(handle, "ictrl_open_session"); + p_ictrl_close_session = (void (*)(input_session_t *))dlsym(handle, "ictrl_close_session"); + p_ictrl_dispatch_event = (int32_t (*)(event_t *))dlsym(handle, "ictrl_dispatch_event"); + p_vkb_init_selection_service = (int32_t (*)())dlsym(handle, "vkb_init_selection_service"); + p_ictrl_get_num_active_sessions = (int32_t (*)())dlsym(handle, "ictrl_get_num_active_sessions"); + + if (Q_UNLIKELY(!p_imf_client_init || !p_ictrl_open_session || !p_ictrl_dispatch_event)) { p_ictrl_open_session = 0; p_ictrl_dispatch_event = 0; s_imfDisabled = true; qCritical("libinput_client.so.1 did not contain the correct symbols, library mismatch? IMF services are disabled."); return false; } + + s_imfReady = true; } return s_imfReady; @@ -581,7 +586,7 @@ QQnxInputContext::QQnxInputContext(QQnxIntegration *integration, QQnxAbstractVir Q_ASSERT(sInputContextInstance == 0); sInputContextInstance = this; - if (p_imf_client_init() != 0) { + if (Q_UNLIKELY(p_imf_client_init() != 0)) { s_imfInitFailed = true; qCritical("imf_client_init failed - IMF services will be unavailable"); } diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.h b/src/plugins/platforms/qnx/qqnxinputcontext_imf.h index 308800ec7c..c4c2057059 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.h +++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp index af280f5c6f..d57d0871a2 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.h b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.h index 72f9b41bc6..aab8dabedf 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.h +++ b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 6548c82310..3a0e97af6e 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -52,12 +58,7 @@ #include "qqnxeglwindow.h" #endif -#if defined(Q_OS_BLACKBERRY) -#include "qqnxbpseventfilter.h" -#include "qqnxnavigatorbps.h" -#include "qblackberrytheme.h" -#include "qqnxvirtualkeyboardbps.h" -#elif defined(QQNX_PPS) +#if defined(QQNX_PPS) #include "qqnxnavigatorpps.h" #include "qqnxnavigatoreventnotifier.h" #include "qqnxvirtualkeyboardpps.h" @@ -75,12 +76,7 @@ #endif #include "private/qgenericunixfontdatabase_p.h" - -#if defined(Q_OS_BLACKBERRY) -#include "qqnxeventdispatcher_blackberry.h" -#else #include "private/qgenericunixeventdispatcher_p.h" -#endif #include <qpa/qplatformwindow.h> #include <qpa/qwindowsysteminterface.h> @@ -120,16 +116,10 @@ static inline QQnxIntegration::Options parseOptions(const QStringList ¶mList options |= QQnxIntegration::AlwaysFlushScreenContext; } -// On Blackberry the first window is treated as a root window -#ifdef Q_OS_BLACKBERRY - if (!paramList.contains(QLatin1String("no-rootwindow"))) { - options |= QQnxIntegration::RootWindow; - } -#else if (paramList.contains(QLatin1String("rootwindow"))) { options |= QQnxIntegration::RootWindow; } -#endif + return options; } @@ -147,12 +137,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) #endif , m_services(0) , m_fontDatabase(new QGenericUnixFontDatabase()) -#if defined(Q_OS_BLACKBERRY) - , m_eventDispatcher(new QQnxEventDispatcherBlackberry()) - , m_bpsEventFilter(0) -#else , m_eventDispatcher(createUnixEventDispatcher()) -#endif , m_nativeInterface(new QQnxNativeInterface(this)) , m_screenEventHandler(new QQnxScreenEventHandler(this)) #if !defined(QT_NO_CLIPBOARD) @@ -169,8 +154,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT), "Failed to create screen context"); - // Not on BlackBerry, it has specialized event dispatcher which also handles navigator events -#if !defined(Q_OS_BLACKBERRY) && defined(QQNX_PPS) +#if defined(QQNX_PPS) // Create/start navigator event notifier m_navigatorEventNotifier = new QQnxNavigatorEventNotifier(m_navigatorEventHandler); @@ -190,8 +174,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) m_screenEventThread->start(); #endif - // Not on BlackBerry, it has specialized event dispatcher which also handles virtual keyboard events -#if !defined(Q_OS_BLACKBERRY) && defined(QQNX_PPS) +#if defined(QQNX_PPS) // Create/start the keyboard class. m_virtualKeyboard = new QQnxVirtualKeyboardPps(); @@ -200,9 +183,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) QMetaObject::invokeMethod(m_virtualKeyboard, "start", Qt::QueuedConnection); #endif -#if defined(Q_OS_BLACKBERRY) - m_navigator = new QQnxNavigatorBps(); -#elif defined(QQNX_PPS) +#if defined(QQNX_PPS) m_navigator = new QQnxNavigatorPps(); #endif @@ -210,34 +191,8 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) if (m_navigator) m_services = new QQnxServices(m_navigator); -#if defined(Q_OS_BLACKBERRY) - QQnxVirtualKeyboardBps* virtualKeyboardBps = new QQnxVirtualKeyboardBps; - -#if defined(QQNX_SCREENEVENTTHREAD) - m_bpsEventFilter = new QQnxBpsEventFilter(m_navigatorEventHandler, 0, virtualKeyboardBps); -#else - m_bpsEventFilter = new QQnxBpsEventFilter(m_navigatorEventHandler, m_screenEventHandler, virtualKeyboardBps); -#endif - - m_bpsEventFilter->installOnEventDispatcher(m_eventDispatcher); - - m_virtualKeyboard = virtualKeyboardBps; -#endif - - // Create displays for all possible screens (which may not be attached). We have to do this - // *after* the call to m_bpsEventFilter->installOnEventDispatcher(m_eventDispatcher). The - // reason for this is that we have to be registered for NAVIGATOR events before we create the - // QQnxScreen objects, and hence the QQnxRootWindow's. It is when the NAVIGATOR service sees - // the window creation that it starts sending us messages which results in a race if we - // create the displays first. createDisplays(); -#if !defined(QQNX_SCREENEVENTTHREAD) && defined(Q_OS_BLACKBERRY) - // Register for screen domain events with bps - Q_FOREACH (QQnxScreen *screen, m_screens) - m_bpsEventFilter->registerForScreenEvents(screen); -#endif - if (m_virtualKeyboard) { // TODO check if we need to do this for all screens or only the primary one QObject::connect(m_virtualKeyboard, SIGNAL(heightChanged(int)), @@ -275,7 +230,7 @@ QQnxIntegration::~QQnxIntegration() #endif // Stop/destroy navigator event notifier -#if !defined(Q_OS_BLACKBERRY) && defined(QQNX_PPS) +#if defined(QQNX_PPS) delete m_navigatorEventNotifier; #endif delete m_navigatorEventHandler; @@ -283,13 +238,6 @@ QQnxIntegration::~QQnxIntegration() #if defined(QQNX_SCREENEVENTTHREAD) // Stop/destroy screen event thread delete m_screenEventThread; -#elif defined(Q_OS_BLACKBERRY) - Q_FOREACH (QQnxScreen *screen, m_screens) - m_bpsEventFilter->unregisterForScreenEvents(screen); -#endif - -#if defined(Q_OS_BLACKBERRY) - delete m_bpsEventFilter; #endif // In case the event-dispatcher was never transferred to QCoreApplication @@ -450,21 +398,6 @@ QPlatformServices * QQnxIntegration::services() const return m_services; } -#if defined(Q_OS_BLACKBERRY) -QStringList QQnxIntegration::themeNames() const -{ - return QStringList(QBlackberryTheme::name()); -} - -QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const -{ - qIntegrationDebug() << "name =" << name; - if (name == QBlackberryTheme::name()) - return new QBlackberryTheme(this); - return 0; -} -#endif - QWindow *QQnxIntegration::window(screen_window_t qnxWindow) { qIntegrationDebug(); @@ -498,7 +431,7 @@ void QQnxIntegration::createDisplays() &displayCount); Q_SCREEN_CRITICALERROR(result, "Failed to query display count"); - if (displayCount < 1) { + if (Q_UNLIKELY(displayCount < 1)) { // Never happens, even if there's no display, libscreen returns 1 qFatal("QQnxIntegration: displayCount=%d", displayCount); } @@ -601,7 +534,7 @@ QQnxIntegration::Options QQnxIntegration::ms_options = 0; bool QQnxIntegration::supportsNavigatorEvents() const { - // If QQNX_PPS or Q_OS_BLACKBERRY is defined then we have navigator + // If QQNX_PPS is defined then we have navigator return m_navigator != 0; } diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h index 04250cdba0..f543b0d102 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.h +++ b/src/plugins/platforms/qnx/qqnxintegration.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -42,7 +48,6 @@ QT_BEGIN_NAMESPACE -class QQnxBpsEventFilter; #if defined(QQNX_SCREENEVENTTHREAD) class QQnxScreenEventThread; #endif @@ -117,12 +122,6 @@ public: QPlatformServices *services() const; -#if defined(Q_OS_BLACKBERRY) - QStringList themeNames() const; - QPlatformTheme *createPlatformTheme(const QString &name) const; - QQnxBpsEventFilter *bpsEventFilter() const { return m_bpsEventFilter; } -#endif - static QWindow *window(screen_window_t qnxWindow); QQnxScreen *screenForNative(screen_display_t qnxScreen) const; @@ -156,9 +155,6 @@ private: QQnxServices *m_services; QPlatformFontDatabase *m_fontDatabase; mutable QAbstractEventDispatcher *m_eventDispatcher; -#if defined(Q_OS_BLACKBERRY) - QQnxBpsEventFilter *m_bpsEventFilter; -#endif QQnxNativeInterface *m_nativeInterface; QList<QQnxScreen*> m_screens; QQnxScreenEventHandler *m_screenEventHandler; diff --git a/src/plugins/platforms/qnx/qqnxkeytranslator.h b/src/plugins/platforms/qnx/qqnxkeytranslator.h index 16828a9467..043e38fec9 100644 --- a/src/plugins/platforms/qnx/qqnxkeytranslator.h +++ b/src/plugins/platforms/qnx/qqnxkeytranslator.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxlgmon.cpp b/src/plugins/platforms/qnx/qqnxlgmon.cpp index 2e4622413b..e751953ec2 100644 --- a/src/plugins/platforms/qnx/qqnxlgmon.cpp +++ b/src/plugins/platforms/qnx/qqnxlgmon.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxlgmon.h b/src/plugins/platforms/qnx/qqnxlgmon.h index 4acedfa6d4..3502e9e7af 100644 --- a/src/plugins/platforms/qnx/qqnxlgmon.h +++ b/src/plugins/platforms/qnx/qqnxlgmon.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp index 549e0209bf..468fe9cd91 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -85,11 +91,6 @@ void *QQnxNativeInterface::nativeResourceForScreen(const QByteArray &resource, Q void *QQnxNativeInterface::nativeResourceForIntegration(const QByteArray &resource) { -#ifdef Q_OS_BLACKBERRY - if (resource == "navigatorEventHandler") - return m_integration->navigatorEventHandler(); -#endif - return 0; } diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.h b/src/plugins/platforms/qnx/qqnxnativeinterface.h index 434b46b242..26e34b9d54 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.h +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp deleted file mode 100644 index 0d730d6f57..0000000000 --- a/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxnavigatorbps.h" - -#include <QDebug> - -#include <bps/navigator.h> - -QT_BEGIN_NAMESPACE - -QQnxNavigatorBps::QQnxNavigatorBps(QObject *parent) - : QQnxAbstractNavigator(parent) -{ - bps_initialize(); -} - -QQnxNavigatorBps::~QQnxNavigatorBps() -{ - bps_shutdown(); -} - -bool QQnxNavigatorBps::requestInvokeUrl(const QByteArray &encodedUrl) -{ - char *error = 0; - - int ret = navigator_invoke(encodedUrl, &error); - if (error) { - qWarning() << "error=" << error; - bps_free(error); - } - - return (ret == BPS_SUCCESS); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxnavigatorbps.h b/src/plugins/platforms/qnx/qqnxnavigatorbps.h deleted file mode 100644 index b006695de6..0000000000 --- a/src/plugins/platforms/qnx/qqnxnavigatorbps.h +++ /dev/null @@ -1,54 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXNAVIGATORBPS_H -#define QQNXNAVIGATORBPS_H - -#include "qqnxabstractnavigator.h" - -QT_BEGIN_NAMESPACE - -class QQnxNavigatorBps : public QQnxAbstractNavigator -{ - Q_OBJECT -public: - explicit QQnxNavigatorBps(QObject *parent = 0); - ~QQnxNavigatorBps(); - -protected: - bool requestInvokeUrl(const QByteArray &encodedUrl); -}; - -QT_END_NAMESPACE - -#endif // QQNXNAVIGATORBPS_H diff --git a/src/plugins/platforms/qnx/qqnxnavigatorcover.cpp b/src/plugins/platforms/qnx/qqnxnavigatorcover.cpp deleted file mode 100644 index 6d30677b30..0000000000 --- a/src/plugins/platforms/qnx/qqnxnavigatorcover.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxnavigatorcover.h" - -QQnxNavigatorCover::QQnxNavigatorCover() -{ - navigator_window_cover_attribute_create(&m_coverAttribute); -} - -QQnxNavigatorCover::~QQnxNavigatorCover() -{ - if (m_coverAttribute) - navigator_window_cover_attribute_destroy(m_coverAttribute); - - navigator_window_cover_reset(); -} - -void QQnxNavigatorCover::updateCover() -{ - if (m_coverAttribute) { - navigator_window_cover_attribute_set_transition(m_coverAttribute, - NAVIGATOR_WINDOW_COVER_TRANSITION_NONE); - navigator_window_cover_attribute_set_alternate_window(m_coverAttribute); - navigator_window_cover_update(m_coverAttribute); - } -} diff --git a/src/plugins/platforms/qnx/qqnxnavigatorcover.h b/src/plugins/platforms/qnx/qqnxnavigatorcover.h deleted file mode 100644 index 5e9ed9f7bd..0000000000 --- a/src/plugins/platforms/qnx/qqnxnavigatorcover.h +++ /dev/null @@ -1,52 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXNAVIGATORCOVER_H -#define QQNXNAVIGATORCOVER_H - -#include "qqnxabstractcover.h" -#include <bps/navigator.h> - -class QQnxNavigatorCover : public QQnxAbstractCover -{ -public: - QQnxNavigatorCover(); - ~QQnxNavigatorCover(); - - void updateCover(); - -private: - navigator_window_cover_attribute_t *m_coverAttribute; -}; - -#endif // QQNXNAVIGATORCOVER_H diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp index 647c53e32c..4955938a3a 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h index 4db752323f..3e10052459 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp index 6199eb8e11..9ccda2d94a 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -102,7 +108,7 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray QList<QByteArray> lines = ppsData.split('\n'); // validate pps object - if (lines.size() == 0 || lines.at(0) != "@control") + if (Q_UNLIKELY(lines.empty() || lines.at(0) != "@control")) qFatal("QQNX: unrecognized pps object, data=%s", ppsData.constData()); // parse pps object attributes and extract values @@ -160,7 +166,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra // send pps message to navigator errno = 0; int bytes = write(m_fd, ppsData.constData(), ppsData.size()); - if (bytes == -1) + if (Q_UNLIKELY(bytes == -1)) qFatal("QQNX: failed to write navigator pps, errno=%d", errno); } @@ -198,7 +204,7 @@ void QQnxNavigatorEventNotifier::readData() // attempt to read pps data errno = 0; int bytes = qt_safe_read(m_fd, buffer, ppsBufferSize - 1); - if (bytes == -1) + if (Q_UNLIKELY(bytes == -1)) qFatal("QQNX: failed to read navigator pps, errno=%d", errno); // check if pps data was received diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h index 553b4ba36f..17c31c096c 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp index b139471669..fd1bbc4a85 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -100,7 +106,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra // send pps message to navigator errno = 0; int bytes = qt_safe_write(m_fd, ppsMessage.constData(), ppsMessage.size()); - if (bytes == -1) + if (Q_UNLIKELY(bytes == -1)) qFatal("QQNX: failed to write navigator pps, errno=%d", errno); // allocate buffer for pps data @@ -110,7 +116,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra do { errno = 0; bytes = qt_safe_read(m_fd, buffer, ppsBufferSize - 1); - if (bytes == -1) + if (Q_UNLIKELY(bytes == -1)) qFatal("QQNX: failed to read navigator pps, errno=%d", errno); } while (bytes == 0); @@ -125,7 +131,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra parsePPS(ppsData, responseFields); if (responseFields.contains("res") && responseFields.value("res") == message) { - if (responseFields.contains("err")) { + if (Q_UNLIKELY(responseFields.contains("err"))) { qCritical() << "navigator responded with error: " << responseFields.value("err"); return false; } @@ -142,7 +148,7 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash<QByteArray, QBy QList<QByteArray> lines = ppsData.split('\n'); // validate pps object - if (lines.size() == 0 || lines.at(0) != "@control") + if (Q_UNLIKELY(lines.empty() || lines.at(0) != "@control")) qFatal("QQNX: unrecognized pps object, data=%s", ppsData.constData()); // parse pps object attributes and extract values diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.h b/src/plugins/platforms/qnx/qqnxnavigatorpps.h index 510759ad23..08315f166f 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.h +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp index 8cf4961dff..c9a89def41 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.h b/src/plugins/platforms/qnx/qqnxrasterbackingstore.h index d29492a743..e4ac8f02b1 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.h +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp index 933fce0e33..0fe80d856d 100644 --- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 - 2014 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -61,7 +67,7 @@ QQnxRasterWindow::QQnxRasterWindow(QWindow *window, screen_context_t context, bo const int val = SCREEN_USAGE_NATIVE | SCREEN_USAGE_READ | SCREEN_USAGE_WRITE; const int result = screen_set_window_property_iv(nativeHandle(), SCREEN_PROPERTY_USAGE, &val); - if (result != 0) + if (Q_UNLIKELY(result != 0)) qFatal("QQnxRasterWindow: failed to set window alpha usage, errno=%d", errno); } diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.h b/src/plugins/platforms/qnx/qqnxrasterwindow.h index af83b8e7f1..53ab29e443 100644 --- a/src/plugins/platforms/qnx/qqnxrasterwindow.h +++ b/src/plugins/platforms/qnx/qqnxrasterwindow.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index c4125ef177..16ddcd784b 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -584,10 +590,6 @@ void QQnxScreen::addWindow(QQnxWindow *window) else m_childWindows.push_back(window); updateHierarchy(); - } else { -#if defined(Q_OS_BLACKBERRY) - m_coverWindow = window; -#endif } } diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h index 00176ac32c..3fa511e6df 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.h +++ b/src/plugins/platforms/qnx/qqnxscreen.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxscreeneventfilter.h b/src/plugins/platforms/qnx/qqnxscreeneventfilter.h index cb7bb32981..857865cc34 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventfilter.h +++ b/src/plugins/platforms/qnx/qqnxscreeneventfilter.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index 6c9532c428..599d43a8c8 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -254,13 +260,8 @@ void QQnxScreenEventHandler::handleKeyboardEvent(screen_event_t event) "Failed to query event cap"); int sequenceId = 0; -#if defined(Q_OS_BLACKBERRY) - Q_SCREEN_CHECKERROR( - screen_get_event_property_iv(event, SCREEN_PROPERTY_SEQUENCE_ID, &sequenceId), - "Failed to query event seqId"); -#endif - bool inject = true; + Q_FOREACH (QQnxScreenEventFilter *filter, m_eventFilters) { if (filter->handleKeyboardEvent(flags, sym, modifiers, scan, cap, sequenceId)) { inject = false; @@ -552,7 +553,7 @@ void QQnxScreenEventHandler::handleDisplayEvent(screen_event_t event) if (val[0] == 0 && val[1] == 0) //If screen size is invalid, wait for the next event return; - qScreenEventDebug() << "creating new QQnxScreen for newly attached display"; + qScreenEventDebug("creating new QQnxScreen for newly attached display"); m_qnxIntegration->createDisplay(nativeDisplay, false /* not primary, we assume */); } } else if (!isAttached) { @@ -565,7 +566,7 @@ void QQnxScreenEventHandler::handleDisplayEvent(screen_event_t event) if (!screen->isPrimaryScreen()) { // libscreen display is deactivated, let's remove the QQnxScreen / QScreen - qScreenEventDebug() << "removing display"; + qScreenEventDebug("removing display"); m_qnxIntegration->removeDisplay(screen); } } @@ -584,12 +585,12 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event) errno = 0; screen_window_t window = 0; - if (screen_get_event_property_pv(event, SCREEN_PROPERTY_WINDOW, (void**)&window) != 0) + if (Q_UNLIKELY(screen_get_event_property_pv(event, SCREEN_PROPERTY_WINDOW, (void**)&window) != 0)) qFatal("QQnx: failed to query window property, errno=%d", errno); errno = 0; int property; - if (screen_get_event_property_iv(event, SCREEN_PROPERTY_NAME, &property) != 0) + if (Q_UNLIKELY(screen_get_event_property_iv(event, SCREEN_PROPERTY_NAME, &property) != 0)) qFatal("QQnx: failed to query window property, errno=%d", errno); switch (property) { @@ -606,7 +607,7 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi { errno = 0; int focus = 0; - if (window && screen_get_window_property_iv(window, SCREEN_PROPERTY_KEYBOARD_FOCUS, &focus) != 0) + if (Q_UNLIKELY(window && screen_get_window_property_iv(window, SCREEN_PROPERTY_KEYBOARD_FOCUS, &focus) != 0)) qFatal("QQnx: failed to query keyboard focus property, errno=%d", errno); QWindow *focusWindow = QQnxIntegration::window(window); diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h index c5a3755ed3..6b234e8d8f 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp index a7d5c4d4bc..c56d9a8da4 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.h b/src/plugins/platforms/qnx/qqnxscreeneventthread.h index db7d5b7f4a..b672fcf991 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventthread.h +++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxservices.cpp b/src/plugins/platforms/qnx/qqnxservices.cpp index a596b3d426..76c4ac34f9 100644 --- a/src/plugins/platforms/qnx/qqnxservices.cpp +++ b/src/plugins/platforms/qnx/qqnxservices.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxservices.h b/src/plugins/platforms/qnx/qqnxservices.h index d285a8f8ff..94dd5dc0b4 100644 --- a/src/plugins/platforms/qnx/qqnxservices.h +++ b/src/plugins/platforms/qnx/qqnxservices.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxsystemsettings.cpp b/src/plugins/platforms/qnx/qqnxsystemsettings.cpp deleted file mode 100644 index 243630ec85..0000000000 --- a/src/plugins/platforms/qnx/qqnxsystemsettings.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxsystemsettings.h" - -#include <QFont> -#include <qpa/qplatformfontdatabase.h> - -QT_BEGIN_NAMESPACE - -QHash<QPlatformTheme::Font, QFont *> qt_qnx_createRoleFonts(QPlatformFontDatabase *fontDatabase) -{ - // See http://docs.blackberry.com/en/developers/deliverables/41577/typography.jsp - // which recommends using - // - small font size of 6 points - // - normal font size of 8 points - // - 11 points for titles (not covered by the theme system). - QFont baseFont = fontDatabase->defaultFont(); - baseFont.setPointSize(8); - - QHash<QPlatformTheme::Font, QFont *> fonts; - fonts.insert(QPlatformTheme::SystemFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::PushButtonFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::ListViewFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::ListBoxFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::TitleBarFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::MenuFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::ComboMenuItemFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::HeaderViewFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::TipLabelFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::LabelFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::ToolButtonFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::MenuItemFont, new QFont(baseFont)); - fonts.insert(QPlatformTheme::ComboLineEditFont, new QFont(baseFont)); - - QFont smallFont(baseFont); - smallFont.setPointSize(6); - fonts.insert(QPlatformTheme::SmallFont, new QFont(smallFont)); - fonts.insert(QPlatformTheme::MiniFont, new QFont(smallFont)); - - return fonts; -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxsystemsettings.h b/src/plugins/platforms/qnx/qqnxsystemsettings.h deleted file mode 100644 index 6a99d5a70c..0000000000 --- a/src/plugins/platforms/qnx/qqnxsystemsettings.h +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXSYSTEMSETTINGS_H -#define QQNXSYSTEMSETTINGS_H - -#include <QtCore/qhash.h> -#include <qpa/qplatformtheme.h> - -QT_BEGIN_NAMESPACE - -class QPlatformFontDatabase; - -QHash<QPlatformTheme::Font, QFont *> qt_qnx_createRoleFonts(QPlatformFontDatabase *fontDatabase); - -QT_END_NAMESPACE - -#endif // QQNXSYSTEMSETTINGS_H diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp deleted file mode 100644 index b55ae842ed..0000000000 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqnxvirtualkeyboardbps.h" - -#include <QDebug> - -#include <bps/event.h> -#include <bps/locale.h> -#include <bps/virtualkeyboard.h> -#if defined(Q_OS_BLACKBERRY) -#include <bbndk.h> -#endif - -#if defined(QQNXVIRTUALKEYBOARD_DEBUG) -#define qVirtualKeyboardDebug qDebug -#else -#define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO -#endif - -QT_BEGIN_NAMESPACE - -QQnxVirtualKeyboardBps::QQnxVirtualKeyboardBps(QObject *parent) - : QQnxAbstractVirtualKeyboard(parent) -{ - if (locale_request_events(0) != BPS_SUCCESS) - qWarning("QQNX: Failed to register for locale events"); - - if (virtualkeyboard_request_events(0) != BPS_SUCCESS) - qWarning("QQNX: Failed to register for virtual keyboard events"); - - int height = 0; - if (virtualkeyboard_get_height(&height) != BPS_SUCCESS) - qWarning("QQNX: Failed to get virtual keyboard height"); - - setHeight(height); -} - -bool QQnxVirtualKeyboardBps::handleEvent(bps_event_t *event) -{ - const int eventDomain = bps_event_get_domain(event); - if (eventDomain == locale_get_domain()) - return handleLocaleEvent(event); - - if (eventDomain == virtualkeyboard_get_domain()) - return handleVirtualKeyboardEvent(event); - - return false; -} - -bool QQnxVirtualKeyboardBps::showKeyboard() -{ - qVirtualKeyboardDebug() << "current visibility=" << isVisible(); - - // They keyboard's mode is global between applications, we have to set it each time - if ( !isVisible() ) - applyKeyboardOptions(); - - virtualkeyboard_show(); - return true; -} - -bool QQnxVirtualKeyboardBps::hideKeyboard() -{ - qVirtualKeyboardDebug() << "current visibility=" << isVisible(); - virtualkeyboard_hide(); - return true; -} - -void QQnxVirtualKeyboardBps::applyKeyboardOptions() -{ - virtualkeyboard_layout_t layout = keyboardLayout(); - virtualkeyboard_enter_t enter = enterKey(); - - qVirtualKeyboardDebug() << "mode=" << keyboardMode() << "enterKey=" << enterKeyType(); - - virtualkeyboard_change_options(layout, enter); -} - -virtualkeyboard_layout_t QQnxVirtualKeyboardBps::keyboardLayout() const -{ - switch (keyboardMode()) { - case Url: - return VIRTUALKEYBOARD_LAYOUT_URL; - case Email: - return VIRTUALKEYBOARD_LAYOUT_EMAIL; - case Web: - return VIRTUALKEYBOARD_LAYOUT_WEB; - case NumPunc: - return VIRTUALKEYBOARD_LAYOUT_NUM_PUNC; - case Number: - return VIRTUALKEYBOARD_LAYOUT_NUMBER; - case Symbol: - return VIRTUALKEYBOARD_LAYOUT_SYMBOL; - case Phone: - return VIRTUALKEYBOARD_LAYOUT_PHONE; - case Pin: - return VIRTUALKEYBOARD_LAYOUT_PIN; - case Password: - return VIRTUALKEYBOARD_LAYOUT_PASSWORD; -#if defined(Q_OS_BLACKBERRY) -#if BBNDK_VERSION_AT_LEAST(10, 2, 1) - case Alphanumeric: - return VIRTUALKEYBOARD_LAYOUT_ALPHANUMERIC; -#endif -#endif - case Default: // fall through - default: - return VIRTUALKEYBOARD_LAYOUT_DEFAULT; - } - - return VIRTUALKEYBOARD_LAYOUT_DEFAULT; -} - -virtualkeyboard_enter_t QQnxVirtualKeyboardBps::enterKey() const -{ - switch (enterKeyType()) { - case Connect: - return VIRTUALKEYBOARD_ENTER_CONNECT; - case Done: - return VIRTUALKEYBOARD_ENTER_DONE; - case Go: - return VIRTUALKEYBOARD_ENTER_GO; - case Join: - return VIRTUALKEYBOARD_ENTER_JOIN; - case Next: - return VIRTUALKEYBOARD_ENTER_NEXT; - case Search: - return VIRTUALKEYBOARD_ENTER_SEARCH; - case Send: - return VIRTUALKEYBOARD_ENTER_SEND; - case Submit: - return VIRTUALKEYBOARD_ENTER_SUBMIT; - case Default: // fall through - default: - return VIRTUALKEYBOARD_ENTER_DEFAULT; - } - - return VIRTUALKEYBOARD_ENTER_DEFAULT; -} - -bool QQnxVirtualKeyboardBps::handleLocaleEvent(bps_event_t *event) -{ - if (bps_event_get_code(event) == LOCALE_INFO) { - const QString language = QString::fromLatin1(locale_event_get_language(event)); - const QString country = QString::fromLatin1(locale_event_get_country(event)); - const QLocale newLocale(language + QLatin1Char('_') + country); - - qVirtualKeyboardDebug() << "current locale" << locale() << "new locale=" << newLocale; - setLocale(newLocale); - return true; - } - - qVirtualKeyboardDebug() << "Unhandled locale event. code=" << bps_event_get_code(event); - - return false; -} - -bool QQnxVirtualKeyboardBps::handleVirtualKeyboardEvent(bps_event_t *event) -{ - switch (bps_event_get_code(event)) { - case VIRTUALKEYBOARD_EVENT_VISIBLE: - qVirtualKeyboardDebug() << "EVENT VISIBLE: current visibility=" << isVisible(); - setVisible(true); - break; - - case VIRTUALKEYBOARD_EVENT_HIDDEN: - qVirtualKeyboardDebug() << "EVENT HIDDEN: current visibility=" << isVisible(); - setVisible(false); - break; - - case VIRTUALKEYBOARD_EVENT_INFO: { - const int newHeight = virtualkeyboard_event_get_height(event); - qVirtualKeyboardDebug() << "EVENT INFO: current height=" << height() << "new height=" << newHeight; - setHeight(newHeight); - break; - } - - default: - qVirtualKeyboardDebug() << "Unhandled virtual keyboard event. code=" << bps_event_get_code(event); - return false; - } - - return true; -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.h b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.h deleted file mode 100644 index a720c5d894..0000000000 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.h +++ /dev/null @@ -1,68 +0,0 @@ -/*************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQNXVIRTUALKEYBOARDBPS_H -#define QQNXVIRTUALKEYBOARDBPS_H - -#include "qqnxabstractvirtualkeyboard.h" -#include <bps/virtualkeyboard.h> - -struct bps_event_t; - -QT_BEGIN_NAMESPACE - -class QQnxVirtualKeyboardBps : public QQnxAbstractVirtualKeyboard -{ - Q_OBJECT -public: - explicit QQnxVirtualKeyboardBps(QObject *parent = 0); - - bool handleEvent(bps_event_t *event); - - bool showKeyboard(); - bool hideKeyboard(); - -protected: - void applyKeyboardOptions(); - -private: - bool handleLocaleEvent(bps_event_t *event); - bool handleVirtualKeyboardEvent(bps_event_t *event); - - virtualkeyboard_layout_t keyboardLayout() const; - virtualkeyboard_enter_t enterKey() const; -}; - -QT_END_NAMESPACE - -#endif // QQNXVIRTUALKEYBOARDBPS_H diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp index d5a9a49ac6..1174dc6ab3 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -127,7 +133,7 @@ bool QQnxVirtualKeyboardPps::connect() } m_buffer = new char[ms_bufferSize]; - if (!m_buffer) { + if (Q_UNLIKELY(!m_buffer)) { qCritical("QQnxVirtualKeyboard: Unable to allocate buffer of %d bytes. " "Size is unavailable.", ms_bufferSize); return false; @@ -170,7 +176,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady() return; // nread is the real space necessary, not the amount read. - if (static_cast<size_t>(nread) > ms_bufferSize - 1) { + if (Q_UNLIKELY(static_cast<size_t>(nread) > ms_bufferSize - 1)) { qCritical("QQnxVirtualKeyboard: Keyboard buffer size too short; need %u.", nread + 1); connect(); // reconnect return; @@ -184,7 +190,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady() #endif const char *value; - if (pps_decoder_get_string(m_decoder, "error", &value) == PPS_DECODER_OK) { + if (Q_UNLIKELY(pps_decoder_get_string(m_decoder, "error", &value) == PPS_DECODER_OK)) { qCritical("QQnxVirtualKeyboard: Keyboard PPS decoder error: %s", value ? value : "[null]"); return; } @@ -214,11 +220,11 @@ void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage() { int newHeight = 0; - if (pps_decoder_push(m_decoder, "dat") != PPS_DECODER_OK) { + if (Q_UNLIKELY(pps_decoder_push(m_decoder, "dat") != PPS_DECODER_OK)) { qCritical("QQnxVirtualKeyboard: Keyboard PPS dat object not found"); return; } - if (pps_decoder_get_int(m_decoder, "size", &newHeight) != PPS_DECODER_OK) { + if (Q_UNLIKELY(pps_decoder_get_int(m_decoder, "size", &newHeight) != PPS_DECODER_OK)) { qCritical("QQnxVirtualKeyboard: Keyboard PPS size field not found"); return; } diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h index 6bde4c7354..8580ee151b 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2012 Research In Motion -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 4dc1248bd1..e04f16db92 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -47,12 +53,6 @@ #include <QtCore/QDebug> -#if defined(Q_OS_BLACKBERRY) -#include "qqnxnavigatorcover.h" -#include <sys/pps.h> -#include <bps/navigator.h> -#endif - #include <errno.h> #if defined(QQNXWINDOW_DEBUG) @@ -378,7 +378,7 @@ void QQnxWindow::setBufferSize(const QSize &size) screen_get_window_property_iv(m_window, SCREEN_PROPERTY_RENDER_BUFFER_COUNT, &bufferCount), "Failed to query render buffer count"); - if (bufferCount != MAX_BUFFER_COUNT) { + if (Q_UNLIKELY(bufferCount != MAX_BUFFER_COUNT)) { qFatal("QQnxWindow: invalid buffer count. Expected = %d, got = %d.", MAX_BUFFER_COUNT, bufferCount); } @@ -456,10 +456,10 @@ void QQnxWindow::removeFromParent() qWindowDebug() << "window =" << window(); // Remove from old Hierarchy position if (m_parentWindow) { - if (m_parentWindow->m_childWindows.removeAll(this)) - m_parentWindow = 0; - else + if (Q_UNLIKELY(!m_parentWindow->m_childWindows.removeAll(this))) qFatal("QQnxWindow: Window Hierarchy broken; window has parent, but parent hasn't got child."); + else + m_parentWindow = 0; } else if (m_screen) { m_screen->removeWindow(this); } @@ -475,7 +475,7 @@ void QQnxWindow::setParent(const QPlatformWindow *window) return; if (screen()->rootWindow() == this) { - qWarning() << "Application window cannot be reparented"; + qWarning("Application window cannot be reparented"); return; } @@ -633,23 +633,7 @@ QQnxWindow *QQnxWindow::findWindow(screen_window_t windowHandle) void QQnxWindow::minimize() { -#if defined(Q_OS_BLACKBERRY) - qWindowDebug(); - - pps_encoder_t encoder; - - pps_encoder_initialize(&encoder, false); - pps_encoder_add_string(&encoder, "msg", "minimizeWindow"); - - if (navigator_raw_write(pps_encoder_buffer(&encoder), - pps_encoder_length(&encoder)) != BPS_SUCCESS) { - qWindowDebug() << "navigator_raw_write failed:" << strerror(errno); - } - - pps_encoder_cleanup(&encoder); -#else qWarning("Qt::WindowMinimized is not supported by this OS version"); -#endif } void QQnxWindow::setRotation(int rotation) @@ -686,18 +670,8 @@ void QQnxWindow::initWindow() QQnxScreen *platformScreen = static_cast<QQnxScreen *>(window()->screen()->handle()); setScreen(platformScreen); - if (window()->type() == Qt::CoverWindow) { -#if defined(Q_OS_BLACKBERRY) - if (platformScreen->rootWindow()) { - screen_set_window_property_pv(m_screen->rootWindow()->nativeHandle(), - SCREEN_PROPERTY_ALTERNATE_WINDOW, (void**)&m_window); - m_cover.reset(new QQnxNavigatorCover); - } else { - qWarning("No root window for cover window"); - } -#endif + if (window()->type() == Qt::CoverWindow) m_exposed = false; - } // Add window to plugin's window mapper QQnxIntegration::addWindow(m_window, window()); diff --git a/src/plugins/platforms/qnx/qqnxwindow.h b/src/plugins/platforms/qnx/qqnxwindow.h index e7ca881499..2e636c7e3e 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.h +++ b/src/plugins/platforms/qnx/qqnxwindow.h @@ -1,31 +1,37 @@ /*************************************************************************** ** ** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved. -** Contact: http://www.qt.io/licensing/ +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** |