mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
Mod Machine_info
add send_info_to_debug Mod get data PC send to debuger on startup
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
#include "machine_info.h"
|
#include "machine_info.h"
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QThread>
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
@@ -31,6 +30,43 @@
|
|||||||
Machine_info::Machine_info(QObject *parent) : QObject(parent)
|
Machine_info::Machine_info(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
init_get_Screen_info();
|
init_get_Screen_info();
|
||||||
|
init_get_cpu_info();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Machine_info::send_info_to_debug
|
||||||
|
*/
|
||||||
|
void Machine_info::send_info_to_debug()
|
||||||
|
{
|
||||||
|
qDebug()<<"test message generated";
|
||||||
|
qInfo()<< tr("Compilation : ") + pc.built.version;
|
||||||
|
qInfo()<< "Built with Qt " + pc.built.QT
|
||||||
|
+ " - Date : " + pc.built.date
|
||||||
|
+ " : " + pc.built.time;
|
||||||
|
qInfo()<< "Run with Qt "+ QString(qVersion())
|
||||||
|
+ " using"
|
||||||
|
+ QString(" %1 thread(s)").arg(pc.cpu.ThreadCount);
|
||||||
|
qInfo()<< "CPU : " + pc.cpu.info;
|
||||||
|
qInfo()<< pc.ram.Total;
|
||||||
|
qInfo()<< pc.ram.Available;
|
||||||
|
qInfo()<< "GPU : " + pc.gpu.info;
|
||||||
|
qInfo()<< "GPU RAM : " + pc.gpu.RAM;
|
||||||
|
|
||||||
|
qInfo()<< "OS : " + pc.os.type
|
||||||
|
+ " - " + pc.cpu.Architecture
|
||||||
|
+ " - Version : "+pc.os.name
|
||||||
|
+ " - Kernel : "+pc.os.kernel;
|
||||||
|
qInfo()<< "*** Qt screens ***";
|
||||||
|
|
||||||
|
for (int ii = 0; ii < pc.screen.count; ++ii) {
|
||||||
|
qInfo()<<"( "
|
||||||
|
+ QString::number(ii + 1)
|
||||||
|
+ " : "
|
||||||
|
+ QString::number(pc.screen.width[ii])
|
||||||
|
+ " x "
|
||||||
|
+ QString::number(pc.screen.height[ii])
|
||||||
|
+ " )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,28 +78,29 @@ void Machine_info::init_get_Screen_info()
|
|||||||
const auto screens = qApp->screens();
|
const auto screens = qApp->screens();
|
||||||
for (int ii = 0; ii < screens.count(); ++ii)
|
for (int ii = 0; ii < screens.count(); ++ii)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(
|
if(
|
||||||
Max_screen_width
|
pc.screen.Max_width
|
||||||
<
|
<
|
||||||
screens[ii]->geometry().width()
|
screens[ii]->geometry().width()
|
||||||
*
|
*
|
||||||
screens[ii]->devicePixelRatio()
|
screens[ii]->devicePixelRatio()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Max_screen_width =
|
pc.screen.Max_width =
|
||||||
screens[ii]->geometry().width()
|
screens[ii]->geometry().width()
|
||||||
*
|
*
|
||||||
screens[ii]->devicePixelRatio();
|
screens[ii]->devicePixelRatio();
|
||||||
}
|
}
|
||||||
if(
|
if(
|
||||||
Max_screen_height
|
pc.screen.Max_height
|
||||||
<
|
<
|
||||||
screens[ii]->geometry().height()
|
screens[ii]->geometry().height()
|
||||||
*
|
*
|
||||||
screens[ii]->devicePixelRatio()
|
screens[ii]->devicePixelRatio()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Max_screen_height =
|
pc.screen.Max_height =
|
||||||
screens[ii]->geometry().height()
|
screens[ii]->geometry().height()
|
||||||
*
|
*
|
||||||
screens[ii]->devicePixelRatio();
|
screens[ii]->devicePixelRatio();
|
||||||
@@ -72,70 +109,44 @@ void Machine_info::init_get_Screen_info()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Machine_info::i_max_screen_width
|
@brief Machine_info::init_get_cpu_info
|
||||||
@return max screen width
|
|
||||||
*/
|
|
||||||
int32_t Machine_info::i_max_screen_width()
|
|
||||||
{
|
|
||||||
return Max_screen_width;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Machine_info::i_max_screen_height
|
|
||||||
@return max screen height
|
|
||||||
*/
|
*/
|
||||||
int32_t Machine_info::i_max_screen_height()
|
void Machine_info::init_get_cpu_info()
|
||||||
{
|
{
|
||||||
return Max_screen_height;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Machine_info::compilation_info
|
|
||||||
@return compilation_info
|
|
||||||
*/
|
|
||||||
QString Machine_info::compilation_info()
|
|
||||||
{
|
|
||||||
QString compilation_info = "<br />" + tr("Compilation : ");
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __APPLE_CC__
|
#ifdef __APPLE_CC__
|
||||||
compilation_info += " CLANG " + QString(__clang_version__ );
|
init_get_cpu_info_macos();
|
||||||
compilation_info += " <br>Built with Qt " + QString(QT_VERSION_STR);
|
|
||||||
compilation_info += " - Date : " + QString(__DATE__);
|
|
||||||
compilation_info += " : " + QString(__TIME__);
|
|
||||||
compilation_info += " <br>Run with Qt "+ QString(qVersion());
|
|
||||||
compilation_info += " using" + QString(" %1 thread(s)").arg(
|
|
||||||
QThread::idealThreadCount());
|
|
||||||
QProcess macoscpuinfo;
|
|
||||||
macoscpuinfo.start("bash",
|
|
||||||
QStringList()
|
|
||||||
<< "-c"
|
|
||||||
<< "sysctl -n machdep.cpu.brand_string");
|
|
||||||
macoscpuinfo.waitForFinished();
|
|
||||||
QString macosOutput = macoscpuinfo.readAllStandardOutput();
|
|
||||||
compilation_info += "<br>"" CPU : "
|
|
||||||
+ QString(macosOutput.toLocal8Bit().constData());
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
compilation_info += " GCC " + QString(__VERSION__);
|
if (pc.os.type == "linux")
|
||||||
compilation_info += "<br>Built with Qt " + QString(QT_VERSION_STR);
|
init_get_cpu_info_linux();
|
||||||
compilation_info += " - Date : " + QString(__DATE__);
|
if (pc.os.type == "winnt")
|
||||||
compilation_info += " : " + QString(__TIME__);
|
init_get_cpu_info_winnt();
|
||||||
compilation_info += " <br>Run with Qt "+ QString(qVersion());
|
#endif
|
||||||
compilation_info += " using"
|
#endif
|
||||||
+ QString(" %1 thread(s)").arg(
|
const auto screens = qApp->screens();
|
||||||
QThread::idealThreadCount());
|
pc.screen.count=screens.count();
|
||||||
|
for (int ii = 0; ii < pc.screen.count; ++ii) {
|
||||||
|
pc.screen.width[ii]=
|
||||||
|
screens[ii]->geometry().width()
|
||||||
|
* screens[ii]->devicePixelRatio();
|
||||||
|
pc.screen.height[ii]=
|
||||||
|
screens[ii]->geometry().height()
|
||||||
|
* screens[ii]->devicePixelRatio();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString OSName = QSysInfo::kernelType();
|
/**
|
||||||
if (OSName == "linux")
|
@brief Machine_info::init_get_cpu_info_linux
|
||||||
{
|
*/
|
||||||
|
void Machine_info::init_get_cpu_info_linux()
|
||||||
|
{
|
||||||
QProcess linuxcpuinfo;
|
QProcess linuxcpuinfo;
|
||||||
linuxcpuinfo.start("bash", QStringList()
|
linuxcpuinfo.start("bash", QStringList()
|
||||||
<< "-c"
|
<< "-c"
|
||||||
<< "cat /proc/cpuinfo |grep 'model name' | uniq");
|
<< "cat /proc/cpuinfo |grep 'model name' | uniq");
|
||||||
linuxcpuinfo.waitForFinished();
|
linuxcpuinfo.waitForFinished();
|
||||||
QString linuxOutput = linuxcpuinfo.readAllStandardOutput();
|
QString linuxOutput = linuxcpuinfo.readAllStandardOutput();
|
||||||
compilation_info += "<br>"" CPU : "
|
pc.cpu.info=QString(linuxOutput.toLocal8Bit().constData());
|
||||||
+ QString(linuxOutput.toLocal8Bit().constData());
|
|
||||||
|
|
||||||
QProcess p;
|
QProcess p;
|
||||||
p.start("awk", QStringList()
|
p.start("awk", QStringList()
|
||||||
@@ -143,8 +154,8 @@ QString Machine_info::compilation_info()
|
|||||||
<< "/proc/meminfo");
|
<< "/proc/meminfo");
|
||||||
p.waitForFinished();
|
p.waitForFinished();
|
||||||
QString memory = p.readAllStandardOutput();
|
QString memory = p.readAllStandardOutput();
|
||||||
compilation_info += "<br>"
|
//compilation_info += "<br>"
|
||||||
+ QString("RAM Total : %1 MB").arg(
|
pc.ram.Total=QString("RAM Total : %1 MB").arg(
|
||||||
memory.toLong() / 1024);
|
memory.toLong() / 1024);
|
||||||
p.close();
|
p.close();
|
||||||
|
|
||||||
@@ -155,8 +166,7 @@ QString Machine_info::compilation_info()
|
|||||||
<< "/proc/meminfo");
|
<< "/proc/meminfo");
|
||||||
qp.waitForFinished();
|
qp.waitForFinished();
|
||||||
QString AvailableMemory = qp.readAllStandardOutput();
|
QString AvailableMemory = qp.readAllStandardOutput();
|
||||||
compilation_info += "<br>"
|
pc.ram.Available=QString("RAM Available : %1 MB").arg(
|
||||||
+ QString("RAM Available : %1 MB").arg(
|
|
||||||
AvailableMemory.toLong() / 1024);
|
AvailableMemory.toLong() / 1024);
|
||||||
qp.close();
|
qp.close();
|
||||||
|
|
||||||
@@ -167,26 +177,22 @@ QString Machine_info::compilation_info()
|
|||||||
<< "lspci | grep VGA | cut -d : -f 3");
|
<< "lspci | grep VGA | cut -d : -f 3");
|
||||||
linuxgpuinfo.waitForFinished();
|
linuxgpuinfo.waitForFinished();
|
||||||
QString linuxGPUOutput = linuxgpuinfo.readAllStandardOutput();
|
QString linuxGPUOutput = linuxgpuinfo.readAllStandardOutput();
|
||||||
compilation_info += "<br>"" GPU : "
|
pc.gpu.info=QString(linuxGPUOutput.toLocal8Bit().constData());
|
||||||
+ QString(linuxGPUOutput.toLocal8Bit().constData());
|
pc.gpu.RAM="@ToDo";
|
||||||
|
}
|
||||||
}
|
/**
|
||||||
|
@brief Machine_info::init_get_cpu_info_winnt
|
||||||
if(QSysInfo::kernelType() == "winnt")
|
*/
|
||||||
{
|
void Machine_info::init_get_cpu_info_winnt()
|
||||||
|
{
|
||||||
QProcess wincpuinfo;
|
QProcess wincpuinfo;
|
||||||
{
|
|
||||||
|
|
||||||
wincpuinfo.start("wmic",
|
wincpuinfo.start("wmic",
|
||||||
QStringList() << "cpu" << "get" << "name");
|
QStringList() << "cpu" << "get" << "name");
|
||||||
wincpuinfo.waitForFinished();
|
wincpuinfo.waitForFinished();
|
||||||
QString windows_output = wincpuinfo.readAllStandardOutput().toUpper();
|
QString windows_output = wincpuinfo.readAllStandardOutput().toUpper();
|
||||||
compilation_info += "<br>"" CPU : "
|
pc.cpu.info=QString(windows_output.toLocal8Bit().constData());
|
||||||
+ QString(windows_output.toLocal8Bit().constData());
|
|
||||||
|
|
||||||
QProcess wingpuinfo;
|
QProcess wingpuinfo;
|
||||||
{
|
|
||||||
|
|
||||||
wingpuinfo.start("wmic",
|
wingpuinfo.start("wmic",
|
||||||
QStringList()
|
QStringList()
|
||||||
<< "PATH"
|
<< "PATH"
|
||||||
@@ -195,13 +201,9 @@ QString Machine_info::compilation_info()
|
|||||||
<< "VideoProcessor ");
|
<< "VideoProcessor ");
|
||||||
wingpuinfo.waitForFinished();
|
wingpuinfo.waitForFinished();
|
||||||
QString WinGPUOutput = wingpuinfo.readAllStandardOutput();
|
QString WinGPUOutput = wingpuinfo.readAllStandardOutput();
|
||||||
compilation_info += "<br>" "GPU : "
|
pc.gpu.info=QString(WinGPUOutput.toLocal8Bit().constData());
|
||||||
+ QString(WinGPUOutput.toLocal8Bit().constData());
|
|
||||||
}
|
|
||||||
|
|
||||||
QProcess wingpuraminfo;
|
QProcess wingpuraminfo;
|
||||||
{
|
|
||||||
|
|
||||||
wingpuraminfo.start("wmic",
|
wingpuraminfo.start("wmic",
|
||||||
QStringList()
|
QStringList()
|
||||||
<< "PATH"
|
<< "PATH"
|
||||||
@@ -210,38 +212,73 @@ QString Machine_info::compilation_info()
|
|||||||
<< "AdapterRAM ");
|
<< "AdapterRAM ");
|
||||||
wingpuraminfo.waitForFinished();
|
wingpuraminfo.waitForFinished();
|
||||||
QString WinGPURAMOutput = wingpuraminfo.readAllStandardOutput();
|
QString WinGPURAMOutput = wingpuraminfo.readAllStandardOutput();
|
||||||
compilation_info += "<br>" "GPU RAM : "
|
pc.gpu.RAM=QString(WinGPURAMOutput.toLocal8Bit().constData());
|
||||||
+ QString(WinGPURAMOutput.toLocal8Bit().constData());
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
void Machine_info::init_get_cpu_info_macos()
|
||||||
#endif
|
{
|
||||||
|
QProcess macoscpuinfo;
|
||||||
|
macoscpuinfo.start("bash",
|
||||||
|
QStringList()
|
||||||
|
<< "-c"
|
||||||
|
<< "sysctl -n machdep.cpu.brand_string");
|
||||||
|
macoscpuinfo.waitForFinished();
|
||||||
|
QString macosOutput = macoscpuinfo.readAllStandardOutput();
|
||||||
|
pc.cpu.info=QString(macosOutput.toLocal8Bit().constData());
|
||||||
|
}
|
||||||
|
|
||||||
compilation_info += "<br>" " OS : "
|
/**
|
||||||
+ QString(QSysInfo::kernelType());
|
@brief Machine_info::i_max_screen_width
|
||||||
compilation_info += " - "
|
@return max screen width
|
||||||
+ QString(QSysInfo::currentCpuArchitecture());
|
*/
|
||||||
compilation_info += " - Version : "
|
int32_t Machine_info::i_max_screen_width()
|
||||||
+ QString(QSysInfo::prettyProductName());
|
{
|
||||||
compilation_info += "</br>" " - Kernel : "
|
return pc.screen.Max_width;
|
||||||
+ QString(QSysInfo::kernelVersion());
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Machine_info::i_max_screen_height
|
||||||
|
@return max screen height
|
||||||
|
*/
|
||||||
|
int32_t Machine_info::i_max_screen_height()
|
||||||
|
{
|
||||||
|
return pc.screen.Max_height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Machine_info::compilation_info
|
||||||
|
@return compilation_info
|
||||||
|
*/
|
||||||
|
QString Machine_info::compilation_info()
|
||||||
|
{
|
||||||
|
QString compilation_info = "<br />" + tr("Compilation : ");
|
||||||
|
compilation_info +=pc.built.version;
|
||||||
|
compilation_info += "<br>Built with Qt " + pc.built.QT;
|
||||||
|
compilation_info += " - Date : " + pc.built.date;
|
||||||
|
compilation_info += " : " + pc.built.time;
|
||||||
|
compilation_info += " <br>Run with Qt "+ QString(qVersion());
|
||||||
|
compilation_info += " using"
|
||||||
|
+ QString(" %1 thread(s)").arg(pc.cpu.ThreadCount);
|
||||||
|
compilation_info += "<br> CPU : " + pc.cpu.info;
|
||||||
|
compilation_info += "<br>" + pc.ram.Total;
|
||||||
|
compilation_info += "<br>" + pc.ram.Available;
|
||||||
|
compilation_info += "<br>GPU : " + pc.gpu.info;
|
||||||
|
compilation_info += "<br>GPU RAM : " + pc.gpu.RAM;
|
||||||
|
|
||||||
|
compilation_info += "<br> OS : " + pc.os.type;
|
||||||
|
compilation_info += " - " + pc.cpu.Architecture;
|
||||||
|
compilation_info += " - Version : "+pc.os.name;
|
||||||
|
compilation_info += "</br> - Kernel : "+pc.os.kernel;
|
||||||
compilation_info += "<br> *** Qt screens *** </br>";
|
compilation_info += "<br> *** Qt screens *** </br>";
|
||||||
const auto screens = qApp->screens();
|
|
||||||
for (int ii = 0; ii < screens.count(); ++ii) {
|
for (int ii = 0; ii < pc.screen.count; ++ii) {
|
||||||
compilation_info += "<br> ( "
|
compilation_info += "<br> ( "
|
||||||
+ QString::number(ii + 1)
|
+ QString::number(ii + 1)
|
||||||
+ " : "
|
+ " : "
|
||||||
+ QString::number(
|
+ QString::number(pc.screen.width[ii])
|
||||||
screens[ii]->geometry().width()
|
|
||||||
* screens[ii]->devicePixelRatio())
|
|
||||||
+ " x "
|
+ " x "
|
||||||
+ QString::number(
|
+ QString::number(pc.screen.height[ii])
|
||||||
screens[ii]->geometry().height()
|
|
||||||
* screens[ii]->devicePixelRatio())
|
|
||||||
+ " ) </br>";
|
+ " ) </br>";
|
||||||
}
|
}
|
||||||
qDebug()<<compilation_info;
|
|
||||||
return compilation_info;
|
return compilation_info;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#define MACHINE_INFO_H
|
#define MACHINE_INFO_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief The Machine_info class
|
@brief The Machine_info class
|
||||||
@@ -32,13 +33,65 @@ public:
|
|||||||
int32_t i_max_screen_width();
|
int32_t i_max_screen_width();
|
||||||
int32_t i_max_screen_height();
|
int32_t i_max_screen_height();
|
||||||
QString compilation_info();
|
QString compilation_info();
|
||||||
|
void send_info_to_debug();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init_get_Screen_info();
|
void init_get_Screen_info();
|
||||||
int32_t Max_screen_width;
|
void init_get_cpu_info();
|
||||||
int32_t Max_screen_height;
|
void init_get_cpu_info_linux();
|
||||||
|
void init_get_cpu_info_winnt();
|
||||||
|
void init_get_cpu_info_macos();
|
||||||
|
struct Pc
|
||||||
|
{
|
||||||
|
struct Screen
|
||||||
|
{
|
||||||
|
int32_t count;
|
||||||
|
int32_t width[10];
|
||||||
|
int32_t height[10];
|
||||||
|
int32_t Max_width;
|
||||||
|
int32_t Max_height;
|
||||||
|
}screen;
|
||||||
|
struct Built
|
||||||
|
{
|
||||||
|
QString version=
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#ifdef __APPLE_CC__
|
||||||
|
"CLANG " + QString(__clang_version__);
|
||||||
|
#else
|
||||||
|
"GCC " + QString(__VERSION__);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
QString QT=QString(QT_VERSION_STR);
|
||||||
|
QString date=QString(__DATE__);
|
||||||
|
QString time=QString(__TIME__);
|
||||||
|
}built;
|
||||||
|
struct CPU
|
||||||
|
{
|
||||||
|
QString info;
|
||||||
|
QString Architecture=QString(
|
||||||
|
QSysInfo::currentCpuArchitecture());
|
||||||
|
int32_t ThreadCount=QThread::idealThreadCount();
|
||||||
|
}cpu;
|
||||||
|
struct RAM
|
||||||
|
{
|
||||||
|
QString Total;
|
||||||
|
QString Available;
|
||||||
|
}ram;
|
||||||
|
struct GPU
|
||||||
|
{
|
||||||
|
QString info;
|
||||||
|
QString RAM;
|
||||||
|
|
||||||
|
}gpu;
|
||||||
|
struct OS
|
||||||
|
{
|
||||||
|
QString type=QString(QSysInfo::kernelType());
|
||||||
|
QString name=QString(QSysInfo::prettyProductName());
|
||||||
|
QString kernel=QString(QSysInfo::kernelVersion());
|
||||||
|
}os;
|
||||||
|
}pc;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "singleapplication.h"
|
#include "singleapplication.h"
|
||||||
#include "qet.h"
|
#include "qet.h"
|
||||||
#include "macosxopenevent.h"
|
#include "macosxopenevent.h"
|
||||||
|
#include "machine_info.h"
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,12 +51,9 @@ void myMessageOutput(QtMsgType type,
|
|||||||
break;
|
break;
|
||||||
case QtInfoMsg:
|
case QtInfoMsg:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s Info: %s (%s:%u, %s)\n",
|
"%s Info: %s \n",
|
||||||
dbs.constData(),
|
dbs.constData(),
|
||||||
localMsg.constData(),
|
localMsg.constData());
|
||||||
file,
|
|
||||||
context.line,
|
|
||||||
function);
|
|
||||||
break;
|
break;
|
||||||
case QtWarningMsg:
|
case QtWarningMsg:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@@ -110,19 +108,16 @@ int main(int argc, char **argv)
|
|||||||
QCoreApplication::setOrganizationName("QElectroTech");
|
QCoreApplication::setOrganizationName("QElectroTech");
|
||||||
QCoreApplication::setOrganizationDomain("qelectrotech.org");
|
QCoreApplication::setOrganizationDomain("qelectrotech.org");
|
||||||
QCoreApplication::setApplicationName("QElectroTech");
|
QCoreApplication::setApplicationName("QElectroTech");
|
||||||
qDebug()<<"test message generated";
|
|
||||||
qInfo()<<"OS:"
|
|
||||||
+ QString(QSysInfo::kernelType())
|
|
||||||
+ "-"
|
|
||||||
+ QString(QSysInfo::currentCpuArchitecture())
|
|
||||||
+ " Version:"
|
|
||||||
+ QString(QSysInfo::prettyProductName())
|
|
||||||
+ " Kernel:"
|
|
||||||
+ QString(QSysInfo::kernelVersion());
|
|
||||||
//Creation and execution of the application
|
//Creation and execution of the application
|
||||||
//HighDPI
|
//HighDPI
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
SingleApplication app(argc, argv, true);
|
SingleApplication app(argc, argv, true);
|
||||||
|
|
||||||
|
{
|
||||||
|
Machine_info *my_ma =new Machine_info();
|
||||||
|
my_ma->send_info_to_debug();
|
||||||
|
delete my_ma;
|
||||||
|
}
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
//Handle the opening of QET when user double click on a .qet .elmt .tbt file
|
//Handle the opening of QET when user double click on a .qet .elmt .tbt file
|
||||||
//or drop these same files to the QET icon of the dock
|
//or drop these same files to the QET icon of the dock
|
||||||
|
|||||||
Reference in New Issue
Block a user