mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
Other: C++ code cleanup
This commit is contained in:
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_APP_CONTROLLER_H
|
#ifndef BRIDGE_GUI_APP_CONTROLLER_H
|
||||||
#define BRIDGE_QT6_APP_CONTROLLER_H
|
#define BRIDGE_GUI_APP_CONTROLLER_H
|
||||||
|
|
||||||
|
|
||||||
class QMLBackend;
|
class QMLBackend;
|
||||||
@ -60,4 +60,4 @@ private: // data members
|
|||||||
AppController& app(); ///< Return a reference to the app controller.
|
AppController& app(); ///< Return a reference to the app controller.
|
||||||
|
|
||||||
|
|
||||||
#endif // BRIDGE_QT6_APP_CONTROLLER_H
|
#endif // BRIDGE_GUI_APP_CONTROLLER_H
|
||||||
|
|||||||
@ -16,12 +16,12 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_DOCK_ICON_H
|
#ifndef BRIDGE_GUI_DOCK_ICON_H
|
||||||
#define BRIDGE_QT6_DOCK_ICON_H
|
#define BRIDGE_GUI_DOCK_ICON_H
|
||||||
|
|
||||||
|
|
||||||
void setDockIconVisibleState(bool visible); ///< Set the DOCK icon visibility state
|
void setDockIconVisibleState(bool visible); ///< Set the DOCK icon visibility state
|
||||||
bool getDockIconVisibleState(); ///< Get the Dock icon visibility state
|
bool getDockIconVisibleState(); ///< Get the Dock icon visibility state
|
||||||
|
|
||||||
|
|
||||||
#endif // #ifndef BRIDGE_QT6_DOCK_ICON_H
|
#endif // #ifndef BRIDGE_GUI_DOCK_ICON_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_EVENT_STREAM_WORKER_H
|
#ifndef BRIDGE_GUI_EVENT_STREAM_WORKER_H
|
||||||
#define BRIDGE_QT6_EVENT_STREAM_WORKER_H
|
#define BRIDGE_GUI_EVENT_STREAM_WORKER_H
|
||||||
|
|
||||||
|
|
||||||
#include "GRPC/bridge.grpc.pb.h"
|
#include "GRPC/bridge.grpc.pb.h"
|
||||||
@ -49,4 +49,4 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //BRIDGE_QT6_EVENT_STREAM_WORKER_H
|
#endif //BRIDGE_GUI_EVENT_STREAM_WORKER_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_EXCEPTION_H
|
#ifndef BRIDGE_GUI_EXCEPTION_H
|
||||||
#define BRIDGE_QT6_EXCEPTION_H
|
#define BRIDGE_GUI_EXCEPTION_H
|
||||||
|
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -43,4 +43,4 @@ private: // data members
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //BRIDGE_QT6_EXCEPTION_H
|
#endif //BRIDGE_GUI_EXCEPTION_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_RPC_CLIENT_H
|
#ifndef BRIDGE_GUI_RPC_CLIENT_H
|
||||||
#define BRIDGE_QT6_RPC_CLIENT_H
|
#define BRIDGE_GUI_RPC_CLIENT_H
|
||||||
|
|
||||||
|
|
||||||
#include "GRPC/bridge.grpc.pb.h"
|
#include "GRPC/bridge.grpc.pb.h"
|
||||||
@ -218,4 +218,4 @@ private: // data members.
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // BRIDGE_QT6_RPC_CLIENT_H
|
#endif // BRIDGE_GUI_RPC_CLIENT_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_GRPCUTILS_H
|
#ifndef BRIDGE_GUI_GRPCUTILS_H
|
||||||
#define BRIDGE_QT6_GRPCUTILS_H
|
#define BRIDGE_GUI_GRPCUTILS_H
|
||||||
|
|
||||||
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
@ -31,4 +31,4 @@ SPUser parsegrpcUser(grpc::User const& grpcUser); ///< Parse a gRPC user struct
|
|||||||
grpc::LogLevel logLevelToGRPC(Log::Level level); ///< Convert a Log::Level to gRPC enum value.
|
grpc::LogLevel logLevelToGRPC(Log::Level level); ///< Convert a Log::Level to gRPC enum value.
|
||||||
|
|
||||||
|
|
||||||
#endif // BRIDGE_QT6_GRPCUTILS_H
|
#endif // BRIDGE_GUI_GRPCUTILS_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_LOG_H
|
#ifndef BRIDGE_GUI_LOG_H
|
||||||
#define BRIDGE_QT6_LOG_H
|
#define BRIDGE_GUI_LOG_H
|
||||||
|
|
||||||
|
|
||||||
//****************************************************************************************************************************************************
|
//****************************************************************************************************************************************************
|
||||||
@ -79,4 +79,4 @@ private: // data members
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //BRIDGE_QT6_LOG_H
|
#endif //BRIDGE_GUI_LOG_H
|
||||||
|
|||||||
@ -16,8 +16,15 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef BRIDGE_GUI_PCH_H
|
||||||
|
#define BRIDGE_GUI_PCH_H
|
||||||
|
|
||||||
|
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QtQuick>
|
#include <QtQuick>
|
||||||
#include <QtQml>
|
#include <QtQml>
|
||||||
#include <QtQuickControls2>
|
#include <QtQuickControls2>
|
||||||
#include <AppController.h>
|
#include <AppController.h>
|
||||||
|
|
||||||
|
|
||||||
|
#endif // BRIDGE_GUI_PCH_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_QMLBACKEND_H
|
#ifndef BRIDGE_GUI_QMLBACKEND_H
|
||||||
#define BRIDGE_QT6_QMLBACKEND_H
|
#define BRIDGE_GUI_QMLBACKEND_H
|
||||||
|
|
||||||
|
|
||||||
#include <grpcpp/support/status.h>
|
#include <grpcpp/support/status.h>
|
||||||
@ -221,4 +221,4 @@ private: // data members
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // BRIDGE_QT6_QMLBACKEND_H
|
#endif // BRIDGE_GUI_QMLBACKEND_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_USER_H
|
#ifndef BRIDGE_GUI_USER_H
|
||||||
#define BRIDGE_QT6_USER_H
|
#define BRIDGE_GUI_USER_H
|
||||||
|
|
||||||
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
@ -90,4 +90,4 @@ private:
|
|||||||
typedef std::shared_ptr<User> SPUser;
|
typedef std::shared_ptr<User> SPUser;
|
||||||
|
|
||||||
|
|
||||||
#endif // BRIDGE_QT6_USER_H
|
#endif // BRIDGE_GUI_USER_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_USER_LIST_H
|
#ifndef BRIDGE_GUI_USER_LIST_H
|
||||||
#define BRIDGE_QT6_USER_LIST_H
|
#define BRIDGE_GUI_USER_LIST_H
|
||||||
|
|
||||||
#include "User.h"
|
#include "User.h"
|
||||||
|
|
||||||
@ -61,4 +61,4 @@ private: // data members
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // BRIDGE_QT6_USER_LIST_H
|
#endif // BRIDGE_GUI_USER_LIST_H
|
||||||
|
|||||||
@ -1,6 +1,24 @@
|
|||||||
#ifndef VERSION_H
|
// Copyright (c) 2022 Proton AG
|
||||||
#define VERSION_H
|
//
|
||||||
|
// This file is part of Proton Mail Bridge.
|
||||||
|
//
|
||||||
|
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef BRIDGE_GUI_VERSION_H
|
||||||
|
#define BRIDGE_GUI_VERSION_H
|
||||||
|
|
||||||
#define PROJECT_VER "@BRIDGE_APP_VERSION@"
|
#define PROJECT_VER "@BRIDGE_APP_VERSION@"
|
||||||
|
|
||||||
#endif // VERSION_H
|
#endif // BRIDGE_GUI_VERSION_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_OVERSEER_H
|
#ifndef BRIDGE_GUI_OVERSEER_H
|
||||||
#define BRIDGE_QT6_OVERSEER_H
|
#define BRIDGE_GUI_OVERSEER_H
|
||||||
|
|
||||||
|
|
||||||
#include "Worker.h"
|
#include "Worker.h"
|
||||||
@ -53,4 +53,4 @@ typedef std::unique_ptr<Overseer> UPOverseer; ///< Type definition for unique po
|
|||||||
typedef std::shared_ptr<Overseer> SPOverseer; ///< Type definition for shared pointer to Overseer.
|
typedef std::shared_ptr<Overseer> SPOverseer; ///< Type definition for shared pointer to Overseer.
|
||||||
|
|
||||||
|
|
||||||
#endif //BRIDGE_QT6_OVERSEER_H
|
#endif //BRIDGE_GUI_OVERSEER_H
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef BRIDGE_QT6_WORKER_H
|
#ifndef BRIDGE_GUI_WORKER_H
|
||||||
#define BRIDGE_QT6_WORKER_H
|
#define BRIDGE_GUI_WORKER_H
|
||||||
|
|
||||||
//****************************************************************************************************************************************************
|
//****************************************************************************************************************************************************
|
||||||
/// \brief Pure virtual class for worker intended to perform a threaded operation.
|
/// \brief Pure virtual class for worker intended to perform a threaded operation.
|
||||||
@ -43,4 +43,4 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif //BRIDGE_QT6_WORKER_H
|
#endif //BRIDGE_GUI_WORKER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user