svn path=/trunk/KDE/kdepim/; revision=1042333
wilder-work
Laurent Montel 17 years ago
parent ff50c2a83a
commit a76339a6ee
  1. 15
      util.cpp
  2. 15
      util.h

@ -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;
}

@ -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;
};
}
}

Loading…
Cancel
Save