mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T40, allow to pass timeout
This commit is contained in:
committed by
Mathew Sutcliffe
parent
523f650a34
commit
b39f9a33a2
@@ -301,12 +301,12 @@ namespace BlackGui
|
||||
return m->displayInStatusBar(message);
|
||||
}
|
||||
|
||||
bool CGuiApplication::displayInOverlayWindow(const CStatusMessage &message)
|
||||
bool CGuiApplication::displayInOverlayWindow(const CStatusMessage &message, int timeOutMs)
|
||||
{
|
||||
IMainWindowAccess *m = mainWindowAccess();
|
||||
BLACK_VERIFY_X(m, Q_FUNC_INFO, "No access interface");
|
||||
if (!m) { return false; }
|
||||
return m->displayInOverlayWindow(message);
|
||||
return m->displayInOverlayWindow(message, timeOutMs);
|
||||
}
|
||||
|
||||
bool CGuiApplication::displayTextInConsole(const QString &text)
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace BlackGui
|
||||
//! \name direct access to main application window
|
||||
//! @{
|
||||
virtual bool displayInStatusBar(const BlackMisc::CStatusMessage &message) override;
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessage &message) override;
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessage &message, int timeOutMs = -1) override;
|
||||
virtual bool displayTextInConsole(const QString &text) override;
|
||||
//! @}
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ namespace BlackGui
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IMainWindowAccess::displayInOverlayWindow(const BlackMisc::CStatusMessage &message)
|
||||
bool IMainWindowAccess::displayInOverlayWindow(const BlackMisc::CStatusMessage &message, int timeOutMs)
|
||||
{
|
||||
if (message.isEmpty()) { return false; }
|
||||
if (!this->m_mwaOverlayFrame) { return false; }
|
||||
this->m_mwaOverlayFrame->showOverlayMessage(message);
|
||||
this->m_mwaOverlayFrame->showOverlayMessage(message, timeOutMs);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BlackGui
|
||||
virtual bool displayInStatusBar(const BlackMisc::CStatusMessage &message);
|
||||
|
||||
//! Display in overlay window
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessage &message);
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessage &message, int timeOutMs = -1);
|
||||
|
||||
protected:
|
||||
Components::CLogComponent *m_mwaLogComponent = nullptr; //!< the log component if any
|
||||
|
||||
Reference in New Issue
Block a user