diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-22 04:25:36 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-22 04:25:36 (GMT) |
commit | 2c9417fadf4205c4fcb602ca17b4d729c5466020 (patch) | |
tree | b4f6d65c9ef83ba99829174148ab51ddd4cb1912 /src/multimedia/qml | |
parent | 155ae1da9dcf11617f412e5c229a2a12a333d7db (diff) | |
parent | fe1a44a850e61d8b64626424b45ef7592ec66589 (diff) | |
download | Qt-2c9417fadf4205c4fcb602ca17b4d729c5466020.zip Qt-2c9417fadf4205c4fcb602ca17b4d729c5466020.tar.gz Qt-2c9417fadf4205c4fcb602ca17b4d729c5466020.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (22 commits)
Fix compilation on HP-UXi: m_volume is a #define
WinCE doesn't have sys/types.h
Fix compilation: qmlviewer cannot use symbols exported with Q_AUTOTEST_EXPORT in production builds
Fix compilation on recent Linux systems: getpid(2) is in unistd.h.
Cocoa: calling QEventLoop::exec from mouse up causes problem
Fix compilation on GNU/Hurd (SA_SIGINFO isn't defined)
Doc: Collected the Declarative UI tutorials together and renamed them.
Doc: Simplified Commercial Editions for Qt 4.7.
Work around MSVC2008 compiler crash
doc: Added "\since 4.7" to a bunch of declarative stuff.
Cocoa: event dispatcher eats mouse events
Fix an issue about double-click on Mac OS X.
qdoc: Finished "Inherited by" list for QML elements.
Avoid calling out to public API in the QtScript implementation
Move property helper functions to QScriptEnginePrivate
Move more script value conversion code to helper functions
Cleanup: Move value conversion code to helper functions
Move implementation of QScriptValue construction functions to private class
Cleanup: Move number conversion functions to QScriptEnginePrivate
Move some helper function declarations outside QT_NO_QOBJECT guard
...
Diffstat (limited to 'src/multimedia/qml')
-rw-r--r-- | src/multimedia/qml/qsoundeffect.cpp | 10 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_pulse_p.cpp | 18 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_pulse_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_qmedia_p.cpp | 8 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_qmedia_p.h | 2 |
6 files changed, 22 insertions, 20 deletions
diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp index 1a67414..1f2c801 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -139,7 +139,7 @@ QSoundEffect::QSoundEffect(QObject *parent) : QObject(parent), m_loopCount(1), - m_volume(100), + m_vol(100), m_muted(false), m_runningCount(0) { @@ -165,7 +165,7 @@ void QSoundEffect::setSource(const QUrl &url) if (d != 0 && d->media().canonicalUrl() == url) return; - d->setVolume(m_volume); + d->setVolume(m_vol); d->setMuted(m_muted); d->setMedia(url); @@ -191,15 +191,15 @@ void QSoundEffect::setLoopCount(int loopCount) int QSoundEffect::volume() const { - return d != 0 ? d->volume() : m_volume; + return d != 0 ? d->volume() : m_vol; } void QSoundEffect::setVolume(int volume) { - if (m_volume == volume) + if (m_vol == volume) return; - m_volume = volume; + m_vol = volume; if (d != 0) d->setVolume(volume); else diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h index 2610a69..5b978e5 100644 --- a/src/multimedia/qml/qsoundeffect_p.h +++ b/src/multimedia/qml/qsoundeffect_p.h @@ -109,7 +109,7 @@ private: Q_DISABLE_COPY(QSoundEffect) int m_loopCount; - int m_volume; + int m_vol; bool m_muted; int m_runningCount; diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/qml/qsoundeffect_pulse_p.cpp index 7057022..ec851aa 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/qml/qsoundeffect_pulse_p.cpp @@ -67,6 +67,8 @@ #include <pulse/ext-stream-restore.h> #endif +#include <unistd.h> + // Less than ideal #define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16) @@ -128,13 +130,13 @@ public: int volume() { - return m_volume; + return m_vol; } private: void prepare() { - m_volume = 100; + m_vol = 100; m_mainLoop = pa_threaded_mainloop_new(); if (m_mainLoop == 0) { @@ -215,13 +217,13 @@ private: const unsigned str_length = 256; char str[str_length]; pa_cvolume_snprint(str, str_length, &info->volume); - self->m_volume = QString(str).replace(" ","").replace("%","").mid(2).toInt(); + self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt(); } } } #endif - int m_volume; + int m_vol; bool m_prepared; pa_context *m_context; pa_threaded_mainloop *m_mainLoop; @@ -236,7 +238,7 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), m_muted(false), m_playQueued(false), - m_volume(100), + m_vol(100), m_duration(0), m_dataUploaded(0), m_state(QMediaPlayer::StoppedState), @@ -260,7 +262,7 @@ qint64 QSoundEffectPrivate::duration() const int QSoundEffectPrivate::volume() const { - return m_volume; + return m_vol; } bool QSoundEffectPrivate::isMuted() const @@ -298,7 +300,7 @@ void QSoundEffectPrivate::play() daemon()->lock(); #if(Q_WS_MAEMO_5) - m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_volume)/2); + m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_vol)/2); #endif pa_operation_unref( pa_context_play_sample(daemon()->context(), @@ -322,7 +324,7 @@ void QSoundEffectPrivate::stop() void QSoundEffectPrivate::setVolume(int volume) { - m_volume = volume; + m_vol = volume; } void QSoundEffectPrivate::setMuted(bool muted) diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.h b/src/multimedia/qml/qsoundeffect_pulse_p.h index 58a05d2..247f8a3 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.h +++ b/src/multimedia/qml/qsoundeffect_pulse_p.h @@ -117,7 +117,7 @@ private: bool m_muted; bool m_playQueued; - int m_volume; + int m_vol; int m_duration; int m_dataUploaded; QTime m_playbackTime; diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp index e5ac0d3..886380a 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp @@ -62,7 +62,7 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), m_muted(false), - m_volume(100), + m_vol(100), m_player(0) { } @@ -83,7 +83,7 @@ int QSoundEffectPrivate::volume() const { if (m_player) return m_player->volume(); - return m_volume; + return m_vol; } bool QSoundEffectPrivate::isMuted() const @@ -128,7 +128,7 @@ void QSoundEffectPrivate::stop() void QSoundEffectPrivate::setVolume(int volume) { - m_volume = volume; + m_vol = volume; if (m_player) m_player->setVolume(volume); @@ -149,7 +149,7 @@ void QSoundEffectPrivate::setMedia(const QMediaContent &media) if (m_player == 0) { m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency); - m_player->setVolume(m_volume); + m_player->setVolume(m_vol); m_player->setMuted(m_muted); connect(m_player, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int))); diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.h b/src/multimedia/qml/qsoundeffect_qmedia_p.h index e17d720..8267f79 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.h +++ b/src/multimedia/qml/qsoundeffect_qmedia_p.h @@ -98,7 +98,7 @@ Q_SIGNALS: private: bool m_muted; - int m_volume; + int m_vol; QMediaPlayer *m_player; }; |