save a lot of allocation for setPen
Needs Verificationb92f53644133

Authored by cullmann on Mar 5 2017, 4:28 PM.

Description

save a lot of allocation for setPen

Details

Auditors
kfunk
Committed
cullmannMar 5 2017, 4:28 PM
Parents
R39:97d7aae17a23: Fix ConfigInterface of KTextEditor::Document
Branches
Unknown
Tags
Unknown
kfunk raised a concern with this commit.Mar 19 2017, 6:19 PM
kfunk added a subscriber: kfunk.
kfunk added inline comments.
/src/view/kateviewhelpers.cpp
488

Leads to: QPainter::setPen: Painter not active in KDevelop

Backtrace excerpt:

Thread 1 "kdevelop" hit Breakpoint 6, QPainter::setPen (this=0x7fffffffaba8, color=...) at /home/kfunk/devel/src/qt5.6/qtbase/src/gui/painting/qpainter.cpp:3844
(gdb) bt 20
#0  QPainter::setPen (this=0x7fffffffaba8, color=...) at /home/kfunk/devel/src/qt5.6/qtbase/src/gui/painting/qpainter.cpp:3844
#1  0x00007ffff7181e8f in KateScrollBar::updatePixmap (this=0x1878d40) at /home/kfunk/devel/src/kf5/ktexteditor/src/view/kateviewhelpers.cpp:488
#2  0x00007ffff72afaa4 in KateScrollBar::qt_static_metacall (_o=0x1878d40, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffadc0) at src/KF5TextEditor_automoc.dir/view/moc_kateviewhelpers.cpp:92
#3  0x00007ffff4cdf02c in QMetaObject::activate (sender=0x1878e28, signalOffset=3, local_signal_index=0, argv=0x0) at /home/kfunk/devel/src/qt5.6/qtbase/src/corelib/kernel/qobject.cpp:3730
#4  0x00007ffff4cde812 in QMetaObject::activate (sender=0x1878e28, m=0x7ffff4fc8940 <QTimer::staticMetaObject>, local_signal_index=0, argv=0x0) at /home/kfunk/devel/src/qt5.6/qtbase/src/corelib/kernel/qobject.cpp:3595
...
This commit now has outstanding concerns.Mar 19 2017, 6:19 PM

Guess should be behind the begin(), upsa :)

cullmann requested verification of this commit.

Please take a look at:

https://phabricator.kde.org/D5108

This commit now requires verification by auditors.Mar 19 2017, 7:00 PM