[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calligra-devel
Subject:    Re: Help,
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2011-01-30 13:19:54
Message-ID: 8768AC82-76E7-47AA-BCB7-C6A08BCDE28B () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Looks to me like you can't use a forward-declaration of CustomStylePrivate to declare a \
QSharedDataPointer<CustomStylePrivate> with. Try putting the class definition of CustomStylePrivate in \
its own header (something_p.h) and include it in Style.h instead of using this forward declaration. And \
why is it

class CustomStylePrivate::CustomStylePrivate : public QSharedData
{
public:
    QString name;
    StyleType type;
};

and not simply

class CustomStylePrivate : public QSharedData
{
public:
    QString name;
    StyleType type;
};

This seems odd to me, also since in the comment above the definition it says "CustomStyle::Private" (so \
which of the three is it really supposed to be now?). Does this code compile on other platforms?

Johannes


Am 30.01.2011 um 09:54 schrieb Pierre Stirnweiss:

> Here is the error: http://paste.kde.org/3643/
> Here is the header: http://paste.kde.org/3641/
> Here is the cpp: http://paste.kde.org/3642/
> 
> These files (header and cpp) are already a modified version of the original tables/Style.h and \
> Style.cpp, with one of the trials i have already done. 
> I just don't know what else to do.
> 
> Thanks,
> 
> PierreSt
> _______________________________________________
> calligra-devel mailing list
> calligra-devel@kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel


[Attachment #5 (unknown)]

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; ">Looks to me like you can't use a forward-declaration of CustomStylePrivate to \
declare a QSharedDataPointer&lt;CustomStylePrivate&gt; with. Try putting the class definition of \
CustomStylePrivate in its own header (something_p.h) and include it in Style.h instead of using this \
forward declaration. And why is it<div><br></div><div><pre>class CustomStylePrivate::CustomStylePrivate : \
public QSharedData {
public:
    QString name;
    StyleType type;
};
</pre><div><br></div><div>and not simply</div><div><br></div><div><pre>class CustomStylePrivate : public \
QSharedData {
public:
    QString name;
    StyleType type;
};</pre></div><div><br></div><div>This seems odd to me, also since in the comment above the definition it \
says&nbsp;"CustomStyle::Private" (so which of the three is it really supposed to be now?). Does this code \
compile on other platforms?</div><div><br></div><div>Johannes</div><div><div><br></div><div><br><div><div>Am \
30.01.2011 um 09:54 schrieb Pierre Stirnweiss:</div><br class="Apple-interchange-newline"><blockquote \
type="cite">Here is the error: <a \
href="http://paste.kde.org/3643/">http://paste.kde.org/3643/</a><br>Here is the header: <a \
href="http://paste.kde.org/3641/">http://paste.kde.org/3641/</a><br>Here is the cpp: <a \
href="http://paste.kde.org/3642/">http://paste.kde.org/3642/</a><br> <br>These files (header and cpp) are \
already a modified version of the original tables/Style.h and Style.cpp, with one of the trials i have \
already done.<br><br>I just don't know what else to do.<br><br>Thanks,<br><br> PierreSt<br>
_______________________________________________<br>calligra-devel mailing list<br><a \
href="mailto:calligra-devel@kde.org">calligra-devel@kde.org</a><br>https://mail.kde.org/mailman/listinfo/calligra-devel<br></blockquote></div><br></div></div></div></body></html>




_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic