qtimer change from pointer
This commit is contained in:
@@ -19,20 +19,19 @@ QGC_LOGGING_CATEGORY(ParameterEditorControllerLog, "qgc.qmlcontrols.parameteredi
|
||||
ParameterEditorController::ParameterEditorController(QObject *parent)
|
||||
: FactPanelController(parent)
|
||||
, _parameterMgr(_vehicle->parameterManager())
|
||||
, _searchTimer(new QTimer(this))
|
||||
{
|
||||
// qCDebug(ParameterEditorControllerLog) << Q_FUNC_INFO << this;
|
||||
|
||||
_buildLists();
|
||||
|
||||
_searchTimer->setSingleShot(true);
|
||||
_searchTimer->setInterval(300);
|
||||
_searchTimer.setSingleShot(true);
|
||||
_searchTimer.setInterval(300);
|
||||
|
||||
connect(this, &ParameterEditorController::currentCategoryChanged, this, &ParameterEditorController::_currentCategoryChanged);
|
||||
connect(this, &ParameterEditorController::currentGroupChanged, this, &ParameterEditorController::_currentGroupChanged);
|
||||
connect(this, &ParameterEditorController::searchTextChanged, this, &ParameterEditorController::_searchTextChanged);
|
||||
connect(this, &ParameterEditorController::showModifiedOnlyChanged, this, &ParameterEditorController::_searchTextChanged);
|
||||
connect(_searchTimer, &QTimer::timeout, this, &ParameterEditorController::_performSearch);
|
||||
connect(&_searchTimer, &QTimer::timeout, this, &ParameterEditorController::_performSearch);
|
||||
connect(_parameterMgr, &ParameterManager::factAdded, this, &ParameterEditorController::_factAdded);
|
||||
|
||||
ParameterEditorCategory* category = _categories.count() ? _categories.value<ParameterEditorCategory*>(0) : nullptr;
|
||||
@@ -375,8 +374,8 @@ bool ParameterEditorController::_shouldShow(Fact* fact) const
|
||||
|
||||
void ParameterEditorController::_searchTextChanged(void)
|
||||
{
|
||||
if (!_searchTimer->isActive()) {
|
||||
_searchTimer->start();
|
||||
if (!_searchTimer.isActive()) {
|
||||
_searchTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
private:
|
||||
ParameterManager* _parameterMgr = nullptr;
|
||||
QString _searchText;
|
||||
QTimer* _searchTimer;
|
||||
QTimer _searchTimer;
|
||||
ParameterEditorCategory* _currentCategory = nullptr;
|
||||
ParameterEditorGroup* _currentGroup = nullptr;
|
||||
bool _showModifiedOnly = false;
|
||||
|
||||
Reference in New Issue
Block a user