mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
Reimplement QApplication::notify() to print out something about the exception if we can
This commit is contained in:
parent
c1d678e2b1
commit
7b8136a36e
@ -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
|
||||
TomahawkApp::instanceStarted( KDSingleApplicationGuard::Instance instance )
|
||||
{
|
||||
|
@ -99,6 +99,9 @@ public:
|
||||
|
||||
bool isTomahawkLoaded() const { return m_loaded; }
|
||||
|
||||
// reimplemented from QApplication/QCoreApplication
|
||||
virtual bool notify( QObject* receiver, QEvent* e );
|
||||
|
||||
signals:
|
||||
void tomahawkLoaded();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user