Select allocator depending upon platform

This commit is contained in:
Pulak Malhotra 2021-08-02 11:43:28 +05:30
parent 0380805548
commit db977a311b

View File

@ -15,8 +15,14 @@ HeapDockWidget::HeapDockWidget(MainWindow *main)
connect<void (QComboBox::*)(int)>(ui->allocatorSelector, &QComboBox::currentIndexChanged, this,
&HeapDockWidget::onAllocatorSelected);
// select Glibc heap by default
onAllocatorSelected(0);
// select default heap depending upon kernel type
if (QSysInfo::kernelType() == "linux") {
ui->allocatorSelector->setCurrentIndex(Glibc);
onAllocatorSelected(Glibc);
} else if (QSysInfo::kernelType() == "winnt") {
ui->allocatorSelector->setCurrentIndex(Windows);
onAllocatorSelected(Windows);
}
}
HeapDockWidget::~HeapDockWidget()