summaryrefslogtreecommitdiff
path: root/src/runonphone/ossignalconverter.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-08-06 15:48:28 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-20 11:07:18 +0200
commitc14a9b92de20b8b114ab26a7d91cf3572bfbdc70 (patch)
treea6ec2b35602633b380b9e1ea5433ba8e628b5da2 /src/runonphone/ossignalconverter.cpp
parent5a8fe661806cfb3a63247f8adf7e38036a5a73fe (diff)
downloadqttools-c14a9b92de20b8b114ab26a7d91cf3572bfbdc70.tar.gz
Remove runonphone
runonphone was a pure symbian utility. Remove it. Change-Id: I6fa1b7884fb86a161ff4f7f8ba7f54de687faa43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jason Barron <jason.barron@nokia.com>
Diffstat (limited to 'src/runonphone/ossignalconverter.cpp')
-rw-r--r--src/runonphone/ossignalconverter.cpp121
1 files changed, 0 insertions, 121 deletions
diff --git a/src/runonphone/ossignalconverter.cpp b/src/runonphone/ossignalconverter.cpp
deleted file mode 100644
index 8f0201b86..000000000
--- a/src/runonphone/ossignalconverter.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the tools applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "ossignalconverter_p.h"
-#include <signal.h>
-#include <QTimer>
-#include <stdio.h>
-
-Q_GLOBAL_STATIC(OsSignalConverter, osSignalConverter);
-
-OsSignalConverter* OsSignalConverter::instance()
-{
- return osSignalConverter();
-}
-
-OsSignalConverter::OsSignalConverter()
-: d(new OsSignalConverterPrivate(this))
-{
-};
-
-OsSignalConverter::~OsSignalConverter()
-{
-}
-
-OsSignalConverterPrivate::OsSignalConverterPrivate(OsSignalConverter* owner)
-: QObject(owner), q(owner), poller(new QTimer(this))
-{
- trap();
- connect(poller, SIGNAL(timeout()), this, SLOT(poll()));
- poller->start(1000);
-}
-
-OsSignalConverterPrivate::~OsSignalConverterPrivate()
-{
- untrap();
-}
-
-void OsSignalConverterPrivate::trap()
-{
- signal(SIGINT, handler);
- signal(SIGTERM, handler);
-#ifdef SIGBREAK
- signal(SIGBREAK, handler);
-#endif
-#ifdef SIGHUP
- signal(SIGHUP, handler);
-#endif
-#ifdef SIGQUIT
- signal(SIGQUIT, handler);
-#endif
-}
-
-void OsSignalConverterPrivate::untrap()
-{
- signal(SIGINT, SIG_DFL);
- signal(SIGTERM, SIG_DFL);
-#ifdef SIGBREAK
- signal(SIGBREAK, SIG_DFL);
-#endif
-#ifdef SIGHUP
- signal(SIGHUP, SIG_DFL);
-#endif
-#ifdef SIGQUIT
- signal(SIGQUIT, SIG_DFL);
-#endif
-}
-
-void OsSignalConverterPrivate::handler(int sig)
-{
- untrap(); //allow 2nd ctrl-c to really kill us
- terminateRequest = sig;
-}
-
-void OsSignalConverterPrivate::poll()
-{
- if (terminateRequest) {
- fprintf(stderr, "\n*** caught signal %d, terminating ***\n", terminateRequest);
- poller->stop();
- emit q->terminate();
- }
-}
-
-sig_atomic_t OsSignalConverterPrivate::terminateRequest;