Fix startup bug in usb mode
This commit is contained in:
parent
03ad005f80
commit
4e2ebcdd4a
@ -29,7 +29,6 @@
|
||||
#include <QFont>
|
||||
#include <QScreen>
|
||||
#include <QRect>
|
||||
#include <QProcess>
|
||||
|
||||
namespace f1x
|
||||
{
|
||||
@ -426,12 +425,12 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
||||
}
|
||||
|
||||
// Load configured brightness values
|
||||
QProcess processbrigthness;
|
||||
processbrigthness.start("/usr/local/bin/autoapp_helper getbrightnessvalues");
|
||||
processbrigthness.waitForFinished();
|
||||
QString brigthness = processbrigthness.readAllStandardOutput();
|
||||
brigthness.resize(brigthness.size()-1); // remove last line break
|
||||
QStringList brigthnessvalues = brigthness.split("#");
|
||||
system("/usr/local/bin/autoapp_helper getbrightnessvalues");
|
||||
QFile paramFile(QString("/tmp/br_values"));
|
||||
paramFile.open(QIODevice::ReadOnly);
|
||||
QTextStream data_param(¶mFile);
|
||||
QStringList brigthnessvalues = data_param.readAll().split("#");
|
||||
paramFile.close();
|
||||
|
||||
// set brightness slider attribs
|
||||
ui_->horizontalSliderBrightness->setMinimum(brigthnessvalues[0].toInt());
|
||||
|
Loading…
x
Reference in New Issue
Block a user