summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <dvratil@kde.org>2016-09-16 13:48:15 (GMT)
committerDaniel Vrátil <dvratil@kde.org>2016-09-30 08:06:42 (GMT)
commit2aa2d64d7b45c792a26d8f5b71e635594f895c97 (patch)
tree0ac65c91838cfb87156153125b9f0658bbffa54b
parentc467dba1ef433147f645ccc82e08043cbb31d483 (diff)
Remove the unused KDSignalBlocker
The class has been upstreamed as QSignalBlocker since Qt 5.3.
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/kdsignalblocker.cpp92
-rw-r--r--src/core/kdsignalblocker.h52
3 files changed, 0 insertions, 146 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 7cd634f..88fd461 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -43,7 +43,6 @@ set(akonadicore_base_SRCS
itemserializer.cpp
itemserializerplugin.cpp
itemsync.cpp
- kdsignalblocker.cpp
mimetypechecker.cpp
monitor.cpp
monitor_p.cpp
@@ -104,7 +103,6 @@ ecm_generate_headers(AkonadiCore_base_HEADERS
ItemMonitor
ItemSerializerPlugin
ItemSync
- KDSignalBlocker
MimeTypeChecker
NewMailNotifierAttribute
NotificationSubscriber
diff --git a/src/core/kdsignalblocker.cpp b/src/core/kdsignalblocker.cpp
deleted file mode 100644
index 3bcab47..0000000
--- a/src/core/kdsignalblocker.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2012 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Tools library.
-**
-** Licensees holding valid commercial KD Tools licenses may use this file in
-** accordance with the KD Tools Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the GNU
-** Lesser General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.LGPL included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.net if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#include "kdsignalblocker.h"
-
-#include <QObject>
-
-using namespace Akonadi;
-
-/*!
- \class KDSignalBlocker
- \ingroup raii core
- \brief Exception-safe and convenient wrapper around QObject::blockSignals()
-
- All methods in this class are nothrow if QObject::blockSignals() and
- QObject::signalsBlocked() are nothrow, which they normally are.
-*/
-
-/*!
- Constructor. Blocks signals on \a o.
-
- \post o->signalsBlocked() == true
-*/
-KDSignalBlocker::KDSignalBlocker(QObject *o)
- : wasBlocked(o->signalsBlocked())
- , object(o)
-{
- o->blockSignals(true);
-}
-
-/*!
- \overload
-
- \post o.signalsBlocked() == true
-*/
-KDSignalBlocker::KDSignalBlocker(QObject &o)
- : wasBlocked(o.signalsBlocked())
- , object(&o)
-{
- o.blockSignals(true);
-}
-
-/*!
- Destructor. Unblocks signals (unless they were blocked before), if not already
- done by unblock().
-
- \post o->signalsBlocked() is the same as just before this instance has been constructed.
-*/
-KDSignalBlocker::~KDSignalBlocker()
-{
- unblock();
-}
-
-/*
- Unblocks signals (unless they were blocked before).
- You can use reblock() to block them again.
- There is no need to reblock before destruction.
-
- \post o->signalsBlocked() is the same as just before this instance has been constructed.
-*/
-void KDSignalBlocker::unblock()
-{
- object->blockSignals(wasBlocked);
-}
-
-/*
- Unblocks signals (unless they were blocked before)
- \post o->signalsBlocked() is the same as just before this instance has been constructed.
-*/
-void KDSignalBlocker::reblock()
-{
- object->blockSignals(true);
-}
diff --git a/src/core/kdsignalblocker.h b/src/core/kdsignalblocker.h
deleted file mode 100644
index 01c3135..0000000
--- a/src/core/kdsignalblocker.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-** Copyright (C) 2001-2012 Klaralvdalens Datakonsult AB. All rights reserved.
-**
-** This file is part of the KD Tools library.
-**
-** Licensees holding valid commercial KD Tools licenses may use this file in
-** accordance with the KD Tools Commercial License Agreement provided with
-** the Software.
-**
-**
-** This file may be distributed and/or modified under the terms of the GNU
-** Lesser General Public License version 2 and version 3 as published by the
-** Free Software Foundation and appearing in the file LICENSE.LGPL included.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** Contact info@kdab.net if any conditions of this licensing are not
-** clear to you.
-**
-**********************************************************************/
-
-#ifndef __KDTOOLS__CORE__KDSIGNALBLOCKER_H__
-#define __KDTOOLS__CORE__KDSIGNALBLOCKER_H__
-
-#include <qglobal.h>
-
-QT_BEGIN_NAMESPACE
-class QObject;
-QT_END_NAMESPACE
-
-namespace Akonadi
-{
-
-class KDSignalBlocker
-{
- Q_DISABLE_COPY(KDSignalBlocker)
-public:
- explicit KDSignalBlocker(QObject *o);
- explicit KDSignalBlocker(QObject &o);
- ~KDSignalBlocker();
-
- void unblock();
- void reblock();
-private:
- const bool wasBlocked;
- QObject *const object;
-};
-
-}
-
-#endif /* __KDTOOLS__CORE__KDSIGNALBLOCKER_H__ */