mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Ref T24, use shared info objects, not header timestamps
This commit is contained in:
@@ -399,11 +399,11 @@ void SwiftGuiStd::ps_verifyDataAvailability()
|
||||
}
|
||||
}
|
||||
|
||||
void SwiftGuiStd::ps_sharedFilesHeadersLoaded()
|
||||
void SwiftGuiStd::ps_sharedInfoObjectsLoaded()
|
||||
{
|
||||
Q_ASSERT_X(sGui && sGui->hasWebDataServices(), Q_FUNC_INFO, "Missing web services");
|
||||
Q_ASSERT_X(CThreadUtils::isCurrentThreadApplicationThread(), Q_FUNC_INFO, "Wrong thread");
|
||||
const CEntityFlags::Entity newEntities = sGui->getWebDataServices()->getEntitiesWithNewerHeaderTimestamp(CEntityFlags::AllDbEntities);
|
||||
const CEntityFlags::Entity newEntities = sGui->getWebDataServices()->getEntitiesWithNewerSharedFile(CEntityFlags::AllDbEntities);
|
||||
if (newEntities == CEntityFlags::NoEntity) { return; }
|
||||
CStatusMessage sm = CStatusMessage(this).info("New data for shared files:");
|
||||
CStatusMessageList sms({sm});
|
||||
@@ -414,7 +414,7 @@ void SwiftGuiStd::ps_sharedFilesHeadersLoaded()
|
||||
sms.push_back(sm);
|
||||
}
|
||||
|
||||
// allow to init GUI completely
|
||||
// allow to init GUI completely before showing overlays
|
||||
const int delay = 2500;
|
||||
QTimer::singleShot(delay, this, [ = ]
|
||||
{
|
||||
|
||||
@@ -251,7 +251,7 @@ private slots:
|
||||
void ps_verifyDataAvailability();
|
||||
|
||||
//! The shared headers have been loaded
|
||||
void ps_sharedFilesHeadersLoaded();
|
||||
void ps_sharedInfoObjectsLoaded();
|
||||
};
|
||||
|
||||
#pragma pop_macro("interface")
|
||||
|
||||
@@ -121,7 +121,7 @@ void SwiftGuiStd::init()
|
||||
this->initGuiSignals();
|
||||
|
||||
// signal / slots contexts / timers
|
||||
connect(sGui->getWebDataServices(), &CWebDataServices::allSwiftSharedAllHeadersReceived, this, &SwiftGuiStd::ps_sharedFilesHeadersLoaded);
|
||||
connect(sGui->getWebDataServices(), &CWebDataServices::sharedInfoObjectsRead, this, &SwiftGuiStd::ps_sharedInfoObjectsLoaded);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionTerminated, this, &SwiftGuiStd::ps_onConnectionTerminated);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::ps_onConnectionStatusChanged);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::textMessagesReceived, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived);
|
||||
|
||||
Reference in New Issue
Block a user