Commit 10945ff6 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fix QString -> char*

parent 37625570
......@@ -429,12 +429,19 @@ void WdaQt::open_class_dialog(char* hierstr, char* classstr, char* namestr)
int res = wdaclass_dia.exec();
if (res == QDialog::Accepted) {
char* hiername = qPrintableLatin1(wdaclass_hiervalue->text());
char* searchname = qPrintableLatin1(wdaclass_namevalue->text());
char* classname = qPrintableLatin1(wdaclass_classvalue->text());
char* hiername = (char*)malloc(wdaclass_hiervalue->text().length() + 1);
char* searchname = (char*)malloc(wdaclass_namevalue->text().length() + 1);
char* classname = (char*)malloc(wdaclass_classvalue->text().length() + 1);
strcpy(hiername, qPrintableLatin1(wdaclass_hiervalue->text()));
strcpy(searchname, qPrintableLatin1(wdaclass_namevalue->text()));
strcpy(classname, qPrintableLatin1(wdaclass_classvalue->text()));
bool attrobjects = wdaclass_attrobjects->isChecked();
toplevel->class_activate_ok(hiername, searchname, classname, attrobjects);
free(hiername);
free(searchname);
free(classname);
}
}
......@@ -574,4 +581,4 @@ WdaQt::WdaQt(void* wa_parent_ctx, ldh_tSesContext wa_ldhses,
((Wtt*)parent_ctx)->register_utility(this, wb_eUtility_SpreadsheetEditor);
}
Wda::open_class_dialog();
}
\ No newline at end of file
}
......@@ -371,15 +371,24 @@ void HistQtWidget::ok_btn()
hist->eventPrio_D = hist->prioD_toggle_w->isChecked();
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->minTime_str, qPrintableLatin1(hist->start_time_entry_w->text()));
strcpy(hist->maxTime_str, qPrintableLatin1(hist->stop_time_entry_w->text()));
strcpy(hist->eventText_str, qPrintableLatin1(hist->event_text_entry_w->text()));
strcpy(hist->eventName_str, qPrintableLatin1(hist->event_name_entry_w->text()));
hist->get_hist_list();
free(hist->minTime_str);
free(hist->maxTime_str);
free(hist->eventText_str);
free(hist->eventName_str);
hist->minTime_str = NULL;
hist->maxTime_str = NULL;
hist->eventText_str = NULL;
hist->eventName_str = NULL;
}
void HistQtWidget::activate_print()
......
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