mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Fix all compilation issues after enabling QT_DISABLE_DEPRECATED_UP_TO
This commit is contained in:
@ -16,7 +16,7 @@ void LibrariesControllerV2::service(HttpRequest & /* request */, HttpResponse &r
|
||||
|
||||
QJsonArray librariesJson;
|
||||
|
||||
foreach (YACReaderLibrary library, libraries) {
|
||||
for (const auto &library : libraries) {
|
||||
QJsonObject libraryJson;
|
||||
|
||||
libraryJson["name"] = library.getName();
|
||||
|
||||
@ -24,7 +24,7 @@ void SyncControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
QLOG_TRACE() << "POST DATA: " << postData;
|
||||
|
||||
if (postData.length() > 0) {
|
||||
QList<QString> data = postData.split("\n");
|
||||
const auto data = postData.split("\n");
|
||||
|
||||
qulonglong libraryId;
|
||||
qulonglong comicId;
|
||||
@ -35,17 +35,17 @@ void SyncControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
QMap<qulonglong, QList<ComicInfo>> comics;
|
||||
QList<ComicInfo> comicsWithNoLibrary;
|
||||
|
||||
auto libraries = DBHelper::getLibraries();
|
||||
const auto libraries = DBHelper::getLibraries();
|
||||
|
||||
bool clientSendsHasBeenOpened = false;
|
||||
bool clientSendsImageFilters = false;
|
||||
|
||||
foreach (QString comicInfo, data) {
|
||||
for (const auto &comicInfo : data) {
|
||||
if (comicInfo.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QList<QString> comicInfoProgress = comicInfo.split("\t");
|
||||
const auto comicInfoProgress = comicInfo.split("\t");
|
||||
|
||||
if (comicInfoProgress.isEmpty()) {
|
||||
continue;
|
||||
@ -166,11 +166,13 @@ void SyncControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
|
||||
if (!comics.isEmpty()) {
|
||||
auto moreRecentComicsFound = DBHelper::updateFromRemoteClient(comics, clientSendsHasBeenOpened, clientSendsImageFilters);
|
||||
const auto libraryIds = moreRecentComicsFound.keys();
|
||||
|
||||
foreach (qulonglong libraryId, moreRecentComicsFound.keys()) {
|
||||
for (const auto libraryId : libraryIds) {
|
||||
auto libraryUuid = DBHelper::getLibraries().getLibraryIdFromLegacyId(libraryId);
|
||||
const auto &libraryComics = moreRecentComicsFound[libraryId];
|
||||
|
||||
foreach (ComicDB comic, moreRecentComicsFound[libraryId]) {
|
||||
for (const auto &comic : libraryComics) {
|
||||
items.append(YACReaderServerDataHelper::fullComicToJSON(libraryId, libraryUuid, comic));
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ QString Static::getConfigDir()
|
||||
searchList.append(QDir::rootPath() + "etc/opt");
|
||||
searchList.append(QDir::rootPath() + "etc");
|
||||
|
||||
foreach (QString dir, searchList) {
|
||||
for (const auto &dir : searchList) {
|
||||
QFile file(dir + "/" + configFileName);
|
||||
if (file.exists()) {
|
||||
// found
|
||||
@ -56,7 +56,7 @@ QString Static::getConfigDir()
|
||||
}
|
||||
|
||||
// not found
|
||||
foreach (QString dir, searchList) {
|
||||
for (const auto &dir : searchList) {
|
||||
qWarning("%s/%s not found", qPrintable(dir), qPrintable(configFileName));
|
||||
}
|
||||
qWarning("Cannot find config file %s", qPrintable(configFileName)); // TODO establecer los valores por defecto
|
||||
|
||||
Reference in New Issue
Block a user