mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-01-22 20:04:32 +08:00
update
This commit is contained in:
parent
96fef84c2d
commit
3f6ef13cd0
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "misc-misplaced-const"
|
||||
|
||||
#include <Windows.h>
|
||||
#include <DbgHelp.h>
|
||||
@ -79,5 +77,3 @@ LONG WINAPI MyUnhandledExceptionFilter(EXCEPTION_POINTERS *exp) {
|
||||
QProcess::startDetached(QGuiApplication::applicationFilePath(), arguments);
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "NotImplementedFunctions"
|
||||
|
||||
#include <QQuickItem>
|
||||
#include <QQuickPaintedItem>
|
||||
@ -31,5 +29,3 @@ private:
|
||||
QPoint _center;
|
||||
QSharedPointer<QQuickItemGrabResult> _grabResult;
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "NotImplementedFunctions"
|
||||
|
||||
#include <QObject>
|
||||
#include <QFileSystemWatcher>
|
||||
@ -21,5 +19,3 @@ private:
|
||||
private:
|
||||
QFileSystemWatcher _watcher;
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "NotImplementedFunctions"
|
||||
|
||||
#include <QtQuick/QQuickItem>
|
||||
#include <QOpenGLFunctions>
|
||||
@ -14,11 +12,11 @@ Q_OBJECT
|
||||
public:
|
||||
explicit OpenGLItem(QQuickItem *parent = nullptr);
|
||||
|
||||
[[nodiscard]] QQuickFramebufferObject::Renderer *createRenderer() const override;
|
||||
QQuickFramebufferObject::Renderer *createRenderer() const override;
|
||||
|
||||
void timerEvent(QTimerEvent *) override;
|
||||
|
||||
[[nodiscard]] qreal t() const { return m_t; }
|
||||
qreal t() const { return m_t; }
|
||||
|
||||
void setT(qreal t);
|
||||
|
||||
@ -29,5 +27,3 @@ signals:
|
||||
private:
|
||||
qreal m_t{};
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,5 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "NotImplementedFunctions"
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
@ -30,5 +28,3 @@ SINGLETON(InitializrHelper)
|
||||
|
||||
Q_SIGNAL void success(const QString &path);
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,7 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "UnusedParameter"
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
|
||||
#include "Network.h"
|
||||
|
||||
#include <QUrlQuery>
|
||||
@ -666,5 +662,3 @@ NetworkParams *Network::deleteJsonArray(const QString &url) {
|
||||
void Network::setInterceptor(QJSValue interceptor) {
|
||||
this->_interceptor = std::move(interceptor);
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "NotImplementedFunctions"
|
||||
|
||||
#include <QObject>
|
||||
#include <QtQml/qqml.h>
|
||||
@ -231,5 +229,3 @@ private:
|
||||
public:
|
||||
QJSValue _interceptor;
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,6 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
|
||||
#include "SettingsHelper.h"
|
||||
|
||||
#include <QDataStream>
|
||||
@ -31,5 +28,3 @@ void SettingsHelper::init(char *argv[]) {
|
||||
const QString iniFilePath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + iniFileName;
|
||||
m_settings.reset(new QSettings(iniFilePath, QSettings::IniFormat));
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,5 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
@ -43,4 +41,3 @@ private:
|
||||
private:
|
||||
QScopedPointer<QSettings> m_settings;
|
||||
};
|
||||
#pragma clang diagnostic pop
|
@ -1,7 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
#pragma ide diagnostic ignored "readability-convert-member-functions-to-static"
|
||||
|
||||
#include "FluTools.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
@ -248,5 +244,3 @@ bool FluTools::isWindows10OrGreater() {
|
||||
QRect FluTools::desktopAvailableGeometry(QQuickWindow *window) {
|
||||
return window->screen()->availableGeometry();
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,5 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
@ -95,5 +93,3 @@ SINGLETON(FluTools)
|
||||
|
||||
Q_INVOKABLE QRect desktopAvailableGeometry(QQuickWindow *window);
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,7 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
#pragma ide diagnostic ignored "google-default-arguments"
|
||||
|
||||
#include "FluTreeModel.h"
|
||||
|
||||
#include <QMetaEnum>
|
||||
@ -276,5 +272,3 @@ void FluTreeModel::allCollapse() {
|
||||
_rows = _root->_children;
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
@ -1,6 +1,3 @@
|
||||
#pragma clang diagnostic push
|
||||
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
|
||||
#pragma ide diagnostic ignored "google-default-arguments"
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
@ -22,10 +19,10 @@ Q_OBJECT
|
||||
public:
|
||||
explicit FluTreeNode(QObject *parent = nullptr);
|
||||
|
||||
Q_INVOKABLE [[nodiscard]] int depth() const { return _depth; };
|
||||
Q_INVOKABLE [[nodiscard]] bool isExpanded() const { return _isExpanded; };
|
||||
Q_INVOKABLE [[nodiscard]] QVariantMap data() const { return _data; };
|
||||
Q_INVOKABLE [[nodiscard]] bool hasChildren() const { return !_children.isEmpty(); };
|
||||
Q_INVOKABLE int depth() const { return _depth; };
|
||||
Q_INVOKABLE bool isExpanded() const { return _isExpanded; };
|
||||
Q_INVOKABLE QVariantMap data() const { return _data; };
|
||||
Q_INVOKABLE bool hasChildren() const { return !_children.isEmpty(); };
|
||||
Q_INVOKABLE bool hasNextNodeByIndex(int index) {
|
||||
FluTreeNode *p = this;
|
||||
for (int i = 0; i <= _depth - index - 1; i++) {
|
||||
@ -37,7 +34,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
Q_INVOKABLE [[nodiscard]] bool checked() const {
|
||||
Q_INVOKABLE bool checked() const {
|
||||
if (!hasChildren()) {
|
||||
return _checked;
|
||||
}
|
||||
@ -63,7 +60,7 @@ public:
|
||||
return false;
|
||||
};
|
||||
|
||||
[[nodiscard]] bool isShown() const {
|
||||
bool isShown() const {
|
||||
auto p = _parent;
|
||||
while (p) {
|
||||
if (!p->_isExpanded) {
|
||||
@ -99,17 +96,17 @@ public:
|
||||
|
||||
explicit FluTreeModel(QObject *parent = nullptr);
|
||||
|
||||
[[nodiscard]] int rowCount(const QModelIndex &parent = {}) const override;
|
||||
int rowCount(const QModelIndex &parent = {}) const override;
|
||||
|
||||
[[nodiscard]] int columnCount(const QModelIndex &parent = {}) const override;
|
||||
int columnCount(const QModelIndex &parent = {}) const override;
|
||||
|
||||
[[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
[[nodiscard]] QHash<int, QByteArray> roleNames() const override;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
[[nodiscard]] QModelIndex parent(const QModelIndex &child) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
|
||||
[[nodiscard]] QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override;
|
||||
|
||||
Q_INVOKABLE void removeRows(int row, int count);
|
||||
|
||||
@ -144,5 +141,3 @@ private:
|
||||
QList<FluTreeNode *> _dataSource;
|
||||
FluTreeNode *_root = nullptr;
|
||||
};
|
||||
|
||||
#pragma clang diagnostic pop
|
Loading…
Reference in New Issue
Block a user