mirror of
https://github.com/YACReader/yacreader
synced 2025-07-17 20:44:32 -04:00
clang-format
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
using namespace YACReader;
|
||||
|
||||
QMutex YACReaderClientConnectionWorker::dbMutex;
|
||||
//int YACReaderClientConnectionWorker::count = 0;
|
||||
// int YACReaderClientConnectionWorker::count = 0;
|
||||
YACReaderLocalServer::YACReaderLocalServer(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
@ -34,14 +34,14 @@ bool YACReaderLocalServer::isListening()
|
||||
|
||||
/*void YACReaderLocalServer::run()
|
||||
{
|
||||
while(1)
|
||||
exec();
|
||||
while(1)
|
||||
exec();
|
||||
}*/
|
||||
|
||||
void YACReaderLocalServer::sendResponse()
|
||||
{
|
||||
QLocalSocket *clientConnection = localServer->nextPendingConnection();
|
||||
//connect(clientConnection, SIGNAL(disconnected()),clientConnection, SLOT(deleteLater()));
|
||||
// connect(clientConnection, SIGNAL(disconnected()),clientConnection, SLOT(deleteLater()));
|
||||
clientConnection->setParent(0);
|
||||
|
||||
auto worker = new YACReaderClientConnectionWorker(clientConnection);
|
||||
@ -53,8 +53,8 @@ void YACReaderLocalServer::sendResponse()
|
||||
}
|
||||
|
||||
QLOG_TRACE() << "connection incoming";
|
||||
//clientConnection->waitForBytesWritten();*/
|
||||
//clientConnection->disconnectFromServer();
|
||||
// clientConnection->waitForBytesWritten();*/
|
||||
// clientConnection->disconnectFromServer();
|
||||
}
|
||||
|
||||
bool YACReaderLocalServer::isRunning()
|
||||
@ -85,13 +85,13 @@ YACReaderClientConnectionWorker::~YACReaderClientConnectionWorker()
|
||||
void YACReaderClientConnectionWorker::run()
|
||||
{
|
||||
/*{
|
||||
QFile f(QString("c:/temp/thread%1.txt").arg(count));
|
||||
f.open(QIODevice::Append);
|
||||
QTextStream out(&f);
|
||||
out << QString("Thread%1 starts").arg(count) << endl;
|
||||
f.close();
|
||||
}
|
||||
uint t1 = QDateTime::currentMSecsSinceEpoch();*/
|
||||
QFile f(QString("c:/temp/thread%1.txt").arg(count));
|
||||
f.open(QIODevice::Append);
|
||||
QTextStream out(&f);
|
||||
out << QString("Thread%1 starts").arg(count) << endl;
|
||||
f.close();
|
||||
}
|
||||
uint t1 = QDateTime::currentMSecsSinceEpoch();*/
|
||||
|
||||
quint64 libraryId;
|
||||
ComicDB comic;
|
||||
@ -126,7 +126,7 @@ void YACReaderClientConnectionWorker::run()
|
||||
data.append(clientConnection->readAll());
|
||||
if ((quint32)data.length() < totalSize)
|
||||
clientConnection->waitForReadyRead(100);
|
||||
if (dataRead == data.length()) //no bytes were read
|
||||
if (dataRead == data.length()) // no bytes were read
|
||||
tries++;
|
||||
dataRead = data.length();
|
||||
}
|
||||
@ -202,14 +202,14 @@ void YACReaderClientConnectionWorker::run()
|
||||
clientConnection->waitForDisconnected();
|
||||
clientConnection->deleteLater();
|
||||
/*count++;
|
||||
uint t2 = QDateTime::currentMSecsSinceEpoch();
|
||||
{
|
||||
QFile f(QString("c:/temp/thread%1.txt").arg(count));
|
||||
f.open(QIODevice::Append);
|
||||
QTextStream out(&f);
|
||||
out << QString("Thread%1 ends : time - %2").arg(count).arg(t2-t1) << endl;
|
||||
f.close();
|
||||
}*/
|
||||
uint t2 = QDateTime::currentMSecsSinceEpoch();
|
||||
{
|
||||
QFile f(QString("c:/temp/thread%1.txt").arg(count));
|
||||
f.open(QIODevice::Append);
|
||||
QTextStream out(&f);
|
||||
out << QString("Thread%1 ends : time - %2").arg(count).arg(t2-t1) << endl;
|
||||
f.close();
|
||||
}*/
|
||||
}
|
||||
|
||||
void YACReaderClientConnectionWorker::getComicInfo(quint64 libraryId, ComicDB &comic, QList<ComicDB> &siblings)
|
||||
|
Reference in New Issue
Block a user