From fbd299323918ab0aa11848b8129adf71aa192ade Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 15 Jan 2022 02:19:43 +0100 Subject: [PATCH] Remove use of sparkle --- src/core/mac_startup.h | 1 - src/core/mac_startup.mm | 14 -------------- src/core/mainwindow.cpp | 9 +-------- src/core/mainwindow.h | 2 -- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/core/mac_startup.h b/src/core/mac_startup.h index 0536625f4..882892de6 100644 --- a/src/core/mac_startup.h +++ b/src/core/mac_startup.h @@ -29,7 +29,6 @@ namespace mac { void MacMain(); void SetShortcutHandler(GlobalShortcutsBackendMacOS *handler); void SetApplicationHandler(PlatformInterface *handler); -void CheckForUpdates(); void EnableFullScreen(const QWidget &main_window); diff --git a/src/core/mac_startup.mm b/src/core/mac_startup.mm index 568e65a73..99d13d7a5 100644 --- a/src/core/mac_startup.mm +++ b/src/core/mac_startup.mm @@ -55,10 +55,6 @@ #include "globalshortcuts/globalshortcutsmanager.h" #include "globalshortcuts/globalshortcutsbackend-macos.h" -#ifdef HAVE_SPARKLE -# import -#endif - #include #include #include @@ -288,10 +284,6 @@ void MacMain() { ScopedNSAutoreleasePool pool; // Creates and sets the magic global variable so QApplication will find it. [MacApplication sharedApplication]; -#ifdef HAVE_SPARKLE - // Creates and sets the magic global variable for Sparkle. - [ [SPUStandardUpdaterController sharedUpdater] setDelegate:NSApp]; -#endif } @@ -303,12 +295,6 @@ void SetApplicationHandler(PlatformInterface *handler) { [NSApp SetApplicationHandler:handler]; } -void CheckForUpdates() { -#ifdef HAVE_SPARKLE - [ [SPUStandardUpdaterController sharedUpdater] checkForUpdates:NSApp]; -#endif -} - static int MapFunctionKey(int keycode) { switch (keycode) { diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index 62639d542..1ad431e15 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -779,10 +779,9 @@ MainWindow::MainWindow(Application *app, std::shared_ptr tray_ic thumbbar_->SetActions(QList() << ui_->action_previous_track << ui_->action_play_pause << ui_->action_stop << ui_->action_next_track << nullptr << ui_->action_love); #endif -#if defined(HAVE_SPARKLE) || defined(HAVE_QTSPARKLE) +#if defined(HAVE_QTSPARKLE) QAction *check_updates = ui_->menu_tools->addAction(tr("Check for updates...")); check_updates->setMenuRole(QAction::ApplicationSpecificRole); - QObject::connect(check_updates, &QAction::triggered, this, &MainWindow::CheckForUpdates); #endif #ifdef HAVE_GLOBALSHORTCUTS @@ -2492,12 +2491,6 @@ bool MainWindow::LoadUrl(const QString &url) { } -void MainWindow::CheckForUpdates() { -#if defined(Q_OS_MACOS) - mac::CheckForUpdates(); -#endif -} - void MainWindow::PlaylistUndoRedoChanged(QAction *undo, QAction *redo) { playlist_menu_->insertAction(playlist_undoredo_, undo); diff --git a/src/core/mainwindow.h b/src/core/mainwindow.h index 2cff73e91..3456e45f8 100644 --- a/src/core/mainwindow.h +++ b/src/core/mainwindow.h @@ -219,8 +219,6 @@ class MainWindow : public QMainWindow, public PlatformInterface { void AddStream(); void AddStreamAccepted(); - void CheckForUpdates(); - void PlayingWidgetPositionChanged(const bool above_status_bar); void SongSaveComplete(TagReaderReply *reply, const QPersistentModelIndex &idx);