I see Q_NULLPTR
being used liberally in Qt source code and examples, but I have found no documentation for what it is exactly and when it should be used.
For example in this official demonstration of the new Qt SerialBus module added in the new Qt v5.6:
if (!m_canDevice->connectDevice()) {
delete m_canDevice;
m_canDevice = Q_NULLPTR;
Did this serve the purpose of nullptr
prior to that being added in C++11? If so, now that we have C++11, should I be using Q_NULLPTR
?
PS: I tried searching the Qt source code for the definition of the macro but failed to find it.
Aucun commentaire:
Enregistrer un commentaire