mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
b1398584c4
3ccfa34b32 convert C-style (void) parameter lists to C++ style () (Arvid Norberg) Pull request description: In C, an empty parameter list, `()`, means the function takes any arguments, and `(void)` means the function does not take any parameters. In C++, an empty parameter list means the function does not take any parameters. So, C++ still supports `(void)` parameter lists with the same semantics, why change to `()`? 1. removing the redundant `void` improves signal-to-noise ratio of the code 2. using `(void)` exposes a rare inconsistency in that a template taking a template `(T)` parameter list, cannot be instantiated with `T=void` Tree-SHA512: be2897b6c5e474873aa878ed6bac098382cd21866aec33752fe40b089a6331aa6263cae749aba1b4a41e8467f1a47086d32eb74abaf09927fd5a2f44a4b2109a # Conflicts: # src/qt/rpcconsole.cpp
28 lines
806 B
C++
28 lines
806 B
C++
// Copyright (c) 2011-2014 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_QT_MACNOTIFICATIONHANDLER_H
|
|
#define BITCOIN_QT_MACNOTIFICATIONHANDLER_H
|
|
|
|
#include <QObject>
|
|
|
|
/** Macintosh-specific notification handler (supports UserNotificationCenter).
|
|
*/
|
|
class MacNotificationHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/** shows a macOS 10.8+ UserNotification in the UserNotificationCenter
|
|
*/
|
|
void showNotification(const QString &title, const QString &text);
|
|
|
|
/** check if OS can handle UserNotifications */
|
|
bool hasUserNotificationCenterSupport();
|
|
static MacNotificationHandler *instance();
|
|
};
|
|
|
|
|
|
#endif // BITCOIN_QT_MACNOTIFICATIONHANDLER_H
|