[Qt-interest] can not copy QString and other non understood other c++ error
Matthias Pospiech
matthias.pospiech at gmx.de
Mon Mar 1 09:34:26 CET 2010
Andreas Pakulat schrieb:
> On 28.02.10 23:38:28, Matthias Pospiech wrote:
>
>> ...
>>
>> src\task.cpp: In constructor
>> 'NationalInstruments::DAQ::Task::Task(QObject*, QString)':
>>
>> src\task.cpp:31: error: passing 'const QString' as 'this' argument of
>> 'QString& QString::operator=(const QString&)' discards qualifiers
>>
>
> You've made your d-pointer a const object, hence you can't change its
> variables, move the const to the other side of the * and read up again
> on const-pointer vs. pointer-to-const.
>
Thank you very much. I had the same idea this morning. No idea why I
could not find this yesterday evening...
Matthias
More information about the Qt-interest-old
mailing list