aboutsummaryrefslogtreecommitdiff
path: root/src/qt/monitoreddatamapper.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-23 19:08:10 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-23 19:09:34 +0200
commitd2833de42430b7771eb572d71ba81eec1079f91f (patch)
tree32e638b4c8a09f0fb9e117d1c9bda95c708a6e9d /src/qt/monitoreddatamapper.cpp
parentc8a25189bcb1381eddf46b9a9743ba48e929439e (diff)
qt: remove monitoreddatamapper
We haven't used the viewModified signal in ages, so we can use a normal QDataWidgetMapper.
Diffstat (limited to 'src/qt/monitoreddatamapper.cpp')
-rw-r--r--src/qt/monitoreddatamapper.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/qt/monitoreddatamapper.cpp b/src/qt/monitoreddatamapper.cpp
deleted file mode 100644
index 5931c53872..0000000000
--- a/src/qt/monitoreddatamapper.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2011-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "monitoreddatamapper.h"
-
-#include <QMetaObject>
-#include <QMetaProperty>
-#include <QWidget>
-
-MonitoredDataMapper::MonitoredDataMapper(QObject *parent) :
- QDataWidgetMapper(parent)
-{
-}
-
-void MonitoredDataMapper::addMapping(QWidget *widget, int section)
-{
- QDataWidgetMapper::addMapping(widget, section);
- addChangeMonitor(widget);
-}
-
-void MonitoredDataMapper::addMapping(QWidget *widget, int section, const QByteArray &propertyName)
-{
- QDataWidgetMapper::addMapping(widget, section, propertyName);
- addChangeMonitor(widget);
-}
-
-void MonitoredDataMapper::addChangeMonitor(QWidget *widget)
-{
- // Watch user property of widget for changes, and connect
- // the signal to our viewModified signal.
- QMetaProperty prop = widget->metaObject()->userProperty();
- int signal = prop.notifySignalIndex();
- int method = this->metaObject()->indexOfMethod("viewModified()");
- if(signal != -1 && method != -1)
- {
- QMetaObject::connect(widget, signal, this, method);
- }
-}