2015-02-04 16:32 GMT-02:00 Giuseppe D'Angelo :
>
> Il 04/02/2015 11:18, Reinhardt Behm ha scritto:
>>
>> MOC does not understand and therefor does not respect macros and #ifdef.
>
>
> I'm sorry to be blunt, but this is simply false. moc has had a full C++
preprocessor since Qt 5.0.
>
> --
> Giusepp
A bit ugly but simple solution is to remove that #ifndef from the header
file and put it to slot method definitions, i.e.:
// header file
public slots:
void recordAdded(const BonjourRecord &record);
void recordRemoved(const BonjourRecord &record);
void bonjourRecordResolved(const QHost
Hi Nuno,
Am Mittwoch, 4. Februar 2015, 18:52:52 schrieb Nuno Santos:
> I have found a workaround for the problem. I have included the
> BonjourRecord header because it doesn't have any dependency on
> dns_sd.h. This way I can safely declare the slots on the header. The
> main problem here is that
Il 04/02/2015 19:52, Nuno Santos ha scritto:
The main problem here is that the moc_ doesn't know about Q_OS_ANDROID
when it is generated which will generate entry for the slots that
shouldn't be there.
Right, so it's the compiler complaining about moc-generated code, not
moc itself...
--
Giu
Hi,
I have found a workaround for the problem. I have included the
BonjourRecord header because it doesn't have any dependency on
dns_sd.h. This way I can safely declare the slots on the header. The
main problem here is that the moc_ doesn't know about Q_OS_ANDROID when
it is generated which
On Wednesday 04 February 2015 19:32:56 Giuseppe D'Angelo wrote:
> Il 04/02/2015 11:18, Reinhardt Behm ha scritto:
> > MOC does not understand and therefor does not respect macros and #ifdef.
>
> I'm sorry to be blunt, but this is simply false. moc has had a full C++
> preprocessor since Qt 5.0.
T
Il 04/02/2015 11:05, Nuno Santos ha scritto:
When compiling for Android, moc file as complaining about not having the
implementation of the methods above which means that the preprocessor has
passed over Q_OS_ANDROID, however, QtCreator had that area greyed out.
Could you please send the exac
Il 04/02/2015 11:18, Reinhardt Behm ha scritto:
MOC does not understand and therefor does not respect macros and #ifdef.
I'm sorry to be blunt, but this is simply false. moc has had a full C++
preprocessor since Qt 5.0.
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer
KDA
Behalf Of
Nuno Santos
Sent: Wednesday, February 04, 2015 2:21 AM
To: Reinhardt Behm
Cc: interest@qt-project.org
Subject: Re: [Interest] Q_OS_ANDROID macro
Hi,
Thanks for your reply.
How can I workaround this situation? Create a specific source file for Android?
Any other ideas?
Thanks,
Nuno
moc conversion will not pre- or post-process anything, so this phase should
not be your problem, as moc files are generated from your header files, and
only after this generation, the compile phase takes place, and for sure,
the compiler should care about macro definitions.
could you post how the
My real problem is with the slot parameter type that will not exist in Android.
> On 04 Feb 2015, at 10:37, Reinhardt Behm wrote:
>
> --
> Best Regards
>
> Reinhardt Behm
>
> mailto: rb...@hushmail.com
> Skype: reinhardt.behm
>
> A different header file is possible but a bit messy solution.
--
Best Regards
Reinhardt Behm
mailto: rb...@hushmail.com
Skype: reinhardt.behm
A different header file is possible but a bit messy solution.
You can use the macro in the .cpp to create one real slot function and one for
android which is just an empty dummy.
Moc does not care what you do in
Hi,
Thanks for your reply.
How can I workaround this situation? Create a specific source file for Android?
Any other ideas?
Thanks,
Nuno
> On 04 Feb 2015, at 10:18, Reinhardt Behm wrote:
>
> On Wednesday 04 February 2015 10:05:12 Nuno Santos wrote:
>> Hi,
>>
>> I have been faced with an aw
On Wednesday 04 February 2015 10:05:12 Nuno Santos wrote:
> Hi,
>
> I have been faced with an awkward situation when building an app for
> android:
>
> My app uses Bonjour but that is not available on Android, so basically for
> android I don’t want to include some slots in a particular class:
>
Hi,
I have been faced with an awkward situation when building an app for android:
My app uses Bonjour but that is not available on Android, so basically for
android I don’t want to include some slots in a particular class:
#ifndef Q_OS_ANDROID
void recordAdded(const BonjourRecord &record);
void
15 matches
Mail list logo