mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
Migrate spotify config to tomahawk, and set up for playlist work
This commit is contained in:
BIN
data/images/spotifycore-logo.png
Normal file
BIN
data/images/spotifycore-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
@@ -135,6 +135,7 @@
|
|||||||
<file>data/images/rdio.png</file>
|
<file>data/images/rdio.png</file>
|
||||||
<file>data/images/grooveshark.png</file>
|
<file>data/images/grooveshark.png</file>
|
||||||
<file>data/images/lastfm-icon.png</file>
|
<file>data/images/lastfm-icon.png</file>
|
||||||
|
<file>data/images/spotifycore-logo.png</file>
|
||||||
<file>data/sql/dbmigrate-27_to_28.sql</file>
|
<file>data/sql/dbmigrate-27_to_28.sql</file>
|
||||||
<file>data/images/process-stop.png</file>
|
<file>data/images/process-stop.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
@@ -77,6 +77,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|||||||
accounts/lastfm/lastfmplugin.cpp
|
accounts/lastfm/lastfmplugin.cpp
|
||||||
|
|
||||||
accounts/spotify/SpotifyAccount.cpp
|
accounts/spotify/SpotifyAccount.cpp
|
||||||
|
accounts/spotify/SpotifyAccountConfig.cpp
|
||||||
|
|
||||||
tomahawktrayicon.cpp
|
tomahawktrayicon.cpp
|
||||||
audiocontrols.cpp
|
audiocontrols.cpp
|
||||||
@@ -98,6 +99,7 @@ SET( tomahawkUI ${tomahawkUI}
|
|||||||
proxydialog.ui
|
proxydialog.ui
|
||||||
|
|
||||||
accounts/lastfm/LastFmConfig.ui
|
accounts/lastfm/LastFmConfig.ui
|
||||||
|
accounts/spotify/SpotifyAccountConfig.ui
|
||||||
|
|
||||||
audiocontrols.ui
|
audiocontrols.ui
|
||||||
|
|
||||||
|
@@ -94,5 +94,3 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // LASTFMPLUGIN_H
|
#endif // LASTFMPLUGIN_H
|
||||||
|
|
||||||
class A;
|
|
||||||
|
@@ -22,7 +22,8 @@
|
|||||||
#include "utils/tomahawkutils.h"
|
#include "utils/tomahawkutils.h"
|
||||||
#include "playlist/PlaylistUpdaterInterface.h"
|
#include "playlist/PlaylistUpdaterInterface.h"
|
||||||
#include "sourcelist.h"
|
#include "sourcelist.h"
|
||||||
|
#include "SpotifyAccountConfig.h"
|
||||||
|
#include "resolvers/scriptresolver.h"
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
@@ -65,14 +66,52 @@ SpotifyAccountFactory::icon() const
|
|||||||
SpotifyAccount::SpotifyAccount( const QString& accountId )
|
SpotifyAccount::SpotifyAccount( const QString& accountId )
|
||||||
: ResolverAccount( accountId )
|
: ResolverAccount( accountId )
|
||||||
{
|
{
|
||||||
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SpotifyAccount::SpotifyAccount( const QString& accountId, const QString& path )
|
SpotifyAccount::SpotifyAccount( const QString& accountId, const QString& path )
|
||||||
: ResolverAccount( accountId, path )
|
: ResolverAccount( accountId, path )
|
||||||
{
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyAccount::init()
|
||||||
|
{
|
||||||
|
m_spotifyResolver = dynamic_cast< ScriptResolver* >( m_resolver.data() );
|
||||||
|
|
||||||
|
connect( m_spotifyResolver.data(), SIGNAL( customMessage( QString,QVariantMap ) ), this, SLOT( resolverMessage( QString, QVariantMap ) ) );
|
||||||
|
|
||||||
|
const bool hasMigrated = configuration().value( "hasMigrated" ).toBool();
|
||||||
|
if ( !hasMigrated )
|
||||||
|
{
|
||||||
|
qDebug() << "Getting credentials from spotify resolver to migrate to in-app config";
|
||||||
|
QVariantMap msg;
|
||||||
|
msg[ "_msgtype" ] = "getCredentials";
|
||||||
|
m_spotifyResolver.data()->sendMessage( msg );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg )
|
||||||
|
{
|
||||||
|
if ( msgType == "credentials" )
|
||||||
|
{
|
||||||
|
QVariantHash creds = credentials();
|
||||||
|
creds[ "username" ] = msg.value( "username" );
|
||||||
|
creds[ "password" ] = msg.value( "password" );
|
||||||
|
creds[ "highQuality" ] = msg.value( "highQuality" );
|
||||||
|
setCredentials( creds );
|
||||||
|
sync();
|
||||||
|
|
||||||
|
QVariantHash config = configuration();
|
||||||
|
config[ "hasMigrated" ] = true;
|
||||||
|
setConfiguration( config );
|
||||||
|
sync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -86,6 +125,36 @@ SpotifyAccount::icon() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QWidget*
|
||||||
|
SpotifyAccount::configurationWidget()
|
||||||
|
{
|
||||||
|
if ( m_configWidget.isNull() )
|
||||||
|
m_configWidget = QWeakPointer< SpotifyAccountConfig >( new SpotifyAccountConfig( this ) );
|
||||||
|
else
|
||||||
|
m_configWidget.data()->loadFromConfig();
|
||||||
|
|
||||||
|
return static_cast< QWidget* >( m_configWidget.data() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyAccount::saveConfig()
|
||||||
|
{
|
||||||
|
Q_ASSERT( !m_configWidget.isNull() );
|
||||||
|
if ( m_configWidget.isNull() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Send the result to the resolver
|
||||||
|
QVariantMap msg;
|
||||||
|
msg[ "_msgtype" ] = "saveSettings";
|
||||||
|
msg[ "username" ] = m_configWidget.data()->username();
|
||||||
|
msg[ "password" ] = m_configWidget.data()->password();
|
||||||
|
msg[ "highQuality" ] = m_configWidget.data()->highQuality();
|
||||||
|
|
||||||
|
m_spotifyResolver.data()->sendMessage( msg );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::addPlaylist( const QString &qid, const QString& title, QList< Tomahawk::query_ptr > tracks )
|
SpotifyAccount::addPlaylist( const QString &qid, const QString& title, QList< Tomahawk::query_ptr > tracks )
|
||||||
{
|
{
|
||||||
@@ -140,7 +209,7 @@ SpotifyAccount::addPlaylist( const QString &qid, const QString& title, QList< To
|
|||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
operator==( Tomahawk::Accounts::SpotifyAccount::Sync one, Tomahawk::Accounts::SpotifyAccount::Sync two )
|
operator==( Accounts::SpotifyAccount::Sync one, Accounts::SpotifyAccount::Sync two )
|
||||||
{
|
{
|
||||||
if( one.id_ == two.id_ )
|
if( one.id_ == two.id_ )
|
||||||
return true;
|
return true;
|
||||||
|
@@ -27,12 +27,12 @@
|
|||||||
|
|
||||||
class QTimer;
|
class QTimer;
|
||||||
|
|
||||||
|
class ScriptResolver;
|
||||||
|
|
||||||
namespace Tomahawk {
|
namespace Tomahawk {
|
||||||
|
|
||||||
class ExternalResolverGui;
|
|
||||||
|
|
||||||
namespace Accounts {
|
namespace Accounts {
|
||||||
|
|
||||||
|
class SpotifyAccountConfig;
|
||||||
|
|
||||||
class SpotifyAccountFactory : public AccountFactory
|
class SpotifyAccountFactory : public AccountFactory
|
||||||
{
|
{
|
||||||
@@ -64,6 +64,8 @@ public:
|
|||||||
virtual ~SpotifyAccount() {}
|
virtual ~SpotifyAccount() {}
|
||||||
|
|
||||||
virtual QPixmap icon() const;
|
virtual QPixmap icon() const;
|
||||||
|
virtual QWidget* configurationWidget();
|
||||||
|
virtual void saveConfig();
|
||||||
|
|
||||||
virtual QWidget* aclWidget() { return 0; }
|
virtual QWidget* aclWidget() { return 0; }
|
||||||
virtual InfoSystem::InfoPlugin* infoPlugin() { return 0; }
|
virtual InfoSystem::InfoPlugin* infoPlugin() { return 0; }
|
||||||
@@ -77,11 +79,18 @@ public:
|
|||||||
Tomahawk::playlist_ptr playlist;
|
Tomahawk::playlist_ptr playlist;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private slots:
|
||||||
QList<Sync> m_syncPlaylists;
|
void resolverMessage( const QString& msgType, const QVariantMap& msg );
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void init();
|
||||||
|
|
||||||
|
QList<Sync> m_syncPlaylists;
|
||||||
|
QWeakPointer<SpotifyAccountConfig> m_configWidget;
|
||||||
|
QWeakPointer<ScriptResolver> m_spotifyResolver;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SpotifyAccount_H
|
#endif // SpotifyAccount_H
|
||||||
|
45
src/accounts/spotify/SpotifyAccountConfig.cpp
Normal file
45
src/accounts/spotify/SpotifyAccountConfig.cpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#include "SpotifyAccountConfig.h"
|
||||||
|
|
||||||
|
#include "SpotifyAccount.h"
|
||||||
|
#include "ui_SpotifyAccountConfig.h"
|
||||||
|
|
||||||
|
using namespace Tomahawk;
|
||||||
|
using namespace Accounts;
|
||||||
|
|
||||||
|
SpotifyAccountConfig::SpotifyAccountConfig( SpotifyAccount *account )
|
||||||
|
: QWidget( 0 )
|
||||||
|
, m_ui( new Ui::SpotifyConfig )
|
||||||
|
, m_account( account )
|
||||||
|
{
|
||||||
|
m_ui->setupUi( this );
|
||||||
|
|
||||||
|
loadFromConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyAccountConfig::loadFromConfig()
|
||||||
|
{
|
||||||
|
m_ui->usernameEdit->setText( m_account->credentials().value( "username" ).toString() );
|
||||||
|
m_ui->passwordEdit->setText( m_account->credentials().value( "password" ).toString() );
|
||||||
|
m_ui->streamingCheckbox->setChecked( m_account->credentials().value( "highQuality" ).toBool() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
SpotifyAccountConfig::username() const
|
||||||
|
{
|
||||||
|
return m_ui->usernameEdit->text().trimmed();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
SpotifyAccountConfig::password() const
|
||||||
|
{
|
||||||
|
return m_ui->passwordEdit->text().trimmed();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
SpotifyAccountConfig::highQuality() const
|
||||||
|
{
|
||||||
|
return m_ui->streamingCheckbox->isChecked();
|
||||||
|
}
|
41
src/accounts/spotify/SpotifyAccountConfig.h
Normal file
41
src/accounts/spotify/SpotifyAccountConfig.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#ifndef SPOTIFYACCOUNTCONFIG_H
|
||||||
|
#define SPOTIFYACCOUNTCONFIG_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui
|
||||||
|
{
|
||||||
|
class SpotifyConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Tomahawk
|
||||||
|
{
|
||||||
|
namespace Accounts
|
||||||
|
{
|
||||||
|
|
||||||
|
class SpotifyAccount;
|
||||||
|
|
||||||
|
class SpotifyAccountConfig : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit SpotifyAccountConfig( SpotifyAccount* account );
|
||||||
|
|
||||||
|
QString username() const;
|
||||||
|
QString password() const;
|
||||||
|
bool highQuality() const;
|
||||||
|
|
||||||
|
QStringList playlistsToSync() const;
|
||||||
|
|
||||||
|
void loadFromConfig();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::SpotifyConfig* m_ui;
|
||||||
|
SpotifyAccount* m_account;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SPOTIFYACCOUNTCONFIG_H
|
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>397</width>
|
<width>457</width>
|
||||||
<height>487</height>
|
<height>479</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -20,21 +20,33 @@
|
|||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="margin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="icon">
|
<widget class="QLabel" name="icon">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>64</width>
|
||||||
|
<height>64</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap>spotify-logo.png</pixmap>
|
<pixmap resource="../../../resources.qrc">:/data/images/spotify-logo.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="titleText">
|
<widget class="QLabel" name="titleText">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -45,7 +57,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Configure your Spotify credentials</string>
|
<string>Configure your Spotify account</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::PlainText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
@@ -69,7 +81,10 @@
|
|||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="usernameEdit">
|
<widget class="QLineEdit" name="usernameEdit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>placeholderUsername</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Username or Facebook Email</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -83,7 +98,7 @@
|
|||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="passwordEdit">
|
<widget class="QLineEdit" name="passwordEdit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>placeholderPw</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="echoMode">
|
<property name="echoMode">
|
||||||
<enum>QLineEdit::Password</enum>
|
<enum>QLineEdit::Password</enum>
|
||||||
@@ -95,7 +110,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_5">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -113,15 +128,15 @@
|
|||||||
<enum>Qt::RightToLeft</enum>
|
<enum>Qt::RightToLeft</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>High Quality Streaming</string>
|
<string>High Quality Streams</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>STREAMING_DEFAULT</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_6">
|
<spacer name="horizontalSpacer_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -135,6 +150,16 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Spotify playlists to keep in sync:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWidget"/>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
@@ -152,11 +177,35 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="spotifyLogo">
|
<widget class="QLabel" name="spotifyLogo">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>64</width>
|
||||||
|
<height>64</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap>spotifycore-logo.png</pixmap>
|
<pixmap resource="../../../resources.qrc">:/data/images/spotifycore-logo.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>This product uses SPOTIFY(R) CORE but is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -175,25 +224,10 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>9</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>This product uses SPOTIFY(R) CORE but is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources.qrc"/>
|
<include location="../../../resources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -144,6 +144,13 @@ ScriptResolver::running() const
|
|||||||
return !m_stopped;
|
return !m_stopped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ScriptResolver::sendMessage( const QVariantMap& map )
|
||||||
|
{
|
||||||
|
QByteArray data = m_serializer.serialize( map );
|
||||||
|
sendMsg( data );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ScriptResolver::readStderr()
|
ScriptResolver::readStderr()
|
||||||
@@ -285,6 +292,11 @@ ScriptResolver::handleMsg( const QByteArray& msg )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Unknown message, give up for custom implementations
|
||||||
|
emit customMessage( msgtype, m );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -54,8 +54,11 @@ public:
|
|||||||
|
|
||||||
virtual bool running() const;
|
virtual bool running() const;
|
||||||
|
|
||||||
|
void sendMessage( const QVariantMap& map );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void terminated();
|
void terminated();
|
||||||
|
void customMessage( const QString& msgType, const QVariantMap& msg );
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void stop();
|
virtual void stop();
|
||||||
|
@@ -150,8 +150,3 @@ Q_DECLARE_METATYPE( QPersistentModelIndex )
|
|||||||
Q_DECLARE_METATYPE( PairList )
|
Q_DECLARE_METATYPE( PairList )
|
||||||
|
|
||||||
#endif // TOMAHAWKAPP_H
|
#endif // TOMAHAWKAPP_H
|
||||||
|
|
||||||
|
|
||||||
struct A;
|
|
||||||
|
|
||||||
struct A;
|
|
||||||
|
Reference in New Issue
Block a user