mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 22:44:56 -04:00
local server now runs in a separated thread
This commit is contained in:
@ -214,7 +214,12 @@ void MainWindowViewer::openFromArgv()
|
||||
|
||||
currentComicDB.id = comicId;
|
||||
YACReaderLocalClient client;
|
||||
|
||||
/*int tries = 0;
|
||||
bool success = false;
|
||||
while(!(success = client.requestComicInfo(libraryId,currentComicDB,siblingComics)) && tries < 3)
|
||||
{
|
||||
tries++;
|
||||
}*/
|
||||
if(client.requestComicInfo(libraryId,currentComicDB,siblingComics))
|
||||
{
|
||||
isClient = true;
|
||||
|
@ -798,6 +798,7 @@ void Viewer::mouseReleaseEvent ( QMouseEvent * event )
|
||||
|
||||
void Viewer::updateFitToWidthRatio(float ratio)
|
||||
{
|
||||
Configuration::getConfiguration().setAdjustToWidth(true);
|
||||
adjustToWidthRatio = ratio;
|
||||
updateContentSize();
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ bool YACReaderLocalClient::requestComicInfo(quint64 libraryId, ComicDB & comic,
|
||||
localSocket->waitForReadyRead(100);
|
||||
tries++;
|
||||
}
|
||||
if(tries == 20)
|
||||
if(tries == 10)
|
||||
return false;
|
||||
QDataStream sizeStream(localSocket->read(sizeof(quint16)));
|
||||
sizeStream.setVersion(QDataStream::Qt_4_8);
|
||||
@ -69,7 +69,7 @@ bool YACReaderLocalClient::requestComicInfo(quint64 libraryId, ComicDB & comic,
|
||||
localSocket->waitForReadyRead(100);
|
||||
tries++;
|
||||
}
|
||||
if(tries == 20)
|
||||
if(tries == 10)
|
||||
return false;
|
||||
QDataStream dataStream(localSocket->read(totalSize));
|
||||
dataStream >> comic;
|
||||
|
Reference in New Issue
Block a user