[Kdenlive-devel] Removing some warnings

Marco Gittler g.marco at freenet.de
Sun Jun 1 16:23:19 UTC 2008


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 ?

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 ???

regards marco

>
> Regards.
> jb
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Kdenlive-devel mailing list
> Kdenlive-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kdenlive-devel



-- 
Wieviele Microsoft-Programmierer braucht man um eine Glühbirne auszuwechseln?
Keinen. Microsoft ernennt die Dunkelheit zum Industriestandard.




More information about the Kdenlive mailing list