[Interest] Converting QStrings to const char *

2020-07-21 Thread Doogster
My program uses both Qt and a C API that takes, as parameters, UTF-8 const char * strings. Is this the correct way to convert a QString containing a UTF8 string to that format? qString.toUtf8().constData() ___ Interest mailing list Interest@qt-project.o

[Interest] How to handle test resources files, building with QMake?

2020-05-23 Thread Doogster
Okay, I'm at the stage where I'm stuck and I need to ask for help here... For the unit tests in my current project, I've prepared external files that the tests would use. For example, a one-second silent MP3 file with a certain set of tags. I have these in a resources/ folder, versioned in the sou

[Interest] Qt .clang-format style

2020-05-20 Thread Doogster
Here's my attempt at a .clang-format file that matches Qt Creator's default, built-in "Qt" style. What do you think? BasedOnStyle: WebKit AllowShortIfStatementsOnASingleLine: Always BraceWrapping: AfterCaseLabel: true AfterClass: true AfterControlStatement: true AfterEnum: true

[Interest] Using Q_NAMESPACE enum as a Q_PROPERTY type

2020-05-02 Thread Doogster
I'm having trouble using an enum with Q_NAMESPACE, as a Q_PROPERTY type. I'm trying to follow this: https://www.kdab.com/new-qt-5-8-meta-object-support-namespaces/ I have the following enum: - namespace ConnectionState { Q_NAMESPACE enum class State : quint8 {Disconnected, Connecting, Conn

[Interest] How do I mock QHostInfo::lookupHost?

2020-05-02 Thread Doogster
How do I mock QHostInfo::lookupHost() for unit testing? When I looked for a solution, all I found was someone who just gave up and said: "Unfortunately QHostInfo::lookupHost is a static method, so we can’t mock it." https://github.com/mumble-voip/mumble/pull/3170

Re: [Interest] Is Nokia officially done with Qt?

2012-06-15 Thread Doogster
Here's an article that does specifically mention Qt: http://www.theregister.co.uk/2012/06/14/nokia_software_purge/ "Among the 10,000 casualties officially announced are teams working on Meltemi, Qt and QML. So is it farewell for Qt and QML? Not at all, says Nokia. 'Speculation is