mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Reimplement QApplication::notify() to print out something about the exception if we can
This commit is contained in:
@@ -707,6 +707,27 @@ TomahawkApp::loadUrl( const QString& url )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
TomahawkApp::notify( QObject *receiver, QEvent *e )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return TOMAHAWK_APPLICATION::notify( receiver, e );
|
||||||
|
}
|
||||||
|
catch ( const std::exception& e )
|
||||||
|
{
|
||||||
|
qWarning( "TomahawkApp::notify caught a std exception in a Qt event handler: " );
|
||||||
|
qFatal( e.what() );
|
||||||
|
}
|
||||||
|
catch ( ... )
|
||||||
|
{
|
||||||
|
qFatal( "TomahawkApp::notify caught a non-std-exception from a Qt event handler. Aborting." );
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkApp::instanceStarted( KDSingleApplicationGuard::Instance instance )
|
TomahawkApp::instanceStarted( KDSingleApplicationGuard::Instance instance )
|
||||||
{
|
{
|
||||||
|
@@ -99,6 +99,9 @@ public:
|
|||||||
|
|
||||||
bool isTomahawkLoaded() const { return m_loaded; }
|
bool isTomahawkLoaded() const { return m_loaded; }
|
||||||
|
|
||||||
|
// reimplemented from QApplication/QCoreApplication
|
||||||
|
virtual bool notify( QObject* receiver, QEvent* e );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void tomahawkLoaded();
|
void tomahawkLoaded();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user