From 9d8f4c3a0d0075d1c269b996440627d622514e84 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 19 Mar 2017 21:35:28 +0200 Subject: QtSingleApplication: Remove unused QtSingleCoreApplication Change-Id: I0a289126ccc6def2e2b129332b64bed1971b6558 Reviewed-by: Tobias Hunger --- .../qtsinglecoreapplication.cpp | 64 ---------------------- .../qtsingleapplication/qtsinglecoreapplication.h | 55 ------------------- .../qtsinglecoreapplication.pri | 14 ----- 3 files changed, 133 deletions(-) delete mode 100644 src/shared/qtsingleapplication/qtsinglecoreapplication.cpp delete mode 100644 src/shared/qtsingleapplication/qtsinglecoreapplication.h delete mode 100644 src/shared/qtsingleapplication/qtsinglecoreapplication.pri (limited to 'src/shared') diff --git a/src/shared/qtsingleapplication/qtsinglecoreapplication.cpp b/src/shared/qtsingleapplication/qtsinglecoreapplication.cpp deleted file mode 100644 index d0ec9ab9d9c..00000000000 --- a/src/shared/qtsingleapplication/qtsinglecoreapplication.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "qtsinglecoreapplication.h" -#include "qtlocalpeer.h" - -namespace SharedTools { - -QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) - : QCoreApplication(argc, argv) -{ - peer = new QtLocalPeer(this); - connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString))); -} - - -QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) - : QCoreApplication(argc, argv) -{ - peer = new QtLocalPeer(this, appId); - connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString))); -} - - -bool QtSingleCoreApplication::isRunning() -{ - return peer->isClient(); -} - - -bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) -{ - return peer->sendMessage(message, timeout); -} - - -QString QtSingleCoreApplication::id() const -{ - return peer->applicationId(); -} - -} // namespace SharedTools diff --git a/src/shared/qtsingleapplication/qtsinglecoreapplication.h b/src/shared/qtsingleapplication/qtsinglecoreapplication.h deleted file mode 100644 index bf9f8e095c7..00000000000 --- a/src/shared/qtsingleapplication/qtsinglecoreapplication.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include - -namespace SharedTools { - -class QtLocalPeer; - -class QtSingleCoreApplication : public QCoreApplication -{ - Q_OBJECT - -public: - QtSingleCoreApplication(int &argc, char **argv); - QtSingleCoreApplication(const QString &id, int &argc, char **argv); - - bool isRunning(); - QString id() const; - -public Q_SLOTS: - bool sendMessage(const QString &message, int timeout = 5000); - - -Q_SIGNALS: - void messageReceived(const QString &message); - - -private: - QtLocalPeer* peer; -}; - -} // namespace SharedTools diff --git a/src/shared/qtsingleapplication/qtsinglecoreapplication.pri b/src/shared/qtsingleapplication/qtsinglecoreapplication.pri deleted file mode 100644 index 3d6301b29c4..00000000000 --- a/src/shared/qtsingleapplication/qtsinglecoreapplication.pri +++ /dev/null @@ -1,14 +0,0 @@ -INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD -HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h -SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp - -QT *= network - -gotqtlockedfile = $$find(HEADERS, .*qtlockedfile.h) -isEmpty(gotqtlockedfile):include(../qtlockedfile/qtlockedfile.pri) - - -win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { - DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) -} -- cgit v1.2.3