mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 08:19:42 +01:00
Merge branch 'master' of https://github.com/tomahawk-player/tomahawk
This commit is contained in:
commit
d243a5f70e
@ -495,7 +495,6 @@ target_link_libraries( tomahawklib
|
||||
${LIBECHONEST_LIBRARY}
|
||||
${QT_QTUITOOLS_LIBRARY}
|
||||
${QT_LIBRARIES}
|
||||
${QT_QTUITOOLS_LIBRARY} # We really need to link twice against it for windows, maybe QTBUG-20498 is related
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LINK_LIBRARIES}
|
||||
|
@ -25,18 +25,21 @@
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
GeneratorInterface*
|
||||
DatabaseFactory::create()
|
||||
{
|
||||
return new DatabaseGenerator();
|
||||
}
|
||||
|
||||
|
||||
dyncontrol_ptr
|
||||
DatabaseFactory::createControl ( const QString& controlType )
|
||||
{
|
||||
return dyncontrol_ptr( new DatabaseControl( controlType, typeSelectors() ) );
|
||||
}
|
||||
|
||||
|
||||
dyncontrol_ptr
|
||||
DatabaseFactory::createControl ( const QString& sql, DatabaseCommand_GenericSelect::QueryType type, const QString& summary )
|
||||
{
|
||||
@ -62,11 +65,12 @@ DatabaseGenerator::DatabaseGenerator ( QObject* parent )
|
||||
// m_logo.load( RESPATH "images )
|
||||
}
|
||||
|
||||
|
||||
DatabaseGenerator::~DatabaseGenerator()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
DatabaseGenerator::logo()
|
||||
{
|
||||
@ -77,15 +81,15 @@ DatabaseGenerator::logo()
|
||||
void
|
||||
DatabaseGenerator::dynamicFetched()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DatabaseGenerator::dynamicStarted()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DatabaseGenerator::generate( int number )
|
||||
{
|
||||
@ -136,6 +140,7 @@ DatabaseGenerator::generate( int number )
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DatabaseGenerator::tracksGenerated ( const QList< query_ptr >& tracks )
|
||||
{
|
||||
@ -150,6 +155,7 @@ DatabaseGenerator::createControl( const QString& type )
|
||||
return m_controls.last();
|
||||
}
|
||||
|
||||
|
||||
dyncontrol_ptr
|
||||
DatabaseGenerator::createControl ( const QString& sql, DatabaseCommand_GenericSelect::QueryType type, const QString& summary )
|
||||
{
|
||||
@ -160,10 +166,11 @@ DatabaseGenerator::createControl ( const QString& sql, DatabaseCommand_GenericSe
|
||||
|
||||
|
||||
void
|
||||
DatabaseGenerator::fetchNext( int rating )
|
||||
DatabaseGenerator::fetchNext( int /* rating */ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
DatabaseGenerator::sentenceSummary()
|
||||
{
|
||||
@ -174,8 +181,8 @@ DatabaseGenerator::sentenceSummary()
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DatabaseGenerator::startOnDemand()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -521,7 +521,6 @@ TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVaria
|
||||
if ( parent.isValid() )
|
||||
crows.second -= 1;
|
||||
|
||||
qDebug() << crows.first << crows.second;
|
||||
if ( !parent.isValid() || crows.second > 0 )
|
||||
emit beginInsertRows( parent, crows.first, crows.second );
|
||||
|
||||
@ -551,7 +550,6 @@ TreeModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums, const QVaria
|
||||
else
|
||||
emit dataChanged( albumitem->index, albumitem->index.sibling( albumitem->index.row(), columnCount( QModelIndex() ) - 1 ) );
|
||||
|
||||
qDebug() << rowCount( parent );
|
||||
emit loadingFinished();
|
||||
}
|
||||
|
||||
@ -568,14 +566,16 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVaria
|
||||
QModelIndex parent = index( rows.first().toUInt(), 0, index( rows.at( 1 ).toUInt(), 0, QModelIndex() ) );
|
||||
TreeModelItem* parentItem = itemFromIndex( parent );
|
||||
|
||||
// the -1 is because we fake a rowCount of 1 to trigger Qt calling fetchMore()
|
||||
int c = rowCount( parent ) - 1;
|
||||
QPair< int, int > crows;
|
||||
int c = rowCount( parent );
|
||||
crows.first = c;
|
||||
crows.second = c + tracks.count() - 1;
|
||||
|
||||
if ( crows.second > 0 )
|
||||
emit beginInsertRows( parent, crows.first + 1, crows.second );
|
||||
if ( parent.isValid() )
|
||||
crows.second -= 1;
|
||||
|
||||
if ( !parent.isValid() || crows.second > 0 )
|
||||
emit beginInsertRows( parent, crows.first, crows.second );
|
||||
|
||||
TreeModelItem* item = 0;
|
||||
foreach( const query_ptr& query, tracks )
|
||||
@ -587,7 +587,7 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVaria
|
||||
connect( item, SIGNAL( dataChanged() ), SLOT( onDataChanged() ) );
|
||||
}
|
||||
|
||||
if ( crows.second > 0 )
|
||||
if ( !parent.isValid() || crows.second > 0 )
|
||||
emit endInsertRows();
|
||||
|
||||
emit dataChanged( item->index.sibling( 0, 0 ), item->index.sibling( item->index.row(), columnCount( QModelIndex() ) - 1 ) );
|
||||
|
@ -80,13 +80,6 @@ ViewManager::ViewManager( QObject* parent )
|
||||
m_infobar = new InfoBar();
|
||||
m_stack = new QStackedWidget();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QFrame* line = new QFrame();
|
||||
line->setFrameStyle( QFrame::HLine );
|
||||
line->setStyleSheet( "border: 1px solid gray;" );
|
||||
line->setMaximumHeight( 1 );
|
||||
#endif
|
||||
|
||||
m_splitter = new AnimatedSplitter();
|
||||
m_splitter->setOrientation( Qt::Vertical );
|
||||
m_splitter->setChildrenCollapsible( false );
|
||||
@ -103,9 +96,6 @@ ViewManager::ViewManager( QObject* parent )
|
||||
|
||||
m_widget->layout()->addWidget( m_infobar );
|
||||
m_widget->layout()->addWidget( m_topbar );
|
||||
#ifdef Q_OS_MAC
|
||||
m_widget->layout()->addWidget( line );
|
||||
#endif
|
||||
m_widget->layout()->addWidget( m_splitter );
|
||||
|
||||
m_superCollectionView = new ArtistView();
|
||||
|
@ -264,7 +264,7 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
QRect rectText = option.rect.adjusted( 66, 20, -100, -8 );
|
||||
#ifdef Q_OS_MAC
|
||||
rectText.adjust( 0, 1, 0, 0 );
|
||||
#elif Q_OS_WIN
|
||||
#elif defined Q_OS_WIN
|
||||
rectText.adjust( 0, 2, 0, 0 );
|
||||
#endif
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <QPluginLoader>
|
||||
#include <QDir>
|
||||
#include <QMetaType>
|
||||
@ -110,8 +112,6 @@ using namespace Tomahawk;
|
||||
TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
: TOMAHAWK_APPLICATION( argc, argv )
|
||||
{
|
||||
qDebug() << "TomahawkApp thread:" << thread();
|
||||
|
||||
setOrganizationName( QLatin1String( TOMAHAWK_ORGANIZATION_NAME ) );
|
||||
setOrganizationDomain( QLatin1String( TOMAHAWK_ORGANIZATION_DOMAIN ) );
|
||||
setApplicationName( QLatin1String( TOMAHAWK_APPLICATION_NAME ) );
|
||||
@ -130,6 +130,7 @@ TomahawkApp::init()
|
||||
::exit(0);
|
||||
}
|
||||
|
||||
qDebug() << "TomahawkApp thread:" << thread();
|
||||
Logger::setupLogfile();
|
||||
qsrand( QTime( 0, 0, 0 ).secsTo( QTime::currentTime() ) );
|
||||
|
||||
@ -303,21 +304,25 @@ TomahawkApp::instance()
|
||||
return (TomahawkApp*)TOMAHAWK_APPLICATION::instance();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkApp::printHelp()
|
||||
{
|
||||
std::cout << QString( "usage: " + arguments().at( 0 ) + " [options] [url]\n" ).toAscii().data();
|
||||
std::cout << QString( "options are:\n" ).toAscii().data();
|
||||
std::cout << QString( " --help Show this help\n" ).toAscii().data();
|
||||
std::cout << QString( " --http Initialize HTTP server\n" ).toAscii().data();
|
||||
std::cout << QString( " --filescan Scan for files on startup\n" ).toAscii().data();
|
||||
std::cout << QString( " --testdb Use a test database instead of real collection\n" ).toAscii().data();
|
||||
std::cout << QString( " --noupnp Disable UPNP\n" ).toAscii().data();
|
||||
std::cout << QString( " --nosip Disable SIP\n" ).toAscii().data();
|
||||
std::cout << QString( "\nurl is a tomahawk:// command or alternatively a url that Tomahawk can recognize.\n" ).toAscii().data();
|
||||
std::cout << QString( "For more documentation, see http://wiki.tomahawk-player.org/mediawiki/index.php/Tomahawk://_Links\n" ).toAscii().data();
|
||||
#define echo( X ) std::cout << QString( X ).toAscii().data()
|
||||
|
||||
echo( "Usage: " + arguments().at( 0 ) + " [options] [url]\n" );
|
||||
echo( "Options are:\n" );
|
||||
echo( " --help Show this help\n" );
|
||||
echo( " --http Initialize HTTP server\n" );
|
||||
echo( " --filescan Scan for files on startup\n" );
|
||||
echo( " --testdb Use a test database instead of real collection\n" );
|
||||
echo( " --noupnp Disable UPNP\n" );
|
||||
echo( " --nosip Disable SIP\n" );
|
||||
echo( "\nurl is a tomahawk:// command or alternatively a url that Tomahawk can recognize.\n" );
|
||||
echo( "For more documentation, see http://wiki.tomahawk-player.org/mediawiki/index.php/Tomahawk://_Links\n" );
|
||||
}
|
||||
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
AudioControls*
|
||||
TomahawkApp::audioControls()
|
||||
|
@ -177,10 +177,8 @@ TomahawkWindow::applyPlatformTweaks()
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
ui->hline1->setMaximumHeight( 0 );
|
||||
ui->hline2->setMaximumHeight( 0 );
|
||||
ui->hline1->hide();
|
||||
ui->hline2->hide();
|
||||
delete ui->hline1;
|
||||
delete ui->hline2;
|
||||
#else
|
||||
ui->hline1->setStyleSheet( "border: 1px solid gray;" );
|
||||
ui->hline2->setStyleSheet( "border: 1px solid gray;" );
|
||||
@ -213,7 +211,10 @@ TomahawkWindow::setupSideBar()
|
||||
sidebarWidget->setContentsMargins( 0, 0, 0, 0 );
|
||||
sidebarWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||
sidebarWidget->layout()->setMargin( 0 );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
sidebarWidget->layout()->setSpacing( 0 );
|
||||
#endif
|
||||
|
||||
ui->splitter->addWidget( sidebarWidget );
|
||||
ui->splitter->addWidget( ViewManager::instance()->widget() );
|
||||
|
@ -67,7 +67,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>20</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuSettings">
|
||||
|
Loading…
x
Reference in New Issue
Block a user