read filter from ini

This commit is contained in:
Akash Mozumdar 2018-10-09 05:45:49 -04:00
parent 69511ddeda
commit 586e22e4a5

View File

@ -15,6 +15,7 @@ MainWindow::MainWindow(QWidget *parent) :
// TODO: add GUI for changing these
if (settings.contains("Flush_Delay")) TextThread::flushDelay = settings.value("Flush_Delay").toInt();
if (settings.contains("Max_Buffer_Size")) TextThread::maxBufferSize = settings.value("Max_Buffer_Size").toInt();
if (settings.contains("Filter")) TextThread::filter = settings.value("Filter").toString().toStdWString().c_str();
processCombo = findChild<QComboBox*>("processCombo");
ttCombo = findChild<QComboBox*>("ttCombo");
@ -43,6 +44,7 @@ MainWindow::~MainWindow()
settings.setValue("Window", this->geometry());
settings.setValue("Flush_Delay", TextThread::flushDelay);
settings.setValue("Max_Buffer_Size", TextThread::maxBufferSize);
settings.setValue("Filter", QString::fromStdWString(TextThread::filter));
settings.sync();
Host::Close();
delete ui;