mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 06:35:41 +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(sGui && sGui->hasWebDataServices(), Q_FUNC_INFO, "Missing web services");
|
||||||
Q_ASSERT_X(CThreadUtils::isCurrentThreadApplicationThread(), Q_FUNC_INFO, "Wrong thread");
|
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; }
|
if (newEntities == CEntityFlags::NoEntity) { return; }
|
||||||
CStatusMessage sm = CStatusMessage(this).info("New data for shared files:");
|
CStatusMessage sm = CStatusMessage(this).info("New data for shared files:");
|
||||||
CStatusMessageList sms({sm});
|
CStatusMessageList sms({sm});
|
||||||
@@ -414,7 +414,7 @@ void SwiftGuiStd::ps_sharedFilesHeadersLoaded()
|
|||||||
sms.push_back(sm);
|
sms.push_back(sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow to init GUI completely
|
// allow to init GUI completely before showing overlays
|
||||||
const int delay = 2500;
|
const int delay = 2500;
|
||||||
QTimer::singleShot(delay, this, [ = ]
|
QTimer::singleShot(delay, this, [ = ]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ private slots:
|
|||||||
void ps_verifyDataAvailability();
|
void ps_verifyDataAvailability();
|
||||||
|
|
||||||
//! The shared headers have been loaded
|
//! The shared headers have been loaded
|
||||||
void ps_sharedFilesHeadersLoaded();
|
void ps_sharedInfoObjectsLoaded();
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pop_macro("interface")
|
#pragma pop_macro("interface")
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void SwiftGuiStd::init()
|
|||||||
this->initGuiSignals();
|
this->initGuiSignals();
|
||||||
|
|
||||||
// signal / slots contexts / timers
|
// 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::connectionTerminated, this, &SwiftGuiStd::ps_onConnectionTerminated);
|
||||||
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::ps_onConnectionStatusChanged);
|
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &SwiftGuiStd::ps_onConnectionStatusChanged);
|
||||||
connect(sGui->getIContextNetwork(), &IContextNetwork::textMessagesReceived, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived);
|
connect(sGui->getIContextNetwork(), &IContextNetwork::textMessagesReceived, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::onTextMessageReceived);
|
||||||
|
|||||||
Reference in New Issue
Block a user