1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 06:36:55 +02:00

* Style fixes and debugging.

This commit is contained in:
Christian Muehlhaeuser
2013-09-05 22:24:23 +02:00
parent 585a7ad878
commit e414c00080
4 changed files with 24 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>300</width> <width>300</width>
<height>500</height> <height>488</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -19,7 +19,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>300</width> <width>300</width>
<height>500</height> <height>488</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -340,8 +340,8 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>17</width> <width>20</width>
<height>15</height> <height>8</height>
</size> </size>
</property> </property>
</spacer> </spacer>

View File

@@ -904,6 +904,7 @@ PlayableModel::onDataChanged()
void void
PlayableModel::startLoading() PlayableModel::startLoading()
{ {
tDebug() << Q_FUNC_INFO;
Q_D( PlayableModel ); Q_D( PlayableModel );
d->loading = true; d->loading = true;
emit loadingStarted(); emit loadingStarted();
@@ -913,6 +914,7 @@ PlayableModel::startLoading()
void void
PlayableModel::finishLoading() PlayableModel::finishLoading()
{ {
tDebug() << Q_FUNC_INFO;
Q_D( PlayableModel ); Q_D( PlayableModel );
d->loading = false; d->loading = false;
emit loadingFinished(); emit loadingFinished();

View File

@@ -83,6 +83,7 @@ AccountListWidget::AccountListWidget( AccountModelFactoryProxy* model, QWidget*
updateToggleOnlineStateButton(); updateToggleOnlineStateButton();
} }
void void
AccountListWidget::updateEntries( const QModelIndex& topLeft, const QModelIndex& bottomRight ) AccountListWidget::updateEntries( const QModelIndex& topLeft, const QModelIndex& bottomRight )
{ {
@@ -105,6 +106,7 @@ AccountListWidget::updateEntries( const QModelIndex& topLeft, const QModelIndex&
} }
} }
void void
AccountListWidget::updateEntry( const QPersistentModelIndex& idx ) AccountListWidget::updateEntry( const QPersistentModelIndex& idx )
{ {
@@ -114,6 +116,7 @@ AccountListWidget::updateEntry( const QPersistentModelIndex& idx )
} }
} }
void void
AccountListWidget::loadAllEntries() AccountListWidget::loadAllEntries()
{ {
@@ -132,6 +135,7 @@ AccountListWidget::loadAllEntries()
insertEntries( QModelIndex(), 0, rc - 1 ); insertEntries( QModelIndex(), 0, rc - 1 );
} }
void void
AccountListWidget::insertEntries( const QModelIndex& parent, int start, int end ) AccountListWidget::insertEntries( const QModelIndex& parent, int start, int end )
{ {
@@ -160,6 +164,7 @@ AccountListWidget::insertEntries( const QModelIndex& parent, int start, int end
} }
} }
void void
AccountListWidget::removeEntries( const QModelIndex& parent, int start, int end ) AccountListWidget::removeEntries( const QModelIndex& parent, int start, int end )
{ {
@@ -191,9 +196,11 @@ AccountListWidget::removeEntries( const QModelIndex& parent, int start, int end
qobject_cast< QWidget* >( QWidget::parent() )->adjustSize(); qobject_cast< QWidget* >( QWidget::parent() )->adjustSize();
} }
void void
AccountListWidget::toggleOnlineStateForAll() AccountListWidget::toggleOnlineStateForAll()
{ {
tDebug() << Q_FUNC_INFO;
bool newState = !m_toggleOnlineButtonState; bool newState = !m_toggleOnlineButtonState;
foreach ( QList< AccountWidget* > awgts, m_entries ) foreach ( QList< AccountWidget* > awgts, m_entries )
{ {
@@ -204,6 +211,7 @@ AccountListWidget::toggleOnlineStateForAll()
} }
} }
void void
AccountListWidget::updateToggleOnlineStateButton() AccountListWidget::updateToggleOnlineStateButton()
{ {
@@ -223,6 +231,7 @@ AccountListWidget::updateToggleOnlineStateButton()
if ( newState != m_toggleOnlineButtonState ) if ( newState != m_toggleOnlineButtonState )
{ {
tDebug() << Q_FUNC_INFO;
m_toggleOnlineButtonState = newState; m_toggleOnlineButtonState = newState;
if ( newState ) if ( newState )
Tomahawk::Accounts::AccountManager::instance()->connectAll(); Tomahawk::Accounts::AccountManager::instance()->connectAll();

View File

@@ -27,6 +27,7 @@
#include "utils/TomahawkStyle.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include "utils/AnimatedSpinner.h" #include "utils/AnimatedSpinner.h"
#include "utils/Logger.h"
#include "widgets/ElidedLabel.h" #include "widgets/ElidedLabel.h"
#include "jobview/JobStatusView.h" #include "jobview/JobStatusView.h"
@@ -187,8 +188,8 @@ AccountWidget::update( const QPersistentModelIndex& idx, int accountIdx )
if ( account->enabled() ) if ( account->enabled() )
m_statusToggle->setChecked( true ); m_statusToggle->setChecked( true );
else else
qDebug() << "AccountWidget warning:" << account->accountFriendlyName() tDebug() << "AccountWidget warning:" << account->accountFriendlyName()
<< "is Connected but Disabled!"; << "is Connected but Disabled!";
m_spinner->fadeOut(); m_spinner->fadeOut();
m_statusToggle->setBackChecked( true ); m_statusToggle->setBackChecked( true );
setInviteWidgetsEnabled( true ); setInviteWidgetsEnabled( true );
@@ -198,8 +199,8 @@ AccountWidget::update( const QPersistentModelIndex& idx, int accountIdx )
case Tomahawk::Accounts::Account::Connecting: case Tomahawk::Accounts::Account::Connecting:
{ {
if ( !account->enabled() ) if ( !account->enabled() )
qDebug() << "AccountWidget warning:" << account->accountFriendlyName() tDebug() << "AccountWidget warning:" << account->accountFriendlyName()
<< "is Connecting but Disabled!"; << "is Connecting but Disabled!";
m_spinner->fadeIn(); m_spinner->fadeIn();
m_statusToggle->setBackChecked( false ); m_statusToggle->setBackChecked( false );
setInviteWidgetsEnabled( false ); setInviteWidgetsEnabled( false );
@@ -211,8 +212,8 @@ AccountWidget::update( const QPersistentModelIndex& idx, int accountIdx )
if ( !account->enabled() ) if ( !account->enabled() )
m_statusToggle->setChecked( false ); m_statusToggle->setChecked( false );
else else
qDebug() << "AccountWidget warning:" << account->accountFriendlyName() tDebug() << "AccountWidget warning:" << account->accountFriendlyName()
<< "is Disconnected but Enabled!"; << "is Disconnected but Enabled!";
m_spinner->fadeOut(); m_spinner->fadeOut();
m_statusToggle->setBackChecked( false ); m_statusToggle->setBackChecked( false );
setInviteWidgetsEnabled( false ); setInviteWidgetsEnabled( false );
@@ -222,8 +223,8 @@ AccountWidget::update( const QPersistentModelIndex& idx, int accountIdx )
case Tomahawk::Accounts::Account::Disconnecting: case Tomahawk::Accounts::Account::Disconnecting:
{ {
if ( account->enabled() ) if ( account->enabled() )
qDebug() << "AccountWidget warning:" << account->accountFriendlyName() tDebug() << "AccountWidget warning:" << account->accountFriendlyName()
<< "is Disconnecting but Enabled!"; << "is Disconnecting but Enabled!";
m_spinner->fadeIn(); m_spinner->fadeIn();
m_statusToggle->setBackChecked( true ); m_statusToggle->setBackChecked( true );
setInviteWidgetsEnabled( false ); setInviteWidgetsEnabled( false );