remove unused QGraphics* includes

This commit is contained in:
Marco Martin 2013-03-13 11:45:34 +01:00
parent 8eb21b7e21
commit 620478614a
10 changed files with 5 additions and 61 deletions

View File

@ -135,7 +135,6 @@ protected:
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *) {}
bool childMouseEventFilter(QQuickItem *item, QEvent *event);
//bool sceneEventFilter(QGraphicsItem *item, QEvent *event);
private:
QQmlComponent* m_delegate;

View File

@ -25,7 +25,6 @@
#define DECLARATIVEDRAGDROPEVENT_H
#include <QObject>
#include <QGraphicsSceneDragDropEvent>
#include "DeclarativeMimeData.h"
#include "DeclarativeDropArea.h"

View File

@ -24,7 +24,6 @@
#include "DeclarativeDropArea.h"
#include "DeclarativeDragDropEvent.h"
#include <QGraphicsSceneDragDropEvent>
#include <QMimeData>
#include <QDebug>

View File

@ -20,8 +20,7 @@
#include "resourceinstance.h"
#include <QApplication>
#include <QGraphicsObject>
#include <QGraphicsView>
#include <QWindow>
#include <QTimer>
#include <KActivities/ResourceInstance>
@ -41,43 +40,14 @@ ResourceInstance::~ResourceInstance()
}
QGraphicsView *ResourceInstance::view() const
{
// It's assumed that we won't be visible on more than one view here.
// Anything that actually needs view() should only really care about
// one of them anyway though.
if (!scene()) {
return 0;
}
QGraphicsView *found = 0;
QGraphicsView *possibleFind = 0;
//kDebug() << "looking through" << scene()->views().count() << "views";
foreach (QGraphicsView *view, scene()->views()) {
//kDebug() << " checking" << view << view->sceneRect()
// << "against" << sceneBoundingRect() << scenePos();
if (view->sceneRect().intersects(sceneBoundingRect()) ||
view->sceneRect().contains(scenePos())) {
//kDebug() << " found something!" << view->isActiveWindow();
if (view->isActiveWindow()) {
found = view;
} else {
possibleFind = view;
}
}
}
return found ? found : possibleFind;
}
void ResourceInstance::syncWid()
{
QGraphicsView *v = view();
if (!v) {
QWindow *w = window();
if (!w) {
return;
}
WId wid = v->topLevelWidget()->effectiveWinId();
WId wid = w->winId();
if (!m_resourceInstance || m_resourceInstance->winId() != wid) {
delete m_resourceInstance;

View File

@ -27,7 +27,6 @@ namespace KActivities {
}
class QTimer;
class QGraphicsView;
class ResourceInstance : public QQuickItem
{
@ -51,9 +50,6 @@ public:
QString title() const;
void setTitle(const QString &title);
protected:
QGraphicsView *view() const;
protected Q_SLOTS:
void syncWid();

View File

@ -94,7 +94,7 @@ void MouseEventListener::mousePressEvent(QMouseEvent *me)
return;
}
//FIXME: when a popup window is visible: a click anywhere hides it: but the old qgraphicswidget will continue to think it's under the mouse
//FIXME: when a popup window is visible: a click anywhere hides it: but the old qquickitem will continue to think it's under the mouse
//doesn't seem to be any good way to properly reset this.
//this msolution will still caused a missed click after the popup is gone, but gets the situation unblocked.
if (!isUnderMouse()) {
@ -164,7 +164,6 @@ QPointF MouseEventListener::buttonDownPos(int btn) const
}
// bool MouseEventListener::sceneEventFilter(QGraphicsItem *item, QEvent *event)
bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
{
if (!isEnabled()) {

View File

@ -27,7 +27,6 @@
#include "package.h"
class KShortcutsDialog;
class QGraphicsWidget;
namespace Plasma
{

View File

@ -20,7 +20,6 @@
#include "applet.h"
#include <QAction>
#include <QGraphicsLinearLayout>
#include <KService>
#include <KServiceTypeTrader>

View File

@ -346,19 +346,4 @@ inline QScriptValue wrapPointer(QScriptEngine *eng, T *ptr, uint flags = 0)
} // namespace QScript
#ifdef QGRAPHICSITEM_H
namespace QScript {
template <class T>
inline QScriptValue wrapGVPointer(QScriptEngine *eng, T *item)
{
uint flags = item->parentItem() ? UserOwnership : 0;
return wrapPointer<T>(eng, item, flags);
}
} // namespace QScript
#endif // QGRAPHICSITEM_H
#endif // QTSCRIPTEXTENSIONS_GLOBAL_H

View File

@ -20,7 +20,6 @@
#include "widget.h"
#include <QAction>
#include <QGraphicsLinearLayout>
#include <Plasma/Applet>
#include <Plasma/Containment>