mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
fixed compilation warnings in YACReaderLibrary.pro, at least using vc++ compiler
This commit is contained in:
@ -209,6 +209,8 @@ QItemSelectionModel *ClassicComicsView::selectionModel()
|
|||||||
|
|
||||||
void ClassicComicsView::scrollTo(const QModelIndex & mi, QAbstractItemView::ScrollHint hint)
|
void ClassicComicsView::scrollTo(const QModelIndex & mi, QAbstractItemView::ScrollHint hint)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(hint);
|
||||||
|
|
||||||
comicFlow->setCenterIndex(mi.row());
|
comicFlow->setCenterIndex(mi.row());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,8 @@ void ComicVineClient::getVolumeComicsInfo(const QString & idVolume, int page)
|
|||||||
//CV_COMIC_ID
|
//CV_COMIC_ID
|
||||||
void ComicVineClient::getComicId(const QString & id, int comicNumber)
|
void ComicVineClient::getComicId(const QString & id, int comicNumber)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id);
|
||||||
|
Q_UNUSED(comicNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
//CV_COMIC_DETAIL
|
//CV_COMIC_DETAIL
|
||||||
@ -169,5 +170,5 @@ void ComicVineClient::getComicCover(const QString &url)
|
|||||||
//CV_COVER_DETAIL
|
//CV_COVER_DETAIL
|
||||||
void ComicVineClient::getCoverURL(const QString & id)
|
void ComicVineClient::getCoverURL(const QString & id)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -509,11 +509,11 @@ ComicDB ComicVineDialog::parseComicInfo(ComicDB & comic, const QString & json, i
|
|||||||
|
|
||||||
|
|
||||||
QString volume = result.property("volume").property("name").toString();
|
QString volume = result.property("volume").property("name").toString();
|
||||||
QString storyArc; //story_arc
|
// QString storyArc; //story_arc
|
||||||
QString arcNumber; //??
|
// QString arcNumber; //??
|
||||||
QString arcCount; //count_of_issue_appearances -> NO
|
// QString arcCount; //count_of_issue_appearances -> NO
|
||||||
|
|
||||||
QString genere; //no
|
// QString genere; //no
|
||||||
|
|
||||||
QMap<QString,QString> authors = getAuthors(result.property("person_credits"));
|
QMap<QString,QString> authors = getAuthors(result.property("person_credits"));
|
||||||
|
|
||||||
@ -527,9 +527,9 @@ ComicDB ComicVineDialog::parseComicInfo(ComicDB & comic, const QString & json, i
|
|||||||
QString date = result.property("cover_date").toString();
|
QString date = result.property("cover_date").toString();
|
||||||
|
|
||||||
//QString publisher; //get from select volume
|
//QString publisher; //get from select volume
|
||||||
QString format; //no
|
// QString format; //no
|
||||||
bool color; //no
|
// bool color; //no
|
||||||
QString ageRating; //no
|
// QString ageRating; //no
|
||||||
|
|
||||||
QString synopsis = result.property("description").toString().remove(QRegExp("<[^>]*>")); //description
|
QString synopsis = result.property("description").toString().remove(QRegExp("<[^>]*>")); //description
|
||||||
QString characters = getCharacters(result.property("character_credits"));
|
QString characters = getCharacters(result.property("character_credits"));
|
||||||
|
|||||||
@ -66,6 +66,7 @@ Qt::ItemFlags LocalComicListModel::flags(const QModelIndex &index) const
|
|||||||
|
|
||||||
QVariant LocalComicListModel::headerData(int section, Qt::Orientation orientation, int role) const
|
QVariant LocalComicListModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(section);
|
||||||
|
|
||||||
if ( role == Qt::TextAlignmentRole)
|
if ( role == Qt::TextAlignmentRole)
|
||||||
return QVariant(Qt::AlignLeft | Qt::AlignVCenter);
|
return QVariant(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
|
|||||||
@ -42,6 +42,11 @@ int ComicModel::columnCount(const QModelIndex &parent) const
|
|||||||
|
|
||||||
bool ComicModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
|
bool ComicModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
Q_UNUSED(row);
|
||||||
|
Q_UNUSED(column);
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
if(!enableResorting)
|
if(!enableResorting)
|
||||||
return false;
|
return false;
|
||||||
return data->formats().contains(YACReader::YACReaderLibrarComiscSelectionMimeDataFormat);
|
return data->formats().contains(YACReader::YACReaderLibrarComiscSelectionMimeDataFormat);
|
||||||
|
|||||||
@ -329,6 +329,8 @@ void FolderModel::setupModelData(QSqlQuery &sqlquery, FolderItem *parent)
|
|||||||
|
|
||||||
void FolderModel::updateFolderModelData(QSqlQuery &sqlquery, FolderItem *parent)
|
void FolderModel::updateFolderModelData(QSqlQuery &sqlquery, FolderItem *parent)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
while (sqlquery.next()) {
|
while (sqlquery.next()) {
|
||||||
QLOG_DEBUG () << "habia next";
|
QLOG_DEBUG () << "habia next";
|
||||||
QList<QVariant> data;
|
QList<QVariant> data;
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <QFileIconProvider>
|
#include <QFileIconProvider>
|
||||||
|
|
||||||
|
#include "QsLog.h"
|
||||||
|
|
||||||
ListItem::ListItem(const QList<QVariant> &data)
|
ListItem::ListItem(const QList<QVariant> &data)
|
||||||
:itemData(data)
|
:itemData(data)
|
||||||
{
|
{
|
||||||
@ -39,6 +41,10 @@ QIcon SpecialListItem::getIcon() const
|
|||||||
QString id = itemData.at(Id).toString();
|
QString id = itemData.at(Id).toString();
|
||||||
return YACReader::noHighlightedIcon(QString(":/images/lists/default_%1.png").arg(id));
|
return YACReader::noHighlightedIcon(QString(":/images/lists/default_%1.png").arg(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLOG_WARN() << "Icon for SpecialListItem not available";
|
||||||
|
|
||||||
|
return QIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadingListModel::TypeSpecialList SpecialListItem::getType() const
|
ReadingListModel::TypeSpecialList SpecialListItem::getType() const
|
||||||
@ -48,6 +54,10 @@ ReadingListModel::TypeSpecialList SpecialListItem::getType() const
|
|||||||
int id = itemData.at(Id).toInt();
|
int id = itemData.at(Id).toInt();
|
||||||
return (ReadingListModel::TypeSpecialList)id;
|
return (ReadingListModel::TypeSpecialList)id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLOG_WARN() << "TypeSpecialList not available";
|
||||||
|
|
||||||
|
return (ReadingListModel::TypeSpecialList)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
@ -65,6 +75,10 @@ QIcon LabelItem::getIcon() const
|
|||||||
QString color = itemData.at(Color).toString();
|
QString color = itemData.at(Color).toString();
|
||||||
return YACReader::noHighlightedIcon(QString(":/images/lists/label_%1.png").arg(color).toLower());
|
return YACReader::noHighlightedIcon(QString(":/images/lists/label_%1.png").arg(color).toLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLOG_WARN() << "Icon for label item not available";
|
||||||
|
|
||||||
|
return QIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
YACReader::LabelColors LabelItem::colorid() const
|
YACReader::LabelColors LabelItem::colorid() const
|
||||||
@ -73,6 +87,10 @@ YACReader::LabelColors LabelItem::colorid() const
|
|||||||
{
|
{
|
||||||
return YACReader::LabelColors(itemData.at(Ordering).toInt());
|
return YACReader::LabelColors(itemData.at(Ordering).toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLOG_WARN() << "Label color for label item not available";
|
||||||
|
|
||||||
|
return (YACReader::LabelColors)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LabelItem::name() const
|
QString LabelItem::name() const
|
||||||
@ -81,6 +99,10 @@ QString LabelItem::name() const
|
|||||||
{
|
{
|
||||||
return itemData.at(Name).toString();
|
return itemData.at(Name).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLOG_WARN() << "Name for label item not available";
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void LabelItem::setName(const QString &name)
|
void LabelItem::setName(const QString &name)
|
||||||
@ -97,6 +119,10 @@ qulonglong LabelItem::getId() const
|
|||||||
{
|
{
|
||||||
return YACReader::LabelColors(itemData.at(Id).toULongLong());
|
return YACReader::LabelColors(itemData.at(Id).toULongLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLOG_WARN() << "Id for Label item not available";
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
@ -187,12 +213,20 @@ qulonglong ReadingListItem::getId() const
|
|||||||
{
|
{
|
||||||
if(itemData.count()>Id)
|
if(itemData.count()>Id)
|
||||||
return itemData.at(Id).toULongLong();
|
return itemData.at(Id).toULongLong();
|
||||||
|
|
||||||
|
QLOG_WARN() << "Name for reading list item not available";
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ReadingListItem::name() const
|
QString ReadingListItem::name() const
|
||||||
{
|
{
|
||||||
if(itemData.count()>Name)
|
if(itemData.count()>Name)
|
||||||
return itemData.at(Name).toString();
|
return itemData.at(Name).toString();
|
||||||
|
|
||||||
|
QLOG_WARN() << "Name for reading list item not available";
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadingListItem::setName(const QString &name)
|
void ReadingListItem::setName(const QString &name)
|
||||||
@ -205,6 +239,9 @@ int ReadingListItem::getOrdering() const
|
|||||||
{
|
{
|
||||||
if(itemData.count()>Ordering)
|
if(itemData.count()>Ordering)
|
||||||
return itemData[Ordering].toInt();
|
return itemData[Ordering].toInt();
|
||||||
|
|
||||||
|
QLOG_WARN() << "Ordering for Item not available";
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadingListItem::setOrdering(const int ordering)
|
void ReadingListItem::setOrdering(const int ordering)
|
||||||
|
|||||||
@ -196,6 +196,8 @@ QModelIndex ReadingListModel::parent(const QModelIndex &index) const
|
|||||||
|
|
||||||
bool ReadingListModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
|
bool ReadingListModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
|
||||||
QLOG_DEBUG() << "trying to drop into row = " << row << "column column = " << column << "parent" << parent;
|
QLOG_DEBUG() << "trying to drop into row = " << row << "column column = " << column << "parent" << parent;
|
||||||
|
|
||||||
if(row == -1)
|
if(row == -1)
|
||||||
@ -242,10 +244,14 @@ bool ReadingListModel::dropMimeData(const QMimeData *data, Qt::DropAction action
|
|||||||
|
|
||||||
if(data->formats().contains(YACReader::YACReaderLibrarSubReadingListMimeDataFormat))
|
if(data->formats().contains(YACReader::YACReaderLibrarSubReadingListMimeDataFormat))
|
||||||
return dropSublist(data, action, row, column, parent);
|
return dropSublist(data, action, row, column, parent);
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReadingListModel::dropComics(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
|
bool ReadingListModel::dropComics(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
|
||||||
QList<qulonglong> comicIds = YACReader::mimeDataToComicsIds(data);
|
QList<qulonglong> comicIds = YACReader::mimeDataToComicsIds(data);
|
||||||
|
|
||||||
QLOG_DEBUG() << "dropped : " << comicIds;
|
QLOG_DEBUG() << "dropped : " << comicIds;
|
||||||
@ -288,6 +294,9 @@ bool ReadingListModel::dropComics(const QMimeData *data, Qt::DropAction action,
|
|||||||
|
|
||||||
bool ReadingListModel::dropSublist(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
|
bool ReadingListModel::dropSublist(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(action);
|
||||||
|
Q_UNUSED(column);
|
||||||
|
|
||||||
QList<QPair<int,int> > sublistsRows;
|
QList<QPair<int,int> > sublistsRows;
|
||||||
QByteArray rawData = data->data(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
QByteArray rawData = data->data(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||||
QDataStream in(&rawData,QIODevice::ReadOnly);
|
QDataStream in(&rawData,QIODevice::ReadOnly);
|
||||||
@ -381,11 +390,16 @@ void ReadingListModel::addNewLabel(const QString &name, YACReader::LabelColors c
|
|||||||
QSqlDatabase db = DataBaseManagement::loadDatabase(_databasePath);
|
QSqlDatabase db = DataBaseManagement::loadDatabase(_databasePath);
|
||||||
qulonglong id = DBHelper::insertLabel(name, color, db);
|
qulonglong id = DBHelper::insertLabel(name, color, db);
|
||||||
|
|
||||||
|
Q_UNUSED(id);
|
||||||
|
|
||||||
beginInsertRows(QModelIndex(),0, 0);
|
beginInsertRows(QModelIndex(),0, 0);
|
||||||
|
|
||||||
int newPos = addLabelIntoList(new LabelItem(QList<QVariant>() << name << YACReader::colorToName(color) << id << color));
|
// using the specfic row pos for inserting doesnt work
|
||||||
|
// int newPos = addLabelIntoList(new LabelItem(QList<QVariant>() << name << YACReader::colorToName(color) << id << color));
|
||||||
|
// beginInsertRows(QModelIndex(),specialLists.count()+1+newPos+1, specialLists.count()+1+newPos+1);
|
||||||
|
|
||||||
|
// endInsertRows();
|
||||||
|
|
||||||
//beginInsertRows(QModelIndex(),specialLists.count()+1+newPos+1, specialLists.count()+1+newPos+1);
|
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
|
||||||
QSqlDatabase::removeDatabase(_databasePath);
|
QSqlDatabase::removeDatabase(_databasePath);
|
||||||
|
|||||||
@ -260,7 +260,8 @@ QItemSelectionModel *GridComicsView::selectionModel()
|
|||||||
|
|
||||||
void GridComicsView::scrollTo(const QModelIndex &mi, QAbstractItemView::ScrollHint hint)
|
void GridComicsView::scrollTo(const QModelIndex &mi, QAbstractItemView::ScrollHint hint)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(mi);
|
||||||
|
Q_UNUSED(hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridComicsView::toFullScreen()
|
void GridComicsView::toFullScreen()
|
||||||
@ -275,12 +276,12 @@ void GridComicsView::toNormal()
|
|||||||
|
|
||||||
void GridComicsView::updateConfig(QSettings *settings)
|
void GridComicsView::updateConfig(QSettings *settings)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridComicsView::enableFilterMode(bool enabled)
|
void GridComicsView::enableFilterMode(bool enabled)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridComicsView::selectAll()
|
void GridComicsView::selectAll()
|
||||||
@ -387,6 +388,8 @@ void GridComicsView::droppedFiles(const QList<QUrl> &urls, Qt::DropAction action
|
|||||||
|
|
||||||
void GridComicsView::droppedComicsForResortingAt(const QString &data, int index)
|
void GridComicsView::droppedComicsForResortingAt(const QString &data, int index)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(data);
|
||||||
|
|
||||||
model->dropMimeData(model->mimeData(_selectionModel->selectedRows()), Qt::MoveAction, index, 0, QModelIndex());
|
model->dropMimeData(model->mimeData(_selectionModel->selectedRows()), Qt::MoveAction, index, 0, QModelIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,8 @@ QString YACReader::colorToName(LabelColors colors)
|
|||||||
case YDark:
|
case YDark:
|
||||||
return "dark";
|
return "dark";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString YACReader::labelColorToRGBString(LabelColors color)
|
QString YACReader::labelColorToRGBString(LabelColors color)
|
||||||
@ -84,7 +86,7 @@ QString YACReader::labelColorToRGBString(LabelColors color)
|
|||||||
return "#C8C8C8";
|
return "#C8C8C8";
|
||||||
case YDark:
|
case YDark:
|
||||||
return "#ABABAB";
|
return "#ABABAB";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,6 +177,8 @@ void YACReaderSideBar::paintEvent(QPaintEvent * event)
|
|||||||
|
|
||||||
void YACReaderSideBar::closeEvent(QCloseEvent *event)
|
void YACReaderSideBar::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
|
QWidget::closeEvent(event);
|
||||||
|
|
||||||
settings->setValue(SIDEBAR_SPLITTER_STATUS, splitter->saveState());
|
settings->setValue(SIDEBAR_SPLITTER_STATUS, splitter->saveState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user