Commit 003099a0 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fix issue with QString -> char*

parent 324dbb94
......@@ -370,10 +370,14 @@ void HistQtWidget::ok_btn()
hist->eventPrio_C = hist->prioC_toggle_w->isChecked();
hist->eventPrio_D = hist->prioD_toggle_w->isChecked();
hist->minTime_str = qPrintableLatin1(hist->start_time_entry_w->text());
hist->maxTime_str = qPrintableLatin1(hist->stop_time_entry_w->text());
hist->eventText_str = qPrintableLatin1(hist->event_text_entry_w->text());
hist->eventName_str = qPrintableLatin1(hist->event_name_entry_w->text());
hist->minTime_str = (char*)malloc(hist->start_time_entry_w->text().length() + 1);
strcpy(hist->minTime_str, qPrintableLatin1(hist->start_time_entry_w->text()));
hist->maxTime_str = (char*)malloc(hist->stop_time_entry_w->text().length() + 1);
strcpy(hist->maxTime_str, qPrintableLatin1(hist->stop_time_entry_w->text()));
hist->eventText_str = (char*)malloc(hist->event_text_entry_w->text().length() + 1);
strcpy(hist->eventText_str, qPrintableLatin1(hist->event_text_entry_w->text()));
hist->eventName_str = (char*)malloc(hist->event_name_entry_w->text().length() + 1);
strcpy(hist->eventName_str, qPrintableLatin1(hist->event_name_entry_w->text()));
hist->get_hist_list();
}
......@@ -510,4 +514,4 @@ void HistQt::SetListTime(pwr_tTime StartTime, pwr_tTime StopTime, int Sensitive)
}
}
#endif
\ No newline at end of file
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment