cppcoreguidelines-init-variables,
modernize-avoid-bind,
modernize-concat-nested-namespaces,
+ modernize-deprecated-headers,
modernize-deprecated-ios-base-aliases,
modernize-make-*,
modernize-raw-string-literal,
#include "qtlockedfile.h"
-#include <string.h>
-#include <errno.h>
+#include <cstring>
+#include <cerrno>
#include <unistd.h>
#include <fcntl.h>
#endif
#if defined(Q_OS_UNIX)
-#include <time.h>
+#include <ctime>
#include <unistd.h>
#endif
#ifndef _C_JHASH_H
#define _C_JHASH_H
-#include <stdint.h>
+#include <cstdint>
#define c_hashsize(n) ((uint8_t) 1 << (n))
#define c_hashmask(n) (xhashsize(n) - 1)
#include <unistd.h>
#endif
-#include <math.h>
-#include <stdarg.h>
+#include <cmath>
+#include <cstdarg>
#include <cstring>
#if defined(Q_OS_WIN)
#define _GNU_SOURCE
#endif
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <ctime>
#include <sys/types.h>
-#include <stdbool.h>
+
#include "c_lib.h"
#include "csync_private.h"
#include "ocsynclib.h"
#include <sys/stat.h>
-#include <stdbool.h>
-#include <stdint.h>
+
+#include <cstdint>
#include <sys/types.h>
#include <config_csync.h>
#include <functional>
#ifndef _CSYNC_MACROS_H
#define _CSYNC_MACROS_H
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
/* How many elements there are in a static array */
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
#define _GNU_SOURCE
#endif
-#include <limits.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
+#include <climits>
+#include <cstring>
+#include <cstdlib>
+#include <cstdio>
#include <sys/types.h>
-#include <errno.h>
+#include <cerrno>
#if _WIN32
# ifndef _WIN32_IE
#include <unordered_map>
#include <QHash>
-#include <stdint.h>
-#include <stdbool.h>
+#include <cstdint>
+
#include <map>
#include <set>
#include <functional>
#include "config_csync.h"
-#include <assert.h>
+#include <cassert>
#include "csync_private.h"
#include "csync_reconcile.h"
#include "csync_util.h"
// Needed for PRIu64 on MinGW in C++ mode.
#define __STDC_FORMAT_MACROS
-#include "inttypes.h"
+#include <cinttypes>
/* Check if a file is ignored because one parent is ignored.
* return the node of the ignored directoy if it's the case, or \c nullptr if it is not ignored */
#define _GNU_SOURCE
#endif
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <math.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <ctime>
+#include <cmath>
#include "c_lib.h"
// Needed for PRIu64 on MinGW in C++ mode.
#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
+#include <cinttypes>
Q_LOGGING_CATEGORY(lcUpdate, "nextcloud.sync.csync.updater", QtInfoMsg)
#define _GNU_SOURCE
#endif
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <time.h>
+#include <cerrno>
+#include <climits>
+#include <cstdio>
+#include <ctime>
#include "common/c_jhash.h"
#include "csync_util.h"
#ifndef _CSYNC_UTIL_H
#define _CSYNC_UTIL_H
-#include <stdint.h>
+#include <cstdint>
#include "csync_private.h"
extern "C" {
#endif
-#include <stdlib.h>
+#include <stdlib.h> // NOLINT this is sometimes compiled in C mode
#include "c_macro.h"
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdlib.h>
-#include <string.h>
+#include <stdlib.h> // NOLINT this is sometimes compiled in C mode
+#include <string.h> // NOLINT this is sometimes compiled in C mode
#include "c_macro.h"
#include "c_alloc.h"
#ifndef _C_MACRO_H
#define _C_MACRO_H
-#include <stdint.h>
-#include <string.h>
+#include <stdint.h> // NOLINT this is sometimes compiled in C mode
+#include <string.h> // NOLINT this is sometimes compiled in C mode
#define INT_TO_POINTER(i) (void *) i
#define POINTER_TO_INT(p) *((int *) (p))
#include <unistd.h>
#endif
-#include <errno.h>
+#include <errno.h> // NOLINT this is sometimes compiled in C mode
#ifdef __MINGW32__
#define EDQUOT 0
#include "c_private.h"
#include "c_macro.h"
-#include <stdlib.h>
+#include <stdlib.h> // NOLINT this is sometimes compiled in C mode
/**
* @brief Compare to strings case insensitively.
#define _GNU_SOURCE
#endif
-#include <errno.h>
-#include <stdio.h>
+#include <cerrno>
+#include <cstdio>
#include "common/asserts.h"
#include "csync_private.h"
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <errno.h>
+#include <cerrno>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
-#include <stdio.h>
+#include <cstdio>
#include <memory>
#include "syncresult.h"
#include "ignorelisttablewidget.h"
-#include <math.h>
+#include <cmath>
#include <QDesktopServices>
#include <QDialogButtonBox>
// event masks
#include "folderwatcher.h"
-#include <stdint.h>
+#include <cstdint>
#include <QFileInfo>
#include <QFlags>
#include <QVBoxLayout>
#include <QEvent>
-#include <stdlib.h>
+#include <cstdlib>
namespace OCC {
#include "logbrowser.h"
-#include "stdio.h"
+#include <cstdio>
#include <iostream>
#include <QDialogButtonBox>
*/
#include <QtGlobal>
-#include <signal.h>
+#include <csignal>
#ifdef Q_OS_UNIX
#include <sys/time.h>
#include <QPainter>
#include <QListWidget>
-#include <string.h>
+#include <cstring>
namespace OCC {
#include <QtGui>
#include <QtWidgets>
-#include <stdio.h>
+#include <cstdio>
namespace OCC {
#include <QtCore>
#include <QtGui>
-#include <stdlib.h>
+#include <cstdlib>
namespace OCC {
#include <qstack.h>
#include <QCoreApplication>
-#include <time.h>
+#include <ctime>
namespace OCC {
#endif
#include <climits>
-#include <assert.h>
+#include <cassert>
#include <QCoreApplication>
#include <QSslSocket>
#ifndef CSYNCTHREAD_H
#define CSYNCTHREAD_H
-#include <stdint.h>
+#include <cstdint>
#include <QMutex>
#include <QThread>