chore: remove unused apps/deskflow-gui/QUtility
This commit is contained in:
parent
e00058a332
commit
385a610da2
3 changed files with 0 additions and 85 deletions
|
|
@ -57,8 +57,6 @@ add_executable(${target} WIN32 MACOSX_BUNDLE
|
||||||
MainWindow.h
|
MainWindow.h
|
||||||
MainWindow.ui
|
MainWindow.ui
|
||||||
ProcessorArch.h
|
ProcessorArch.h
|
||||||
QUtility.cpp
|
|
||||||
QUtility.h
|
|
||||||
ScreenSetupModel.cpp
|
ScreenSetupModel.cpp
|
||||||
ScreenSetupModel.h
|
ScreenSetupModel.h
|
||||||
ServerConfig.cpp
|
ServerConfig.cpp
|
||||||
|
|
|
||||||
|
|
@ -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 <QFile>
|
|
||||||
#include <QProcess>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
#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;
|
|
||||||
}
|
|
||||||
|
|
@ -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 <QComboBox>
|
|
||||||
#include <QCryptographicHash>
|
|
||||||
#include <QNetworkInterface>
|
|
||||||
#include <QVariant>
|
|
||||||
|
|
||||||
void setIndexFromItemData(QComboBox *comboBox, const QVariant &itemData);
|
|
||||||
QString hash(const QString &string);
|
|
||||||
qProcessorArch getProcessorArch();
|
|
||||||
Loading…
Reference in a new issue