From a665c17a6c1a06455f447ab1035f1b893479c262 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sat, 30 Jul 2011 20:05:46 +0200 Subject: [PATCH] remove some api duplication --- corona.cpp | 8 ++------ corona.h | 25 ++++++++----------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/corona.cpp b/corona.cpp index 9163a0f93..fae073e01 100644 --- a/corona.cpp +++ b/corona.cpp @@ -50,6 +50,7 @@ #include "private/animator_p.h" #include "private/applet_p.h" #include "private/containment_p.h" +#include "private/tooltipmanager_p.h" #include "tooltipmanager.h" #include "view.h" @@ -68,7 +69,7 @@ Corona::Corona(QObject *parent) kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Corona ctor start"; #endif d->init(); - ToolTipManager::self()->m_corona = this; + ToolTipManager::self()->d->corona = this; //setViewport(new QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel))); } @@ -450,11 +451,6 @@ QRegion Corona::availableScreenRegion(int id) const return QRegion(screenGeometry(id)); } -QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s) -{ - return popupPosition(item, s, Qt::AlignLeft); -} - QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s, Qt::AlignmentFlag alignment) { // TODO: merge both methods (also these in Applet) into one (with optional alignment) when we can break compatibility diff --git a/corona.h b/corona.h index 1ac831562..9b6753749 100644 --- a/corona.h +++ b/corona.h @@ -173,25 +173,16 @@ public: */ virtual QRegion availableScreenRegion(int id) const; - /** - * Recommended position for a popup window like a menu or a tooltip - * given its size - * @param item the item that the popup should appear adjacent to (an applet, say) - * @param size size of the popup - * @returns reccomended position - */ - QPoint popupPosition(const QGraphicsItem *item, const QSize &size); - /** * @since 4.4 - * Recommended position for a popup window like a menu or a tooltip - * given its size - * @param item the item that the popup should appear adjacent to (an applet, say) - * @param size size of the popup - * @param alignment alignment of the popup, valid flags are Qt::AlignLeft, Qt::AlignRight and Qt::AlignCenter - * @returns reccomended position - */ - QPoint popupPosition(const QGraphicsItem *item, const QSize &size, Qt::AlignmentFlag alignment); + * Recommended position for a popup window like a menu or a tooltip + * given its size + * @param item the item that the popup should appear adjacent to (an applet, say) + * @param size size of the popup + * @param alignment alignment of the popup, valid flags are Qt::AlignLeft, Qt::AlignRight and Qt::AlignCenter + * @returns reccomended position + */ + QPoint popupPosition(const QGraphicsItem *item, const QSize &size, Qt::AlignmentFlag alignment = Qt::AlignCenter); /** * This method is useful in order to retrieve the list of available