Refactoring.
This commit is contained in:
parent
8451ff874a
commit
5fb51c3e91
|
@ -50,12 +50,15 @@ public:
|
|||
explicit VException(const QString &error) V_NOEXCEPT_EXPR(true);
|
||||
VException(const VException &e) V_NOEXCEPT_EXPR(true);
|
||||
auto operator=(const VException &e) V_NOEXCEPT_EXPR(true) -> VException &;
|
||||
virtual ~VException() V_NOEXCEPT_EXPR(true) = default;
|
||||
~VException() V_NOEXCEPT_EXPR(true) override = default;
|
||||
|
||||
Q_NORETURN virtual void raise() const override;
|
||||
VException(VException &&) noexcept = default;
|
||||
auto operator=(VException &&) noexcept -> VException & = default;
|
||||
|
||||
Q_NORETURN void raise() const override;
|
||||
|
||||
// cppcheck-suppress unusedFunction
|
||||
Q_REQUIRED_RESULT virtual auto clone() const -> VException * override;
|
||||
Q_REQUIRED_RESULT auto clone() const -> VException * override;
|
||||
|
||||
virtual auto ErrorMessage() const -> QString;
|
||||
virtual auto DetailedInformation() const -> QString;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#ifndef VEXCEPTIONUNDO_H
|
||||
#define VEXCEPTIONUNDO_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "../ifcdef.h"
|
||||
|
@ -38,13 +37,16 @@
|
|||
class VExceptionUndo : public VException
|
||||
{
|
||||
public:
|
||||
explicit VExceptionUndo(const QString &what) V_NOEXCEPT_EXPR (true);
|
||||
VExceptionUndo(const VExceptionUndo &e) V_NOEXCEPT_EXPR (true);
|
||||
virtual ~VExceptionUndo() V_NOEXCEPT_EXPR (true) = default;
|
||||
explicit VExceptionUndo(const QString &what) V_NOEXCEPT_EXPR(true);
|
||||
VExceptionUndo(const VExceptionUndo &e) V_NOEXCEPT_EXPR(true);
|
||||
~VExceptionUndo() V_NOEXCEPT_EXPR(true) override = default;
|
||||
|
||||
Q_NORETURN virtual void raise() const override { throw *this; }
|
||||
VExceptionUndo(VExceptionUndo &&) noexcept = default;
|
||||
auto operator=(VExceptionUndo &&) noexcept -> VExceptionUndo & = default;
|
||||
|
||||
Q_REQUIRED_RESULT virtual auto clone() const -> VExceptionUndo * override { return new VExceptionUndo(*this); }
|
||||
Q_NORETURN void raise() const override { throw *this; }
|
||||
|
||||
Q_REQUIRED_RESULT auto clone() const -> VExceptionUndo * override { return new VExceptionUndo(*this); }
|
||||
};
|
||||
|
||||
#endif // VEXCEPTIONUNDO_H
|
||||
|
|
|
@ -609,6 +609,7 @@ void VAbstractApplication::RepopulateFontDatabase(const QString &path)
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, hicpp-avoid-c-arrays, modernize-avoid-c-arrays)
|
||||
auto VAbstractApplication::IsOptionSet(int argc, char *argv[], const char *option) -> bool
|
||||
|
@ -628,7 +629,6 @@ auto VAbstractApplication::IsOptionSet(int argc, char *argv[], const char *optio
|
|||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, hicpp-avoid-c-arrays, modernize-avoid-c-arrays)
|
||||
void VAbstractApplication::InitHighDpiScaling(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
/* For more info see: http://doc.qt.io/qt-5/highdpi.html */
|
||||
if (IsOptionSet(argc, argv, qPrintable("--"_L1 + LONG_OPTION_NO_HDPI_SCALING)))
|
||||
{
|
||||
|
@ -638,11 +638,8 @@ void VAbstractApplication::InitHighDpiScaling(int argc, char *argv[])
|
|||
{
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(argc);
|
||||
Q_UNUSED(argv);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VAbstractApplication::LogDirPath() -> QString
|
||||
|
|
|
@ -120,10 +120,12 @@ public:
|
|||
|
||||
auto GetPlaceholderTranslator() -> QSharedPointer<VTranslator>;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, hicpp-avoid-c-arrays, modernize-avoid-c-arrays)
|
||||
static auto IsOptionSet(int argc, char *argv[], const char *option) -> bool;
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, hicpp-avoid-c-arrays, modernize-avoid-c-arrays)
|
||||
static void InitHighDpiScaling(int argc, char *argv[]);
|
||||
#endif
|
||||
|
||||
static auto LogDirPath() -> QString;
|
||||
static auto CreateLogDir() -> bool;
|
||||
|
|
Loading…
Reference in New Issue
Block a user