1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-14 18:35:16 +01:00

Remove the debug profiling output from startup

This commit is contained in:
David Sansome 2010-09-10 14:57:03 +00:00
parent aa6e67eb1f
commit 4020a7e774
3 changed files with 0 additions and 56 deletions

View File

@ -39,7 +39,6 @@
#include <QDesktopServices>
#include <QCoreApplication>
#include <QSettings>
#include <QTime>
#include <QtDebug>
@ -72,31 +71,22 @@ MagnatuneService::MagnatuneService(RadioModel* parent)
total_song_count_(0),
network_(parent->network()->network())
{
QTime t;
t.start();
ReloadSettings();
qDebug() << t.restart() << "magnatune: settings";
// Create the library backend in the database thread
library_backend_ = new LibraryBackend;
library_backend_->moveToThread(parent->db_thread());
qDebug() << t.restart() << "magnatune: backendctor";
library_backend_->Init(parent->db_thread()->Worker(), kSongsTable,
QString::null, QString::null, kFtsTable);
qDebug() << t.restart() << "magnatune: backendinit";
library_model_ = new LibraryModel(library_backend_, this);
qDebug() << t.restart() << "magnatune: modelctor";
connect(library_backend_, SIGNAL(TotalSongCountUpdated(int)),
SLOT(UpdateTotalSongCount(int)));
qDebug() << t.restart() << "magnatune: connect";
library_sort_model_->setSourceModel(library_model_);
library_sort_model_->setSortRole(LibraryModel::Role_SortText);
library_sort_model_->setDynamicSortFilter(true);
library_sort_model_->sort(0);
qDebug() << t.restart() << "magnatune: sort model";
}
MagnatuneService::~MagnatuneService() {

View File

@ -24,7 +24,6 @@
#include "core/mergedproxymodel.h"
#include <QMimeData>
#include <QTime>
#include <QtDebug>
QMap<QString, RadioService*> RadioModel::sServices;
@ -43,17 +42,10 @@ RadioModel::RadioModel(BackgroundThread<Database>* db_thread,
root_->lazy_loaded = true;
merged_model_->setSourceModel(this);
QTime t;
t.start();
AddService(new LastFMService(this));
qDebug() << t.restart() << "lastfm";
AddService(new SomaFMService(this));
qDebug() << t.restart() << "somafm";
AddService(new MagnatuneService(this));
qDebug() << t.restart() << "magnatune";
AddService(new SavedRadio(this));
qDebug() << t.restart() << "saved";
}
void RadioModel::AddService(RadioService *service) {

View File

@ -97,8 +97,6 @@
#include <cmath>
#include <QTime>
using boost::shared_ptr;
using boost::scoped_ptr;
@ -146,30 +144,19 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
track_position_timer_(new QTimer(this)),
was_maximized_(false)
{
QTime t;
t.start();
// Wait for the database thread to start - lots of stuff depends on it.
database_->Start(true);
qDebug() << t.restart() << "database startup";
// Create some objects in the database thread
playlist_backend_ = new PlaylistBackend;
playlist_backend_->moveToThread(database_);
playlist_backend_->SetDatabase(database_->Worker());
qDebug() << t.restart() << "playlist backend";
// Create stuff that needs the database
radio_model_ = new RadioModel(database_, network, task_manager_, this);
qDebug() << t.restart() << "dbdeps: radio model";
player_ = new Player(playlists_, radio_model_->GetLastFMService(), engine, this);
qDebug() << t.restart() << "dbdeps: player";
library_ = new Library(database_, task_manager_, this);
qDebug() << t.restart() << "dbdeps: library";
devices_ = new DeviceManager(database_, task_manager_, this);
qDebug() << t.restart() << "dbdeps: devices";
// Initialise the UI
ui_->setupUi(this);
@ -184,13 +171,9 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
ui_->tabs->setDocumentMode(false);
#endif
qDebug() << t.restart() << "ui";
// Start initialising the player
player_->Init();
qDebug() << t.restart() << "player";
#ifdef HAVE_GSTREAMER
if (qobject_cast<GstEngine*>(player_->GetEngine()) == NULL) {
ui_->action_transcode->setEnabled(false);
@ -219,8 +202,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
organise_dialog_->SetDestinationModel(library_->model()->directory_model());
qDebug() << t.restart() << "models";
// Icons
ui_->action_about->setIcon(IconLoader::Load("help-about"));
ui_->action_add_file->setIcon(IconLoader::Load("document-open"));
@ -249,8 +230,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
ui_->action_update_library->setIcon(IconLoader::Load("view-refresh"));
ui_->action_rain->setIcon(IconLoader::Load("weather-showers-scattered"));
qDebug() << t.restart() << "icons";
// File view connections
connect(ui_->file_view, SIGNAL(AddToPlaylist(QList<QUrl>)), SLOT(AddFilesToPlaylist(QList<QUrl>)));
connect(ui_->file_view, SIGNAL(Load(QList<QUrl>)), SLOT(LoadFilesToPlaylist(QList<QUrl>)));
@ -415,8 +394,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
ui_->action_shuffle->setShortcut(QKeySequence());
#endif
qDebug() << t.restart() << "connections";
playlist_delete_->setVisible(false); // TODO
connect(ui_->playlist, SIGNAL(UndoRedoActionsChanged(QAction*,QAction*)),
@ -443,8 +420,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
// Connections to the saved streams service
connect(RadioModel::Service<SavedRadio>(), SIGNAL(ShowAddStreamDialog()), SLOT(AddStream()));
qDebug() << t.restart() << "more connections";
#ifdef Q_OS_DARWIN
mac::SetApplicationHandler(this);
#endif
@ -473,8 +448,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
ui_->action_about->setMenuRole(QAction::AboutRole);
#endif
qDebug() << t.restart() << "tray";
// Global shortcuts
connect(global_shortcuts_, SIGNAL(Play()), player_, SLOT(Play()));
connect(global_shortcuts_, SIGNAL(Pause()), player_, SLOT(Pause()));
@ -521,19 +494,13 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
connect(ui_->action_hypnotoad, SIGNAL(toggled(bool)), ui_->now_playing, SLOT(AllHail(bool)));
NowPlayingWidgetPositionChanged(ui_->now_playing->show_above_status_bar());
qDebug() << t.restart() << "stuff";
// Load theme
StyleSheetLoader* css_loader = new StyleSheetLoader(this);
css_loader->SetStyleSheet(this, ":mainwindow.css");
qDebug() << t.restart() << "theme";
// Load playlists
playlists_->Init(library_->backend(), playlist_backend_, ui_->playlist_sequence);
qDebug() << t.restart() << "load playlists";
// Load settings
settings_.beginGroup(kSettingsGroup);
@ -567,8 +534,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
show();
#endif
qDebug() << t.restart() << "load settings";
QShortcut* close_window_shortcut = new QShortcut(this);
close_window_shortcut->setKey(Qt::CTRL + Qt::Key_W);
connect(close_window_shortcut, SIGNAL(activated()), SLOT(SetHiddenInTray()));
@ -576,14 +541,11 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
library_->Init();
library_->StartThreads();
qDebug() << t.restart() << "start library";
#ifdef ENABLE_WIIMOTEDEV
// http://code.google.com/p/clementine-player/issues/detail?id=670
// Switched position, mayby something is not ready ?
wiimotedev_shortcuts_.reset(new WiimotedevShortcuts(osd_, this, player_));
qDebug() << t.restart() << "start wiimotedev";
#endif
}