diff options
| author | Peter Penz <[email protected]> | 2009-06-20 15:45:18 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-06-20 15:45:18 +0000 |
| commit | 5e73577d6c3520fa3dfd63646795e628cf2a0614 (patch) | |
| tree | bca7b798a6bd0936e9fff6f2c5fc848edaaa1724 /src/tooltips/tooltipmanager.cpp | |
| parent | 514566db88e51ba39695b083f3257c6c9d7356b4 (diff) | |
Tooltip interface cleanup: Don't use const-pointers as parameters if the implementation cannot handle 0-pointers. Use a const-reference instead.
svn path=/trunk/KDE/kdebase/apps/; revision=984342
Diffstat (limited to 'src/tooltips/tooltipmanager.cpp')
| -rw-r--r-- | src/tooltips/tooltipmanager.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tooltips/tooltipmanager.cpp b/src/tooltips/tooltipmanager.cpp index c5558eef1..489c6c2b6 100644 --- a/src/tooltips/tooltipmanager.cpp +++ b/src/tooltips/tooltipmanager.cpp @@ -214,13 +214,11 @@ void ToolTipManager::showToolTip(KToolTipItem* tip) QSize size; if (m_previewIsLate) { QPixmap paddedImage(QSize(PREVIEW_WIDTH, PREVIEW_HEIGHT)); - KToolTipItem* maxiTip = new KToolTipItem(paddedImage, m_item.getToolTipText()); - size = g_delegate->sizeHint(&option, maxiTip); - delete maxiTip; - maxiTip = 0; + KToolTipItem maxiTip(paddedImage, m_item.getToolTipText()); + size = g_delegate->sizeHint(option, maxiTip); } - else { - size = g_delegate->sizeHint(&option, tip); + else if (tip != 0) { + size = g_delegate->sizeHint(option, *tip); } const QRect desktop = QApplication::desktop()->screenGeometry(m_itemRect.bottomRight()); |
