diff --git a/util.cpp b/util.cpp index a9b8918a7..d44fa323f 100644 --- a/util.cpp +++ b/util.cpp @@ -172,19 +172,4 @@ bool KMail::Util::handleUrlOnMac( const KUrl& url ) #endif } -KMail::Util::RecursionPreventer::RecursionPreventer( int &counter ) - : mCounter( counter ) -{ - mCounter++; -} - -KMail::Util::RecursionPreventer::~RecursionPreventer() -{ - mCounter--; -} - -bool KMail::Util::RecursionPreventer::isRecursive() const -{ - return mCounter > 1; -} diff --git a/util.h b/util.h index a6c04087f..1a0b316b0 100644 --- a/util.h +++ b/util.h @@ -144,21 +144,6 @@ namespace Util { bool m_disabled; }; - /** - * Small helper class that implements a variable when it is constructed and decrements that - * when it is destructed. - * Intended use is to use this with a static int that is initialy 0. - */ - class RecursionPreventer - { - public: - explicit RecursionPreventer( int &counter ); - ~RecursionPreventer(); - bool isRecursive() const; - - private: - int &mCounter; - }; } }