"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/AlbumInfoDownloaderDlgImpl.cpp" between
MP3Diags-unstable-1.3.04.tar.gz and MP3Diags-unstable-1.5.01.tar.gz

About: MP3 Diags finds problems in MP3 files and helps the user to fix many of them (with a GUI). Also includes a tag editor and a file renamer.

AlbumInfoDownloaderDlgImpl.cpp  (MP3Diags-unstable-1.3.04):AlbumInfoDownloaderDlgImpl.cpp  (MP3Diags-unstable-1.5.01)
skipping to change at line 40 skipping to change at line 40
#endif #endif
#include <QHttp> #include <QHttp>
#include <QMessageBox> #include <QMessageBox>
#include <QXmlSimpleReader> #include <QXmlSimpleReader>
#include <QBuffer> #include <QBuffer>
#include <QPainter> #include <QPainter>
#include <QScrollBar> #include <QScrollBar>
#include <QHeaderView> #include <QHeaderView>
#include <QTime> #include <QTime>
#include <QPixmap>
#include "AlbumInfoDownloaderDlgImpl.h" #include "AlbumInfoDownloaderDlgImpl.h"
#include "Helpers.h" #include "Helpers.h"
#include "ColumnResizer.h" #include "ColumnResizer.h"
#include "Widgets.h" #include "Widgets.h"
#include "fstream_unicode.h" #include "fstream_unicode.h"
using namespace std; using namespace std;
skipping to change at line 65 skipping to change at line 66
AlbumInfoDownloaderDlgImpl::AlbumInfoDownloaderDlgImpl(QWidget* pParent, Session Settings& settings, bool bSaveResults) : QDialog(pParent, getDialogWndFlags()), Ui::AlbumInfoDownloaderDlg(), m_bSaveResults(bSaveResults), m_nLastCount(0), m_n LastTime(0), m_settings(settings) AlbumInfoDownloaderDlgImpl::AlbumInfoDownloaderDlgImpl(QWidget* pParent, Session Settings& settings, bool bSaveResults) : QDialog(pParent, getDialogWndFlags()), Ui::AlbumInfoDownloaderDlg(), m_bSaveResults(bSaveResults), m_nLastCount(0), m_n LastTime(0), m_settings(settings)
{ {
setupUi(this); setupUi(this);
m_pQHttp = new QHttp (this); m_pQHttp = new QHttp (this);
connect(m_pQHttp, SIGNAL(requestFinished(int, bool)), this, SLOT(onRequestFi nished(int, bool))); connect(m_pQHttp, SIGNAL(requestFinished(int, bool)), this, SLOT(onRequestFi nished(int, bool)));
m_pTrackListG->verticalHeader()->setMinimumSectionSize(CELL_HEIGHT); m_pTrackListG->verticalHeader()->setMinimumSectionSize(CELL_HEIGHT);
m_pTrackListG->verticalHeader()->setDefaultSectionSize(CELL_HEIGHT); m_pTrackListG->verticalHeader()->setDefaultSectionSize(CELL_HEIGHT);
decreaseRowHeaderFont(*m_pTrackListG);
{ QAction* p (new QAction(this)); p->setShortcut(QKeySequence("F1")); connec t(p, SIGNAL(triggered()), this, SLOT(onHelp())); addAction(p); } { QAction* p (new QAction(this)); p->setShortcut(QKeySequence("F1")); connec t(p, SIGNAL(triggered()), this, SLOT(onHelp())); addAction(p); }
} }
AlbumInfoDownloaderDlgImpl::~AlbumInfoDownloaderDlgImpl() AlbumInfoDownloaderDlgImpl::~AlbumInfoDownloaderDlgImpl()
{ {
} }
bool AlbumInfoDownloaderDlgImpl::getInfo(const std::string& strArtist, const std ::string& strAlbum, int nTrackCount, AlbumInfo*& pAlbumInfo, ImageInfo*& pImageI nfo) bool AlbumInfoDownloaderDlgImpl::getInfo(const std::string& strArtist, const std ::string& strAlbum, int nTrackCount, AlbumInfo*& pAlbumInfo, ImageInfo*& pImageI nfo)
{ {
skipping to change at line 171 skipping to change at line 173
LAST_STEP("AlbumInfoDownloaderDlgImpl::search"); LAST_STEP("AlbumInfoDownloaderDlgImpl::search");
m_pResArtistE->setText(""); m_pResArtistE->setText("");
m_pResAlbumE->setText(""); m_pResAlbumE->setText("");
m_pDownloadsM->setText(""); m_pDownloadsM->setText("");
m_pAlbumNotesM->setText(""); m_pAlbumNotesM->setText("");
m_pFormatE->setText(""); m_pFormatE->setText("");
m_pRealeasedE->setText(""); m_pRealeasedE->setText("");
m_pResultNoL->setText(""); m_pResultNoL->setText("");
updateTrackList(); updateTrackList();
m_pVolumeCbB->clear(); m_pVolumeCbB->clear();
m_pImageL->setPixmap(0); m_pImageL->setPixmap(QPixmap());
m_pImageL->setText(""); m_pImageL->setText("");
m_pImgSizeL->setText("\n"); m_pImgSizeL->setText("\n");
m_pViewAtAmazonL->setText(tr(NOT_FOUND_AT_AMAZON)); m_pViewAtAmazonL->setText(tr(NOT_FOUND_AT_AMAZON));
m_strQuery = escapeHttp(createQuery()); // e.g. http://www.discogs.com/searc h?type=all&q=beatles&f=xml&api_key=f51e9c8f6c, without page number; to be used b y loadNextPage(); m_strQuery = escapeHttp(createQuery()); // e.g. http://www.discogs.com/searc h?type=all&q=beatles&f=xml&api_key=f51e9c8f6c, without page number; to be used b y loadNextPage();
m_nTotalPages = 1; m_nLastLoadedPage = -1; m_nTotalPages = 1; m_nLastLoadedPage = -1;
m_nCrtAlbum = -1; m_nCrtImage = -1; m_nCrtAlbum = -1; m_nCrtImage = -1;
resetNavigation(); resetNavigation();
//m_eNavigDir = NEXT; //m_eNavigDir = NEXT;
m_eNavigDir = NEXT; m_eNavigDir = NEXT;
skipping to change at line 245 skipping to change at line 247
return; return;
} }
if (0 == getAlbumCount()) if (0 == getAlbumCount())
{ {
showCritical(this, tr("Error"), tr("You cannot save the results now, bec ause no album is loaded")); showCritical(this, tr("Error"), tr("You cannot save the results now, bec ause no album is loaded"));
return; return;
} }
int nCnt (0); int nCnt (0);
CB_ASSERT (m_nCrtAlbum >= 0 && m_nCrtAlbum < getAlbumCount()); CB_ASSERT (m_nCrtAlbum >= 0 && m_nCrtAlbum < getAlbumCount());// ttt0 trigge red according to mail on 2015.12.13
const WebAlbumInfoBase& albumInfo (album(m_nCrtAlbum)); const WebAlbumInfoBase& albumInfo (album(m_nCrtAlbum));
if (m_pVolumeCbB->isEnabled() && m_pVolumeCbB->currentIndex() != m_pVolumeCb B->count() - 1) if (m_pVolumeCbB->isEnabled() && m_pVolumeCbB->currentIndex() != m_pVolumeCb B->count() - 1)
{ {
string s (convStr(m_pVolumeCbB->itemText(m_pVolumeCbB->currentIndex()))) ; string s (convStr(m_pVolumeCbB->itemText(m_pVolumeCbB->currentIndex()))) ;
for (int i = 0, n = cSize(albumInfo.m_vTracks); i < n; ++i) for (int i = 0, n = cSize(albumInfo.m_vTracks); i < n; ++i)
{ {
if (beginsWith(albumInfo.m_vTracks[i].m_strPos, s)) if (beginsWith(albumInfo.m_vTracks[i].m_strPos, s))
{ {
++nCnt; ++nCnt;
} }
skipping to change at line 874 skipping to change at line 876
QString q1 (m_nTotalPages == m_nLastLoadedPage + 1 ? "" : "+"); QString q1 (m_nTotalPages == m_nLastLoadedPage + 1 ? "" : "+");
QString s (tr("Album %1/%2%3, image %4/%5").arg(m_nCrtAlbum + 1).arg(getAlbu mCount()).arg(q1).arg(m_nCrtImage + 1).arg(albumInfo.m_vpImages.size())); QString s (tr("Album %1/%2%3, image %4/%5").arg(m_nCrtAlbum + 1).arg(getAlbu mCount()).arg(q1).arg(m_nCrtImage + 1).arg(albumInfo.m_vpImages.size()));
m_pResultNoL->setText(s); m_pResultNoL->setText(s);
m_pResArtistE->setText(convStr(albumInfo.m_strArtist)); m_pResArtistE->setText(convStr(albumInfo.m_strArtist));
m_pResAlbumE->setText(convStr(albumInfo.m_strTitle)); m_pResAlbumE->setText(convStr(albumInfo.m_strTitle));
if (-1 == m_nCrtImage || 0 == albumInfo.m_vpImages[m_nCrtImage]) if (-1 == m_nCrtImage || 0 == albumInfo.m_vpImages[m_nCrtImage])
{ {
m_pImageL->setPixmap(0); m_pImageL->setPixmap(QPixmap());
m_pImageL->setText(""); m_pImageL->setText("");
m_pImgSizeL->setText(tr("No image\n")); m_pImgSizeL->setText(tr("No image\n"));
} }
else else
{ {
m_pImageL->setPixmap(QPixmap::fromImage(albumInfo.m_vpImages[m_nCrtImage ]->getImage(m_pImageL->width(), m_pImageL->height()))); m_pImageL->setPixmap(QPixmap::fromImage(albumInfo.m_vpImages[m_nCrtImage ]->getImage(m_pImageL->width(), m_pImageL->height())));
m_pImgSizeL->setText(convStr(albumInfo.m_vstrImageInfo[m_nCrtImage])); m_pImgSizeL->setText(convStr(albumInfo.m_vstrImageInfo[m_nCrtImage]));
} }
} }
 End of changes. 5 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)