diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-07-04 17:18:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-25 14:57:08 +0200 |
commit | 0e8279b7bcad4c639562bb034a20866d9b2e8192 (patch) | |
tree | cbe4ce14eac1518aac2a9103ed57885432392ce4 /mkspecs/features/default_post.prf | |
parent | 06e8682cb7c29d15a2c49fbc442a1a4509876abb (diff) |
QObject: add a macro for conveniently setting the object name
This is a simplified port of KDTools' KDAB_SET_OBJECT_NAME.
It simply assigns the variable name as the objectName of
a QObject, uic-style. It uses a small helper function so
that it works on references as well as pointer variables.
QLabel label;
QLabel *pLabel = new QLabel();
Q_SET_OBJECT_NAME(label);
Q_SET_OBJECT_NAME(pLabel);
Change-Id: I25fec0c90f33249a3ea5d2dd622ab708019fd101
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'mkspecs/features/default_post.prf')
0 files changed, 0 insertions, 0 deletions