mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 07:37:21 -08:00
Oops, UID isn't an integer...
This commit is contained in:
parent
8b72d91875
commit
958dde6491
3 changed files with 10 additions and 15 deletions
11
functions.h
11
functions.h
|
@ -29,7 +29,6 @@ namespace global {
|
|||
namespace mainwindow {
|
||||
namespace tabSwitcher {
|
||||
inline bool repaint;
|
||||
|
||||
inline bool appsWidgetCreated;
|
||||
inline bool appsWidgetSelected;
|
||||
inline bool settingsChooserWidgetCreated;
|
||||
|
@ -52,6 +51,7 @@ namespace global {
|
|||
// https://stackoverflow.com/questions/6080853/c-multiple-definition-error-for-global-functions-in-the-header-file/20679534#20679534
|
||||
namespace {
|
||||
QString checkconfig_str_val;
|
||||
QString deviceUID;
|
||||
QString batt_level;
|
||||
int batt_level_int;
|
||||
bool checked_box = false;
|
||||
|
@ -246,7 +246,7 @@ namespace {
|
|||
proc->start(prog, args);
|
||||
}
|
||||
}
|
||||
int getUID() {
|
||||
void getUID() {
|
||||
QString prog ("dd");
|
||||
QStringList args;
|
||||
args << "if=/dev/mmcblk0" << "bs=512" << "skip=1" << "count=1" << "status=none";
|
||||
|
@ -254,11 +254,8 @@ namespace {
|
|||
proc->start(prog, args);
|
||||
proc->waitForFinished();
|
||||
|
||||
QString procOutput = proc->readAllStandardOutput();
|
||||
procOutput = procOutput.left(256);
|
||||
|
||||
int deviceUID = procOutput.toInt();
|
||||
return deviceUID;
|
||||
deviceUID = proc->readAllStandardOutput();
|
||||
deviceUID = deviceUID.left(256);
|
||||
}
|
||||
}
|
||||
#endif // FUNCTIONS_H
|
||||
|
|
|
@ -766,10 +766,9 @@ void reader::on_aboutBtn_clicked()
|
|||
string_checkconfig_ro("/external_root/opt/isa/version");
|
||||
aboutmsg.append("\n\nInkBox ");
|
||||
aboutmsg.append(checkconfig_str_val);
|
||||
int device_uid = getUID();
|
||||
QString device_uid_qstr = QString::number(device_uid);
|
||||
aboutmsg.append("\n");
|
||||
aboutmsg.append(device_uid_qstr);
|
||||
getUID();
|
||||
aboutmsg.append("\nDevice UID:\n");
|
||||
aboutmsg.append(deviceUID);
|
||||
QMessageBox::information(this, tr("Information"), aboutmsg);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -266,10 +266,9 @@ void settings::on_aboutBtn_clicked()
|
|||
string_checkconfig_ro("/external_root/opt/isa/version");
|
||||
aboutmsg.append("\n\nInkBox ");
|
||||
aboutmsg.append(checkconfig_str_val);
|
||||
int device_uid = getUID();
|
||||
QString device_uid_qstr = QString::number(device_uid);
|
||||
aboutmsg.append("\n");
|
||||
aboutmsg.append(device_uid_qstr);
|
||||
getUID();
|
||||
aboutmsg.append("\nDevice UID:\n");
|
||||
aboutmsg.append(deviceUID);
|
||||
QMessageBox::information(this, tr("Information"), aboutmsg);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue