Page 1 of 1

CopperSpice Migration guide for Qt Developers

Posted: Fri Aug 04 2017 2:38 pm
by Johnco3
Hello, firstly a disclaimer. I am not a very experienced Qt developer, and as such, I just spent a considerable time coming up to speed with the threading and messaging limitations in Qt. Although I eventually figured them out, it was not trivial. Specifically, it was a big challenge to long lived background threads to regularly update widgets in the main GUI thread using the signals/slots mechanism. More importantly however, developing with Qt promotes bad C++11/14 practice in the files that are affected by MOC - specifically when it comes to allocating via new and not deleting. The whole idea of bypassing MOC with pure C++14 counterparts is very enticing.

I recently came across your product after listening to an interview on CPPCast, the weekly C++ podcast. I have to say that the product sounds intriguing, but what I am missing is what I have to do from an application maintenance/IDE workflow point of view.

I am in the middle of a completing a wrapper that I am adding to a suite of libraries that make extensive use of pure C++11/14. I needed to add one open source plugin to support reading configuration data from an Excel spreadsheet (https://github.com/VSRonin/QtXlsxWriter) and all the other dependencies are pure C++ libraries – i.e. boost, and my own libraries.

I develop using Visual Studio 2017 with a pre release QT VS TOOLS add in for Qt 5.9.1 (although to my knowledge none of my Qt widgets are specifically 5.9.1 specific) – this allows me to directly launch the Qt Designer (not sure what the difference is between this and Qt Creator) from within the IDE to edit my UI files while also allowing me to MOC, compile, link and debug the application.

I ran the PepperMill application on my source folder containing my Qt GUI files and it looks like it produced sensibly translated headers that do not depend on MOC. Now the question is how to firstly migrate my current application source (I need to change the include and library paths presumably away from Qt) – can I keep using Qt Creator to maintain my Widgets (it’s a super UI developer tool). How do I integrate this with my Visual Studio workflow, this is where I need guidance.

I prefer to develop with the Visual Studio IDE as the debugging platform is the best I have come across. I would greatly appreciate your insight into the best way to maintain an easy to use workflow within Visual Studio – perhaps you could do something similar to developing a plugin similar to QT VS TOOLS that would make this migration seamless. I do know that Visual Studio 2017 has an open folder option to open a CMake project, perhaps that would be one way forward, however for those looking for a simple upgrade path from Qt, it would be preferred to convert the existing qmake .pro file to cmake via some sort of wizard.

Lastly, DoxyPress does not create RTF files, it breaks at the end of the run. The html output is great though but we need rtf files in our projects for inclusion in word documents.

Anyway, this is my 2c worth after seeing your product for the first time the other day. Keep up the great work.

John Coffey

Re: CopperSpice Migration guide for Qt Developers

Posted: Fri Aug 04 2017 6:11 pm
by barbara
Johnco3 wrote: I recently came across your product after listening to an interview on CPPCast, the weekly C++ podcast. I have to say that the product sounds intriguing, ...

Lastly, DoxyPress does not create RTF files, it breaks at the end of the run. The html output is great though but we need rtf files in our projects for inclusion in word documents.
John,

Thank you so much for your comments and feedback. It is great to hear you are taking a look at our work. Since your DoxyPress issue is a bit shorter I wanted to address this one first. I ran our test suite in DoxyPress and was not able to break the RTF output. It sounds like you have a specific issue and we would like to address this. Can you provide a sample or an error report so we can try to reproduce your issue. The more information you can provide the easier it will be to address.

We will address your CopperSpice questions shortly.

Barbara

Re: CopperSpice Migration guide for Qt Developers

Posted: Thu Aug 10 2017 3:23 pm
by Johnco3
Barbara, here you have the log file from doxypress - hopefully you will be able to determine what went wrong. Uploading the source will be more difficult as it contains confidential info. If you can spot a particular file of interest in the log, let me know. Note doxygen did not have a problem generating RTF and DoxyPress was fine with the html docs.

I still look forward to the answers to the rest of my CopperSpice questions.

John

BTW the forum does not accept log file attachments (it complains that the extension txt is not allowed, I also tried attaching a zip) Consequently I had to trim the log file below,
// this should be a link to the file which I uploaded to firefox
https://send.firefox.com/download/0c6a5 ... P_FOuo1UQw

Code: Select all

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:5841: Warning: Return types do not agree for member: GetMetadata
   return type: ::google::protobuf::Metadata   return type: google::protobuf::Metadata

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:6106: Warning: Return types do not agree for member: InternalSerializeWithCachedSizesToArray
   return type: ::google::protobuf::uint8 *   return type: google::protobuf::uint8 *

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:6197: Warning: Return types do not agree for member: GetMetadata
   return type: ::google::protobuf::Metadata   return type: google::protobuf::Metadata

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:6610: Warning: Return types do not agree for member: InternalSerializeWithCachedSizesToArray
   return type: ::google::protobuf::uint8 *   return type: google::protobuf::uint8 *

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:6867: Warning: Return types do not agree for member: GetMetadata
   return type: ::google::protobuf::Metadata   return type: google::protobuf::Metadata

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:7432: Warning: Return types do not agree for member: InternalSerializeWithCachedSizesToArray
   return type: ::google::protobuf::uint8 *   return type: google::protobuf::uint8 *

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:7613: Warning: Return types do not agree for member: GetMetadata
   return type: ::google::protobuf::Metadata   return type: google::protobuf::Metadata

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:7789: Warning: Return types do not agree for member: GetMetadata
   return type: ::google::protobuf::Metadata   return type: google::protobuf::Metadata

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:8590: Warning: Return types do not agree for member: InternalSerializeWithCachedSizesToArray
   return type: ::google::protobuf::uint8 *   return type: google::protobuf::uint8 *

C:/Users/johnc/main/dlmu/cadaemon-0339.1/src/cagrpc/CAService.pb.cc:9169: Warning: Return types do not agree for member: GetMetadata
   return type: ::google::protobuf::Metadata   return type: google::protobuf::Metadata

Creating members for template instances
Resolve empty Namespaces
Building page list
Search for main page
Computing page relations
Determining the scope of groups
Freeing entry tree
Determining which enums are documented
Computing member relations
Building full member lists recursively
Adding members to member groups
Computing member references
Inheriting documentation
Generating disk names
Adding source references
Adding xrefitems
Computing dependencies between directories
Generating citations page
Counting data structures
Resolving user defined references
Finding anchors and sections in the documentation
Transferring function references
Combining using relations
Adding members to index pages

**  Generate Documentation Output
Generating style sheet
Generating example documentation
Generating source code
Generating code for file cadaemon-0339.1/include/ca/CADaemon.h
Generating code for file cadaemon-0339.1/include/ca/CAEnums.h
Generating code for file cadaemon-0339.1/include/ca/CAExceptions.h
Generating code for file cadaemon-0339.1/include/ca/CAManager.h
Generating code for file cadaemon-0339.1/include/ca/CAServiceHeartbeatMessage.h
Generating code for file cadaemon-0339.1/include/ca/CAServiceRow.h
Generating code for file cadaemon-0339.1/include/ca/CASharedMem.h
Generating code for file cadaemon-0339.1/include/ca/CMCCommandMessage.h
Generating code for file cadaemon-0339.1/include/ca/DLMUWEnums.h
Generating code for file cadaemon-0339.1/include/ca/DLMUWOperationalSupportMessage.h
Generating code for file cadaemon-0339.1/include/ca/MaintenanceOTPMessage.h
Generating code for file cadaemon-0339.1/include/ca/MemberSystemStatusMessage.h
Generating code for file cadaemon-0339.1/include/ca/WSUDeviceStatusMessage.h
Generating code for file cadaemon-0339.1/include/cagrpc/CAService.grpc.pb.h
Generating code for file cadaemon-0339.1/include/cagrpc/CAService.pb.h
Generating code for file cadaemon-0339.1/include/cmdline/CLIParser.h
Generating code for file cadaemon-0339.1/src/ca/CADaemon.cpp
Generating code for file cadaemon-0339.1/src/ca/CAEnums.cpp
Generating code for file cadaemon-0339.1/src/ca/CAManager.cpp
Generating code for file cadaemon-0339.1/src/ca/CASharedMem.cpp
Generating code for file cadaemon-0339.1/src/ca/DLMUWEnums.cpp
Generating code for file cadaemon-0339.1/src/cadaemon/main.cpp
Generating code for file cadaemon-0339.1/src/cagrpc/CAService.grpc.pb.cc
Generating code for file cadaemon-0339.1/src/cagrpc/CAService.pb.cc
Generating code for file cadaemon-0339.1/src/cmdline/CLIParser.cpp
Generating file documentation
Generating docs for file cadaemon-0339.1/include/ca/CADaemon.h
Generating docs for file cadaemon-0339.1/include/ca/CAEnums.h
Generating docs for file cadaemon-0339.1/include/ca/CAExceptions.h
Generating docs for file cadaemon-0339.1/include/ca/CAManager.h
Generating docs for file cadaemon-0339.1/include/ca/CAServiceHeartbeatMessage.h
Generating docs for file cadaemon-0339.1/include/ca/CAServiceRow.h
Generating docs for file cadaemon-0339.1/include/ca/CASharedMem.h
Generating docs for file cadaemon-0339.1/include/ca/CMCCommandMessage.h
Generating docs for file cadaemon-0339.1/include/ca/DLMUWEnums.h
Generating docs for file cadaemon-0339.1/include/ca/DLMUWOperationalSupportMessage.h
Generating docs for file cadaemon-0339.1/include/ca/MaintenanceOTPMessage.h
Generating docs for file cadaemon-0339.1/include/ca/MemberSystemStatusMessage.h
Generating docs for file cadaemon-0339.1/include/ca/WSUDeviceStatusMessage.h
Generating docs for file cadaemon-0339.1/include/cagrpc/CAService.grpc.pb.h
Generating docs for file cadaemon-0339.1/include/cagrpc/CAService.pb.h
Generating docs for file cadaemon-0339.1/include/cmdline/CLIParser.h
Generating docs for file cadaemon-0339.1/src/ca/CADaemon.cpp
Generating docs for file cadaemon-0339.1/src/ca/CAEnums.cpp
Generating docs for file cadaemon-0339.1/src/ca/CAManager.cpp
Generating docs for file cadaemon-0339.1/src/ca/CASharedMem.cpp
Generating docs for file cadaemon-0339.1/src/ca/DLMUWEnums.cpp
Generating docs for file cadaemon-0339.1/src/cadaemon/main.cpp
Generating docs for file cadaemon-0339.1/src/cagrpc/CAService.grpc.pb.cc
Generating docs for file cadaemon-0339.1/src/cagrpc/CAService.pb.cc
Generating docs for file cadaemon-0339.1/src/cmdline/CLIParser.cpp
Generating page documentation
Generating docs for page bug
Generating group documentation
Generating class documentation
Generating docs for compound CABlackListException
Generating docs for compound CAClosedByServerException
Generating docs for compound CADaemon
Generating docs for nested compound CADaemon::BlackListEntry
Generating docs for nested compound CADaemon::ServiceInfo
Generating docs for nested compound CADaemon::SteadyStateCounters
Generating docs for compound CAInvalidConnectionException
Generating docs for compound CAManager
Generating docs for compound CAParameter
Generating docs for compound CAServiceHeartbeatMessage
Generating docs for compound CAServiceRow
Generating docs for compound CAUnauthorizedConnectionException
Generating docs for compound CFGParameter
Generating docs for compound CLIParser
Generating docs for compound CMCCommand
Generating docs for compound CMCCommandMessage
Generating docs for compound Connection
Generating docs for compound ConnectionStatus
Generating docs for compound DiscreteStatus
Generating docs for compound DLMUWOperationalSupportMessage
Generating docs for compound MaintenanceOTPMessage
Generating docs for compound MemberSystem
Generating docs for compound MemberSystemStatusMessage
Generating docs for compound MessageStatus
Generating docs for compound MessageType
Generating docs for compound OTPConnectionStatus
Generating docs for compound PhaseOfFlight
Generating docs for compound SHMemName
Generating docs for compound Source
Generating docs for compound WSUDeviceStatusMessage
Generating namespace documentation
Generating docs for namespace ca
Generating docs for namespace compounds ca::AuthenticateRequest
Generating docs for namespace compounds ca::AuthenticateRequestDefaultTypeInternal
Generating docs for namespace compounds ca::BlackListEntry
Generating docs for namespace compounds ca::BlackListEntryDefaultTypeInternal
Generating docs for namespace compounds ca::CAResponse
Generating docs for namespace compounds ca::CAResponseDefaultTypeInternal
Generating docs for namespace compounds ca::CAService
Generating docs for nested compound ca::CAService::Service
Generating docs for nested compound ca::CAService::Stub
Generating docs for nested compound ca::CAService::StubInterface
Generating docs for nested compound ca::CAService::WithAsyncMethod_Authenticate
Generating docs for nested compound ca::CAService::WithAsyncMethod_ClearBlackList
Generating docs for nested compound ca::CAService::WithAsyncMethod_Connect
Generating docs for nested compound ca::CAService::WithAsyncMethod_Disconnect
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetBinaryFaultReport
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetFault
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetFaults
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetMaintenanceOTPMessage
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetOpSupportMessage
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetServiceStatii
Generating docs for nested compound ca::CAService::WithAsyncMethod_GetStatus
Generating docs for nested compound ca::CAService::WithAsyncMethod_Heartbeat
Generating docs for nested compound ca::CAService::WithAsyncMethod_ListFaults
Generating docs for nested compound ca::CAService::WithAsyncMethod_SetDataLoading
Generating docs for nested compound ca::CAService::WithAsyncMethod_SetFault
Generating docs for nested compound ca::CAService::WithGenericMethod_Authenticate
Generating docs for nested compound ca::CAService::WithGenericMethod_ClearBlackList
Generating docs for nested compound ca::CAService::WithGenericMethod_Connect
Generating docs for nested compound ca::CAService::WithGenericMethod_Disconnect
Generating docs for nested compound ca::CAService::WithGenericMethod_GetBinaryFaultReport
Generating docs for nested compound ca::CAService::WithGenericMethod_GetFault
Generating docs for nested compound ca::CAService::WithGenericMethod_GetFaults
Generating docs for nested compound ca::CAService::WithGenericMethod_GetMaintenanceOTPMessage
Generating docs for nested compound ca::CAService::WithGenericMethod_GetOpSupportMessage
Generating docs for nested compound ca::CAService::WithGenericMethod_GetServiceStatii
Generating docs for nested compound ca::CAService::WithGenericMethod_GetStatus
Generating docs for nested compound ca::CAService::WithGenericMethod_Heartbeat
Generating docs for nested compound ca::CAService::WithGenericMethod_ListFaults
Generating docs for nested compound ca::CAService::WithGenericMethod_SetDataLoading
Generating docs for nested compound ca::CAService::WithGenericMethod_SetFault
Generating docs for nested compound ca::CAService::WithSplitStreamingMethod_GetFaults
Generating docs for nested compound ca::CAService::WithSplitStreamingMethod_ListFaults
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_Authenticate
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_ClearBlackList
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_Connect
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_Disconnect
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_GetBinaryFaultReport
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_GetFault
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_GetMaintenanceOTPMessage
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_GetOpSupportMessage
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_GetServiceStatii
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_GetStatus
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_Heartbeat
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_SetDataLoading
Generating docs for nested compound ca::CAService::WithStreamedUnaryMethod_SetFault
Generating docs for namespace compounds ca::ClearBlackListResponse
Generating docs for namespace compounds ca::ClearBlackListResponseDefaultTypeInternal
Generating docs for namespace compounds ca::ConnectRequest
Generating docs for namespace compounds ca::ConnectRequestDefaultTypeInternal
Generating docs for namespace compounds ca::DisconnectRequest
Generating docs for namespace compounds ca::DisconnectRequestDefaultTypeInternal
Generating docs for namespace compounds ca::Fault
Generating docs for namespace compounds ca::FaultDefaultTypeInternal
Generating docs for namespace compounds ca::FaultValue
Generating docs for nested compound ca::FaultValue::OneofTypeUnion
Generating docs for namespace compounds ca::FaultValueDefaultTypeInternal
Generating docs for namespace compounds ca::HeartbeatRequest
Generating docs for namespace compounds ca::HeartbeatRequestDefaultTypeInternal
Generating docs for namespace compounds ca::OTPResponse
Generating docs for namespace compounds ca::OTPResponseDefaultTypeInternal
Generating docs for namespace compounds ca::OpSupportResponse
Generating docs for namespace compounds ca::OpSupportResponseDefaultTypeInternal
Generating docs for namespace compounds ca::ServiceConnectStatus
Generating docs for nested compound ca::ServiceConnectStatus::ServiceConnectStatus_ConnectionStatiiEntry
Generating docs for namespace compounds ca::ServiceConnectStatusDefaultTypeInternal
Generating docs for namespace compounds ca::ServiceConnectStatus_ConnectionStatiiEntryDefaultTypeInternal
Generating docs for namespace compounds ca::StatusResponse
Generating docs for nested compound ca::StatusResponse::StatusResponse_ServiceStatiiEntry
Generating docs for namespace compounds ca::StatusResponseDefaultTypeInternal
Generating docs for namespace compounds ca::StatusResponse_Connection
Generating docs for namespace compounds ca::StatusResponse_ConnectionDefaultTypeInternal
Generating docs for namespace compounds ca::StatusResponse_ServiceStatiiEntryDefaultTypeInternal
Generating docs for namespace ca::protobuf_CAService_2eproto
Generating docs for namespace compounds ca::protobuf_CAService_2eproto::StaticDescriptorInitializer
Generating docs for namespace compounds ca::protobuf_CAService_2eproto::TableStruct
Generating docs for namespace google
Generating docs for namespace google::protobuf
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::ConnectStatus >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::DLMUFault >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::FTPCode >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::HBConnection >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::LockFindMethod >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::OTPResponse_OTPConnStatus >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::RXMessageType >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::SourceEnum >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::StatusResponse_ALBFStatus >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::StatusResponse_Connection_ConnectionState >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::StatusResponse_Connection_ConnectionType >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::TXMessageType >
Generating docs for namespace compounds google::protobuf::is_proto_enum< ::ca::WSUFault >
Generating graph documentation
Generating directory documentation
Generating main page
Generating page index
Generating module index
Generating namespace index
Generating namespace member index
Generating annotated compound index
Generating alphabetical compound index
Generating hierarchical class index
Generating member index
Error: Unable to open file for writing functions_all, error: 5
Cleaning up
DoxyPress aborted

** DoxyPress completed

Re: DoxyPress Issue (subject changed)

Posted: Thu Aug 10 2017 5:41 pm
by barbara
John,

Thanks for sending the log. If you have issues with long files you can always use something like pastebin.

It took a bit to reproduce this issue. What helped was realizing you were generating just html or just rtf. If you had selected both at the same time the issue would not have occurred. The problem was two html files we added for improved indexing were accidentally being generated even if you had html turned off. This has been corrected and the changes to DoxyPress are being pushed to github this morning.

I also added some new text to the output log indicating which outputs are enabled. This will help us next time someone an issue specific to one format.

Barbara

Johnco3 wrote:Barbara, here you have the log file from doxypress - hopefully you will be able to determine what went wrong. Uploading the source will be more difficult as it contains confidential info. If you can spot a particular file of interest in the log, let me know. Note doxygen did not have a problem generating RTF and DoxyPress was fine with the html docs.

John

Code: Select all

Generating member index
Error: Unable to open file for writing functions_all, error: 5
Cleaning up
DoxyPress aborted

** DoxyPress completed

Re: CopperSpice Migration guide for Qt Developers

Posted: Thu Aug 10 2017 5:57 pm
by barbara
John,

Until recently we have been unable to support MSVC due to the fact that Microsoft has had very limited support for the advanced features of C++11. Constructs like SFINAE, type traits, constexpr, etc simply did not meet the C++ standard. We have a new contributor who is working diligently to allow CopperSpice to work with MSVC17. He currently has a few of the CS libraries working and is preparing some pull requests.

The direction to go is using the Visual Studio CMake support and not a plugin.

Qt Creator works great with CopperSpice. We have information about how to configure a project in our CopperSpice Overview documentation. Since adding support for VS is very new, this is still under consideration.

You asked about changing your paths away from Qt. Did you mean in your build files or Qt Creator?

We have new CMake files for DoxyPress which show how to set up a CopperSpice project. We are in the process of adding CMake build files to our KitchenSink demo. This will give users a guide on what needs to be changed.

Let us know if you have other questions and thanks so much for your support and feedback.

Barbara

Johnco3 wrote: I develop using Visual Studio 2017 with a pre release QT VS TOOLS add in for Qt 5.9.1 ...

I ran the PepperMill application on my source folder containing my Qt GUI files and it looks like it produced sensibly translated headers that do not depend on MOC.

Now the question is how to firstly migrate my current application source (I need to change the include and library paths presumably away from Qt) – can I keep using Qt Creator to maintain my Widgets (it’s a super UI developer tool). How do I integrate this with my Visual Studio workflow, this is where I need guidance.

...perhaps you could do something similar to developing a plugin similar to QT VS TOOLS ...

... for those looking for a simple upgrade path from Qt, it would be preferred to convert the existing qmake .pro file to cmake via some sort of wizard.

John Coffey