From d9210302ce9a7345862f9c5e0ff7148c01e72d9b Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 3 Dec 2010 12:07:32 +0100 Subject: [PATCH] debugger: mover qml related engines to the Internal namespace --- src/plugins/debugger/debuggerengine.h | 4 ++-- src/plugins/debugger/qml/qmlcppengine.cpp | 17 +++++++---------- src/plugins/debugger/qml/qmlcppengine.h | 16 ++++++++-------- src/plugins/debugger/qml/qmlengine.cpp | 9 +++------ src/plugins/debugger/qml/qmlengine.h | 20 ++++++++++---------- 5 files changed, 30 insertions(+), 36 deletions(-) diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index a659a235fc..3723ce9e3c 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -60,7 +60,6 @@ namespace Debugger { class DebuggerEnginePrivate; class DebuggerRunControl; -class QmlCppEngine; class DEBUGGER_EXPORT DebuggerStartParameters { @@ -132,6 +131,7 @@ class SourceFilesHandler; class ThreadsHandler; class WatchHandler; class BreakpointParameters; +class QmlCppEngine; struct WatchUpdateFlags { @@ -349,7 +349,7 @@ protected: private: // Wrapper engine needs access to state of its subengines. - friend class QmlCppEngine; + friend class Internal::QmlCppEngine; void setState(DebuggerState state, bool forced = false); void setSlaveEngine(bool value); diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index 4fa1cb23ad..6dc28e87c1 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -33,9 +33,9 @@ public: QmlCppEnginePrivate(); ~QmlCppEnginePrivate() {} - friend class Debugger::QmlCppEngine; + friend class QmlCppEngine; private: - QmlEngine *m_qmlEngine; + DebuggerEngine *m_qmlEngine; DebuggerEngine *m_cppEngine; DebuggerEngine *m_activeEngine; DebuggerState m_errorState; @@ -48,20 +48,17 @@ QmlCppEnginePrivate::QmlCppEnginePrivate() m_errorState(InferiorRunOk) {} -} // namespace Internal - -using namespace Internal; QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp) : DebuggerEngine(sp), d(new QmlCppEnginePrivate) { - d->m_qmlEngine = qobject_cast(Internal::createQmlEngine(sp)); + d->m_qmlEngine = createQmlEngine(sp); if (startParameters().cppEngineType == GdbEngineType) { - d->m_cppEngine = Internal::createGdbEngine(sp); + d->m_cppEngine = createGdbEngine(sp); } else { QString errorMessage; - d->m_cppEngine = Internal::createCdbEngine(sp, &errorMessage); + d->m_cppEngine = createCdbEngine(sp, &errorMessage); if (!d->m_cppEngine) { qWarning("%s", qPrintable(errorMessage)); return; @@ -239,7 +236,7 @@ void QmlCppEngine::updateAll() void QmlCppEngine::attemptBreakpointSynchronization() { d->m_cppEngine->attemptBreakpointSynchronization(); - static_cast(d->m_qmlEngine)->attemptBreakpointSynchronization(); + d->m_qmlEngine->attemptBreakpointSynchronization(); } bool QmlCppEngine::acceptsBreakpoint(BreakpointId id) const @@ -642,5 +639,5 @@ DebuggerEngine *QmlCppEngine::cppEngine() const return d->m_cppEngine; } - +} // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/qml/qmlcppengine.h b/src/plugins/debugger/qml/qmlcppengine.h index 839ed200f2..10c9a4011b 100644 --- a/src/plugins/debugger/qml/qmlcppengine.h +++ b/src/plugins/debugger/qml/qmlcppengine.h @@ -10,10 +10,9 @@ class IEditor; } namespace Debugger { - namespace Internal { + class QmlCppEnginePrivate; -} // namespace Internal class DEBUGGER_EXPORT QmlCppEngine : public DebuggerEngine { @@ -27,13 +26,13 @@ public: virtual void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor * editor, int cursorPos); - virtual void updateWatchData(const Internal::WatchData &data, - const Internal::WatchUpdateFlags &flags); + virtual void updateWatchData(const WatchData &data, + const WatchUpdateFlags &flags); virtual void watchPoint(const QPoint &); - virtual void fetchMemory(Internal::MemoryViewAgent *, QObject *, + virtual void fetchMemory(MemoryViewAgent *, QObject *, quint64 addr, quint64 length); - virtual void fetchDisassembler(Internal::DisassemblerViewAgent *); + virtual void fetchDisassembler(DisassemblerViewAgent *); virtual void activateFrame(int index); virtual void reloadModules(); @@ -59,7 +58,7 @@ public: virtual bool acceptsBreakpoint(BreakpointId id) const; virtual void selectThread(int index); - virtual void assignValueInDebugger(const Internal::WatchData *data, + virtual void assignValueInDebugger(const WatchData *data, const QString &expr, const QVariant &value); QAbstractItemModel *modulesModel() const; @@ -114,9 +113,10 @@ private: void engineStateChanged(const DebuggerState &newState); private: - QScopedPointer d; + QScopedPointer d; }; +} // namespace Internal } // namespace Debugger #endif // QMLGDBENGINE_H diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index d96bcca75f..983972cd3b 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -149,8 +149,8 @@ public: explicit QmlEnginePrivate(QmlEngine *q); ~QmlEnginePrivate() { delete m_adapter; } - friend class Debugger::QmlEngine; private: + friend class QmlEngine; int m_ping; QmlAdapter *m_adapter; ProjectExplorer::ApplicationLauncher m_applicationLauncher; @@ -160,9 +160,6 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *q) : m_ping(0), m_adapter(new QmlAdapter(q)) {} -} // namespace Internal - -using namespace Internal; /////////////////////////////////////////////////////////////////////// // @@ -177,8 +174,7 @@ QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters) } QmlEngine::~QmlEngine() -{ -} +{} void QmlEngine::gotoLocation(const QString &fileName, int lineNumber, bool setMarker) { @@ -867,5 +863,6 @@ QString QmlEngine::fromShadowBuildFilename(const QString &filename) const return newFilename; } +} // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h index e1e952fa38..ff5ee43abb 100644 --- a/src/plugins/debugger/qml/qmlengine.h +++ b/src/plugins/debugger/qml/qmlengine.h @@ -36,24 +36,23 @@ #include namespace Debugger { - namespace Internal { + class QmlEnginePrivate; -} // namespace Internal -class DEBUGGER_EXPORT QmlEngine : public DebuggerEngine +class QmlEngine : public DebuggerEngine { Q_OBJECT public: explicit QmlEngine(const DebuggerStartParameters &startParameters); - virtual ~QmlEngine(); + ~QmlEngine(); void handleRemoteSetupDone(int port); void handleRemoteSetupFailed(const QString &message); void gotoLocation(const QString &fileName, int lineNumber, bool setMarker); - void gotoLocation(const Internal::StackFrame &frame, bool setMarker); + void gotoLocation(const StackFrame &frame, bool setMarker); void pauseConnection(); @@ -65,7 +64,7 @@ signals: void remoteStartupRequested(); private: - // DebuggerEngine implementation + // DebuggerEngine implementation. bool isSynchronous() const { return false; } void executeStep(); void executeStepOut(); @@ -95,7 +94,7 @@ private: void attemptBreakpointSynchronization(); bool acceptsBreakpoint(BreakpointId id) const; - void assignValueInDebugger(const Internal::WatchData *data, + void assignValueInDebugger(const WatchData *data, const QString &expr, const QVariant &value); void loadSymbols(const QString &moduleName); void loadAllSymbols(); @@ -106,8 +105,8 @@ private: void reloadFullStack() {} bool supportsThreads() const { return false; } - void updateWatchData(const Internal::WatchData &data, - const Internal::WatchUpdateFlags &flags); + void updateWatchData(const WatchData &data, + const WatchUpdateFlags &flags); void executeDebuggerCommand(const QString &command); unsigned int debuggerCapabilities() const; @@ -141,9 +140,10 @@ private: private: friend class QmlCppEngine; - QScopedPointer d; + QScopedPointer d; }; +} // namespace Internal } // namespace Debugger #endif // DEBUGGER_QMLENGINE_H -- 2.11.0