Clean up multi threading patch, fix build and some bugs

Make strings translatable, remove some more debug code, fix tests,
reduce size of patch slightly, remove weird tooltip, don't crash when
closing database, simplify code, fix filters, don't link agains pthread
on Windows.
This commit is contained in:
Martin Kleusberg
2018-05-21 18:27:41 +02:00
parent 51dbe72e23
commit 3da520cdd1
16 changed files with 275 additions and 265 deletions

View File

@@ -424,12 +424,11 @@ void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* sett
ui->plotWidget->replot();
// Warn user if not all data has been fetched and hint about the button for loading all the data
if (model->rowCountAvailable() != SqliteTableModel::RowCount::Complete || !model->isCacheComplete()) {
if (model && (model->rowCountAvailable() != SqliteTableModel::RowCount::Complete || !model->isCacheComplete())) {
ui->buttonLoadAllData->setEnabled(true);
ui->buttonLoadAllData->setStyleSheet("QToolButton {color: white; background-color: rgb(255, 102, 102)}");
ui->buttonLoadAllData->setToolTip(tr("Load all data and redraw plot.\n"
"Warning: not all data has been fetched from the table yet due to the partial fetch mechanism."));
QToolTip::showText(ui->buttonLoadAllData->mapToGlobal(QPoint(0, 0)), ui->buttonLoadAllData->toolTip());
} else {
ui->buttonLoadAllData->setEnabled(false);
ui->buttonLoadAllData->setStyleSheet("");