diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-02-27 15:47:47 +0100 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-09-27 08:17:08 +0000 |
commit | 0269bf537bce9ea18f14ab7075a99ace202d0d2d (patch) | |
tree | 730eb7d52ec3990a19dfb8a43f30478ff8841f82 /src/plugins/macros/imacrohandler.cpp | |
parent | e99b86e8ca1473acf45c50c35c68dd57318f3462 (diff) | |
download | qt-creator-0269bf537bce9ea18f14ab7075a99ace202d0d2d.tar.gz |
Macros: Modernize
* Replace 0 with nullptr
* Remove redundant pimpl
* Use inline member initialization
Started-by: Laurent Montel <laurent.montel@kdab.com>
Change-Id: I15ace2581c13ecf24b7c947972b9435fbcaa12ab
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/macros/imacrohandler.cpp')
-rw-r--r-- | src/plugins/macros/imacrohandler.cpp | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/src/plugins/macros/imacrohandler.cpp b/src/plugins/macros/imacrohandler.cpp index 15d36b6358..b9b3fbf2f4 100644 --- a/src/plugins/macros/imacrohandler.cpp +++ b/src/plugins/macros/imacrohandler.cpp @@ -67,55 +67,31 @@ using namespace Macros::Internal; the macro event. */ -class IMacroHandler::IMacroHandlerPrivate -{ -public: - IMacroHandlerPrivate(); - - Macro *currentMacro; -}; - -IMacroHandler::IMacroHandlerPrivate::IMacroHandlerPrivate() : - currentMacro(0) -{ -} - - // ---------- IMacroHandler ------------ -IMacroHandler::IMacroHandler(): - d(new IMacroHandlerPrivate) -{ -} - -IMacroHandler::~IMacroHandler() -{ - delete d; -} - void IMacroHandler::startRecording(Macro* macro) { - d->currentMacro = macro; + m_currentMacro = macro; } void IMacroHandler::endRecordingMacro(Macro* macro) { Q_UNUSED(macro) - d->currentMacro = 0; + m_currentMacro = nullptr; } void IMacroHandler::addMacroEvent(const MacroEvent& event) { - if (d->currentMacro) - d->currentMacro->append(event); + if (m_currentMacro) + m_currentMacro->append(event); } void IMacroHandler::setCurrentMacro(Macro *macro) { - d->currentMacro = macro; + m_currentMacro = macro; } bool IMacroHandler::isRecording() const { - return d->currentMacro != 0; + return m_currentMacro != nullptr; } |