~neon/kolourpaint/master

« back to all changes in this revision

Viewing changes to views/kpView.cpp

  • Committer: Kevin Funk
  • Date: 2017-11-19 23:16:39 UTC
  • Revision ID: git-v1:b08455db1ca77205455f4c0bc3bf80b8347b5fcb
Modernize: Use nullptr where possible

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
// protected
115
115
kpAbstractSelection *kpView::selection () const
116
116
{
117
 
    return document () ? document ()->selection () : 0;
 
117
    return document () ? document ()->selection () : nullptr;
118
118
}
119
119
 
120
120
//---------------------------------------------------------------------
122
122
// protected
123
123
kpTextSelection *kpView::textSelection () const
124
124
{
125
 
    return document () ? document ()->textSelection () : 0;
 
125
    return document () ? document ()->textSelection () : nullptr;
126
126
}
127
127
 
128
128
//---------------------------------------------------------------------
136
136
// protected
137
137
kpTool *kpView::tool () const
138
138
{
139
 
    return toolToolBar () ? toolToolBar ()->tool () : 0;
 
139
    return toolToolBar () ? toolToolBar ()->tool () : nullptr;
140
140
}
141
141
 
142
142
// public
154
154
// public
155
155
kpViewScrollableContainer *kpView::buddyViewScrollableContainer () const
156
156
{
157
 
    return (buddyView () ? buddyView ()->scrollableContainer () : 0);
 
157
    return (buddyView () ? buddyView ()->scrollableContainer () : nullptr);
158
158
}
159
159
 
160
160
// public
547
547
    if (yes && vm->viewUnderCursor () != this)
548
548
        vm->setViewUnderCursor (this);
549
549
    else if (!yes && vm->viewUnderCursor () == this)
550
 
        vm->setViewUnderCursor (0);
 
550
        vm->setViewUnderCursor (nullptr);
551
551
}
552
552
 
553
553
//---------------------------------------------------------------------