[Kdenlive-devel] Removing some warnings

Fran García fran.miranda at gmail.com
Sun Jun 1 20:40:00 UTC 2008


Hi,

Marco Gittler escribió:
> hi again
> 
> i was some seconds too slow.
> 
> Am Sonntag, 1. Juni 2008 schrieb jb:
>> On Saturday 31 May 2008 21:46:34 Fran García wrote:
>>> Hi,
>>> I think I removed some of the warnings in the kde4 version, I'd like to
>>> know what you think.
>> Hi!
>>
>> First, thanks for your patch, it's great to have some help.
>>
>>> -  "sdl_preview"); //consumer;
>>> +  (char*)"sdl_preview"); //consumer;
>> I am by no way a c++ expert but I think this could lead to memory leaks. I
>> did some search about the warning:
>>
>> deprecated conversion from string constant to ‘char*’
> i dont have these warnings, maybe you have gcc >4.1 ?

You are right, I was too quick sending the patch and didn't give it 
proper thought, I apologize.

I am using gcc 4.2 but I have tried with 4.1 or 4.0 and still get those 
warnings.

> then in most cases a const char* in the called function would be better, than 
> casting here in char*.
>> And it seems the correct fix is to change the "char*" functions to "const
>> char*".
>>
>> Since all those warnings come from the MLT++ bindings, I think the correct
>> fix would be to change the MLT++ functions to use const char* instead of
>> char*...
>>
>> But if someone has a better knowledge of the issue, I am listening.
>>
>>> For kthumb.cpp:
>>> -        m_clipManager->setThumbsProgress(m_url, p->value());
>>> +        m_clipManager->setThumbsProgress(m_url.url(), p->value());
>> Yes, fixed. I forgot to commit this change.
>>
>>> And effectstackedit:
>>> Here the compiler complained about deleting a void* was undefined. As
>>> far as I can tell, doing that cast to char* should do the trick, but I
>>> don't really know well the code so maybe I did something stupid with
>>> that!
>> I have no idea about the correct fix for this... Marco ?
>> The other compile problems you encountered should be fixed now I think.
> the problem is, that we create objects with f.e.: 
> Ui::Colorval_UI *cval = new Ui::Colorval_UI;
> 
> since these classes from qt4-designer have no parent object, we have no real 
> type to assing it. this causes the deleting of void*.
> 
> we could use QPointer for this i think, but the we must cast the *cval again 
> in QPointer*.
> 
> so in some place the cast is needed, else we find a class from which ALL 
> objects in this list inherits. but this could be a problem with the UI::* 
> files or ???

According to the documentation, QPointer can only be used with 
subclasses of QObject, so I don't see how it could solve the problem.

> regards marco
> 
>> Regards.
>> jb




More information about the Kdenlive mailing list