mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-11 17:29:46 +00:00
Polymorphic classes without virtual dtor warning.
This commit is contained in:
parent
032694ad9e
commit
98cb85df66
@ -132,6 +132,8 @@ public:
|
||||
return _filterWheelEvent.events();
|
||||
}
|
||||
|
||||
virtual ~FloatDelegate() = default;
|
||||
|
||||
protected:
|
||||
void floatPlayerCheckVisibility() {
|
||||
_checkVisibility.fire({});
|
||||
|
@ -13,7 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <mmdeviceapi.h>
|
||||
#include <audioclient.h>
|
||||
|
||||
#include <wrl\client.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
|
||||
namespace Platform {
|
||||
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "core/crash_reports.h"
|
||||
#include "core/update_checker.h"
|
||||
#include "platform/platform_specific.h"
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
#include <shellapi.h>
|
||||
|
||||
|
@ -26,8 +26,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <WtsApi32.h>
|
||||
|
||||
#include <roapi.h>
|
||||
#include <wrl\client.h>
|
||||
#include <wrl\implements.h>
|
||||
#include <wrl/client.h>
|
||||
#include "platform/win/wrapper_wrl_implements_h.h"
|
||||
#include <windows.ui.notifications.h>
|
||||
|
||||
#include <Windowsx.h>
|
||||
|
@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#include "platform/platform_main_window.h"
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
#include "base/flags.h"
|
||||
|
||||
namespace Ui {
|
||||
|
@ -18,8 +18,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <shellapi.h>
|
||||
|
||||
#include <roapi.h>
|
||||
#include <wrl\client.h>
|
||||
#include <wrl\implements.h>
|
||||
#include <wrl/client.h>
|
||||
#include "platform/win/wrapper_wrl_implements_h.h"
|
||||
#include <windows.ui.notifications.h>
|
||||
|
||||
#include <strsafe.h>
|
||||
@ -196,7 +196,7 @@ typedef ABI::Windows::Foundation::ITypedEventHandler<ToastNotification*, ::IInsp
|
||||
typedef ABI::Windows::Foundation::ITypedEventHandler<ToastNotification*, ToastDismissedEventArgs*> DesktopToastDismissedEventHandler;
|
||||
typedef ABI::Windows::Foundation::ITypedEventHandler<ToastNotification*, ToastFailedEventArgs*> DesktopToastFailedEventHandler;
|
||||
|
||||
class ToastEventHandler : public Implements<
|
||||
class ToastEventHandler final : public Implements<
|
||||
DesktopToastActivatedEventHandler,
|
||||
DesktopToastDismissedEventHandler,
|
||||
DesktopToastFailedEventHandler> {
|
||||
@ -210,7 +210,6 @@ public:
|
||||
, _msgId(msg)
|
||||
, _weak(guarded) {
|
||||
}
|
||||
~ToastEventHandler() = default;
|
||||
|
||||
void performOnMainQueue(FnMut<void(Manager *manager)> task) {
|
||||
const auto weak = _weak;
|
||||
|
@ -23,16 +23,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <shellapi.h>
|
||||
|
||||
#include <roapi.h>
|
||||
#include <wrl\client.h>
|
||||
#include <wrl\implements.h>
|
||||
#include <wrl/client.h>
|
||||
#include "platform/win/wrapper_wrl_implements_h.h"
|
||||
#include <windows.ui.notifications.h>
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4091)
|
||||
#include <dbghelp.h>
|
||||
#include <shlobj.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <Shlwapi.h>
|
||||
#include <Strsafe.h>
|
||||
#include <Windowsx.h>
|
||||
|
@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
class LocationCoords;
|
||||
|
||||
|
@ -12,8 +12,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <propkey.h>
|
||||
|
||||
#include <roapi.h>
|
||||
#include <wrl\client.h>
|
||||
#include <wrl\implements.h>
|
||||
#include <wrl/client.h>
|
||||
#include "platform/win/wrapper_wrl_implements_h.h"
|
||||
#include <windows.ui.notifications.h>
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
|
@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
namespace Platform {
|
||||
namespace AppUserModelId {
|
||||
|
@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
#include <shlobj.h>
|
||||
#include <roapi.h>
|
||||
|
@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
namespace Platform {
|
||||
|
||||
|
14
Telegram/SourceFiles/platform/win/wrapper_wrl_implements_h.h
Normal file
14
Telegram/SourceFiles/platform/win/wrapper_wrl_implements_h.h
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#pragma warning(push)
|
||||
// class has virtual functions, but destructor is not virtual
|
||||
#pragma warning(disable:4265)
|
||||
#include <wrl/implements.h>
|
||||
#pragma warning(pop)
|
@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "storage/storage_clear_legacy.h"
|
||||
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
namespace Storage {
|
||||
namespace details {
|
||||
|
@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "storage/storage_file_lock.h"
|
||||
|
||||
#include "platform/win/windows_dlls.h"
|
||||
#include "platform/win/windows_h_wrapper.h"
|
||||
#include "platform/win/wrapper_windows_h.h"
|
||||
|
||||
#include <io.h>
|
||||
#include <fileapi.h>
|
||||
|
@ -124,6 +124,8 @@ public:
|
||||
|
||||
rpl::lifetime &lifetime();
|
||||
|
||||
virtual ~RpWidgetMethods() = default;
|
||||
|
||||
protected:
|
||||
bool handleEvent(QEvent *event);
|
||||
virtual bool eventHook(QEvent *event) = 0;
|
||||
|
@ -43,6 +43,9 @@ class ModuleBase {
|
||||
public:
|
||||
virtual void start() = 0;
|
||||
virtual void stop() = 0;
|
||||
|
||||
virtual ~ModuleBase() = default;
|
||||
|
||||
};
|
||||
|
||||
void registerModule(ModuleBase *module);
|
||||
|
@ -31,6 +31,7 @@
|
||||
'/EHsc', # Catch C++ exceptions only, extern C functions never throw a C++ exception.
|
||||
'/w14834', # [[nodiscard]]
|
||||
'/w15038', # wrong initialization order
|
||||
'/w14265', # class has virtual functions, but destructor is not virtual
|
||||
],
|
||||
'TreatWChar_tAsBuiltInType': 'false',
|
||||
},
|
||||
|
@ -580,6 +580,8 @@
|
||||
<(src_loc)/platform/win/windows_dlls.h
|
||||
<(src_loc)/platform/win/windows_event_filter.cpp
|
||||
<(src_loc)/platform/win/windows_event_filter.h
|
||||
<(src_loc)/platform/win/wrapper_windows_h.h
|
||||
<(src_loc)/platform/win/wrapper_wrl_implements_h.h
|
||||
<(src_loc)/platform/platform_audio.h
|
||||
<(src_loc)/platform/platform_file_utilities.h
|
||||
<(src_loc)/platform/platform_launcher.h
|
||||
|
Loading…
Reference in New Issue
Block a user