cleanup
authortmarki <tmarki@gmail.com>
Thu, 19 Aug 2010 23:50:08 +0000 (01:50 +0200)
committertmarki <tmarki@gmail.com>
Thu, 19 Aug 2010 23:50:08 +0000 (01:50 +0200)
tomamp/optiondialog.cpp
tomamp/optiondialog.h
tomamp/playlistmanager.cpp

index 9792b96..a7d22b9 100644 (file)
@@ -119,11 +119,4 @@ void OptionDialog::orderControl (QString link)
     setupUi();
 }
 
-void OptionDialog::upColumn (int i)
-{
-}
-
-void OptionDialog::downColumn (int i)
-{
-}
 
index 1e14fb3..227739f 100644 (file)
@@ -21,8 +21,6 @@ private slots:
     void orderControl (QString);
     void toggleFlip (bool);
 private:
-    void upColumn (int i);
-    void downColumn (int i);
     void    setupUi ();
     QSettings& settings;
     QComboBox* orient;
index 98ac21a..57d1a81 100644 (file)
@@ -29,7 +29,6 @@ int PlaylistManager::indexOf(const Phonon::MediaSource &s) const
 void PlaylistManager::parseAndAddFolder(const QString &dir, bool recursive)
 {
     QStringList filters;
-//    filters << "*.mp3";
 
     QStringList files = QDir (dir).entryList(filters);
 
@@ -38,7 +37,6 @@ void PlaylistManager::parseAndAddFolder(const QString &dir, bool recursive)
 
     qDebug () << "Parsing folder " << dir;
 
-    //settings.setValue("LastFolder", dir);
     int index = items.size();
     foreach (QString string, files)
     {
@@ -58,7 +56,6 @@ void PlaylistManager::parseAndAddFolder(const QString &dir, bool recursive)
             items.append(PlaylistItem (PlaylistItem (fname)));
         }
     }
-//    if (!items.isEmpty())
     if (items.size () > index)
     {
         metaInformationResolver->setCurrentSource(items.at(index).source);
@@ -79,7 +76,6 @@ void PlaylistManager::addStringList(const QStringList& list)
             items.append(PlaylistItem (string));
         }
     }
-//    if (!items.isEmpty())
     if (items.size () > index)
     {
         metaInformationResolver->setCurrentSource(items.at(index).source);
@@ -91,7 +87,7 @@ void PlaylistManager::addStringList(const QStringList& list)
 void PlaylistManager::metaStateChanged(Phonon::State newState, Phonon::State oldState)
 {
     qDebug () << "Meta state now " << newState << " old state " << oldState;
-    // This is an ugly hack, since the metaInformationResolver doesn't properly load the assigned source when it's in the error state
+    // NOTE: This is an ugly hack, since the metaInformationResolver doesn't properly load the assigned source when it's in the error state
     // In order to properly read the next file we have to set it as current source again when the resolver entered the stopped state after the error
     static bool wasError = false;
     if (wasError && newState == Phonon::StoppedState)
@@ -111,7 +107,6 @@ void PlaylistManager::metaStateChanged(Phonon::State newState, Phonon::State old
     }
 
     int index = lastMetaRead;
-    qDebug () << "Reading meta info of " << metaInformationResolver->currentSource().fileName() << " => " << index;
 
     QMap<QString, QString> metaData = metaInformationResolver->metaData();
 
@@ -125,9 +120,7 @@ void PlaylistManager::metaStateChanged(Phonon::State newState, Phonon::State old
         items[index].genre = metaData.value("GENRE");
         qDebug () << "Meta " << metaData;
         qDebug () << "Info is: " << items[index].year << " - " << items[index].genre;*/
-        if (metaData.isEmpty())
-            qDebug () << "Detected to be empty: " << items[index].uri;
-        else
+        if (!metaData.isEmpty())
             items[index].playable = true;
         emit itemUpdated (index);
     }
@@ -292,9 +285,6 @@ void PlaylistManager::clearPlaylist()
 {
     items.clear();
     emit playlistChanged(0);
-/*    while (musicTable->rowCount())
-        musicTable->removeRow(0);
-    mediaObject->clear();*/
 }
 
 QStringList PlaylistManager::playlistStrings() const
@@ -335,7 +325,6 @@ bool PlaylistManager::moveItemUp (int i)
         items[i - 1] = items[i];
         items[i] = tmp;
         return true;
-//        emit playlistChanged(i - 1);
     }
     return false;
 }
@@ -348,7 +337,6 @@ bool PlaylistManager::moveItemDown (int i)
         items[i + 1] = items[i];
         items[i] = tmp;
         return true;
-//        emit playlistChanged(i - 1);
     }
     return false;
 }