diff --git a/src/apps/deskflow-gui/CMakeLists.txt b/src/apps/deskflow-gui/CMakeLists.txt index aef05edc2..cebb298ce 100644 --- a/src/apps/deskflow-gui/CMakeLists.txt +++ b/src/apps/deskflow-gui/CMakeLists.txt @@ -57,8 +57,6 @@ add_executable(${target} WIN32 MACOSX_BUNDLE MainWindow.h MainWindow.ui ProcessorArch.h - QUtility.cpp - QUtility.h ScreenSetupModel.cpp ScreenSetupModel.h ServerConfig.cpp diff --git a/src/apps/deskflow-gui/QUtility.cpp b/src/apps/deskflow-gui/QUtility.cpp deleted file mode 100644 index dfa5a7528..000000000 --- a/src/apps/deskflow-gui/QUtility.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2013 - 2016 Symless Ltd. - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#include "QUtility.h" - -#include "ProcessorArch.h" - -#if defined(Q_OS_LINUX) -#include -#include -#endif - -#if defined(Q_OS_WIN) -#define WIN32_LEAN_AND_MEAN -#include -#endif - -void setIndexFromItemData(QComboBox *comboBox, const QVariant &itemData) -{ - for (int i = 0; i < comboBox->count(); ++i) { - if (comboBox->itemData(i) == itemData) { - comboBox->setCurrentIndex(i); - return; - } - } -} - -QString hash(const QString &string) -{ - QByteArray data = string.toUtf8(); - QByteArray hash = QCryptographicHash::hash(data, QCryptographicHash::Md5); - return hash.toHex(); -} - -qProcessorArch getProcessorArch() -{ -#if defined(Q_OS_WIN) - SYSTEM_INFO systemInfo; - GetNativeSystemInfo(&systemInfo); - - switch (systemInfo.wProcessorArchitecture) { - case PROCESSOR_ARCHITECTURE_INTEL: - return kProcessorArchWin32; - case PROCESSOR_ARCHITECTURE_IA64: - return kProcessorArchWin64; - case PROCESSOR_ARCHITECTURE_AMD64: - return kProcessorArchWin64; - default: - return kProcessorArchUnknown; - } -#endif - -#if defined(Q_OS_LINUX) -#ifdef __i386__ - return kProcessorArchLinux32; -#else - return kProcessorArchLinux64; -#endif -#endif - - return kProcessorArchUnknown; -} diff --git a/src/apps/deskflow-gui/QUtility.h b/src/apps/deskflow-gui/QUtility.h deleted file mode 100644 index b9edfc127..000000000 --- a/src/apps/deskflow-gui/QUtility.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2013 - 2016 Symless Ltd. - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#pragma once - -#include "ProcessorArch.h" - -#include -#include -#include -#include - -void setIndexFromItemData(QComboBox *comboBox, const QVariant &itemData); -QString hash(const QString &string); -qProcessorArch getProcessorArch();