add cmake option DISABLE_UPDATE_CHECKER (#2793)
* add cmake option DISABLE_UPDATE_CHECKER * add cmake option DISABLE_UPDATE_CHECKER to compile out updatechecker * format code use `clang-format -i $(git ls-files "*.cpp" "*.h")` * fallback wrong code format * replace `add_definitions` with `add_compile_definitions`
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include "src/widgets/orientablepushbutton.h"
|
||||
#include "src/widgets/panel/sidepanelwidget.h"
|
||||
#include "src/widgets/panel/utilitypanel.h"
|
||||
#include "src/widgets/updatenotificationwidget.h"
|
||||
#include <QApplication>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
@@ -42,6 +41,10 @@
|
||||
#include <QShortcut>
|
||||
#include <draggablewidgetmaker.h>
|
||||
|
||||
#if !defined(DISABLE_UPDATE_CHECKER)
|
||||
#include "src/widgets/updatenotificationwidget.h"
|
||||
#endif
|
||||
|
||||
#define MOUSE_DISTANCE_TO_START_MOVING 3
|
||||
|
||||
// CaptureWidget is the main component used to capture the screen. It contains
|
||||
@@ -64,7 +67,9 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
|
||||
, m_toolWidget(nullptr)
|
||||
, m_colorPicker(nullptr)
|
||||
, m_lastMouseWheel(0)
|
||||
#if !defined(DISABLE_UPDATE_CHECKER)
|
||||
, m_updateNotificationWidget(nullptr)
|
||||
#endif
|
||||
, m_activeToolIsMoved(false)
|
||||
, m_panel(nullptr)
|
||||
, m_sidePanel(nullptr)
|
||||
@@ -1127,6 +1132,7 @@ void CaptureWidget::initPanel()
|
||||
m_panel->fillCaptureTools(m_captureToolObjects.captureToolObjects());
|
||||
}
|
||||
|
||||
#if !defined(DISABLE_UPDATE_CHECKER)
|
||||
void CaptureWidget::showAppUpdateNotification(const QString& appLatestVersion,
|
||||
const QString& appLatestUrl)
|
||||
{
|
||||
@@ -1159,6 +1165,7 @@ void CaptureWidget::showAppUpdateNotification(const QString& appLatestVersion,
|
||||
makeChild(m_updateNotificationWidget);
|
||||
m_updateNotificationWidget->show();
|
||||
}
|
||||
#endif
|
||||
|
||||
void CaptureWidget::initSelection()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user