[Amarok] add a metadatachanged scripting method.
Kevin Funk
krf at gmx.de
Tue Feb 9 14:16:35 CET 2010
Tuesday 09 February 2010, Casey Link <unnamedrambler at gmail.com>:
> commit 0813da6aaf276029bc626797c0b1822c8386a9df
> Author: Casey Link <unnamedrambler at gmail.com>
> AuthorDate: Sun Jan 31 12:46:22 2010 -0500
> Commit: Casey Link <unnamedrambler at gmail.com>
> CommitDate: Sun Jan 31 12:46:22 2010 -0500
>
> add a metadatachanged scripting method.
>
> diff --git a/src/scriptengine/AmarokEngineScript.cpp
> b/src/scriptengine/AmarokEngineScript.cpp index 81508e1..4d649f6 100644
> --- a/src/scriptengine/AmarokEngineScript.cpp
> +++ b/src/scriptengine/AmarokEngineScript.cpp
> @@ -153,6 +153,10 @@ namespace AmarokScript
> if ( track.isNull() )
> emit trackFinished();
> }
> + void AmarokEngineScript::engineNewMetaData( const QHash<qint64,
> QString> &newMetaData, bool trackChanged ) + {
> + emit( newMetaData, trackChanged );
> + }
> void AmarokEngineScript::engineStateChanged( Phonon::State newState,
> Phonon::State oldState ) {
> Q_UNUSED( oldState );
> diff --git a/src/scriptengine/AmarokEngineScript.h
> b/src/scriptengine/AmarokEngineScript.h index b0626ef..bba86c1 100644
> --- a/src/scriptengine/AmarokEngineScript.h
> +++ b/src/scriptengine/AmarokEngineScript.h
> @@ -70,6 +70,7 @@ namespace AmarokScript
> signals:
> void trackFinished(); // when playback stops altogether
> void trackChanged();
> + void newMetaData( const QHash<qint64, QString> &newMetaData,
> bool trackChanged ); void trackSeeked( int ); //return relative time in
> million second void volumeChanged( int );
> void trackPlayPause( int ); //Playing: 0, Paused: 1
> @@ -78,6 +79,7 @@ namespace AmarokScript
> void engineVolumeChanged( int value );
> void engineTrackPositionChanged( qint64 position, bool
> userSeek ); void engineTrackChanged( Meta::TrackPtr track );
> + void engineNewMetaData( const QHash<qint64, QString>
> &newMetaData, bool trackChanged ); void engineStateChanged( Phonon::State
> currentState, Phonon::State oldState );
>
> bool randomMode() const;
That diff looks weird, it should be emit keyword(arg1, arg2, ...), right?
Does that work at all?
Compile warning:
AmarokEngineScript.cpp:158: warning: left-hand operand of comma has no effect
--
Kevin Funk
More information about the Amarok-devel
mailing list