~georg-zotti/stellarium/gz_AtmosphereTweaks

« back to all changes in this revision

Viewing changes to src/gui/ShortcutsDialog.cpp

  • Committer: Georg Zotti
  • Date: 2017-05-23 13:18:09 UTC
  • mfrom: (8115.1.1321 trunk)
  • Revision ID: georg.zotti@univie.ac.at-20170523131809-a6pus0ogpmjwtmd8
merge-in trunk r9436

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
{
73
73
        collisionItems.clear();
74
74
        delete ui;
75
 
        ui = NULL;
 
75
        ui = Q_NULLPTR;
76
76
}
77
77
 
78
78
void ShortcutsDialog::drawCollisions()
413
413
                                          QStandardItem *shortcutItem)
414
414
{
415
415
        QVariant shortcutId(action->getId());
416
 
        if (shortcutItem == NULL)
 
416
        if (shortcutItem == Q_NULLPTR)
417
417
        {
418
418
                // search for item
419
419
                shortcutItem = findItemByData(shortcutId, Qt::UserRole, 0);
420
420
        }
421
421
        // we didn't find item, create and add new
422
 
        QStandardItem* groupItem = NULL;
423
 
        if (shortcutItem == NULL)
 
422
        QStandardItem* groupItem = Q_NULLPTR;
 
423
        if (shortcutItem == Q_NULLPTR)
424
424
        {
425
425
                // firstly search for group
426
426
                QVariant groupId(action->getGroup());
427
427
                groupItem = findItemByData(groupId, Qt::UserRole, 0);
428
 
                if (groupItem == NULL)
 
428
                if (groupItem == Q_NULLPTR)
429
429
                {
430
430
                        // create and add new group to treeWidget
431
431
                        groupItem = updateGroup(action->getGroup());
479
479
 
480
480
bool ShortcutsDialog::itemIsEditable(QStandardItem *item)
481
481
{
482
 
        if (item == NULL) return false;
 
482
        if (item == Q_NULLPTR) return false;
483
483
        // non-editable items(not group items) have no Qt::ItemIsSelectable flag
484
484
        return (Qt::ItemIsSelectable & item->flags());
485
485
}