From 268bebbdddec5011c5bcdfd09a4dce3737d85a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Fri, 31 May 2019 21:00:19 +0200 Subject: [PATCH] Use nullptr instead of 0 --- YACReaderLibrary/add_label_dialog.h | 2 +- YACReaderLibrary/add_library_dialog.h | 2 +- YACReaderLibrary/comic_files_manager.h | 2 +- YACReaderLibrary/comic_flow.h | 2 +- YACReaderLibrary/comic_flow_widget.h | 6 +++--- YACReaderLibrary/comic_vine/api_key_dialog.h | 2 +- .../comic_vine_all_volume_comics_retriever.h | 2 +- YACReaderLibrary/comic_vine/comic_vine_client.h | 2 +- YACReaderLibrary/comic_vine/comic_vine_dialog.h | 2 +- YACReaderLibrary/comic_vine/model/comics_model.h | 2 +- YACReaderLibrary/comic_vine/model/json_model.h | 2 +- .../comic_vine/model/local_comic_list_model.cpp | 2 +- .../comic_vine/model/local_comic_list_model.h | 2 +- .../comic_vine/model/response_parser.h | 2 +- .../comic_vine/model/volume_comics_model.cpp | 2 +- .../comic_vine/model/volume_comics_model.h | 2 +- .../comic_vine/model/volumes_model.cpp | 2 +- YACReaderLibrary/comic_vine/model/volumes_model.h | 2 +- YACReaderLibrary/comic_vine/scraper_lineedit.h | 2 +- .../comic_vine/scraper_results_paginator.h | 2 +- YACReaderLibrary/comic_vine/scraper_scroll_label.h | 2 +- YACReaderLibrary/comic_vine/scraper_selector.h | 2 +- YACReaderLibrary/comic_vine/scraper_tableview.h | 2 +- YACReaderLibrary/comic_vine/search_single_comic.h | 2 +- YACReaderLibrary/comic_vine/search_volume.h | 2 +- YACReaderLibrary/comic_vine/select_comic.h | 2 +- YACReaderLibrary/comic_vine/select_volume.h | 2 +- YACReaderLibrary/comic_vine/series_question.h | 2 +- YACReaderLibrary/comic_vine/sort_volume_comics.h | 4 ++-- YACReaderLibrary/comic_vine/title_header.h | 2 +- YACReaderLibrary/comics_remover.h | 4 ++-- YACReaderLibrary/comics_view.cpp | 2 +- YACReaderLibrary/comics_view.h | 2 +- YACReaderLibrary/comics_view_transition.h | 2 +- YACReaderLibrary/create_library_dialog.h | 4 ++-- YACReaderLibrary/db/folder_item.h | 2 +- YACReaderLibrary/db/reading_list_item.h | 2 +- YACReaderLibrary/empty_container_info.h | 2 +- YACReaderLibrary/empty_folder_widget.h | 2 +- YACReaderLibrary/empty_label_widget.h | 2 +- YACReaderLibrary/empty_reading_list_widget.h | 2 +- YACReaderLibrary/empty_special_list.h | 2 +- YACReaderLibrary/export_comics_info_dialog.h | 2 +- YACReaderLibrary/export_library_dialog.h | 2 +- YACReaderLibrary/import_comics_info_dialog.h | 2 +- YACReaderLibrary/import_library_dialog.h | 2 +- YACReaderLibrary/info_comics_view.h | 2 +- YACReaderLibrary/no_libraries_widget.h | 2 +- YACReaderLibrary/no_search_results_widget.h | 2 +- YACReaderLibrary/options_dialog.h | 2 +- YACReaderLibrary/package_manager.cpp | 4 ++-- YACReaderLibrary/properties_dialog.h | 2 +- YACReaderLibrary/rename_library_dialog.h | 2 +- .../server/controllers/v1/comiccontroller.cpp | 6 +++--- .../server/controllers/v2/comiccontroller_v2.cpp | 6 +++--- .../lib/httpserver/httpconnectionhandler.cpp | 14 +++++++------- .../server/lib/httpserver/httpconnectionhandler.h | 2 +- .../lib/httpserver/httpconnectionhandlerpool.cpp | 6 +++--- .../server/lib/httpserver/httplistener.cpp | 10 +++++----- .../server/lib/httpserver/httplistener.h | 2 +- .../server/lib/httpserver/httprequest.cpp | 2 +- .../server/lib/httpserver/httprequesthandler.h | 2 +- .../server/lib/httpserver/httpsession.cpp | 4 ++-- .../server/lib/httpserver/httpsessionstore.h | 2 +- .../server/lib/httpserver/staticfilecontroller.h | 2 +- .../server/lib/templateengine/templatecache.h | 2 +- .../server/lib/templateengine/templateloader.h | 2 +- YACReaderLibrary/server/requestmapper.h | 2 +- YACReaderLibrary/server/static.cpp | 10 +++++----- YACReaderLibrary/server/yacreader_http_session.h | 2 +- .../server/yacreader_http_session_store.h | 2 +- YACReaderLibrary/yacreader_comic_info_helper.h | 2 +- .../yacreader_comics_selection_helper.cpp | 8 ++++---- .../yacreader_comics_selection_helper.h | 2 +- YACReaderLibrary/yacreader_comics_views_manager.h | 2 +- YACReaderLibrary/yacreader_folders_view.h | 4 ++-- YACReaderLibrary/yacreader_history_controller.h | 2 +- YACReaderLibrary/yacreader_local_server.h | 2 +- YACReaderLibrary/yacreader_main_toolbar.h | 2 +- .../yacreader_navigation_controller.cpp | 2 +- YACReaderLibrary/yacreader_reading_lists_view.h | 4 ++-- 81 files changed, 113 insertions(+), 113 deletions(-) diff --git a/YACReaderLibrary/add_label_dialog.h b/YACReaderLibrary/add_label_dialog.h index 02262d25..61d7cf56 100644 --- a/YACReaderLibrary/add_label_dialog.h +++ b/YACReaderLibrary/add_label_dialog.h @@ -9,7 +9,7 @@ class AddLabelDialog : public QDialog { Q_OBJECT public: - explicit AddLabelDialog(QWidget *parent = 0); + explicit AddLabelDialog(QWidget *parent = nullptr); YACReader::LabelColors selectedColor(); QString name(); signals: diff --git a/YACReaderLibrary/add_library_dialog.h b/YACReaderLibrary/add_library_dialog.h index eaa70817..1176d933 100644 --- a/YACReaderLibrary/add_library_dialog.h +++ b/YACReaderLibrary/add_library_dialog.h @@ -11,7 +11,7 @@ class AddLibraryDialog : public QDialog { Q_OBJECT public: - AddLibraryDialog(QWidget *parent = 0); + AddLibraryDialog(QWidget *parent = nullptr); private: QLabel *nameLabel; diff --git a/YACReaderLibrary/comic_files_manager.h b/YACReaderLibrary/comic_files_manager.h index 680ef180..3333341d 100644 --- a/YACReaderLibrary/comic_files_manager.h +++ b/YACReaderLibrary/comic_files_manager.h @@ -11,7 +11,7 @@ class ComicFilesManager : public QObject { Q_OBJECT public: - explicit ComicFilesManager(QObject *parent = 0); + explicit ComicFilesManager(QObject *parent = nullptr); void copyComicsTo(const QList> &sourceComics, const QString &folderDest, const QModelIndex &dest); void moveComicsTo(const QList> &comics, const QString &folderDest, const QModelIndex &dest); static QList> getDroppedFiles(const QList &urls); diff --git a/YACReaderLibrary/comic_flow.h b/YACReaderLibrary/comic_flow.h index 0d69ed94..597a1e95 100644 --- a/YACReaderLibrary/comic_flow.h +++ b/YACReaderLibrary/comic_flow.h @@ -17,7 +17,7 @@ class ComicFlow : public YACReaderFlow { Q_OBJECT public: - ComicFlow(QWidget *parent = 0, FlowType flowType = CoverFlowLike); + ComicFlow(QWidget *parent = nullptr, FlowType flowType = CoverFlowLike); virtual ~ComicFlow(); void setImagePaths(const QStringList &paths); diff --git a/YACReaderLibrary/comic_flow_widget.h b/YACReaderLibrary/comic_flow_widget.h index 08bde4be..cfb214ad 100644 --- a/YACReaderLibrary/comic_flow_widget.h +++ b/YACReaderLibrary/comic_flow_widget.h @@ -12,7 +12,7 @@ class ComicFlowWidget : public QWidget { Q_OBJECT public: - ComicFlowWidget(QWidget *paret = 0); + ComicFlowWidget(QWidget *paret = nullptr); public slots: virtual void setShowMarks(bool value) = 0; @@ -44,7 +44,7 @@ private: ComicFlow *flow; public: - ComicFlowWidgetSW(QWidget *parent = 0); + ComicFlowWidgetSW(QWidget *parent = nullptr); void setShowMarks(bool value); void setMarks(QVector marks); @@ -84,7 +84,7 @@ private: YACReaderComicFlowGL *flow; public: - ComicFlowWidgetGL(QWidget *parent = 0); + ComicFlowWidgetGL(QWidget *parent = nullptr); void setShowMarks(bool value); void setMarks(QVector marks); diff --git a/YACReaderLibrary/comic_vine/api_key_dialog.h b/YACReaderLibrary/comic_vine/api_key_dialog.h index f6532c76..15a809de 100644 --- a/YACReaderLibrary/comic_vine/api_key_dialog.h +++ b/YACReaderLibrary/comic_vine/api_key_dialog.h @@ -11,7 +11,7 @@ class ApiKeyDialog : public QDialog { Q_OBJECT public: - explicit ApiKeyDialog(QWidget *parent = 0); + explicit ApiKeyDialog(QWidget *parent = nullptr); ~ApiKeyDialog(); signals: diff --git a/YACReaderLibrary/comic_vine/comic_vine_all_volume_comics_retriever.h b/YACReaderLibrary/comic_vine/comic_vine_all_volume_comics_retriever.h index e880699b..24e5f6fd 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_all_volume_comics_retriever.h +++ b/YACReaderLibrary/comic_vine/comic_vine_all_volume_comics_retriever.h @@ -7,7 +7,7 @@ class ComicVineAllVolumeComicsRetriever : public QObject { Q_OBJECT public: - explicit ComicVineAllVolumeComicsRetriever(const QString &volumeURLString, QObject *parent = 0); + explicit ComicVineAllVolumeComicsRetriever(const QString &volumeURLString, QObject *parent = nullptr); void getAllVolumeComics(); protected: diff --git a/YACReaderLibrary/comic_vine/comic_vine_client.h b/YACReaderLibrary/comic_vine/comic_vine_client.h index d99b491f..349f89b7 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_client.h +++ b/YACReaderLibrary/comic_vine/comic_vine_client.h @@ -10,7 +10,7 @@ class ComicVineClient : public QObject { Q_OBJECT public: - explicit ComicVineClient(QObject *parent = 0); + explicit ComicVineClient(QObject *parent = nullptr); ~ComicVineClient(); signals: diff --git a/YACReaderLibrary/comic_vine/comic_vine_dialog.h b/YACReaderLibrary/comic_vine/comic_vine_dialog.h index 39b7688f..fb01762d 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_dialog.h +++ b/YACReaderLibrary/comic_vine/comic_vine_dialog.h @@ -26,7 +26,7 @@ class ComicVineDialog : public QDialog { Q_OBJECT public: - explicit ComicVineDialog(QWidget *parent = 0); + explicit ComicVineDialog(QWidget *parent = nullptr); QString databasePath; QString basePath; void setComics(const QList &comics); diff --git a/YACReaderLibrary/comic_vine/model/comics_model.h b/YACReaderLibrary/comic_vine/model/comics_model.h index e019bb89..50c6f97e 100644 --- a/YACReaderLibrary/comic_vine/model/comics_model.h +++ b/YACReaderLibrary/comic_vine/model/comics_model.h @@ -7,7 +7,7 @@ class ComicsModel : public JSONModel { Q_OBJECT public: - explicit ComicsModel(QObject *parent = 0); + explicit ComicsModel(QObject *parent = nullptr); signals: diff --git a/YACReaderLibrary/comic_vine/model/json_model.h b/YACReaderLibrary/comic_vine/model/json_model.h index 747f221d..7585eb65 100644 --- a/YACReaderLibrary/comic_vine/model/json_model.h +++ b/YACReaderLibrary/comic_vine/model/json_model.h @@ -7,7 +7,7 @@ class JSONModel : public QAbstractItemModel { Q_OBJECT public: - explicit JSONModel(QObject *parent = 0); + explicit JSONModel(QObject *parent = nullptr); virtual void load(const QString &json) = 0; signals: diff --git a/YACReaderLibrary/comic_vine/model/local_comic_list_model.cpp b/YACReaderLibrary/comic_vine/model/local_comic_list_model.cpp index ce99b786..7ae45af8 100644 --- a/YACReaderLibrary/comic_vine/model/local_comic_list_model.cpp +++ b/YACReaderLibrary/comic_vine/model/local_comic_list_model.cpp @@ -57,7 +57,7 @@ QVariant LocalComicListModel::data(const QModelIndex &index, int role) const Qt::ItemFlags LocalComicListModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return 0; + return nullptr; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } diff --git a/YACReaderLibrary/comic_vine/model/local_comic_list_model.h b/YACReaderLibrary/comic_vine/model/local_comic_list_model.h index f3736a1d..20fb05b9 100644 --- a/YACReaderLibrary/comic_vine/model/local_comic_list_model.h +++ b/YACReaderLibrary/comic_vine/model/local_comic_list_model.h @@ -9,7 +9,7 @@ class LocalComicListModel : public QAbstractItemModel { Q_OBJECT public: - explicit LocalComicListModel(QObject *parent = 0); + explicit LocalComicListModel(QObject *parent = nullptr); void load(QList &comics); diff --git a/YACReaderLibrary/comic_vine/model/response_parser.h b/YACReaderLibrary/comic_vine/model/response_parser.h index c4109491..c18004ac 100644 --- a/YACReaderLibrary/comic_vine/model/response_parser.h +++ b/YACReaderLibrary/comic_vine/model/response_parser.h @@ -7,7 +7,7 @@ class ResponseParser : public QObject { Q_OBJECT public: - explicit ResponseParser(QObject *parent = 0); + explicit ResponseParser(QObject *parent = nullptr); bool responseError(); QString errorDescription(); qint32 getNumResults(); diff --git a/YACReaderLibrary/comic_vine/model/volume_comics_model.cpp b/YACReaderLibrary/comic_vine/model/volume_comics_model.cpp index 78e28b59..e08080f9 100644 --- a/YACReaderLibrary/comic_vine/model/volume_comics_model.cpp +++ b/YACReaderLibrary/comic_vine/model/volume_comics_model.cpp @@ -108,7 +108,7 @@ QVariant VolumeComicsModel::data(const QModelIndex &index, int role) const Qt::ItemFlags VolumeComicsModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return 0; + return nullptr; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } diff --git a/YACReaderLibrary/comic_vine/model/volume_comics_model.h b/YACReaderLibrary/comic_vine/model/volume_comics_model.h index 5d7003bb..7994ad3f 100644 --- a/YACReaderLibrary/comic_vine/model/volume_comics_model.h +++ b/YACReaderLibrary/comic_vine/model/volume_comics_model.h @@ -7,7 +7,7 @@ class VolumeComicsModel : public JSONModel { Q_OBJECT public: - explicit VolumeComicsModel(QObject *parent = 0); + explicit VolumeComicsModel(QObject *parent = nullptr); void load(const QString &json); //void load(const QStringList & jsonList); diff --git a/YACReaderLibrary/comic_vine/model/volumes_model.cpp b/YACReaderLibrary/comic_vine/model/volumes_model.cpp index 4396dfb8..a7d56a51 100644 --- a/YACReaderLibrary/comic_vine/model/volumes_model.cpp +++ b/YACReaderLibrary/comic_vine/model/volumes_model.cpp @@ -102,7 +102,7 @@ QVariant VolumesModel::data(const QModelIndex &index, int role) const Qt::ItemFlags VolumesModel::flags(const QModelIndex &index) const { if (!index.isValid()) - return 0; + return nullptr; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } diff --git a/YACReaderLibrary/comic_vine/model/volumes_model.h b/YACReaderLibrary/comic_vine/model/volumes_model.h index 839786e8..6d76e12c 100644 --- a/YACReaderLibrary/comic_vine/model/volumes_model.h +++ b/YACReaderLibrary/comic_vine/model/volumes_model.h @@ -7,7 +7,7 @@ class VolumesModel : public JSONModel { Q_OBJECT public: - explicit VolumesModel(QObject *parent = 0); + explicit VolumesModel(QObject *parent = nullptr); virtual ~VolumesModel(); //receive a valid json with a list of volumes void load(const QString &json); diff --git a/YACReaderLibrary/comic_vine/scraper_lineedit.h b/YACReaderLibrary/comic_vine/scraper_lineedit.h index e4bd0582..8a10567a 100644 --- a/YACReaderLibrary/comic_vine/scraper_lineedit.h +++ b/YACReaderLibrary/comic_vine/scraper_lineedit.h @@ -9,7 +9,7 @@ class ScraperLineEdit : public QLineEdit { Q_OBJECT public: - ScraperLineEdit(const QString &title, QWidget *widget = 0); + ScraperLineEdit(const QString &title, QWidget *widget = nullptr); protected: void resizeEvent(QResizeEvent *); diff --git a/YACReaderLibrary/comic_vine/scraper_results_paginator.h b/YACReaderLibrary/comic_vine/scraper_results_paginator.h index 8f96adbc..4395df4c 100644 --- a/YACReaderLibrary/comic_vine/scraper_results_paginator.h +++ b/YACReaderLibrary/comic_vine/scraper_results_paginator.h @@ -10,7 +10,7 @@ class ScraperResultsPaginator : public QWidget { Q_OBJECT public: - explicit ScraperResultsPaginator(QWidget *parent = 0); + explicit ScraperResultsPaginator(QWidget *parent = nullptr); void update(const QString &json); int getCurrentPage(); void setCustomLabel(const QString &label); diff --git a/YACReaderLibrary/comic_vine/scraper_scroll_label.h b/YACReaderLibrary/comic_vine/scraper_scroll_label.h index d9fd6837..6dc428dd 100644 --- a/YACReaderLibrary/comic_vine/scraper_scroll_label.h +++ b/YACReaderLibrary/comic_vine/scraper_scroll_label.h @@ -9,7 +9,7 @@ class ScraperScrollLabel : public QScrollArea { Q_OBJECT public: - explicit ScraperScrollLabel(QWidget *parent = 0); + explicit ScraperScrollLabel(QWidget *parent = nullptr); signals: diff --git a/YACReaderLibrary/comic_vine/scraper_selector.h b/YACReaderLibrary/comic_vine/scraper_selector.h index 5fdf1b1b..312dcb46 100644 --- a/YACReaderLibrary/comic_vine/scraper_selector.h +++ b/YACReaderLibrary/comic_vine/scraper_selector.h @@ -9,7 +9,7 @@ class ScraperSelector : public QWidget { Q_OBJECT public: - explicit ScraperSelector(QWidget *parent = 0); + explicit ScraperSelector(QWidget *parent = nullptr); virtual void load(const QString &json, const QString &searchString); public slots: diff --git a/YACReaderLibrary/comic_vine/scraper_tableview.h b/YACReaderLibrary/comic_vine/scraper_tableview.h index 9c6ad8c6..03eb0322 100644 --- a/YACReaderLibrary/comic_vine/scraper_tableview.h +++ b/YACReaderLibrary/comic_vine/scraper_tableview.h @@ -7,7 +7,7 @@ class ScraperTableView : public QTableView { Q_OBJECT public: - explicit ScraperTableView(QWidget *parent = 0); + explicit ScraperTableView(QWidget *parent = nullptr); signals: diff --git a/YACReaderLibrary/comic_vine/search_single_comic.h b/YACReaderLibrary/comic_vine/search_single_comic.h index 6458fe64..58dfa44a 100644 --- a/YACReaderLibrary/comic_vine/search_single_comic.h +++ b/YACReaderLibrary/comic_vine/search_single_comic.h @@ -9,7 +9,7 @@ class SearchSingleComic : public QWidget { Q_OBJECT public: - SearchSingleComic(QWidget *parent = 0); + SearchSingleComic(QWidget *parent = nullptr); QString getVolumeInfo(); QString getComicInfo(); int getComicNumber(); diff --git a/YACReaderLibrary/comic_vine/search_volume.h b/YACReaderLibrary/comic_vine/search_volume.h index f0dcf825..8343e129 100644 --- a/YACReaderLibrary/comic_vine/search_volume.h +++ b/YACReaderLibrary/comic_vine/search_volume.h @@ -9,7 +9,7 @@ class SearchVolume : public QWidget { Q_OBJECT public: - SearchVolume(QWidget *parent = 0); + SearchVolume(QWidget *parent = nullptr); void clean(); public slots: QString getVolumeInfo(); diff --git a/YACReaderLibrary/comic_vine/select_comic.h b/YACReaderLibrary/comic_vine/select_comic.h index 83153702..eb824ceb 100644 --- a/YACReaderLibrary/comic_vine/select_comic.h +++ b/YACReaderLibrary/comic_vine/select_comic.h @@ -14,7 +14,7 @@ class SelectComic : public ScraperSelector { Q_OBJECT public: - SelectComic(QWidget *parent = 0); + SelectComic(QWidget *parent = nullptr); void load(const QString &json, const QString &searchString); virtual ~SelectComic(); diff --git a/YACReaderLibrary/comic_vine/select_volume.h b/YACReaderLibrary/comic_vine/select_volume.h index a02672d5..983a80d2 100644 --- a/YACReaderLibrary/comic_vine/select_volume.h +++ b/YACReaderLibrary/comic_vine/select_volume.h @@ -16,7 +16,7 @@ class SelectVolume : public ScraperSelector { Q_OBJECT public: - SelectVolume(QWidget *parent = 0); + SelectVolume(QWidget *parent = nullptr); void load(const QString &json, const QString &searchString); virtual ~SelectVolume(); diff --git a/YACReaderLibrary/comic_vine/series_question.h b/YACReaderLibrary/comic_vine/series_question.h index d03af685..a02654f8 100644 --- a/YACReaderLibrary/comic_vine/series_question.h +++ b/YACReaderLibrary/comic_vine/series_question.h @@ -10,7 +10,7 @@ class SeriesQuestion : public QWidget Q_OBJECT public: - SeriesQuestion(QWidget *parent = 0); + SeriesQuestion(QWidget *parent = nullptr); bool getYes(); void setYes(bool yes = true); diff --git a/YACReaderLibrary/comic_vine/sort_volume_comics.h b/YACReaderLibrary/comic_vine/sort_volume_comics.h index ac33d1b5..2134f494 100644 --- a/YACReaderLibrary/comic_vine/sort_volume_comics.h +++ b/YACReaderLibrary/comic_vine/sort_volume_comics.h @@ -23,7 +23,7 @@ public: RIGHT }; - ScrapperToolButton(ScrapperToolButton::Appearance appearance = DEFAULT, QWidget *parent = 0) + ScrapperToolButton(ScrapperToolButton::Appearance appearance = DEFAULT, QWidget *parent = nullptr) : QPushButton(parent), appearance(appearance) { setStyleSheet("QPushButton {border: none; background: #2e2e2e; color:white; border-radius:2px;}" @@ -67,7 +67,7 @@ class SortVolumeComics : public ScraperSelector { Q_OBJECT public: - explicit SortVolumeComics(QWidget *parent = 0); + explicit SortVolumeComics(QWidget *parent = nullptr); signals: diff --git a/YACReaderLibrary/comic_vine/title_header.h b/YACReaderLibrary/comic_vine/title_header.h index 74d4d3c8..4a359ede 100644 --- a/YACReaderLibrary/comic_vine/title_header.h +++ b/YACReaderLibrary/comic_vine/title_header.h @@ -9,7 +9,7 @@ class TitleHeader : public QWidget { Q_OBJECT public: - TitleHeader(QWidget *parent = 0); + TitleHeader(QWidget *parent = nullptr); public slots: void setTitle(const QString &title); void setSubTitle(const QString &title); diff --git a/YACReaderLibrary/comics_remover.h b/YACReaderLibrary/comics_remover.h index 68c4e816..c46a4cbe 100644 --- a/YACReaderLibrary/comics_remover.h +++ b/YACReaderLibrary/comics_remover.h @@ -10,7 +10,7 @@ class ComicsRemover : public QObject { Q_OBJECT public: - explicit ComicsRemover(QModelIndexList &indexList, QList &paths, qulonglong parentId, QObject *parent = 0); + explicit ComicsRemover(QModelIndexList &indexList, QList &paths, qulonglong parentId, QObject *parent = nullptr); signals: void remove(int); @@ -31,7 +31,7 @@ class FoldersRemover : public QObject { Q_OBJECT public: - explicit FoldersRemover(QModelIndexList &indexList, QList &paths, QObject *parent = 0); + explicit FoldersRemover(QModelIndexList &indexList, QList &paths, QObject *parent = nullptr); signals: void remove(QModelIndex); diff --git a/YACReaderLibrary/comics_view.cpp b/YACReaderLibrary/comics_view.cpp index 6d838d10..0fa9940d 100644 --- a/YACReaderLibrary/comics_view.cpp +++ b/YACReaderLibrary/comics_view.cpp @@ -9,7 +9,7 @@ #include ComicsView::ComicsView(QWidget *parent) - : QWidget(parent), model(NULL), comicDB(nullptr) + : QWidget(parent), model(nullptr), comicDB(nullptr) { setAcceptDrops(true); } diff --git a/YACReaderLibrary/comics_view.h b/YACReaderLibrary/comics_view.h index b83a0954..d594529d 100644 --- a/YACReaderLibrary/comics_view.h +++ b/YACReaderLibrary/comics_view.h @@ -16,7 +16,7 @@ class ComicsView : public QWidget { Q_OBJECT public: - explicit ComicsView(QWidget *parent = 0); + explicit ComicsView(QWidget *parent = nullptr); virtual void setToolBar(QToolBar *toolBar) = 0; virtual void setModel(ComicModel *model); virtual void setCurrentIndex(const QModelIndex &index) = 0; diff --git a/YACReaderLibrary/comics_view_transition.h b/YACReaderLibrary/comics_view_transition.h index 0a6989e5..c67e658e 100644 --- a/YACReaderLibrary/comics_view_transition.h +++ b/YACReaderLibrary/comics_view_transition.h @@ -7,7 +7,7 @@ class ComicsViewTransition : public QWidget { Q_OBJECT public: - explicit ComicsViewTransition(QWidget *parent = 0); + explicit ComicsViewTransition(QWidget *parent = nullptr); QSize sizeHint(); protected: diff --git a/YACReaderLibrary/create_library_dialog.h b/YACReaderLibrary/create_library_dialog.h index 895d0551..83658034 100644 --- a/YACReaderLibrary/create_library_dialog.h +++ b/YACReaderLibrary/create_library_dialog.h @@ -14,7 +14,7 @@ class CreateLibraryDialog : public QDialog { Q_OBJECT public: - CreateLibraryDialog(QWidget *parent = 0); + CreateLibraryDialog(QWidget *parent = nullptr); private: QLabel *nameLabel; @@ -46,7 +46,7 @@ class UpdateLibraryDialog : public QDialog { Q_OBJECT public: - UpdateLibraryDialog(QWidget *parent = 0); + UpdateLibraryDialog(QWidget *parent = nullptr); private: QLabel *message; diff --git a/YACReaderLibrary/db/folder_item.h b/YACReaderLibrary/db/folder_item.h index 3ef9ed10..2cc4bd45 100644 --- a/YACReaderLibrary/db/folder_item.h +++ b/YACReaderLibrary/db/folder_item.h @@ -48,7 +48,7 @@ class FolderItem { public: - FolderItem(const QList &data, FolderItem *parent = 0); + FolderItem(const QList &data, FolderItem *parent = nullptr); ~FolderItem(); void appendChild(FolderItem *child); diff --git a/YACReaderLibrary/db/reading_list_item.h b/YACReaderLibrary/db/reading_list_item.h index 0650bff0..752ea0bb 100644 --- a/YACReaderLibrary/db/reading_list_item.h +++ b/YACReaderLibrary/db/reading_list_item.h @@ -62,7 +62,7 @@ private: class ReadingListItem : public ListItem { public: - ReadingListItem(const QList &data, ReadingListItem *parent = 0); + ReadingListItem(const QList &data, ReadingListItem *parent = nullptr); QIcon getIcon() const; ReadingListItem *parent; int childCount() const; diff --git a/YACReaderLibrary/empty_container_info.h b/YACReaderLibrary/empty_container_info.h index 45055b73..93dfceea 100644 --- a/YACReaderLibrary/empty_container_info.h +++ b/YACReaderLibrary/empty_container_info.h @@ -7,7 +7,7 @@ class EmptyContainerInfo : public QWidget { Q_OBJECT public: - explicit EmptyContainerInfo(QWidget *parent = 0); + explicit EmptyContainerInfo(QWidget *parent = nullptr); void setPixmap(const QPixmap &pixmap); void setText(const QString &text); QVBoxLayout *setUpDefaultLayout(bool addStretch); diff --git a/YACReaderLibrary/empty_folder_widget.h b/YACReaderLibrary/empty_folder_widget.h index 0d8ae2a9..2f416b6b 100644 --- a/YACReaderLibrary/empty_folder_widget.h +++ b/YACReaderLibrary/empty_folder_widget.h @@ -8,7 +8,7 @@ class EmptyFolderWidget : public EmptyContainerInfo { Q_OBJECT public: - explicit EmptyFolderWidget(QWidget *parent = 0); + explicit EmptyFolderWidget(QWidget *parent = nullptr); void setSubfolders(const QModelIndex &mi, const QStringList &foldersNames); signals: void subfolderSelected(QModelIndex, int); diff --git a/YACReaderLibrary/empty_label_widget.h b/YACReaderLibrary/empty_label_widget.h index 8dce705c..850b6fd9 100644 --- a/YACReaderLibrary/empty_label_widget.h +++ b/YACReaderLibrary/empty_label_widget.h @@ -9,7 +9,7 @@ class EmptyLabelWidget : public EmptyContainerInfo { Q_OBJECT public: - explicit EmptyLabelWidget(QWidget *parent = 0); + explicit EmptyLabelWidget(QWidget *parent = nullptr); void setColor(YACReader::LabelColors color); signals: diff --git a/YACReaderLibrary/empty_reading_list_widget.h b/YACReaderLibrary/empty_reading_list_widget.h index 4046bd12..4fa7fa25 100644 --- a/YACReaderLibrary/empty_reading_list_widget.h +++ b/YACReaderLibrary/empty_reading_list_widget.h @@ -7,7 +7,7 @@ class EmptyReadingListWidget : public EmptyContainerInfo { public: - EmptyReadingListWidget(QWidget *parent = 0); + EmptyReadingListWidget(QWidget *parent = nullptr); }; #endif // EMPTY_READING_LIST_WIDGET_H diff --git a/YACReaderLibrary/empty_special_list.h b/YACReaderLibrary/empty_special_list.h index 97e6e762..481bd9e7 100644 --- a/YACReaderLibrary/empty_special_list.h +++ b/YACReaderLibrary/empty_special_list.h @@ -7,7 +7,7 @@ class EmptySpecialListWidget : public EmptyContainerInfo { public: - EmptySpecialListWidget(QWidget *parent = 0); + EmptySpecialListWidget(QWidget *parent = nullptr); }; #endif // EMPTY_SPECIAL_LIST_H diff --git a/YACReaderLibrary/export_comics_info_dialog.h b/YACReaderLibrary/export_comics_info_dialog.h index 008a273e..7c1cbf7d 100644 --- a/YACReaderLibrary/export_comics_info_dialog.h +++ b/YACReaderLibrary/export_comics_info_dialog.h @@ -11,7 +11,7 @@ class ExportComicsInfoDialog : public QDialog Q_OBJECT public: - ExportComicsInfoDialog(QWidget *parent = 0); + ExportComicsInfoDialog(QWidget *parent = nullptr); ~ExportComicsInfoDialog(); QString source; diff --git a/YACReaderLibrary/export_library_dialog.h b/YACReaderLibrary/export_library_dialog.h index 4f8b8dfe..1c3e8025 100644 --- a/YACReaderLibrary/export_library_dialog.h +++ b/YACReaderLibrary/export_library_dialog.h @@ -14,7 +14,7 @@ class ExportLibraryDialog : public QDialog { Q_OBJECT public: - ExportLibraryDialog(QWidget *parent = 0); + ExportLibraryDialog(QWidget *parent = nullptr); public slots: void exportLibrary(); void findPath(); diff --git a/YACReaderLibrary/import_comics_info_dialog.h b/YACReaderLibrary/import_comics_info_dialog.h index ac1b3c48..5deeea0d 100644 --- a/YACReaderLibrary/import_comics_info_dialog.h +++ b/YACReaderLibrary/import_comics_info_dialog.h @@ -24,7 +24,7 @@ class ImportComicsInfoDialog : public QDialog Q_OBJECT public: - ImportComicsInfoDialog(QWidget *parent = 0); + ImportComicsInfoDialog(QWidget *parent = nullptr); ~ImportComicsInfoDialog(); QString dest; diff --git a/YACReaderLibrary/import_library_dialog.h b/YACReaderLibrary/import_library_dialog.h index 11be8dd9..e2a9ce1c 100644 --- a/YACReaderLibrary/import_library_dialog.h +++ b/YACReaderLibrary/import_library_dialog.h @@ -13,7 +13,7 @@ class ImportLibraryDialog : public QDialog { Q_OBJECT public: - ImportLibraryDialog(QWidget *parent = 0); + ImportLibraryDialog(QWidget *parent = nullptr); private: QLabel *nameLabel; diff --git a/YACReaderLibrary/info_comics_view.h b/YACReaderLibrary/info_comics_view.h index 6e01fcbb..257e3975 100644 --- a/YACReaderLibrary/info_comics_view.h +++ b/YACReaderLibrary/info_comics_view.h @@ -12,7 +12,7 @@ class InfoComicsView : public ComicsView { Q_OBJECT public: - explicit InfoComicsView(QWidget *parent = 0); + explicit InfoComicsView(QWidget *parent = nullptr); ~InfoComicsView(); void setToolBar(QToolBar *toolBar); void setModel(ComicModel *model); diff --git a/YACReaderLibrary/no_libraries_widget.h b/YACReaderLibrary/no_libraries_widget.h index 0e15d5fe..ee1a7b82 100644 --- a/YACReaderLibrary/no_libraries_widget.h +++ b/YACReaderLibrary/no_libraries_widget.h @@ -7,7 +7,7 @@ class NoLibrariesWidget : public QWidget { Q_OBJECT public: - explicit NoLibrariesWidget(QWidget *parent = 0); + explicit NoLibrariesWidget(QWidget *parent = nullptr); signals: void createNewLibrary(); diff --git a/YACReaderLibrary/no_search_results_widget.h b/YACReaderLibrary/no_search_results_widget.h index d03a600f..8ee5a794 100644 --- a/YACReaderLibrary/no_search_results_widget.h +++ b/YACReaderLibrary/no_search_results_widget.h @@ -9,7 +9,7 @@ class NoSearchResultsWidget : public QWidget { Q_OBJECT public: - explicit NoSearchResultsWidget(QWidget *parent = 0); + explicit NoSearchResultsWidget(QWidget *parent = nullptr); signals: diff --git a/YACReaderLibrary/options_dialog.h b/YACReaderLibrary/options_dialog.h index 0dd53a62..6a5db8aa 100644 --- a/YACReaderLibrary/options_dialog.h +++ b/YACReaderLibrary/options_dialog.h @@ -13,7 +13,7 @@ class OptionsDialog : public YACReaderOptionsDialog { Q_OBJECT public: - OptionsDialog(QWidget *parent = 0); + OptionsDialog(QWidget *parent = nullptr); public slots: void editApiKey(); diff --git a/YACReaderLibrary/package_manager.cpp b/YACReaderLibrary/package_manager.cpp index 4501b2f1..dc22107d 100644 --- a/YACReaderLibrary/package_manager.cpp +++ b/YACReaderLibrary/package_manager.cpp @@ -2,7 +2,7 @@ #include PackageManager::PackageManager() - : _7z(0) + : _7z(nullptr) { } @@ -41,7 +41,7 @@ void PackageManager::extractPackage(const QString &packagePath, const QString &d void PackageManager::cancel() { - if (_7z != 0) { + if (_7z != nullptr) { _7z->disconnect(); _7z->kill(); if (creating) { diff --git a/YACReaderLibrary/properties_dialog.h b/YACReaderLibrary/properties_dialog.h index b253c81c..85a5679b 100644 --- a/YACReaderLibrary/properties_dialog.h +++ b/YACReaderLibrary/properties_dialog.h @@ -118,7 +118,7 @@ private: QString originalCoverSize; public: - PropertiesDialog(QWidget *parent = 0); + PropertiesDialog(QWidget *parent = nullptr); QString databasePath; QString basePath; QSize sizeHint(); diff --git a/YACReaderLibrary/rename_library_dialog.h b/YACReaderLibrary/rename_library_dialog.h index dd56cc00..38561415 100644 --- a/YACReaderLibrary/rename_library_dialog.h +++ b/YACReaderLibrary/rename_library_dialog.h @@ -10,7 +10,7 @@ class RenameLibraryDialog : public QDialog { Q_OBJECT public: - RenameLibraryDialog(QWidget *parent = 0); + RenameLibraryDialog(QWidget *parent = nullptr); private: QLabel *newNameLabel; diff --git a/YACReaderLibrary/server/controllers/v1/comiccontroller.cpp b/YACReaderLibrary/server/controllers/v1/comiccontroller.cpp index 2ebdc20d..a01d510b 100644 --- a/YACReaderLibrary/server/controllers/v1/comiccontroller.cpp +++ b/YACReaderLibrary/server/controllers/v1/comiccontroller.cpp @@ -50,8 +50,8 @@ void ComicController::service(HttpRequest &request, HttpResponse &response) Comic *comicFile = FactoryComic::newComic(libraries.getPath(libraryId) + comic.path); - if (comicFile != NULL) { - QThread *thread = NULL; + if (comicFile != nullptr) { + QThread *thread = nullptr; thread = new QThread(); @@ -65,7 +65,7 @@ void ComicController::service(HttpRequest &request, HttpResponse &response) comicFile->load(libraries.getPath(libraryId) + comic.path); - if (thread != NULL) + if (thread != nullptr) thread->start(); if (remoteComic) { diff --git a/YACReaderLibrary/server/controllers/v2/comiccontroller_v2.cpp b/YACReaderLibrary/server/controllers/v2/comiccontroller_v2.cpp index dd2083ea..eca197d6 100644 --- a/YACReaderLibrary/server/controllers/v2/comiccontroller_v2.cpp +++ b/YACReaderLibrary/server/controllers/v2/comiccontroller_v2.cpp @@ -53,8 +53,8 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response) Comic *comicFile = FactoryComic::newComic(libraries.getPath(libraryId) + comic.path); - if (comicFile != NULL) { - QThread *thread = NULL; + if (comicFile != nullptr) { + QThread *thread = nullptr; thread = new QThread(); @@ -68,7 +68,7 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response) comicFile->load(libraries.getPath(libraryId) + comic.path); - if (thread != NULL) + if (thread != nullptr) thread->start(); if (remoteComic) { diff --git a/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.cpp b/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.cpp index d07b593e..6e2150fa 100644 --- a/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.cpp +++ b/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.cpp @@ -9,12 +9,12 @@ HttpConnectionHandler::HttpConnectionHandler(QSettings* settings, HttpRequestHandler* requestHandler, QSslConfiguration* sslConfiguration) : QThread() { - Q_ASSERT(settings!=0); - Q_ASSERT(requestHandler!=0); + Q_ASSERT(settings!=nullptr); + Q_ASSERT(requestHandler!=nullptr); this->settings=settings; this->requestHandler=requestHandler; this->sslConfiguration=sslConfiguration; - currentRequest=0; + currentRequest=nullptr; busy=false; // Create TCP or SSL socket @@ -111,7 +111,7 @@ void HttpConnectionHandler::handleConnection(tSocketDescriptor socketDescriptor) readTimer.start(readTimeout); // delete previous request delete currentRequest; - currentRequest=0; + currentRequest=nullptr; } @@ -136,7 +136,7 @@ void HttpConnectionHandler::readTimeout() socket->flush(); socket->disconnectFromHost(); delete currentRequest; - currentRequest=0; + currentRequest=nullptr; } @@ -183,7 +183,7 @@ void HttpConnectionHandler::read() socket->flush(); socket->disconnectFromHost(); delete currentRequest; - currentRequest=0; + currentRequest=nullptr; return; } @@ -269,7 +269,7 @@ void HttpConnectionHandler::read() readTimer.start(readTimeout); } delete currentRequest; - currentRequest=0; + currentRequest=nullptr; } } } diff --git a/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.h b/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.h index 79c0a786..b659ce59 100644 --- a/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.h +++ b/YACReaderLibrary/server/lib/httpserver/httpconnectionhandler.h @@ -56,7 +56,7 @@ public: @param requestHandler Handler that will process each incoming HTTP request @param sslConfiguration SSL (HTTPS) will be used if not NULL */ - HttpConnectionHandler(QSettings* settings, HttpRequestHandler* requestHandler, QSslConfiguration* sslConfiguration=NULL); + HttpConnectionHandler(QSettings* settings, HttpRequestHandler* requestHandler, QSslConfiguration* sslConfiguration=nullptr); /** Destructor */ virtual ~HttpConnectionHandler(); diff --git a/YACReaderLibrary/server/lib/httpserver/httpconnectionhandlerpool.cpp b/YACReaderLibrary/server/lib/httpserver/httpconnectionhandlerpool.cpp index 6dd3d8c1..be4a85fa 100644 --- a/YACReaderLibrary/server/lib/httpserver/httpconnectionhandlerpool.cpp +++ b/YACReaderLibrary/server/lib/httpserver/httpconnectionhandlerpool.cpp @@ -10,10 +10,10 @@ HttpConnectionHandlerPool::HttpConnectionHandlerPool(QSettings* settings, HttpRequestHandler* requestHandler) : QObject() { - Q_ASSERT(settings!=0); + Q_ASSERT(settings!=nullptr); this->settings=settings; this->requestHandler=requestHandler; - this->sslConfiguration=NULL; + this->sslConfiguration=nullptr; loadSslConfig(); cleanupTimer.start(settings->value("cleanupInterval",1000).toInt()); connect(&cleanupTimer, SIGNAL(timeout()), SLOT(cleanup())); @@ -34,7 +34,7 @@ HttpConnectionHandlerPool::~HttpConnectionHandlerPool() HttpConnectionHandler* HttpConnectionHandlerPool::getConnectionHandler() { - HttpConnectionHandler* freeHandler=0; + HttpConnectionHandler* freeHandler=nullptr; mutex.lock(); // find a free handler in pool foreach(HttpConnectionHandler* handler, pool) diff --git a/YACReaderLibrary/server/lib/httpserver/httplistener.cpp b/YACReaderLibrary/server/lib/httpserver/httplistener.cpp index ac1a79a1..14d861ad 100644 --- a/YACReaderLibrary/server/lib/httpserver/httplistener.cpp +++ b/YACReaderLibrary/server/lib/httpserver/httplistener.cpp @@ -11,9 +11,9 @@ HttpListener::HttpListener(QSettings* settings, HttpRequestHandler* requestHandler, QObject *parent) : QTcpServer(parent) { - Q_ASSERT(settings!=0); - Q_ASSERT(requestHandler!=0); - pool=NULL; + Q_ASSERT(settings!=nullptr); + Q_ASSERT(requestHandler!=nullptr); + pool=nullptr; this->settings=settings; this->requestHandler=requestHandler; // Reqister type of socketDescriptor for signal/slot handling @@ -64,7 +64,7 @@ void HttpListener::close() { qDebug("HttpListener: closed"); if (pool) { delete pool; - pool=NULL; + pool=nullptr; } } @@ -73,7 +73,7 @@ void HttpListener::incomingConnection(tSocketDescriptor socketDescriptor) { qDebug("HttpListener: New connection"); #endif - HttpConnectionHandler* freeHandler=NULL; + HttpConnectionHandler* freeHandler=nullptr; if (pool) { freeHandler=pool->getConnectionHandler(); diff --git a/YACReaderLibrary/server/lib/httpserver/httplistener.h b/YACReaderLibrary/server/lib/httpserver/httplistener.h index a88176d0..25303188 100644 --- a/YACReaderLibrary/server/lib/httpserver/httplistener.h +++ b/YACReaderLibrary/server/lib/httpserver/httplistener.h @@ -52,7 +52,7 @@ public: @param parent Parent object. @warning Ensure to close or delete the listener before deleting the request handler. */ - HttpListener(QSettings* settings, HttpRequestHandler* requestHandler, QObject* parent = NULL); + HttpListener(QSettings* settings, HttpRequestHandler* requestHandler, QObject* parent = nullptr); /** Destructor */ virtual ~HttpListener(); diff --git a/YACReaderLibrary/server/lib/httpserver/httprequest.cpp b/YACReaderLibrary/server/lib/httpserver/httprequest.cpp index efbf686b..00a0617a 100644 --- a/YACReaderLibrary/server/lib/httpserver/httprequest.cpp +++ b/YACReaderLibrary/server/lib/httpserver/httprequest.cpp @@ -441,7 +441,7 @@ void HttpRequest::parseMultiPartFile() #ifdef SUPERVERBOSE qDebug("HttpRequest: reading multpart data"); #endif - QTemporaryFile* uploadedFile=0; + QTemporaryFile* uploadedFile=nullptr; QByteArray fieldValue; while (!tempFile.atEnd() && !finished && !tempFile.error()) { diff --git a/YACReaderLibrary/server/lib/httpserver/httprequesthandler.h b/YACReaderLibrary/server/lib/httpserver/httprequesthandler.h index 12ac0cf9..913cc3ca 100644 --- a/YACReaderLibrary/server/lib/httpserver/httprequesthandler.h +++ b/YACReaderLibrary/server/lib/httpserver/httprequesthandler.h @@ -31,7 +31,7 @@ public: * Constructor. * @param parent Parent object. */ - HttpRequestHandler(QObject* parent=NULL); + HttpRequestHandler(QObject* parent=nullptr); /** Destructor */ virtual ~HttpRequestHandler(); diff --git a/YACReaderLibrary/server/lib/httpserver/httpsession.cpp b/YACReaderLibrary/server/lib/httpserver/httpsession.cpp index ae705e38..b3977730 100644 --- a/YACReaderLibrary/server/lib/httpserver/httpsession.cpp +++ b/YACReaderLibrary/server/lib/httpserver/httpsession.cpp @@ -22,7 +22,7 @@ HttpSession::HttpSession(bool canStore) } else { - dataPtr=0; + dataPtr=nullptr; } } @@ -103,7 +103,7 @@ QByteArray HttpSession::getId() const } bool HttpSession::isNull() const { - return dataPtr==0; + return dataPtr==nullptr; } void HttpSession::set(const QByteArray& key, const QVariant& value) diff --git a/YACReaderLibrary/server/lib/httpserver/httpsessionstore.h b/YACReaderLibrary/server/lib/httpserver/httpsessionstore.h index 2e44d23a..f3e11ae5 100644 --- a/YACReaderLibrary/server/lib/httpserver/httpsessionstore.h +++ b/YACReaderLibrary/server/lib/httpserver/httpsessionstore.h @@ -36,7 +36,7 @@ class DECLSPEC HttpSessionStore : public QObject { public: /** Constructor. */ - HttpSessionStore(QSettings* settings, QObject* parent=NULL); + HttpSessionStore(QSettings* settings, QObject* parent=nullptr); /** Destructor */ virtual ~HttpSessionStore(); diff --git a/YACReaderLibrary/server/lib/httpserver/staticfilecontroller.h b/YACReaderLibrary/server/lib/httpserver/staticfilecontroller.h index 104cbee9..17e98c32 100644 --- a/YACReaderLibrary/server/lib/httpserver/staticfilecontroller.h +++ b/YACReaderLibrary/server/lib/httpserver/staticfilecontroller.h @@ -46,7 +46,7 @@ class DECLSPEC StaticFileController : public HttpRequestHandler { public: /** Constructor */ - StaticFileController(QSettings* settings, QObject* parent = NULL); + StaticFileController(QSettings* settings, QObject* parent = nullptr); /** Generates the response */ void service(HttpRequest& request, HttpResponse& response); diff --git a/YACReaderLibrary/server/lib/templateengine/templatecache.h b/YACReaderLibrary/server/lib/templateengine/templatecache.h index 5edc68ab..c9d95c1c 100644 --- a/YACReaderLibrary/server/lib/templateengine/templatecache.h +++ b/YACReaderLibrary/server/lib/templateengine/templatecache.h @@ -49,7 +49,7 @@ public: @param settings configurations settings @param parent Parent object */ - TemplateCache(QSettings* settings, QObject* parent=0); + TemplateCache(QSettings* settings, QObject* parent=nullptr); protected: diff --git a/YACReaderLibrary/server/lib/templateengine/templateloader.h b/YACReaderLibrary/server/lib/templateengine/templateloader.h index 0bfe3597..464ad1ea 100644 --- a/YACReaderLibrary/server/lib/templateengine/templateloader.h +++ b/YACReaderLibrary/server/lib/templateengine/templateloader.h @@ -45,7 +45,7 @@ public: @param settings configurations settings @param parent parent object */ - TemplateLoader(QSettings* settings, QObject* parent=0); + TemplateLoader(QSettings* settings, QObject* parent=nullptr); /** Destructor */ virtual ~TemplateLoader(); diff --git a/YACReaderLibrary/server/requestmapper.h b/YACReaderLibrary/server/requestmapper.h index e4bc2273..a380d747 100644 --- a/YACReaderLibrary/server/requestmapper.h +++ b/YACReaderLibrary/server/requestmapper.h @@ -14,7 +14,7 @@ class RequestMapper : public HttpRequestHandler Q_OBJECT Q_DISABLE_COPY(RequestMapper) public: - RequestMapper(QObject *parent = 0); + RequestMapper(QObject *parent = nullptr); void service(HttpRequest &request, HttpResponse &response); void loadSessionV1(HttpRequest &request, HttpResponse &response); diff --git a/YACReaderLibrary/server/static.cpp b/YACReaderLibrary/server/static.cpp index 90c25c18..47138d14 100644 --- a/YACReaderLibrary/server/static.cpp +++ b/YACReaderLibrary/server/static.cpp @@ -9,15 +9,15 @@ #include #include -QString Static::configDir = 0; +QString Static::configDir = nullptr; -TemplateLoader *Static::templateLoader = 0; +TemplateLoader *Static::templateLoader = nullptr; -HttpSessionStore *Static::sessionStore = 0; +HttpSessionStore *Static::sessionStore = nullptr; StaticFileController *Static::staticFileController = 0; -YACReaderHttpSessionStore *Static::yacreaderSessionStore = 0; +YACReaderHttpSessionStore *Static::yacreaderSessionStore = nullptr; QString Static::getConfigFileName() { @@ -62,5 +62,5 @@ QString Static::getConfigDir() } qWarning("Cannot find config file %s", qPrintable(configFileName)); //TODO establecer los valores por defecto - return 0; + return nullptr; } diff --git a/YACReaderLibrary/server/yacreader_http_session.h b/YACReaderLibrary/server/yacreader_http_session.h index 4801097a..56bb931a 100644 --- a/YACReaderLibrary/server/yacreader_http_session.h +++ b/YACReaderLibrary/server/yacreader_http_session.h @@ -9,7 +9,7 @@ class YACReaderHttpSession : public QObject { Q_OBJECT public: - explicit YACReaderHttpSession(QObject *parent = 0); + explicit YACReaderHttpSession(QObject *parent = nullptr); ~YACReaderHttpSession(); void setComicsOnDevice(const QSet &set); diff --git a/YACReaderLibrary/server/yacreader_http_session_store.h b/YACReaderLibrary/server/yacreader_http_session_store.h index d07635f3..e0bc3458 100644 --- a/YACReaderLibrary/server/yacreader_http_session_store.h +++ b/YACReaderLibrary/server/yacreader_http_session_store.h @@ -11,7 +11,7 @@ class YACReaderHttpSessionStore : public QObject { Q_OBJECT public: - explicit YACReaderHttpSessionStore(HttpSessionStore *sessionStore, QObject *parent = 0); + explicit YACReaderHttpSessionStore(HttpSessionStore *sessionStore, QObject *parent = nullptr); void addYACReaderHttpSession(const QByteArray &httpSessionId, YACReaderHttpSession *yacreaderHttpSession); YACReaderHttpSession *getYACReaderSessionHttpSession(const QByteArray &httpSessionId); diff --git a/YACReaderLibrary/yacreader_comic_info_helper.h b/YACReaderLibrary/yacreader_comic_info_helper.h index fa649d00..01d59913 100644 --- a/YACReaderLibrary/yacreader_comic_info_helper.h +++ b/YACReaderLibrary/yacreader_comic_info_helper.h @@ -9,7 +9,7 @@ class YACReaderComicInfoHelper : public QObject { Q_OBJECT public: - explicit YACReaderComicInfoHelper(QObject *parent = 0); + explicit YACReaderComicInfoHelper(QObject *parent = nullptr); void setModel(ComicModel *model); diff --git a/YACReaderLibrary/yacreader_comics_selection_helper.cpp b/YACReaderLibrary/yacreader_comics_selection_helper.cpp index 5f7f2f9d..4aebc4fc 100644 --- a/YACReaderLibrary/yacreader_comics_selection_helper.cpp +++ b/YACReaderLibrary/yacreader_comics_selection_helper.cpp @@ -9,7 +9,7 @@ YACReaderComicsSelectionHelper::YACReaderComicsSelectionHelper(QObject *parent) void YACReaderComicsSelectionHelper::setModel(ComicModel *model) { - if (model == NULL) + if (model == nullptr) return; this->model = model; @@ -22,7 +22,7 @@ void YACReaderComicsSelectionHelper::setModel(ComicModel *model) void YACReaderComicsSelectionHelper::selectIndex(int index) { - if (_selectionModel != nullptr && model != NULL) { + if (_selectionModel != nullptr && model != nullptr) { _selectionModel->select(model->index(index, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows); emit selectionChanged(); @@ -31,7 +31,7 @@ void YACReaderComicsSelectionHelper::selectIndex(int index) void YACReaderComicsSelectionHelper::deselectIndex(int index) { - if (_selectionModel != nullptr && model != NULL) { + if (_selectionModel != nullptr && model != nullptr) { _selectionModel->select(model->index(index, 0), QItemSelectionModel::Deselect | QItemSelectionModel::Rows); emit selectionChanged(); @@ -40,7 +40,7 @@ void YACReaderComicsSelectionHelper::deselectIndex(int index) bool YACReaderComicsSelectionHelper::isSelectedIndex(int index) const { - if (_selectionModel != nullptr && model != NULL) { + if (_selectionModel != nullptr && model != nullptr) { QModelIndex mi = model->index(index, 0); return _selectionModel->isSelected(mi); } diff --git a/YACReaderLibrary/yacreader_comics_selection_helper.h b/YACReaderLibrary/yacreader_comics_selection_helper.h index 8326626c..aad8d799 100644 --- a/YACReaderLibrary/yacreader_comics_selection_helper.h +++ b/YACReaderLibrary/yacreader_comics_selection_helper.h @@ -10,7 +10,7 @@ class YACReaderComicsSelectionHelper : public QObject { Q_OBJECT public: - explicit YACReaderComicsSelectionHelper(QObject *parent = 0); + explicit YACReaderComicsSelectionHelper(QObject *parent = nullptr); void setModel(ComicModel *model); diff --git a/YACReaderLibrary/yacreader_comics_views_manager.h b/YACReaderLibrary/yacreader_comics_views_manager.h index d89d4d87..b93fed05 100644 --- a/YACReaderLibrary/yacreader_comics_views_manager.h +++ b/YACReaderLibrary/yacreader_comics_views_manager.h @@ -24,7 +24,7 @@ class YACReaderComicsViewsManager : public QObject { Q_OBJECT public: - explicit YACReaderComicsViewsManager(QSettings *settings, LibraryWindow *parent = 0); + explicit YACReaderComicsViewsManager(QSettings *settings, LibraryWindow *parent = nullptr); QWidget *containerWidget(); diff --git a/YACReaderLibrary/yacreader_folders_view.h b/YACReaderLibrary/yacreader_folders_view.h index 73e2d678..dc6db47a 100644 --- a/YACReaderLibrary/yacreader_folders_view.h +++ b/YACReaderLibrary/yacreader_folders_view.h @@ -9,7 +9,7 @@ class YACReaderFoldersView : public YACReaderTreeView { Q_OBJECT public: - explicit YACReaderFoldersView(QWidget *parent = 0); + explicit YACReaderFoldersView(QWidget *parent = nullptr); signals: //Drops @@ -28,7 +28,7 @@ class YACReaderFoldersViewItemDeletegate : public QStyledItemDelegate { Q_OBJECT public: - explicit YACReaderFoldersViewItemDeletegate(QObject *parent = 0); + explicit YACReaderFoldersViewItemDeletegate(QObject *parent = nullptr); void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; }; diff --git a/YACReaderLibrary/yacreader_history_controller.h b/YACReaderLibrary/yacreader_history_controller.h index 93d9a352..b51ecb8e 100644 --- a/YACReaderLibrary/yacreader_history_controller.h +++ b/YACReaderLibrary/yacreader_history_controller.h @@ -37,7 +37,7 @@ class YACReaderHistoryController : public QObject { Q_OBJECT public: - explicit YACReaderHistoryController(QObject *parent = 0); + explicit YACReaderHistoryController(QObject *parent = nullptr); signals: void enabledForward(bool enabled); diff --git a/YACReaderLibrary/yacreader_local_server.h b/YACReaderLibrary/yacreader_local_server.h index a8e3f411..3086f57b 100644 --- a/YACReaderLibrary/yacreader_local_server.h +++ b/YACReaderLibrary/yacreader_local_server.h @@ -13,7 +13,7 @@ class YACReaderLocalServer : public QObject { Q_OBJECT public: - explicit YACReaderLocalServer(QObject *parent = 0); + explicit YACReaderLocalServer(QObject *parent = nullptr); signals: void comicUpdated(quint64 libraryId, const ComicDB &comic); diff --git a/YACReaderLibrary/yacreader_main_toolbar.h b/YACReaderLibrary/yacreader_main_toolbar.h index 978201d8..76ded23f 100644 --- a/YACReaderLibrary/yacreader_main_toolbar.h +++ b/YACReaderLibrary/yacreader_main_toolbar.h @@ -14,7 +14,7 @@ class YACReaderMainToolBar : public QWidget { Q_OBJECT public: - explicit YACReaderMainToolBar(QWidget *parent = 0); + explicit YACReaderMainToolBar(QWidget *parent = nullptr); QSize sizeHint() const; QToolButton *backButton; diff --git a/YACReaderLibrary/yacreader_navigation_controller.cpp b/YACReaderLibrary/yacreader_navigation_controller.cpp index d3438a1b..c258d951 100644 --- a/YACReaderLibrary/yacreader_navigation_controller.cpp +++ b/YACReaderLibrary/yacreader_navigation_controller.cpp @@ -280,7 +280,7 @@ qulonglong YACReaderNavigationController::folderModelIndexToID(const QModelIndex return 1; auto folderItem = static_cast(mi.internalPointer()); - if (folderItem != 0) + if (folderItem != nullptr) return folderItem->id; return 1; diff --git a/YACReaderLibrary/yacreader_reading_lists_view.h b/YACReaderLibrary/yacreader_reading_lists_view.h index 980f85ca..728fedf5 100644 --- a/YACReaderLibrary/yacreader_reading_lists_view.h +++ b/YACReaderLibrary/yacreader_reading_lists_view.h @@ -9,7 +9,7 @@ class YACReaderReadingListsView : public YACReaderTreeView { Q_OBJECT public: - explicit YACReaderReadingListsView(QWidget *parent = 0); + explicit YACReaderReadingListsView(QWidget *parent = nullptr); protected: //Drop to import & internal Drag&Drop for resorting @@ -22,7 +22,7 @@ class YACReaderReadingListsViewItemDeletegate : public QStyledItemDelegate { Q_OBJECT public: - explicit YACReaderReadingListsViewItemDeletegate(QObject *parent = 0); + explicit YACReaderReadingListsViewItemDeletegate(QObject *parent = nullptr); void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; };