mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Replace deprecated qt_mac_set_dock_menu()
This commit is contained in:
parent
adbd34c795
commit
78b9eafed2
@ -29,10 +29,14 @@
|
|||||||
#ifndef MACUTILITIES_H
|
#ifndef MACUTILITIES_H
|
||||||
#define MACUTILITIES_H
|
#define MACUTILITIES_H
|
||||||
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QSize>
|
|
||||||
#include <objc/objc.h>
|
#include <objc/objc.h>
|
||||||
|
|
||||||
|
#include <QSet>
|
||||||
|
|
||||||
|
class QPixmap;
|
||||||
|
class QSize;
|
||||||
|
class QString;
|
||||||
|
|
||||||
namespace MacUtils
|
namespace MacUtils
|
||||||
{
|
{
|
||||||
QPixmap pixmapForExtension(const QString &ext, const QSize &size);
|
QPixmap pixmapForExtension(const QString &ext, const QSize &size);
|
||||||
|
@ -28,10 +28,14 @@
|
|||||||
|
|
||||||
#include "macutilities.h"
|
#include "macutilities.h"
|
||||||
|
|
||||||
#include <QSet>
|
|
||||||
#include <QtMac>
|
|
||||||
#include <objc/message.h>
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#include <objc/message.h>
|
||||||
|
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSet>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QtMac>
|
||||||
|
|
||||||
namespace MacUtils
|
namespace MacUtils
|
||||||
{
|
{
|
||||||
|
@ -107,10 +107,6 @@
|
|||||||
#include "programupdater.h"
|
#include "programupdater.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
void qt_mac_set_dock_menu(QMenu *menu);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TIME_TRAY_BALLOON 5000
|
#define TIME_TRAY_BALLOON 5000
|
||||||
#define PREVENT_SUSPEND_INTERVAL 60000
|
#define PREVENT_SUSPEND_INTERVAL 60000
|
||||||
|
|
||||||
@ -469,7 +465,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
setupDockClickHandler();
|
setupDockClickHandler();
|
||||||
qt_mac_set_dock_menu(trayIconMenu());
|
trayIconMenu()->setAsDockMenu();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1815,7 +1811,6 @@ void MainWindow::on_actionDownloadFromURL_triggered()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
|
||||||
void MainWindow::handleUpdateCheckFinished(bool updateAvailable, QString newVersion, bool invokedByUser)
|
void MainWindow::handleUpdateCheckFinished(bool updateAvailable, QString newVersion, bool invokedByUser)
|
||||||
{
|
{
|
||||||
QMessageBox::StandardButton answer = QMessageBox::Yes;
|
QMessageBox::StandardButton answer = QMessageBox::Yes;
|
||||||
|
Loading…
Reference in New Issue
Block a user