From 2fda389dafdb3a9c1a8dce7245188f72564e5ff2 Mon Sep 17 00:00:00 2001 From: Joris Goosen Date: Wed, 15 Jan 2025 12:56:55 +0100 Subject: [PATCH] small tweaks --- QMLComponents/analysisform.cpp | 4 ++-- QMLComponents/models/listmodelfiltereddataentry.cpp | 11 +++++------ QMLComponents/models/listmodelfiltereddataentry.h | 2 +- QMLComponents/variableinfo.cpp | 2 -- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/QMLComponents/analysisform.cpp b/QMLComponents/analysisform.cpp index 2dcaaa6a32..0da3d80e38 100644 --- a/QMLComponents/analysisform.cpp +++ b/QMLComponents/analysisform.cpp @@ -205,8 +205,8 @@ void AnalysisForm::addColumnControl(JASPControl* control, bool isComputed) { if (isComputed) { - connect(control, &JASPControl::requestComputedColumnCreation, _analysis, &AnalysisBase::requestComputedColumnCreationHandler, Qt::QueuedConnection); - connect(control, &JASPControl::requestComputedColumnDestruction, _analysis, &AnalysisBase::requestComputedColumnDestructionHandler, Qt::QueuedConnection); + connect(control, &JASPControl::requestComputedColumnCreation, _analysis, &AnalysisBase::requestComputedColumnCreationHandler); + connect(control, &JASPControl::requestComputedColumnDestruction, _analysis, &AnalysisBase::requestComputedColumnDestructionHandler); } else connect(control, &JASPControl::requestColumnCreation, _analysis, &AnalysisBase::requestColumnCreationHandler); diff --git a/QMLComponents/models/listmodelfiltereddataentry.cpp b/QMLComponents/models/listmodelfiltereddataentry.cpp index 12310dfde9..6646b9e84b 100644 --- a/QMLComponents/models/listmodelfiltereddataentry.cpp +++ b/QMLComponents/models/listmodelfiltereddataentry.cpp @@ -1,11 +1,11 @@ #include "listmodelfiltereddataentry.h" +#include "columnutils.h" #include "controls/tableviewbase.h" #include "utilities/qutils.h" #include "log.h" #include "controls/jaspcontrol.h" #include "filter.h" -#include "dataset.h" -#include "columnutils.h" + ListModelFilteredDataEntry::ListModelFilteredDataEntry(TableViewBase * parent) : ListModelTableViewBase(parent) @@ -63,13 +63,13 @@ void ListModelFilteredDataEntry::runFilter() { if(!_filter) //prob still need to bind return; - + runFilterByName(tq(_filter->name())); } void ListModelFilteredDataEntry::filterDoneHandler(const QString &name, const QString & error) { - if(name.toStdString() != _filterName) + if(name.toStdString() != _filter->name()) return; Log::log() << "ListModelFilteredDataEntry::filterDoneHandler for " << name << " and error '" << error << "'" << std::endl; @@ -224,7 +224,7 @@ void ListModelFilteredDataEntry::fillTable() _tableTerms.rowNames.clear(); _tableTerms.values.clear(); - if (_filter) + if(_filter) _filter->checkForUpdates(); size_t dataRows = _filter && _filter->filtered().size() > 0 ? _filter->filtered().size() : getDataSetRowCount(); @@ -439,4 +439,3 @@ void ListModelFilteredDataEntry::refreshModel() { ListModel::refresh(); } - diff --git a/QMLComponents/models/listmodelfiltereddataentry.h b/QMLComponents/models/listmodelfiltereddataentry.h index 663bbeb349..f4a1dc00e1 100644 --- a/QMLComponents/models/listmodelfiltereddataentry.h +++ b/QMLComponents/models/listmodelfiltereddataentry.h @@ -85,7 +85,7 @@ private slots: QStringList _dataColumns, _extraColsStr; std::string _filterName; - Filter * _filter = nullptr; + Filter * _filter = nullptr; bool _informOnce = false; }; diff --git a/QMLComponents/variableinfo.cpp b/QMLComponents/variableinfo.cpp index 94e5c7b1bb..c4862e5eac 100644 --- a/QMLComponents/variableinfo.cpp +++ b/QMLComponents/variableinfo.cpp @@ -2,8 +2,6 @@ #include "jasptheme.h" #include "QQmlContext" #include "QTimer" -#include "databaseinterface.h" -#include "dataset.h" VariableInfo* VariableInfo::_singleton = nullptr;