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