QtMultimedia: Remove qpa-sections from .profiles.
Prepare for removal of the -qpa configure option. Change-Id: Ibf4be58231d29cd972eb765f32b410e1eb9d7fed Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
18dc690a19
commit
6703ebf362
@@ -14,9 +14,6 @@ unix:!mac {
|
||||
PRIVATE_HEADERS += effects/qsoundeffect_qmedia_p.h
|
||||
SOURCES += effects/qsoundeffect_qmedia_p.cpp
|
||||
}
|
||||
} else:!qpa {
|
||||
PRIVATE_HEADERS += effects/qsoundeffect_qsound_p.h
|
||||
SOURCES += effects/qsoundeffect_qsound_p.cpp
|
||||
} else {
|
||||
DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
|
||||
PRIVATE_HEADERS += effects/qsoundeffect_qmedia_p.h
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
#include "qsoundeffect_pulse_p.h"
|
||||
#elif(QT_MULTIMEDIA_QMEDIAPLAYER)
|
||||
#include "qsoundeffect_qmedia_p.h"
|
||||
#else
|
||||
#include "qsoundeffect_qsound_p.h"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU Lesser
|
||||
** General Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License version 3.0 as published by the Free Software Foundation
|
||||
** and appearing in the file LICENSE.GPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU General
|
||||
** Public License version 3.0 requirements will be met:
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// INTERNAL USE ONLY: Do NOT use for any other purpose.
|
||||
//
|
||||
|
||||
#include "qsoundeffect_qsound_p.h"
|
||||
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtWidgets/qsound.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
|
||||
QObject(parent),
|
||||
m_playing(false),
|
||||
m_timerID(0),
|
||||
m_muted(false),
|
||||
m_loopCount(1),
|
||||
m_volume(100),
|
||||
m_status(QSoundEffect::Null),
|
||||
m_sound(0)
|
||||
{
|
||||
if (!QSound::isAvailable())
|
||||
qWarning("SoundEffect(qsound) : not available");
|
||||
}
|
||||
|
||||
QSoundEffectPrivate::~QSoundEffectPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
QStringList QSoundEffectPrivate::supportedMimeTypes()
|
||||
{
|
||||
QStringList supportedTypes;
|
||||
supportedTypes << QLatin1String("audio/x-wav") << QLatin1String("audio/vnd.wave") ;
|
||||
return supportedTypes;
|
||||
}
|
||||
|
||||
QUrl QSoundEffectPrivate::source() const
|
||||
{
|
||||
return m_source;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::setSource(const QUrl &url)
|
||||
{
|
||||
if (url.isEmpty()) {
|
||||
m_source = QUrl();
|
||||
setStatus(QSoundEffect::Null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.scheme() != QLatin1String("file")) {
|
||||
m_source = url;
|
||||
setStatus(QSoundEffect::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_sound != 0)
|
||||
delete m_sound;
|
||||
|
||||
m_source = url;
|
||||
m_sound = new QSound(m_source.toLocalFile(), this);
|
||||
m_sound->setLoops(m_loopCount);
|
||||
m_status = QSoundEffect::Ready;
|
||||
emit statusChanged();
|
||||
emit loadedChanged();
|
||||
}
|
||||
|
||||
int QSoundEffectPrivate::loopCount() const
|
||||
{
|
||||
return m_loopCount;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::setLoopCount(int lc)
|
||||
{
|
||||
m_loopCount = lc;
|
||||
if (m_sound)
|
||||
m_sound->setLoops(lc);
|
||||
}
|
||||
|
||||
int QSoundEffectPrivate::volume() const
|
||||
{
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::setVolume(int v)
|
||||
{
|
||||
m_volume = v;
|
||||
}
|
||||
|
||||
bool QSoundEffectPrivate::isMuted() const
|
||||
{
|
||||
return m_muted;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::setMuted(bool muted)
|
||||
{
|
||||
m_muted = muted;
|
||||
}
|
||||
|
||||
bool QSoundEffectPrivate::isLoaded() const
|
||||
{
|
||||
return m_status == QSoundEffect::Ready;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::play()
|
||||
{
|
||||
if (m_status == QSoundEffect::Null || m_status == QSoundEffect::Error)
|
||||
return;
|
||||
if (m_timerID != 0)
|
||||
killTimer(m_timerID);
|
||||
m_timerID = startTimer(500);
|
||||
m_sound->play();
|
||||
setPlaying(true);
|
||||
}
|
||||
|
||||
|
||||
void QSoundEffectPrivate::stop()
|
||||
{
|
||||
if (m_timerID != 0)
|
||||
killTimer(m_timerID);
|
||||
m_timerID = 0;
|
||||
m_sound->stop();
|
||||
setPlaying(false);
|
||||
}
|
||||
|
||||
bool QSoundEffectPrivate::isPlaying()
|
||||
{
|
||||
if (m_playing && m_sound && m_sound->isFinished()) {
|
||||
if (m_timerID != 0)
|
||||
killTimer(m_timerID);
|
||||
m_timerID = 0;
|
||||
setPlaying(false);
|
||||
}
|
||||
return m_playing;
|
||||
}
|
||||
|
||||
QSoundEffect::Status QSoundEffectPrivate::status() const
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
setPlaying(!m_sound->isFinished());
|
||||
if (isPlaying())
|
||||
return;
|
||||
killTimer(m_timerID);
|
||||
m_timerID = 0;
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::setStatus(QSoundEffect::Status status)
|
||||
{
|
||||
if (m_status == status)
|
||||
return;
|
||||
bool oldLoaded = isLoaded();
|
||||
m_status = status;
|
||||
emit statusChanged();
|
||||
if (oldLoaded != isLoaded())
|
||||
emit loadedChanged();
|
||||
}
|
||||
|
||||
void QSoundEffectPrivate::setPlaying(bool playing)
|
||||
{
|
||||
if (m_playing == playing)
|
||||
return;
|
||||
m_playing = playing;
|
||||
emit playingChanged();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qsoundeffect_qsound_p.cpp"
|
||||
@@ -1,121 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU Lesser
|
||||
** General Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License version 3.0 as published by the Free Software Foundation
|
||||
** and appearing in the file LICENSE.GPL included in the packaging of this
|
||||
** file. Please review the following information to ensure the GNU General
|
||||
** Public License version 3.0 requirements will be met:
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QSOUNDEFFECT_QSOUND_H
|
||||
#define QSOUNDEFFECT_QSOUND_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtCore/qurl.h>
|
||||
#include "qsoundeffect.h"
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_MODULE(Multimedia)
|
||||
|
||||
|
||||
class QSound;
|
||||
|
||||
class QSoundEffectPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QSoundEffectPrivate(QObject* parent);
|
||||
~QSoundEffectPrivate();
|
||||
|
||||
static QStringList supportedMimeTypes();
|
||||
|
||||
QUrl source() const;
|
||||
void setSource(const QUrl &url);
|
||||
int loopCount() const;
|
||||
void setLoopCount(int loopCount);
|
||||
int volume() const;
|
||||
void setVolume(int volume);
|
||||
bool isMuted() const;
|
||||
void setMuted(bool muted);
|
||||
bool isLoaded() const;
|
||||
bool isPlaying();
|
||||
QSoundEffect::Status status() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void play();
|
||||
void stop();
|
||||
|
||||
Q_SIGNALS:
|
||||
void volumeChanged();
|
||||
void mutedChanged();
|
||||
void loadedChanged();
|
||||
void playingChanged();
|
||||
void statusChanged();
|
||||
|
||||
private:
|
||||
void setStatus(QSoundEffect::Status status);
|
||||
void setPlaying(bool playing);
|
||||
void timerEvent(QTimerEvent *event);
|
||||
|
||||
bool m_playing;
|
||||
int m_timerID;
|
||||
bool m_muted;
|
||||
int m_loopCount;
|
||||
int m_volume;
|
||||
QSoundEffect::Status m_status;
|
||||
QSound *m_sound;
|
||||
QUrl m_source;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QSOUNDEFFECT_QSOUND_H
|
||||
@@ -153,7 +153,7 @@ include(audio/audio.pri)
|
||||
include(video/video.pri)
|
||||
include(effects/effects.pri)
|
||||
|
||||
mac:!qpa {
|
||||
mac {
|
||||
LIBS += -framework AppKit -framework QuartzCore -framework QTKit
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ load(qt_module)
|
||||
# distinct from QtMultimedia
|
||||
TARGET = QtMultimediaWidgets
|
||||
QPRO_PWD = $$PWD
|
||||
QT = core gui multimedia-private widgets
|
||||
QT = core gui multimedia-private widgets-private
|
||||
|
||||
CONFIG += module no_private_qt_headers_warning
|
||||
MODULE_PRI += ../../modules/qt_multimediawidgets.pri
|
||||
@@ -39,11 +39,12 @@ SOURCES += \
|
||||
qvideowidget.cpp \
|
||||
qvideowindowcontrol.cpp \
|
||||
|
||||
mac:!qpa {
|
||||
!simulator {
|
||||
mac {
|
||||
# QtWidgets is not yet supported on Mac (!).
|
||||
false:!simulator {
|
||||
PRIVATE_HEADERS += qpaintervideosurface_mac_p.h
|
||||
OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm
|
||||
}
|
||||
}
|
||||
LIBS += -framework AppKit -framework QuartzCore -framework QTKit
|
||||
}
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ CONFIG += no_private_qt_headers_warning
|
||||
SOURCES += tst_qgraphicsvideoitem.cpp
|
||||
|
||||
# QPA minimal crashes with this test in QBackingStore
|
||||
qpa:CONFIG += insignificant_test
|
||||
CONFIG += insignificant_test
|
||||
QT+=widgets
|
||||
|
||||
@@ -14,5 +14,5 @@ contains(QT_CONFIG, opengl): QT += opengl
|
||||
SOURCES += tst_qpaintervideosurface.cpp
|
||||
|
||||
# QPA-minimal and OpenGL don't get along
|
||||
qpa:CONFIG += insignificant_test
|
||||
CONFIG += insignificant_test
|
||||
QT+=widgets
|
||||
|
||||
@@ -7,5 +7,5 @@ CONFIG += no_private_qt_headers_warning
|
||||
SOURCES += tst_qvideowidget.cpp
|
||||
|
||||
# QPA seems to break some assumptions
|
||||
qpa:CONFIG += insignificant_test
|
||||
CONFIG += insignificant_test
|
||||
QT+=widgets
|
||||
|
||||
Reference in New Issue
Block a user