mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
Make headless mode compile again.
This commit is contained in:
committed by
Christian Muehlhaeuser
parent
7adce37c12
commit
9c34047d80
@@ -12,7 +12,6 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QStackedWidget>
|
|
||||||
|
|
||||||
#include "QxtHttpServerConnector"
|
#include "QxtHttpServerConnector"
|
||||||
#include "QxtHttpSessionManager"
|
#include "QxtHttpSessionManager"
|
||||||
@@ -37,6 +36,7 @@ class TomahawkSettings;
|
|||||||
class AudioEngine;
|
class AudioEngine;
|
||||||
class TomahawkWindow;
|
class TomahawkWindow;
|
||||||
class PlaylistManager;
|
class PlaylistManager;
|
||||||
|
#include <QStackedWidget>
|
||||||
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifndef NO_LIBLASTFM
|
||||||
#include <lastfm/NetworkAccessManager>
|
#include <lastfm/NetworkAccessManager>
|
||||||
|
@@ -75,7 +75,6 @@ SET( tomahawkSources ${tomahawkSources}
|
|||||||
|
|
||||||
web/api_v1.cpp
|
web/api_v1.cpp
|
||||||
|
|
||||||
widgetdragfilter.cpp
|
|
||||||
tomahawksettings.cpp
|
tomahawksettings.cpp
|
||||||
tomahawkapp.cpp
|
tomahawkapp.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
@@ -118,6 +117,8 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|||||||
audiocontrols.cpp
|
audiocontrols.cpp
|
||||||
settingsdialog.cpp
|
settingsdialog.cpp
|
||||||
proxystyle.cpp
|
proxystyle.cpp
|
||||||
|
|
||||||
|
widgetdragfilter.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET( tomahawkHeaders ${tomahawkHeaders}
|
SET( tomahawkHeaders ${tomahawkHeaders}
|
||||||
@@ -180,7 +181,6 @@ SET( tomahawkHeaders ${tomahawkHeaders}
|
|||||||
servent.h
|
servent.h
|
||||||
scriptresolver.h
|
scriptresolver.h
|
||||||
tomahawksettings.h
|
tomahawksettings.h
|
||||||
widgetdragfilter.h
|
|
||||||
|
|
||||||
web/api_v1.h
|
web/api_v1.h
|
||||||
)
|
)
|
||||||
@@ -224,6 +224,8 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
|||||||
tomahawkwindow.h
|
tomahawkwindow.h
|
||||||
audiocontrols.h
|
audiocontrols.h
|
||||||
settingsdialog.h
|
settingsdialog.h
|
||||||
|
|
||||||
|
widgetdragfilter.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET( tomahawkUI ${tomahawkUI}
|
SET( tomahawkUI ${tomahawkUI}
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
||||||
#include "tomahawk/collection.h"
|
#include "tomahawk/collection.h"
|
||||||
@@ -19,11 +18,12 @@
|
|||||||
|
|
||||||
#include "controlconnection.h"
|
#include "controlconnection.h"
|
||||||
#include "tomahawkzeroconf.h"
|
#include "tomahawkzeroconf.h"
|
||||||
#include "settingsdialog.h"
|
|
||||||
|
|
||||||
#ifndef TOMAHAWK_HEADLESS
|
#ifndef TOMAHAWK_HEADLESS
|
||||||
#include "audioengine.h"
|
#include "audioengine.h"
|
||||||
#include "tomahawkwindow.h"
|
#include "tomahawkwindow.h"
|
||||||
|
#include "settingsdialog.h"
|
||||||
|
#include <QMessageBox>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -150,10 +150,10 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
|||||||
#else
|
#else
|
||||||
m_nam = new QNetworkAccessManager;
|
m_nam = new QNetworkAccessManager;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_mainwindow = new TomahawkWindow();
|
m_mainwindow = new TomahawkWindow();
|
||||||
m_mainwindow->show();
|
m_mainwindow->show();
|
||||||
connect( m_mainwindow, SIGNAL( settingsChanged() ), SIGNAL( settingsChanged() ) );
|
connect( m_mainwindow, SIGNAL( settingsChanged() ), SIGNAL( settingsChanged() ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -179,11 +179,13 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
|||||||
SLOT( lanHostFound( const QString&, int, const QString&, const QString& ) ) );
|
SLOT( lanHostFound( const QString&, int, const QString&, const QString& ) ) );
|
||||||
m_zeroconf->advertise();
|
m_zeroconf->advertise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TOMAHAWK_HEADLESS
|
||||||
if ( !m_settings->hasScannerPath() )
|
if ( !m_settings->hasScannerPath() )
|
||||||
{
|
{
|
||||||
m_mainwindow->showSettingsDialog();
|
m_mainwindow->showSettingsDialog();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,14 +1,19 @@
|
|||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
#include "settingsdialog.h"
|
|
||||||
|
#ifdef TOMAHAWK_HEADLESS
|
||||||
|
#include "settingsdialog.h"
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopServices>
|
|
||||||
|
|
||||||
|
|
||||||
TomahawkSettings::TomahawkSettings( QObject* parent )
|
TomahawkSettings::TomahawkSettings( QObject* parent )
|
||||||
: QSettings( parent )
|
: QSettings( parent )
|
||||||
{
|
{
|
||||||
|
#ifdef TOMAHAWK_HEADLESS
|
||||||
if( !contains( "configversion") )
|
if( !contains( "configversion") )
|
||||||
{
|
{
|
||||||
setValue( "configversion", SettingsDialog::VERSION );
|
setValue( "configversion", SettingsDialog::VERSION );
|
||||||
@@ -22,6 +27,7 @@ TomahawkSettings::TomahawkSettings( QObject* parent )
|
|||||||
// insert upgrade code here as required
|
// insert upgrade code here as required
|
||||||
setValue( "configversion", SettingsDialog::VERSION );
|
setValue( "configversion", SettingsDialog::VERSION );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TomahawkSettings::~TomahawkSettings()
|
TomahawkSettings::~TomahawkSettings()
|
||||||
@@ -31,7 +37,11 @@ TomahawkSettings::~TomahawkSettings()
|
|||||||
|
|
||||||
QString TomahawkSettings::scannerPath() const
|
QString TomahawkSettings::scannerPath() const
|
||||||
{
|
{
|
||||||
|
#ifdef TOMAHAWK_HEADLESS
|
||||||
return value( "scannerpath", QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ).toString();
|
return value( "scannerpath", QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ).toString();
|
||||||
|
#else
|
||||||
|
return value( "scannerpath", "" ).toString();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TomahawkSettings::setScannerPath(const QString& path)
|
void TomahawkSettings::setScannerPath(const QString& path)
|
||||||
|
Reference in New Issue
Block a user