[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [akonadi] src/core: Remove the unused KDSignalBlocker
From:       Daniel_Vrátil <dvratil () kde ! org>
Date:       2016-09-30 8:06:50
Message-ID: E1bpsqI-0000wf-7O () code ! kde ! org
[Download RAW message or body]

Git commit 2aa2d64d7b45c792a26d8f5b71e635594f895c97 by Daniel Vrátil.
Committed on 30/09/2016 at 08:06.
Pushed by dvratil into branch 'master'.

Remove the unused KDSignalBlocker

The class has been upstreamed as QSignalBlocker since Qt 5.3.

M  +0    -2    src/core/CMakeLists.txt
D  +0    -92   src/core/kdsignalblocker.cpp
D  +0    -52   src/core/kdsignalblocker.h

http://commits.kde.org/akonadi/2aa2d64d7b45c792a26d8f5b71e635594f895c97

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__ */
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic