Code improvements
Deleted move and copy for classes which don't need them
This commit is contained in:
parent
d2fecd9552
commit
080cb20552
|
@ -52,7 +52,7 @@ class MainWindow final : public QMainWindow
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit MainWindow( QWidget* parent=nullptr );
|
explicit MainWindow( QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(MainWindow)
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ class Changelog : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Changelog( const QFont& font, const QFont& tb_font, QWidget* parent=nullptr );
|
explicit Changelog( const QFont& font, const QFont& tb_font, QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(Changelog)
|
||||||
|
|
||||||
//! Sets the given font for the changelog info
|
//! Sets the given font for the changelog info
|
||||||
void setTextFont( const QFont& font ) noexcept;
|
void setTextFont( const QFont& font ) noexcept;
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Craphelp final : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Craphelp( QWidget* parent=nullptr );
|
explicit Craphelp( QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(Craphelp)
|
||||||
|
|
||||||
//! Provides help about log formats
|
//! Provides help about log formats
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -20,7 +20,6 @@ class Crapinfo final : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Class constructor
|
|
||||||
/*!
|
/*!
|
||||||
\param version The version of LogDoctor actually running
|
\param version The version of LogDoctor actually running
|
||||||
\param exec_path The path of the executable
|
\param exec_path The path of the executable
|
||||||
|
@ -29,6 +28,7 @@ public:
|
||||||
\param parent The parent Widget
|
\param parent The parent Widget
|
||||||
*/
|
*/
|
||||||
explicit Crapinfo( const QString& version, const QString& exec_path, const QString& conf_path, const QString& logdoc_path, QWidget* parent=nullptr );
|
explicit Crapinfo( const QString& version, const QString& exec_path, const QString& conf_path, const QString& logdoc_path, QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(Crapinfo)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSharedPointer<Ui::Crapinfo> ui;
|
QSharedPointer<Ui::Crapinfo> ui;
|
||||||
|
|
|
@ -27,7 +27,9 @@ class Craplog final : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit Craplog();
|
explicit Craplog();
|
||||||
|
Q_DISABLE_COPY_MOVE(Craplog)
|
||||||
|
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
|
|
|
@ -24,12 +24,9 @@ class Crapup final : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Class constructor
|
|
||||||
/*!
|
|
||||||
\param parent The parent Widget
|
|
||||||
*/
|
|
||||||
explicit Crapup( QWidget* parent=nullptr );
|
explicit Crapup( QWidget* parent=nullptr );
|
||||||
~Crapup();
|
~Crapup();
|
||||||
|
Q_DISABLE_COPY_MOVE(Crapup)
|
||||||
|
|
||||||
|
|
||||||
//! Performs a version check
|
//! Performs a version check
|
||||||
|
|
|
@ -25,6 +25,9 @@ class Crapview final : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
explicit Crapview() noexcept {}
|
||||||
|
Q_DISABLE_COPY_MOVE(Crapview)
|
||||||
|
|
||||||
//! Returns the Dialogs level
|
//! Returns the Dialogs level
|
||||||
DialogsLevel getDialogsLevel() const noexcept;
|
DialogsLevel getDialogsLevel() const noexcept;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,9 @@ class DbQuery final
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
explicit DbQuery() noexcept {}
|
||||||
|
Q_DISABLE_COPY_MOVE(DbQuery)
|
||||||
|
|
||||||
// log fields enums to log fields strings
|
// log fields enums to log fields strings
|
||||||
const std::unordered_map<LogField, std::string> FIELDS{
|
const std::unordered_map<LogField, std::string> FIELDS{
|
||||||
{LogField::Warning, FIELDS__WARNING},
|
{LogField::Warning, FIELDS__WARNING},
|
||||||
|
|
|
@ -19,13 +19,13 @@ class DialogBool final : public QDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Dialog constructor
|
|
||||||
/*!
|
/*!
|
||||||
\param title The title
|
\param title The title
|
||||||
\param text The message
|
\param text The message
|
||||||
\param parent The parent Widget
|
\param parent The parent Widget
|
||||||
*/
|
*/
|
||||||
explicit DialogBool( const QString& title, const QString& text, QWidget *parent=nullptr );
|
explicit DialogBool( const QString& title, const QString& text, QWidget *parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(DialogBool)
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ class DialogIda final : public QDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Dialog constructor
|
|
||||||
/*!
|
/*!
|
||||||
\param title The title
|
\param title The title
|
||||||
\param text The message
|
\param text The message
|
||||||
|
@ -30,6 +29,7 @@ public:
|
||||||
\param parent The parent Widget
|
\param parent The parent Widget
|
||||||
*/
|
*/
|
||||||
explicit DialogIda( const QString& title, const QString& text, const bool ignore=true, const bool discard=true, const bool abort=true, QWidget* parent=nullptr );
|
explicit DialogIda( const QString& title, const QString& text, const bool ignore=true, const bool discard=true, const bool abort=true, QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(DialogIda)
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ class DialogMsg final : public QDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Dialog constructor
|
|
||||||
/*!
|
/*!
|
||||||
\param title The title
|
\param title The title
|
||||||
\param text The message
|
\param text The message
|
||||||
|
@ -35,6 +34,7 @@ public:
|
||||||
\param parent The parent Widget
|
\param parent The parent Widget
|
||||||
*/
|
*/
|
||||||
explicit DialogMsg( const QString& title, const QString& text, const QString& additional, const MsgType type, QWidget *parent=nullptr );
|
explicit DialogMsg( const QString& title, const QString& text, const QString& additional, const MsgType type, QWidget *parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(DialogMsg)
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ class Crapnote final : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit Crapnote( const ColorsScheme colors_scheme, QFont font, QWidget* parent=nullptr );
|
explicit Crapnote( const ColorsScheme colors_scheme, QFont font, QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(Crapnote)
|
||||||
|
|
||||||
//! Sets the given font
|
//! Sets the given font
|
||||||
void setTextFont( QFont font ) noexcept;
|
void setTextFont( QFont font ) noexcept;
|
||||||
|
|
|
@ -11,6 +11,7 @@ class Crappath : public QFileDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Crappath( QWidget* parent=nullptr );
|
explicit Crappath( QWidget* parent=nullptr );
|
||||||
|
Q_DISABLE_COPY_MOVE(Crappath)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LOGDOCTOR__CRAPPATH_H
|
#endif // LOGDOCTOR__CRAPPATH_H
|
||||||
|
|
Loading…
Reference in New Issue