1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02: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[] ) main( int argc, char *argv[] )
{ {
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
// Do Mac specific startup to get media keys working. // Do Mac specific startup to get media keys working.
// This must go before QApplication initialisation. // This must go before QApplication initialisation.
Tomahawk::macMain(); Tomahawk::macMain();
// used for url handler // used for url handler
AEEventHandlerUPP h = AEEventHandlerUPP( appleEventHandler ); AEEventHandlerUPP h = AEEventHandlerUPP( appleEventHandler );
AEInstallEventHandler( 'GURL', 'GURL', h, 0, false ); AEInstallEventHandler( 'GURL', 'GURL', h, 0, false );
#endif #endif
// Unity hack taken from Clementine's main.cpp // Unity hack taken from Clementine's main.cpp
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
// In 11.04 Ubuntu decided that the system tray should be reserved for certain // In 11.04 Ubuntu decided that the system tray should be reserved for certain
// whitelisted applications. Tomahawk will override this setting and insert // whitelisted applications. Tomahawk will override this setting and insert
// itself into the list of whitelisted apps. // 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; UbuntuUnityHack hack;
#endif #endif

View File

@@ -132,7 +132,7 @@ TomahawkApp::init()
if ( arguments().contains( "--help" ) || arguments().contains( "-h" ) ) if ( arguments().contains( "--help" ) || arguments().contains( "-h" ) )
{ {
printHelp(); printHelp();
::exit(0); ::exit( 0 );
} }
qDebug() << "TomahawkApp thread:" << thread(); qDebug() << "TomahawkApp thread:" << thread();
@@ -286,8 +286,9 @@ TomahawkApp::~TomahawkApp()
if ( !m_audioEngine.isNull() ) if ( !m_audioEngine.isNull() )
delete m_audioEngine.data(); 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 ); ? //FIXME: delete GeneratorFactory::registerFactory( "echonest", new EchonestFactory ); ?

View File

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