Summary: | Kscd does not save disk data in local CDDB | ||
---|---|---|---|
Product: | [Unmaintained] kscd | Reporter: | imruska |
Component: | general | Assignee: | Aaron J. Seigo <aseigo> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Martin |
Priority: | NOR | ||
Version: | 1.4 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
imruska
2004-08-26 22:36:34 UTC
CVS commit by larkang: Saving and sending cd-info was really broken. Disc title, artist and song-titles weren't updated. This also fixes bug 88165 about not being able to enter new info CCMAIL: 88165-done@bugs.kde.org M +29 -14 cddbdlg.cpp 1.3 M +2 -1 cddbdlg.h 1.2 --- kdemultimedia/kscd/cddbdlg.cpp #1.2:1.3 @@ -283,23 +283,13 @@ QTime framestoTime(int _frames) } // framestotime -void CDDBDlg::titlechanged() -{ - QString title = m_dlgBase->le_title->text().stripWhiteSpace(); - QString artist = m_dlgBase->le_artist->text().stripWhiteSpace(); - - if(title.isEmpty() || artist.isEmpty()) - return; - - title = QString("%1 / %2").arg(artist).arg(title); - *track_list.begin() = title; -} // titlechanged - -QString submitcat; - void CDDBDlg::upload() { + updateTrackList(); + if(!checkit()) return; + QString submitcat; + if( category.isEmpty() ) { @@ -363,4 +353,6 @@ void CDDBDlg::setCdInfo(KCDDB::CDInfo &i void CDDBDlg::save() { + updateTrackList(); + if(!checkit()) return; @@ -489,3 +481,26 @@ void CDDBDlg::load_cddb() } // load +void CDDBDlg::updateTrackList() +{ + QString title = m_dlgBase->le_title->text().stripWhiteSpace(); + QString artist = m_dlgBase->le_artist->text().stripWhiteSpace(); + + title = QString("%1 / %2").arg(artist).arg(title); + *track_list.begin() = title; + + m_dlgBase->lv_trackList->setSorting(0, true); + + unsigned int i=1; + for (QListViewItem* item = m_dlgBase->lv_trackList->firstChild(); item ; item=item->nextSibling()) + { + if (track_list.count() <= i) + { + kdWarning() << "track_list.count <= " << i << endl; + continue; + } + track_list[i] = item->text(2); + i++; + } +} + #include "cddbdlg.moc" --- kdemultimedia/kscd/cddbdlg.h #1.1:1.2 @@ -59,5 +59,4 @@ class CDDBDlg : public KDialogBase public slots: - void titlechanged(); void save(); void extITB( int trackNum ); @@ -72,4 +71,6 @@ class CDDBDlg : public KDialogBase private: + void updateTrackList(); + CDDBDlgBase *m_dlgBase; QStringList ext_list; |