forked from qt-creator/qt-creator
UpdateInfo: Modernize
modernize-* Change-Id: I1cc383cc9422d0635ba794b7f8de011261da6728 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -42,8 +42,7 @@ static const char FILTER_OPTIONS_PAGE[] = QT_TRANSLATE_NOOP("Update", "Update");
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingsPage::SettingsPage(UpdateInfoPlugin *plugin)
|
SettingsPage::SettingsPage(UpdateInfoPlugin *plugin)
|
||||||
: m_widget(0)
|
: m_plugin(plugin)
|
||||||
, m_plugin(plugin)
|
|
||||||
{
|
{
|
||||||
setId(FILTER_OPTIONS_PAGE_ID);
|
setId(FILTER_OPTIONS_PAGE_ID);
|
||||||
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
|
setCategory(Core::Constants::SETTINGS_CATEGORY_CORE);
|
||||||
|
@@ -46,9 +46,9 @@ class SettingsPage : public Core::IOptionsPage
|
|||||||
public:
|
public:
|
||||||
explicit SettingsPage(UpdateInfoPlugin *plugin);
|
explicit SettingsPage(UpdateInfoPlugin *plugin);
|
||||||
|
|
||||||
QWidget *widget();
|
QWidget *widget() override;
|
||||||
void apply();
|
void apply() override;
|
||||||
void finish();
|
void finish() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void newUpdatesAvailable(bool available);
|
void newUpdatesAvailable(bool available);
|
||||||
|
@@ -65,13 +65,10 @@ namespace Internal {
|
|||||||
class UpdateInfoPluginPrivate
|
class UpdateInfoPluginPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UpdateInfoPluginPrivate()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
QString m_maintenanceTool;
|
QString m_maintenanceTool;
|
||||||
QPointer<ShellCommand> m_checkUpdatesCommand;
|
QPointer<ShellCommand> m_checkUpdatesCommand;
|
||||||
QString m_collectedOutput;
|
QString m_collectedOutput;
|
||||||
QTimer *m_checkUpdatesTimer = 0;
|
QTimer *m_checkUpdatesTimer = nullptr;
|
||||||
|
|
||||||
bool m_automaticCheck = true;
|
bool m_automaticCheck = true;
|
||||||
UpdateInfoPlugin::CheckUpdateInterval m_checkInterval = UpdateInfoPlugin::WeeklyCheck;
|
UpdateInfoPlugin::CheckUpdateInterval m_checkInterval = UpdateInfoPlugin::WeeklyCheck;
|
||||||
@@ -145,7 +142,7 @@ void UpdateInfoPlugin::stopCheckForUpdates()
|
|||||||
d->m_collectedOutput.clear();
|
d->m_collectedOutput.clear();
|
||||||
d->m_checkUpdatesCommand->disconnect();
|
d->m_checkUpdatesCommand->disconnect();
|
||||||
d->m_checkUpdatesCommand->cancel();
|
d->m_checkUpdatesCommand->cancel();
|
||||||
d->m_checkUpdatesCommand = 0;
|
d->m_checkUpdatesCommand = nullptr;
|
||||||
emit checkForUpdatesRunningChanged(false);
|
emit checkForUpdatesRunningChanged(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -50,10 +50,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
UpdateInfoPlugin();
|
UpdateInfoPlugin();
|
||||||
virtual ~UpdateInfoPlugin();
|
~UpdateInfoPlugin() override;
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized() override;
|
||||||
bool initialize(const QStringList &arguments, QString *errorMessage);
|
bool initialize(const QStringList &arguments, QString *errorMessage) override;
|
||||||
|
|
||||||
bool isAutomaticCheck() const;
|
bool isAutomaticCheck() const;
|
||||||
void setAutomaticCheck(bool on);
|
void setAutomaticCheck(bool on);
|
||||||
|
Reference in New Issue
Block a user