Merge pull request #6 from selmf/9.5.0_bugfixes

9.5.0 bugfixes
This commit is contained in:
Luis Ángel San Martín 2018-05-31 18:14:41 +02:00 committed by GitHub
commit 4608c9bb03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 49 additions and 35 deletions

View File

@ -1682,7 +1682,10 @@ void MainWindowViewer::decreasePageZoomLevel()
void MainWindowViewer::sendComic()
{
YACReaderLocalClient * client = new YACReaderLocalClient;
connect(client, &YACReaderLocalClient::finished, client, &YACReaderLocalClient::deleteLater);
currentComicDB.info.lastTimeOpened = QDateTime::currentMSecsSinceEpoch() / 1000;
viewer->updateComic(currentComicDB);
if (currentComicDB.info.currentPage == currentComicDB.info.numPages) {
@ -1692,15 +1695,12 @@ void MainWindowViewer::sendComic()
ComicDB & nextComic = siblingComics[currentIndex+1];
nextComic.info.hasBeenOpened = true;
int retries = 1;
while(!client->sendComicInfo(libraryId,currentComicDB,nextComic.id) && retries!=0)
while(!client->sendComicInfo(libraryId, currentComicDB, nextComic.id) && retries!=0)
retries--;
connect(client,SIGNAL(finished()),client,SLOT(deleteLater()));
}
} else {
int retries = 1;
while(!client->sendComicInfo(libraryId,currentComicDB) && retries!=0)
while(!client->sendComicInfo(libraryId, currentComicDB) && retries!=0)
retries--;
connect(client,SIGNAL(finished()),client,SLOT(deleteLater()));
}
//delete client;
}

View File

@ -86,7 +86,7 @@ SortVolumeComics::SortVolumeComics(QWidget *parent) :
//rows actions
QAction * removeItemFromList = new QAction(tr("remove selected comics"),this);
QAction * restoreAllItems = new QAction(tr("restore all removed comics"),this);
QAction * restoreItems = new QAction(tr("restore removed comics"),this);
//QAction * restoreItems = new QAction(tr("restore removed comics"),this);
tableFiles->setContextMenuPolicy(Qt::ActionsContextMenu);
tableFiles->addAction(removeItemFromList);
@ -95,7 +95,7 @@ SortVolumeComics::SortVolumeComics(QWidget *parent) :
connect(removeItemFromList,SIGNAL(triggered()),this,SLOT(removeSelectedComics()));
connect(restoreAllItems,SIGNAL(triggered()),this,SLOT(restoreAllComics()));
connect(restoreItems,SIGNAL(triggered()),this,SLOT(showRemovedComicsSelector()));
//connect(restoreItems,SIGNAL(triggered()),this,SLOT(showRemovedComicsSelector()));
}
void SortVolumeComics::setData(QList<ComicDB> & comics, const QString &json, const QString &vID)

View File

@ -823,7 +823,13 @@ void FolderModelProxy::setupFilteredModelData(QSqlQuery &sqlquery, FolderItem *p
//si el nodo es hijo de 1 y no hab<61>a sido previamente insertado como hijo, se a<>ade como tal
if(!parentPreviousInserted)
{
filteredItems.value(ROOT)->appendChild(item);
}
else
{
delete item;
}
}
}
}

View File

@ -460,16 +460,23 @@ void HttpRequest::parseMultiPartFile()
else if (!fileName.isEmpty() && !fieldName.isEmpty())
{
// last field was a file
#ifdef SUPERVERBOSE
qDebug("HttpRequest: finishing writing to uploaded file");
#endif
uploadedFile->resize(uploadedFile->size()-2);
uploadedFile->flush();
uploadedFile->seek(0);
parameters.insert(fieldName,fileName);
qDebug("HttpRequest: set parameter %s=%s",fieldName.data(),fileName.data());
uploadedFiles.insert(fieldName,uploadedFile);
qDebug("HttpRequest: uploaded file size is %i",(int) uploadedFile->size());
if (uploadedFile)
{
#ifdef SUPERVERBOSE
qDebug("HttpRequest: finishing writing to uploaded file");
#endif
uploadedFile->resize(uploadedFile->size()-2);
uploadedFile->flush();
uploadedFile->seek(0);
parameters.insert(fieldName,fileName);
qDebug("HttpRequest: set parameter %s=%s",fieldName.data(),fileName.data());
uploadedFiles.insert(fieldName,uploadedFile);
qDebug("HttpRequest: uploaded file size is %i",(int) uploadedFile->size());
}
else
{
qWarning("HttpRequest: format error, unexpected end of file data");
}
}
if (line.contains(boundary+"--"))
{
@ -546,4 +553,3 @@ QHostAddress HttpRequest::getPeerAddress() const
{
return peerAddress;
}

View File

@ -92,8 +92,8 @@ void FileLogger::write(const LogMessage* logMessage)
// Check for success
if (file->error())
{
close();
qWarning("Cannot write to log file %s: %s",qPrintable(fileName),qPrintable(file->errorString()));
close();
}
}

View File

@ -70,37 +70,37 @@ YACReaderOptionsDialog::YACReaderOptionsDialog(QWidget * parent)
connect(gl->xRotation,SIGNAL(valueChanged(int)),this,SLOT(saveXRotation(int)));
connect(gl->xRotation,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->yPosition,SIGNAL(valueChanged(int)),this,SLOT(saveYPosition(int)));
connect(gl->yPosition,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->coverDistance,SIGNAL(valueChanged(int)),this,SLOT(saveCoverDistance(int)));
connect(gl->coverDistance,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->centralDistance,SIGNAL(valueChanged(int)),this,SLOT(saveCentralDistance(int)));
connect(gl->centralDistance,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->zoomLevel,SIGNAL(valueChanged(int)),this,SLOT(saveZoomLevel(int)));
connect(gl->zoomLevel,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->yCoverOffset,SIGNAL(valueChanged(int)),this,SLOT(saveYCoverOffset(int)));
connect(gl->yCoverOffset,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->zCoverOffset,SIGNAL(valueChanged(int)),this,SLOT(saveZCoverOffset(int)));
connect(gl->zCoverOffset,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->coverRotation,SIGNAL(valueChanged(int)),this,SLOT(saveCoverRotation(int)));
connect(gl->coverRotation,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->fadeOutDist,SIGNAL(valueChanged(int)),this,SLOT(saveFadeOutDist(int)));
connect(gl->fadeOutDist,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->lightStrength,SIGNAL(valueChanged(int)),this,SLOT(saveLightStrength(int)));
connect(gl->lightStrength,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->maxAngle,SIGNAL(valueChanged(int)),this,SLOT(saveMaxAngle(int)));
connect(gl->maxAngle,SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
connect(gl->performanceSlider, SIGNAL(valueChanged(int)),this,SLOT(savePerformance(int)));
connect(gl->performanceSlider, SIGNAL(valueChanged(int)),this,SIGNAL(optionsChanged()));
@ -237,7 +237,7 @@ void YACReaderOptionsDialog::restoreOptions(QSettings * settings)
sw->setVisible(true);
useGL->setChecked(false);
}
if(!settings->contains(FLOW_TYPE_GL))
{
@ -253,7 +253,7 @@ void YACReaderOptionsDialog::restoreOptions(QSettings * settings)
gl->vSyncCheck->setChecked(false);
gl->performanceSlider->setValue(settings->value(PERFORMANCE).toInt());
FlowType flowType;
switch(settings->value(FLOW_TYPE_GL).toInt())
{
@ -275,8 +275,10 @@ void YACReaderOptionsDialog::restoreOptions(QSettings * settings)
case 5:
flowType = Custom;
break;
default:
flowType = CoverFlowLike;
}
if(flowType == Custom)
{
@ -311,7 +313,7 @@ void YACReaderOptionsDialog::restoreOptions(QSettings * settings)
gl->radionModern->setChecked(true);
return;
}
if(flowType == Roulette)
{
setRouletteConfig();
@ -399,7 +401,7 @@ void YACReaderOptionsDialog::setModernConfig()
void YACReaderOptionsDialog::setRouletteConfig()
{
gl->setValues(pressetYACReaderFlowDownConfig);
saveFlowParameters();
settings->setValue(FLOW_TYPE_GL,Roulette);