mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
Fixed warnings/improved displayInOverlay handing
This commit is contained in:
committed by
Mat Sutcliffe
parent
2f450ec9c5
commit
bbaa9577b8
@@ -523,20 +523,31 @@ namespace BlackGui
|
||||
|
||||
bool CGuiApplication::displayInOverlayWindow(const CStatusMessage &message, int timeOutMs)
|
||||
{
|
||||
if (message.isEmpty()) { return false; }
|
||||
IMainWindowAccess *m = mainWindowAccess();
|
||||
BLACK_VERIFY_X(m, Q_FUNC_INFO, "No access interface");
|
||||
if (!m) { return false; }
|
||||
if (!m) { return IMainWindowAccess::displayInOverlayWindow(message, timeOutMs); }
|
||||
return m->displayInOverlayWindow(message, timeOutMs);
|
||||
}
|
||||
|
||||
bool CGuiApplication::displayInOverlayWindow(const CStatusMessageList &messages, int timeOutMs)
|
||||
{
|
||||
if (messages.isEmpty()) { return false; }
|
||||
IMainWindowAccess *m = mainWindowAccess();
|
||||
BLACK_VERIFY_X(m, Q_FUNC_INFO, "No access interface");
|
||||
if (!m) { return false; }
|
||||
if (!m) { return IMainWindowAccess::displayInOverlayWindow(messages, timeOutMs); }
|
||||
return m->displayInOverlayWindow(messages, timeOutMs);
|
||||
}
|
||||
|
||||
bool CGuiApplication::displayInOverlayWindow(const QString &html, int timeOutMs)
|
||||
{
|
||||
if (html.isEmpty()) { return false; }
|
||||
IMainWindowAccess *m = mainWindowAccess();
|
||||
BLACK_VERIFY_X(m, Q_FUNC_INFO, "No access interface");
|
||||
if (!m) { return IMainWindowAccess::displayInOverlayWindow(html, timeOutMs); }
|
||||
return m->displayInOverlayWindow(html, timeOutMs);
|
||||
}
|
||||
|
||||
bool CGuiApplication::displayTextInConsole(const QString &text)
|
||||
{
|
||||
IMainWindowAccess *m = mainWindowAccess();
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace BlackGui
|
||||
*/
|
||||
class BLACKGUI_EXPORT CGuiApplication :
|
||||
public BlackCore::CApplication,
|
||||
public BlackGui::IMainWindowAccess
|
||||
public IMainWindowAccess
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(BlackGui::IMainWindowAccess)
|
||||
@@ -132,6 +132,7 @@ namespace BlackGui
|
||||
virtual bool displayTextInConsole(const QString &text) override;
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessage &message, int timeOutMs = -1) override;
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessageList &messages, int timeOutMs = -1) override;
|
||||
virtual bool displayInOverlayWindow(const QString &html, int timeOutMs = -1) override;
|
||||
//! @}
|
||||
|
||||
// -------- Splash screen related ---------
|
||||
|
||||
Reference in New Issue
Block a user