Use default constructor, destructor

This commit is contained in:
Chocobo1
2023-05-05 01:57:01 +08:00
parent 3fbe380582
commit 8219b1f695
20 changed files with 15 additions and 46 deletions

View File

@@ -50,10 +50,6 @@ PowerManagement::PowerManagement(QObject *parent)
#endif
}
PowerManagement::~PowerManagement()
{
}
void PowerManagement::setActivityState(const bool busy)
{
if (busy)

View File

@@ -47,7 +47,7 @@ class PowerManagement : public QObject
public:
PowerManagement(QObject *parent = nullptr);
virtual ~PowerManagement();
virtual ~PowerManagement() = default;
void setActivityState(bool busy);

View File

@@ -51,10 +51,6 @@ PowerManagementInhibitor::PowerManagementInhibitor(QObject *parent)
m_useGSM = false;
}
PowerManagementInhibitor::~PowerManagementInhibitor()
{
}
void PowerManagementInhibitor::requestIdle()
{
m_intendedState = Idle;

View File

@@ -39,7 +39,7 @@ class PowerManagementInhibitor : public QObject
public:
PowerManagementInhibitor(QObject *parent = nullptr);
virtual ~PowerManagementInhibitor();
virtual ~PowerManagementInhibitor() = default;
void requestIdle();
void requestBusy();

View File

@@ -54,10 +54,6 @@ HtmlBrowser::HtmlBrowser(QWidget *parent)
connect(m_netManager, &QNetworkAccessManager::finished, this, &HtmlBrowser::resourceLoaded);
}
HtmlBrowser::~HtmlBrowser()
{
}
QVariant HtmlBrowser::loadResource(int type, const QUrl &name)
{
if (type == QTextDocument::ImageResource)

View File

@@ -42,7 +42,7 @@ class HtmlBrowser final : public QTextBrowser
public:
explicit HtmlBrowser(QWidget* parent = nullptr);
~HtmlBrowser();
~HtmlBrowser() = default;
QVariant loadResource(int type, const QUrl &name) override;

View File

@@ -38,9 +38,7 @@
class CategoryModelItem
{
public:
CategoryModelItem()
{
}
CategoryModelItem() = default;
CategoryModelItem(CategoryModelItem *parent, QString categoryName, int torrentsCount = 0)
: m_parent(nullptr)