Cleanup compile warnings
This commit is contained in:
parent
706532ecb0
commit
6645169786
@ -88,6 +88,7 @@ DeviceControlApplication::DeviceControlApplication(int argc, char *argv[]) : QAp
|
||||
|
||||
void DeviceControlApplication::handleNdefMessage(QNdefMessage message, QNearFieldTarget *target)
|
||||
{
|
||||
Q_UNUSED(target)
|
||||
qDebug() << "************* NFC message!" << message.toByteArray();
|
||||
if (message.count() < 1) {
|
||||
qWarning() << "NFC message doesn't contain any records...";
|
||||
|
||||
16
config.pri
16
config.pri
@ -1,10 +1,5 @@
|
||||
CONFIG += c++11
|
||||
|
||||
# We want -Wall to keep the code clean and tidy, however:
|
||||
# On Windows, -Wall goes mental, so not using it there
|
||||
# As of Qt 5.15, lots of things are deprecated inside Qt in preparation for Qt6 but no replacement to actually fix those yet.
|
||||
!win32:QMAKE_CXXFLAGS += -Wall -Wno-deprecated-declarations -Wno-deprecated-copy
|
||||
|
||||
top_srcdir=$$PWD
|
||||
top_builddir=$$shadowed($$PWD)
|
||||
|
||||
@ -14,7 +9,18 @@ APP_REVISION=$$member(VERSION_INFO, 1)
|
||||
|
||||
DEFINES+=APP_VERSION=\\\"$${APP_VERSION}\\\"
|
||||
|
||||
# We want -Wall to keep the code clean and tidy, however:
|
||||
# On Windows, -Wall goes mental, so not using it there
|
||||
!win32:QMAKE_CXXFLAGS += -Wall
|
||||
|
||||
# As of Qt 5.15, lots of things are deprecated inside Qt in preparation for Qt6 but no replacement to actually fix those yet.
|
||||
linux:!android {
|
||||
QMAKE_CXXFLAGS += -Wno-deprecated-declarations -Wno-deprecated-copy
|
||||
}
|
||||
|
||||
android: {
|
||||
QMAKE_CXXFLAGS += -Wno-deprecated-declarations
|
||||
|
||||
QMAKE_POST_LINK += cp $$top_srcdir/version.txt $$top_builddir/
|
||||
|
||||
!equals(OVERLAY_PATH, ""):!equals(BRANDING, "") {
|
||||
|
||||
@ -49,6 +49,9 @@
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include "logging.h"
|
||||
NYMEA_LOGGING_CATEGORY(dcJsonRpc, "JsonRpc")
|
||||
|
||||
JsonRpcClient::JsonRpcClient(QObject *parent) :
|
||||
JsonHandler(parent),
|
||||
m_id(0)
|
||||
@ -170,9 +173,9 @@ void JsonRpcClient::getCloudConnectionStatus()
|
||||
sendRequest(reply->requestMap());
|
||||
}
|
||||
|
||||
void JsonRpcClient::setNotificationsEnabledResponse(int /*commandId*/, const QVariantMap ¶ms)
|
||||
void JsonRpcClient::setNotificationsEnabledResponse(int commandId, const QVariantMap ¶ms)
|
||||
{
|
||||
// qDebug() << "Notifications enabled:" << params;
|
||||
qCDebug(dcJsonRpc()) << "Notification configuration response:" << commandId << qUtf8Printable(QJsonDocument::fromVariant(params).toJson());
|
||||
|
||||
if (!m_connected) {
|
||||
m_connected = true;
|
||||
|
||||
@ -44,6 +44,7 @@ class Engine;
|
||||
class LogsModelNg : public QAbstractListModel, public QQmlParserStatus
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QQmlParserStatus)
|
||||
Q_PROPERTY(Engine* engine READ engine WRITE setEngine NOTIFY engineChanged)
|
||||
Q_PROPERTY(bool busy READ busy NOTIFY busyChanged)
|
||||
Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged)
|
||||
|
||||
@ -62,13 +62,13 @@ void SortFilterProxyModel::setSortOrder(Qt::SortOrder sortOrder)
|
||||
emit sortOrderChanged();
|
||||
}
|
||||
|
||||
QVariant SortFilterProxyModel::data(int row, const QString &role) const
|
||||
QVariant SortFilterProxyModel::modelData(int row, const QString &role) const
|
||||
{
|
||||
int roleId = roleNames().key(role.toUtf8());
|
||||
return QSortFilterProxyModel::data(index(row, 0), roleId);
|
||||
}
|
||||
|
||||
int SortFilterProxyModel::mapToSource(int index) const
|
||||
int SortFilterProxyModel::mapToSourceIndex(int index) const
|
||||
{
|
||||
return QSortFilterProxyModel::mapToSource(this->index(index, 0)).row();
|
||||
}
|
||||
|
||||
@ -26,8 +26,8 @@ public:
|
||||
|
||||
void setSortOrder(Qt::SortOrder sortOrder);
|
||||
|
||||
Q_INVOKABLE QVariant data(int row, const QString &role) const;
|
||||
Q_INVOKABLE int mapToSource(int index) const;
|
||||
Q_INVOKABLE QVariant modelData(int row, const QString &role) const;
|
||||
Q_INVOKABLE int mapToSourceIndex(int index) const;
|
||||
|
||||
signals:
|
||||
void filterRoleNameChanged();
|
||||
|
||||
@ -14,16 +14,6 @@ ScriptAutoSaver::~ScriptAutoSaver()
|
||||
storeContent();
|
||||
}
|
||||
|
||||
void ScriptAutoSaver::classBegin()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ScriptAutoSaver::componentComplete()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool ScriptAutoSaver::available() const
|
||||
{
|
||||
return m_cacheFile.isOpen();
|
||||
|
||||
@ -3,10 +3,9 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QUuid>
|
||||
#include <QQmlParserStatus>
|
||||
#include <QFile>
|
||||
|
||||
class ScriptAutoSaver : public QObject, public QQmlParserStatus
|
||||
class ScriptAutoSaver : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QUuid scriptId READ scriptId WRITE setScriptId NOTIFY scriptIdChanged)
|
||||
@ -17,10 +16,7 @@ class ScriptAutoSaver : public QObject, public QQmlParserStatus
|
||||
|
||||
public:
|
||||
explicit ScriptAutoSaver(QObject *parent = nullptr);
|
||||
~ScriptAutoSaver();
|
||||
|
||||
void classBegin() override;
|
||||
void componentComplete() override;
|
||||
~ScriptAutoSaver() override;
|
||||
|
||||
bool available() const;
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
void addIOConnection(IOConnection *ioConnection);
|
||||
void removeIOConnection(const QUuid &ioConnectionId);
|
||||
|
||||
@ -68,7 +68,7 @@ Page {
|
||||
color: Style.headerForegroundColor
|
||||
text: d.configOverlay !== null ?
|
||||
qsTr("Configure main view")
|
||||
: swipeView.currentItem.item.title.length > 0 ? swipeView.currentItem.item.title : filteredContentModel.data(swipeView.currentIndex, "displayName")
|
||||
: swipeView.currentItem.item.title.length > 0 ? swipeView.currentItem.item.title : filteredContentModel.modelData(swipeView.currentIndex, "displayName")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user