summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/multimedia/effects/effects.pri3
-rw-r--r--src/multimedia/effects/qsoundeffect.cpp2
-rw-r--r--src/multimedia/effects/qsoundeffect_qsound_p.cpp222
-rw-r--r--src/multimedia/effects/qsoundeffect_qsound_p.h121
-rw-r--r--src/multimedia/multimedia.pro2
-rw-r--r--src/multimediawidgets/multimediawidgets.pro15
-rw-r--r--tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro2
-rw-r--r--tests/auto/qpaintervideosurface/qpaintervideosurface.pro2
-rw-r--r--tests/auto/qvideowidget/qvideowidget.pro2
9 files changed, 12 insertions, 359 deletions
diff --git a/src/multimedia/effects/effects.pri b/src/multimedia/effects/effects.pri
index 9b8fbede5..f83f7296f 100644
--- a/src/multimedia/effects/effects.pri
+++ b/src/multimedia/effects/effects.pri
@@ -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
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp
index e95909587..7cfcdce70 100644
--- a/src/multimedia/effects/qsoundeffect.cpp
+++ b/src/multimedia/effects/qsoundeffect.cpp
@@ -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
diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.cpp b/src/multimedia/effects/qsoundeffect_qsound_p.cpp
deleted file mode 100644
index 0b9082eb5..000000000
--- a/src/multimedia/effects/qsoundeffect_qsound_p.cpp
+++ /dev/null
@@ -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"
diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.h b/src/multimedia/effects/qsoundeffect_qsound_p.h
deleted file mode 100644
index e867bf477..000000000
--- a/src/multimedia/effects/qsoundeffect_qsound_p.h
+++ /dev/null
@@ -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
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index f1c11b998..a603049cd 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -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
}
diff --git a/src/multimediawidgets/multimediawidgets.pro b/src/multimediawidgets/multimediawidgets.pro
index 9251f2f71..d107b842b 100644
--- a/src/multimediawidgets/multimediawidgets.pro
+++ b/src/multimediawidgets/multimediawidgets.pro
@@ -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,12 +39,13 @@ SOURCES += \
qvideowidget.cpp \
qvideowindowcontrol.cpp \
-mac:!qpa {
-!simulator {
- PRIVATE_HEADERS += qpaintervideosurface_mac_p.h
- OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm
-}
- LIBS += -framework AppKit -framework QuartzCore -framework QTKit
+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
}
maemo6 {
diff --git a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
index d3514cf7e..eac437632 100644
--- a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
+++ b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
@@ -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
diff --git a/tests/auto/qpaintervideosurface/qpaintervideosurface.pro b/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
index d56a384d2..edf9c8975 100644
--- a/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
+++ b/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
@@ -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
diff --git a/tests/auto/qvideowidget/qvideowidget.pro b/tests/auto/qvideowidget/qvideowidget.pro
index 4e44a1d31..d0ea9fa7c 100644
--- a/tests/auto/qvideowidget/qvideowidget.pro
+++ b/tests/auto/qvideowidget/qvideowidget.pro
@@ -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