1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 17:29:42 +01:00

* 'Fixed' Windows shutdown crash.

This commit is contained in:
Christian Muehlhaeuser 2011-11-13 18:38:52 +01:00
parent 25bb7bd547
commit 1c6c52056f
3 changed files with 11 additions and 13 deletions

View File

@ -35,22 +35,21 @@ int
main( int argc, char *argv[] )
{
#ifdef Q_WS_MAC
// Do Mac specific startup to get media keys working.
// This must go before QApplication initialisation.
Tomahawk::macMain();
// Do Mac specific startup to get media keys working.
// This must go before QApplication initialisation.
Tomahawk::macMain();
// used for url handler
AEEventHandlerUPP h = AEEventHandlerUPP( appleEventHandler );
AEInstallEventHandler( 'GURL', 'GURL', h, 0, false );
// used for url handler
AEEventHandlerUPP h = AEEventHandlerUPP( appleEventHandler );
AEInstallEventHandler( 'GURL', 'GURL', h, 0, false );
#endif
// Unity hack taken from Clementine's main.cpp
#ifdef Q_OS_LINUX
// In 11.04 Ubuntu decided that the system tray should be reserved for certain
// whitelisted applications. Tomahawk will override this setting and insert
// itself into the list of whitelisted apps.
setenv("QT_X11_NO_NATIVE_MENUBAR", "1", true);
setenv( "QT_X11_NO_NATIVE_MENUBAR", "1", true );
UbuntuUnityHack hack;
#endif

View File

@ -132,7 +132,7 @@ TomahawkApp::init()
if ( arguments().contains( "--help" ) || arguments().contains( "-h" ) )
{
printHelp();
::exit(0);
::exit( 0 );
}
qDebug() << "TomahawkApp thread:" << thread();
@ -286,8 +286,9 @@ TomahawkApp::~TomahawkApp()
if ( !m_audioEngine.isNull() )
delete m_audioEngine.data();
if ( !m_infoSystem.isNull() )
delete m_infoSystem.data();
/* if ( !m_infoSystem.isNull() )
delete m_infoSystem.data(); */ // FIXME: this causes a shutdown crash on Windows
//FIXME: delete GeneratorFactory::registerFactory( "echonest", new EchonestFactory ); ?

View File

@ -111,8 +111,6 @@ private:
void initHTTP();
QList<Tomahawk::collection_ptr> m_collections;
QWeakPointer<Database> m_database;
QWeakPointer<ScanManager> m_scanManager;
QWeakPointer<AudioEngine> m_audioEngine;