Adapt to changes in c++utilities

This commit is contained in:
Martchus 2019-06-12 21:00:49 +02:00
parent 7dbe419d0a
commit dc7d9b815f
16 changed files with 36 additions and 36 deletions

View File

@ -294,8 +294,8 @@ void Application::handleResponse()
void Application::handleError(
const QString &message, SyncthingErrorCategory category, int networkError, const QNetworkRequest &request, const QByteArray &response)
{
VAR_UNUSED(category)
VAR_UNUSED(networkError)
CPP_UTILITIES_UNUSED(category)
CPP_UTILITIES_UNUSED(networkError)
// skip error handling for shell completion
if (!m_argsRead) {

View File

@ -10,8 +10,8 @@
#define LIB_SYNCTHING_CONNECTOR_EXPORT
#define LIB_SYNCTHING_CONNECTOR_IMPORT
#else
#define LIB_SYNCTHING_CONNECTOR_EXPORT LIB_EXPORT
#define LIB_SYNCTHING_CONNECTOR_IMPORT LIB_IMPORT
#define LIB_SYNCTHING_CONNECTOR_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define LIB_SYNCTHING_CONNECTOR_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -765,7 +765,7 @@ void SyncthingConnection::setStatus(SyncthingStatus status)
case SyncthingStatus::Disconnected:
// disable (long) polling
m_keepPolling = false;
FALLTHROUGH;
[[fallthrough]];
case SyncthingStatus::Reconnecting:
m_devStatsPollTimer.stop();
m_trafficPollTimer.stop();

View File

@ -1669,7 +1669,7 @@ void SyncthingConnection::readStatusChangedEvent(DateTime eventTime, const QJson
*/
void SyncthingConnection::readDownloadProgressEvent(DateTime eventTime, const QJsonObject &eventData)
{
VAR_UNUSED(eventTime)
CPP_UTILITIES_UNUSED(eventTime)
for (SyncthingDir &dirInfo : m_dirs) {
// disappearing implies that the download has been finished so just wipe old entries
dirInfo.downloadingItems.clear();
@ -1832,8 +1832,8 @@ void SyncthingConnection::readDeviceEvent(DateTime eventTime, const QString &eve
*/
void SyncthingConnection::readItemStarted(DateTime eventTime, const QJsonObject &eventData)
{
VAR_UNUSED(eventTime)
VAR_UNUSED(eventData)
CPP_UTILITIES_UNUSED(eventTime)
CPP_UTILITIES_UNUSED(eventData)
}
/*!

View File

@ -61,7 +61,7 @@ void SyncthingNotifier::handleStatusChangedEvent(SyncthingStatus newStatus)
void SyncthingNotifier::handleNewDevEvent(DateTime when, const QString &devId, const QString &address)
{
VAR_UNUSED(when)
CPP_UTILITIES_UNUSED(when)
// ignore if not enabled
if (!(m_enabledNotifications & SyncthingHighLevelNotification::NewDevice)) {
@ -73,7 +73,7 @@ void SyncthingNotifier::handleNewDevEvent(DateTime when, const QString &devId, c
void SyncthingNotifier::handleNewDirEvent(DateTime when, const QString &devId, const SyncthingDev *dev, const QString &dirId, const QString &dirLabel)
{
VAR_UNUSED(when)
CPP_UTILITIES_UNUSED(when)
// ignore if not enabled
if (!(m_enabledNotifications & SyncthingHighLevelNotification::NewDir)) {
@ -173,8 +173,8 @@ void SyncthingNotifier::emitConnectedAndDisconnected(SyncthingStatus newStatus)
*/
void SyncthingNotifier::emitSyncComplete(CppUtilities::DateTime when, const SyncthingDir &dir, int index, const SyncthingDev *remoteDev)
{
VAR_UNUSED(when)
VAR_UNUSED(index)
CPP_UTILITIES_UNUSED(when)
CPP_UTILITIES_UNUSED(index)
// discard event for paused directories/devices
if (dir.paused || (remoteDev && remoteDev->paused)) {

View File

@ -10,8 +10,8 @@
#define SYNCTHINGFILEITEMACTION_EXPORT
#define SYNCTHINGFILEITEMACTION_IMPORT
#else
#define SYNCTHINGFILEITEMACTION_EXPORT LIB_EXPORT
#define SYNCTHINGFILEITEMACTION_IMPORT LIB_IMPORT
#define SYNCTHINGFILEITEMACTION_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define SYNCTHINGFILEITEMACTION_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -5,14 +5,14 @@
#include "../connector/syncthingconnection.h"
#ifdef DEBUG_BUILD
#ifdef CPP_UTILITIES_DEBUG_BUILD
#include <c++utilities/io/ansiescapecodes.h>
#endif
#include <QAction>
#include <QMenu>
#ifdef DEBUG_BUILD
#ifdef CPP_UTILITIES_DEBUG_BUILD
#include <iostream>
#endif
@ -24,7 +24,7 @@ SyncthingMenuAction::SyncthingMenuAction(const KFileItemListProperties &properti
, m_properties(properties)
, m_notifier(SyncthingFileItemAction::staticData().connection())
{
#ifdef DEBUG_BUILD
#ifdef CPP_UTILITIES_DEBUG_BUILD
std::cerr << EscapeCodes::Phrases::Info << "Creating SyncthingMenuAction: " << this << EscapeCodes::Phrases::EndFlush;
#endif
@ -38,7 +38,7 @@ SyncthingMenuAction::SyncthingMenuAction(const KFileItemListProperties &properti
connect(&m_notifier, &SyncthingNotifier::disconnected, this, &SyncthingMenuAction::handleConnectedChanged);
}
#ifdef DEBUG_BUILD
#ifdef CPP_UTILITIES_DEBUG_BUILD
SyncthingMenuAction::~SyncthingMenuAction()
{
std::cerr << EscapeCodes::Phrases::Info << "Destroying SyncthingMenuAction: " << this << EscapeCodes::Phrases::EndFlush;

View File

@ -20,7 +20,7 @@ class SyncthingMenuAction : public QAction {
public:
explicit SyncthingMenuAction(const KFileItemListProperties &properties = KFileItemListProperties(),
const QList<QAction *> &actions = QList<QAction *>(), QObject *parent = nullptr);
#ifdef DEBUG_BUILD
#ifdef CPP_UTILITIES_DEBUG_BUILD
~SyncthingMenuAction() override;
#endif

View File

@ -10,8 +10,8 @@
#define LIB_SYNCTHING_EXPORT
#define LIB_SYNCTHING_IMPORT
#else
#define LIB_SYNCTHING_EXPORT LIB_EXPORT
#define LIB_SYNCTHING_IMPORT LIB_IMPORT
#define LIB_SYNCTHING_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define LIB_SYNCTHING_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -10,8 +10,8 @@
#define LIB_SYNCTHING_MODEL_EXPORT
#define LIB_SYNCTHING_MODEL_IMPORT
#else
#define LIB_SYNCTHING_MODEL_EXPORT LIB_EXPORT
#define LIB_SYNCTHING_MODEL_IMPORT LIB_IMPORT
#define LIB_SYNCTHING_MODEL_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define LIB_SYNCTHING_MODEL_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -131,7 +131,7 @@ QVariant SyncthingDeviceModel::data(const QModelIndex &index, int role) const
}
break;
}
FALLTHROUGH;
[[fallthrough]];
case DeviceDetail:
if (index.column() == 1 || role == DeviceDetail) {
// attribute values

View File

@ -143,7 +143,7 @@ QVariant SyncthingDirectoryModel::data(const QModelIndex &index, int role) const
}
break;
}
FALLTHROUGH;
[[fallthrough]];
case DirectoryDetail:
if (index.column() == 1 || role == DirectoryDetail) {
// attribute values

View File

@ -10,8 +10,8 @@
#define SYNCTHINGPLASMOID_EXPORT
#define SYNCTHINGPLASMOID_IMPORT
#else
#define SYNCTHINGPLASMOID_EXPORT LIB_EXPORT
#define SYNCTHINGPLASMOID_IMPORT LIB_IMPORT
#define SYNCTHINGPLASMOID_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define SYNCTHINGPLASMOID_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -10,8 +10,8 @@
#define SYNCTHINGTESTHELPER_EXPORT
#define SYNCTHINGTESTHELPER_IMPORT
#else
#define SYNCTHINGTESTHELPER_EXPORT LIB_EXPORT
#define SYNCTHINGTESTHELPER_IMPORT LIB_IMPORT
#define SYNCTHINGTESTHELPER_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define SYNCTHINGTESTHELPER_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -10,8 +10,8 @@
#define SYNCTHINGWIDGETS_EXPORT
#define SYNCTHINGWIDGETS_IMPORT
#else
#define SYNCTHINGWIDGETS_EXPORT LIB_EXPORT
#define SYNCTHINGWIDGETS_IMPORT LIB_IMPORT
#define SYNCTHINGWIDGETS_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
#define SYNCTHINGWIDGETS_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
#endif
/*!

View File

@ -130,9 +130,9 @@ void SyncthingLauncher::handleLoggingCallback(LibSyncthing::LogLevel level, cons
emit outputAvailable(move(messageData));
#else
VAR_UNUSED(level)
VAR_UNUSED(message)
VAR_UNUSED(messageSize)
CPP_UTILITIES_UNUSED(level)
CPP_UTILITIES_UNUSED(message)
CPP_UTILITIES_UNUSED(messageSize)
#endif
}
@ -143,7 +143,7 @@ void SyncthingLauncher::runLibSyncthing(const LibSyncthing::RuntimeOptions &runt
const auto exitCode = LibSyncthing::runSyncthing(runtimeOptions);
emit exited(static_cast<int>(exitCode), exitCode == 0 ? QProcess::NormalExit : QProcess::CrashExit);
#else
VAR_UNUSED(runtimeOptions)
CPP_UTILITIES_UNUSED(runtimeOptions)
emit outputAvailable("libsyncthing support not enabled");
emit exited(-1, QProcess::CrashExit);
#endif
@ -156,7 +156,7 @@ void SyncthingLauncher::runLibSyncthing(const std::vector<string> &arguments)
const auto exitCode = LibSyncthing::runSyncthing(arguments);
emit exited(static_cast<int>(exitCode), exitCode == 0 ? QProcess::NormalExit : QProcess::CrashExit);
#else
VAR_UNUSED(arguments)
CPP_UTILITIES_UNUSED(arguments)
emit outputAvailable("libsyncthing support not enabled");
emit exited(-1, QProcess::CrashExit);
#endif