extragear/multimedia/amarok/src/scriptengine
Dan Meltzer
parallelgrapefruit at gmail.com
Thu Sep 25 00:23:20 CEST 2008
On Wed, Sep 24, 2008 at 5:56 PM, Seb Ruiz <ruiz at kde.org> wrote:
> 2008/9/24 Dan Meltzer <parallelgrapefruit at gmail.com>:
>> On Wed, Sep 24, 2008 at 7:08 AM, Seb Ruiz <ruiz at kde.org> wrote:
>>> SVN commit 864254 by seb:
>>>
>>> warnings--
>>
>> Warnings in this case were a good way to see what was, and was not,
>> yet implemented.... most of the Q_UNUSED were because the functions
>> were stubs... can you put AMAROK_NOTIMPLEMENTED in there so that we
>> still can keep track of them not being implemented? Otherwise it's
>> hiding a problem, not solving it.
>
> Thank you, I am very aware of the NYI macro, however warnings are a
> fundamentally idiotic way of determining if a method is not
> implemented. Since this is not my code, I don't know if these methods
> are intentionally left empty and are meant to be implemented by a
> subclass etc, in which case NYI macro would be incorrect.
>
> I'll leave it up to peter to do the correct thing, as it is his code.
reguardless of how they are eventually implemented, It makes sense to
note them at this point as not implemented if they are not
implemented. Especially in scripting, if people see methods they are
probably going to try and use them, providing feedback when the
methods are called is much more helpful then having them sit there
doing nothing. If they get implemented differently in the future,
then it seems fairly obvious that whoever is doing the implementing
will remove AMARK_NOTIMPLEMENTED from the function, and guess what,
the function will no longer be not implemented.
Claiming that it's not your code, and therefore isn't your
responsibility to do, is a fair bit hypocritical after you just made
commits that touched this code.
Dan,
>
>
>>>
>>>
>>> M +2 -2 AmarokEngineScript.cpp
>>> M +2 -1 AmarokLyricsScript.cpp
>>> M +2 -0 AmarokScriptableServiceScript.cpp
>>>
>>>
>>> --- trunk/extragear/multimedia/amarok/src/scriptengine/AmarokEngineScript.cpp #864253:864254
>>> @@ -170,7 +170,7 @@
>>>
>>> void AmarokEngineScript::setDynamicMode( bool enable )
>>> {
>>> -
>>> + Q_UNUSED( enable );
>>> }
>>>
>>> void AmarokEngineScript::setRepeatPlaylist( bool enable )
>>> @@ -200,7 +200,7 @@
>>>
>>> void AmarokEngineScript::setFadeoutLength( int length )
>>> {
>>> -
>>> + Q_UNUSED( length );
>>> }
>>> }
>>>
>>> --- trunk/extragear/multimedia/amarok/src/scriptengine/AmarokLyricsScript.cpp #864253:864254
>>> @@ -66,7 +66,8 @@
>>> void
>>> AmarokLyricsScript::setLyricsForTrack( const QString& trackUrl, const QString& lyrics ) const
>>> {
>>> - debug() << "bar";
>>> + Q_UNUSED( trackUrl );
>>> + Q_UNUSED( lyrics );
>>> }
>>>
>>> QString
>>> --- trunk/extragear/multimedia/amarok/src/scriptengine/AmarokScriptableServiceScript.cpp #864253:864254
>>> @@ -26,6 +26,7 @@
>>>
>>> StreamItem::StreamItem( QScriptEngine *engine )
>>> {
>>> + Q_UNUSED( engine );
>>> }
>>>
>>> StreamItem::~StreamItem()
>>> @@ -117,6 +118,7 @@
>>>
>>> QScriptValue ScriptableServiceScript::ScriptableServiceScript_prototype_populate( QScriptContext *context, QScriptEngine *engine )
>>> {
>>> + Q_UNUSED( context );
>>> debug() << "prototype populating here!";
>>> return engine->undefinedValue(); // Fixme: return something.
>>> }
>>>
>> _______________________________________________
>> Amarok-devel mailing list
>> Amarok-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/amarok-devel
>>
>
>
>
> --
> Seb Ruiz
>
> http://www.sebruiz.net/
> http://amarok.kde.org/
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>
More information about the Amarok-devel
mailing list