Commit dd524974 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Compile warnings in DebuggerUISwitcher

parent 1d853788
......@@ -73,23 +73,38 @@
#include <QtCore/QSettings>
using namespace Core;
using namespace Debugger::Internal;
namespace Debugger {
namespace Internal {
DockWidgetEventFilter::DockWidgetEventFilter(QObject *parent)
: QObject(parent)
{}
class DockWidgetEventFilter : public QObject
{
Q_OBJECT
public:
explicit DockWidgetEventFilter(QObject *parent = 0) : QObject(parent) {}
signals:
void widgetResized();
protected:
virtual bool eventFilter(QObject *obj, QEvent *event);
};
bool DockWidgetEventFilter::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::Resize || event->type() == QEvent::ZOrderChange)
switch (event->type()) {
case QEvent::Resize:
case QEvent::ZOrderChange:
emit widgetResized();
break;
default:
break;
}
return QObject::eventFilter(obj, event);
}
}
// first: language id, second: menu item
typedef QPair<DebuggerLanguage, QAction *> ViewsMenuItems;
......@@ -164,8 +179,6 @@ DebuggerUISwitcherPrivate::DebuggerUISwitcherPrivate(DebuggerUISwitcher *q)
DebuggerUISwitcher *DebuggerUISwitcherPrivate::m_instance = 0;
} // namespace Internal
DebuggerUISwitcher::DebuggerUISwitcher(BaseMode *mode, QObject* parent)
: QObject(parent), d(new DebuggerUISwitcherPrivate(this))
{
......@@ -491,7 +504,7 @@ Utils::FancyMainWindow *DebuggerUISwitcher::mainWindow() const
QWidget *DebuggerUISwitcher::createMainWindow(BaseMode *mode)
{
d->m_mainWindow = new DebuggerMainWindow(this);
d->m_mainWindow = new Internal::DebuggerMainWindow(this);
d->m_mainWindow->setDocumentMode(true);
d->m_mainWindow->setDockNestingEnabled(true);
connect(d->m_mainWindow, SIGNAL(resetLayout()),
......@@ -770,3 +783,5 @@ QList<QDockWidget* > DebuggerUISwitcher::i_mw_dockWidgets() const
}
} // namespace Debugger
#include "debuggeruiswitcher.moc"
......@@ -34,10 +34,8 @@
#include "debuggerconstants.h"
#include <QtCore/QObject>
#include <QtCore/QMultiHash>
QT_BEGIN_NAMESPACE
class QEvent;
class QDockWidget;
QT_END_NAMESPACE
......@@ -61,9 +59,9 @@ namespace ProjectExplorer {
}
namespace Debugger {
struct DebuggerUISwitcherPrivate;
namespace Internal {
class DebuggerUISwitcherPrivate;
class DebuggerMainWindow;
};
......@@ -156,26 +154,9 @@ private:
QWidget *createContents(Core::BaseMode *mode);
QWidget *createMainWindow(Core::BaseMode *mode);
Internal::DebuggerUISwitcherPrivate *d;
DebuggerUISwitcherPrivate *d;
};
namespace Internal {
class DockWidgetEventFilter : public QObject
{
Q_OBJECT
public:
DockWidgetEventFilter(QObject *parent = 0);
signals:
void widgetResized();
protected:
bool eventFilter(QObject *obj, QEvent *event);
};
} // namespace Internal
} // namespace Debugger
#endif // DEBUGGERUISWITCHER_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment