From 34b31d18fe31984aaa61006045c08d9c228cff2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 29 Oct 2013 19:46:00 +0100 Subject: [PATCH] fixed ComicVineClient timeOut connection from search --- .../comic_vine/comic_vine_client.cpp | 2 +- .../comic_vine/sort_volume_comics.h | 83 ++++++++++--------- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/YACReaderLibrary/comic_vine/comic_vine_client.cpp b/YACReaderLibrary/comic_vine/comic_vine_client.cpp index a97d018e..af4600a5 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_client.cpp +++ b/YACReaderLibrary/comic_vine/comic_vine_client.cpp @@ -45,7 +45,7 @@ void ComicVineClient::search(const QString & query, int page) { HttpWorker * search = new HttpWorker(CV_SEARCH.arg(query).arg(page)); connect(search,SIGNAL(dataReady(const QByteArray &)),this,SLOT(proccessVolumesSearchData(const QByteArray &))); - connect(search,SIGNAL(timeout()),this,SLOT(queryTimeOut())); + connect(search,SIGNAL(timeout()),this,SIGNAL(timeOut())); connect(search,SIGNAL(finished()),search,SLOT(deleteLater())); search->get(); } diff --git a/YACReaderLibrary/comic_vine/sort_volume_comics.h b/YACReaderLibrary/comic_vine/sort_volume_comics.h index 6b6a3e2d..54bdda43 100644 --- a/YACReaderLibrary/comic_vine/sort_volume_comics.h +++ b/YACReaderLibrary/comic_vine/sort_volume_comics.h @@ -23,7 +23,8 @@ public: }; ScrapperToolButton(ScrapperToolButton::Appearance appearance = DEFAULT, QWidget * parent=0):QPushButton(parent),appearance(appearance) { - setStyleSheet("QPushButton {border: none; background: #2e2e2e; color:white; border-radius:2px;}"); + setStyleSheet("QPushButton {border: none; background: #2e2e2e; color:white; border-radius:2px;}" + "QPushButton::pressed {border: none; background: #282828; color:white; border-radius:2px;}"); setFixedSize(18,17); } static QWidget * getSeparator(){QWidget * w = new QWidget; w->setFixedWidth(1); w->setStyleSheet("QWidget {background:#282828;}"); return w;} @@ -32,55 +33,55 @@ public: -protected: - void paintEvent(QPaintEvent * e) - { - QPainter p(this); + protected: + void paintEvent(QPaintEvent * e) + { + QPainter p(this); - switch (appearance) { - case LEFT: - p.fillRect(16,0,2,18,QColor("#2E2E2E")); - break; - case RIGHT: - p.fillRect(0,0,2,18,QColor("#2E2E2E")); - break; - default: - break; + switch (appearance) { + case LEFT: + p.fillRect(16,0,2,18,QColor("#2E2E2E")); + break; + case RIGHT: + p.fillRect(0,0,2,18,QColor("#2E2E2E")); + break; + default: + break; + } + + QPushButton::paintEvent(e); } - QPushButton::paintEvent(e); - } + private: + Appearance appearance; + }; -private: - Appearance appearance; -}; + class SortVolumeComics : public QWidget + { + Q_OBJECT + public: + explicit SortVolumeComics(QWidget *parent = 0); -class SortVolumeComics : public QWidget -{ - Q_OBJECT -public: - explicit SortVolumeComics(QWidget *parent = 0); + signals: -signals: + public slots: + void setData(QList & comics, const QString & json); -public slots: - void setData(QList & comics, const QString & json); + protected slots: + void synchronizeScroll(int pos); -protected slots: - void synchronizeScroll(int pos); + private: + ScraperTableView * tableFiles; + ScraperTableView * tableVolumeComics; -private: - ScraperTableView * tableFiles; - ScraperTableView * tableVolumeComics; + LocalComicListModel * localComicsModel; + VolumeComicsModel * volumeComicsModel; - LocalComicListModel * localComicsModel; - VolumeComicsModel * volumeComicsModel; + ScrapperToolButton * moveUpButtonCL; + ScrapperToolButton * moveDownButtonCL; + ScrapperToolButton * moveUpButtonIL; + ScrapperToolButton * moveDownButtonIL; - ScrapperToolButton * moveUpButtonCL; - ScrapperToolButton * moveDownButtonCL; - ScrapperToolButton * moveUpButtonIL; - ScrapperToolButton * moveDownButtonIL; + }; -}; - -#endif // SORT_VOLUME_COMICS_H + #endif // SORT_VOLUME_COMICS_H