Support Qt and CopperSpice

Post Reply
elias
Posts: 2
Joined: Sat Dec 05 2015 6:13 pm

Support Qt and CopperSpice

Post by elias »

Hello! I have library which has multiple Qt PODs (Q_GADGETs).
Is it possible to preserve Qt compatibility? For example, run PepperMill on original files.
So, PepperMill will be called instead of MOC via CMake macros. Are there any CMake projects for inspiration?
This library will be used on the client-side with Qt and on the server-side with CopperSpice (peppermilled sources).
barbara
Posts: 443
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: Support Qt and CopperSpice

Post by barbara »

elias wrote: Fri Jan 15 2021 2:05 pm Hello! I have library which has multiple Qt PODs (Q_GADGETs).
Is it possible to preserve Qt compatibility? For example, run PepperMill on original files.
So, PepperMill will be called instead of MOC.
As noted in our CS Overview documentation:

The PepperMill utility is a parser and is run one time on your C++ header files. It will convert your application header files to CopperSpice header files and change the syntax of Signal and Slot declarations, properties, enums, and several other constructs which involve registration.

PepperMill is not a program that runs instead of moc, it is a parser that changes your header files to use our syntax. You can do these changes by hand, PM just makes it happen quicker. Once you run PM your header

To be clear, CopperSpice does not use moc or require this pre-procssor since everything it did has been replaced by pure C++ code in our libraries. This was not a simple task but modern C++ has more functionality than older versions of the language.

Are there any CMake projects for inspiration?
If you are looking for example CMake files which use CopperSpice there are multiple projects on our github repo for KitchenSink, Diamond, and DoxyPress, and DoxPressApp. We also have a sample project in our Overview documentation.

https://github.com/copperspice

* *
There may be other issues you have not considered. Their framework is not ABI compatible with the CopperSpice libraries. Much of the functionality is compatible and the API of the classes will be similar and very familiar. As one simple example, QString in their code does not use utf-8 where as CS has full support for utf-8 and handles all code points. If you need utf-16 we have added a QSting16 class. So this is one of the many changes in ABI.

It sounds like you have two applications and want to send data between them. For this to work it will depend on how you transfer the data.
Post Reply