mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Ref T171, use a shared completer for callsign completion
* CSharedStringListCompleter utility class supporting timestamp checks * avoid unnecessary DBus transfer * less memory consumption Remark: No totally clear if a QCompleter can be shared, but I have not noticed a problem so far
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define BLACKGUI_COMPONENTS_CALLSIGNCOMPLETER_H
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackgui/sharedstringlistcompleter.h"
|
||||
#include "blackmisc/digestsignal.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackcore/network.h"
|
||||
@@ -63,8 +64,10 @@ namespace BlackGui
|
||||
void onChangedConnectionStatus(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to);
|
||||
bool isValidKnownCallsign(const QString &callsignString) const;
|
||||
|
||||
//! Shared completer data
|
||||
static CSharedStringListCompleter *completer();
|
||||
|
||||
QScopedPointer <Ui::CCallsignCompleter> ui;
|
||||
QCompleter *m_currentCompleter = nullptr;
|
||||
BlackMisc::Aviation::CCallsignSet m_validCallsigns;
|
||||
BlackMisc::CDigestSignal m_dsAircraftsInRangeChanged { this, &CCallsignCompleter::onChangedAircraftInRange, 5000, 5 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user