mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed compilation warnings in YACReader.pro, at least using vc++ compiler
This commit is contained in:
parent
e5a9fbbf3e
commit
20c01cca8c
@ -220,7 +220,7 @@ Logger::Helper::~Helper()
|
|||||||
catch(std::exception&) {
|
catch(std::exception&) {
|
||||||
// you shouldn't throw exceptions from a sink
|
// you shouldn't throw exceptions from a sink
|
||||||
assert(!"exception in logger helper destructor");
|
assert(!"exception in logger helper destructor");
|
||||||
throw;
|
//CHANGED throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,7 +876,7 @@ void Render::nextDoublePage()
|
|||||||
update();
|
update();
|
||||||
emit pageChanged(currentIndex);
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
else if (hasLoadedComic() && (currentIndex >= numPages()-2))
|
else if (hasLoadedComic() && ((unsigned int)currentIndex >= numPages()-2))
|
||||||
{
|
{
|
||||||
emit isLast();
|
emit isLast();
|
||||||
}
|
}
|
||||||
|
@ -95,10 +95,10 @@ bool YACReaderLocalClient::requestComicInfo(quint64 libraryId, ComicDB & comic,
|
|||||||
tries = 0;
|
tries = 0;
|
||||||
int dataRead = 0;
|
int dataRead = 0;
|
||||||
localSocket->waitForReadyRead(1000);
|
localSocket->waitForReadyRead(1000);
|
||||||
while(data.length() < totalSize && tries < 20 )
|
while((unsigned int)data.length() < totalSize && tries < 20 )
|
||||||
{
|
{
|
||||||
data.append(localSocket->readAll());
|
data.append(localSocket->readAll());
|
||||||
if(data.length() < totalSize)
|
if((unsigned int)data.length() < totalSize)
|
||||||
localSocket->waitForReadyRead(100);
|
localSocket->waitForReadyRead(100);
|
||||||
if(data.length() == dataRead)
|
if(data.length() == dataRead)
|
||||||
tries++;
|
tries++;
|
||||||
|
@ -7,11 +7,15 @@ ActionsGroupsModel::ActionsGroupsModel(QObject *parent) :
|
|||||||
|
|
||||||
int ActionsGroupsModel::rowCount(const QModelIndex &parent) const
|
int ActionsGroupsModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
return groups.length();
|
return groups.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ActionsGroupsModel::columnCount(const QModelIndex &parent) const
|
int ActionsGroupsModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +43,8 @@ QVariant ActionsGroupsModel::data(const QModelIndex &index, int role) const
|
|||||||
|
|
||||||
QModelIndex ActionsGroupsModel::parent(const QModelIndex &index) const
|
QModelIndex ActionsGroupsModel::parent(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(index);
|
||||||
|
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,11 +11,15 @@ ActionsShortcutsModel::ActionsShortcutsModel(QObject *parent) :
|
|||||||
|
|
||||||
int ActionsShortcutsModel::rowCount(const QModelIndex &parent) const
|
int ActionsShortcutsModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
return actions.length();
|
return actions.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ActionsShortcutsModel::columnCount(const QModelIndex &parent) const
|
int ActionsShortcutsModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +82,8 @@ QVariant ActionsShortcutsModel::data(const QModelIndex &index, int role) const
|
|||||||
|
|
||||||
bool ActionsShortcutsModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
bool ActionsShortcutsModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(role);
|
||||||
|
|
||||||
if(index.column() == KEYS)
|
if(index.column() == KEYS)
|
||||||
{
|
{
|
||||||
ShortcutsManager sm = ShortcutsManager::getShortcutsManager();
|
ShortcutsManager sm = ShortcutsManager::getShortcutsManager();
|
||||||
@ -95,6 +101,8 @@ bool ActionsShortcutsModel::setData(const QModelIndex &index, const QVariant &va
|
|||||||
|
|
||||||
QModelIndex ActionsShortcutsModel::parent(const QModelIndex &index) const
|
QModelIndex ActionsShortcutsModel::parent(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(index);
|
||||||
|
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ EditShortcutItemDelegate::EditShortcutItemDelegate(QObject *parent) :
|
|||||||
|
|
||||||
QWidget *EditShortcutItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QWidget *EditShortcutItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(option);
|
||||||
|
Q_UNUSED(index);
|
||||||
|
|
||||||
KeySequenceLineEdit * editor = new KeySequenceLineEdit(parent);
|
KeySequenceLineEdit * editor = new KeySequenceLineEdit(parent);
|
||||||
connect(editor,SIGNAL(editingFinished()),this,SLOT(closeShortcutEditor()));
|
connect(editor,SIGNAL(editingFinished()),this,SLOT(closeShortcutEditor()));
|
||||||
return editor;
|
return editor;
|
||||||
@ -31,6 +34,8 @@ void EditShortcutItemDelegate::setModelData(QWidget *editor, QAbstractItemModel
|
|||||||
|
|
||||||
void EditShortcutItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &mi) const
|
void EditShortcutItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &mi) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(mi);
|
||||||
|
|
||||||
editor->setGeometry(option.rect);
|
editor->setGeometry(option.rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,8 @@ void EditShortcutsDialog::resetToDefaults()
|
|||||||
|
|
||||||
void EditShortcutsDialog::loadShortcuts(const QModelIndex &mi,const QModelIndex &mi2)
|
void EditShortcutsDialog::loadShortcuts(const QModelIndex &mi,const QModelIndex &mi2)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(mi2);
|
||||||
|
|
||||||
actionsModel->addActions(groupsModel->getActions(mi));
|
actionsModel->addActions(groupsModel->getActions(mi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user