mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
REFAC(deprecated): Use QFlag default constructor
Qt 5.15 has introduced a default constructor for a QFlag that will be equivalent of setting it equal to a zero literal (setting it to no flag).
This commit is contained in:
parent
62c215e924
commit
0fcafd86e7
@ -104,7 +104,13 @@ QFlags<ChanACL::Perm> ChanACL::effectivePermissions(ServerUser *p, Channel *chan
|
||||
return static_cast<Permissions>(All &~ (Speak|Whisper));
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
||||
// Qt 5.15 introduced a default constructor that initializes the flags to be set to no flags
|
||||
Permissions granted;
|
||||
#else
|
||||
// Before Qt 5.15 we have emulate the default constructor by assigning a literal zero
|
||||
Permissions granted = 0;
|
||||
#endif
|
||||
|
||||
if (cache) {
|
||||
QHash<Channel *, Permissions> *h = cache->value(p);
|
||||
|
||||
@ -3198,9 +3198,14 @@ void MainWindow::serverDisconnected(QAbstractSocket::SocketError err, QString re
|
||||
g.l->log(Log::ServerDisconnected, tr("Disconnected from server."));
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
||||
// Qt 5.15 introduced a default constructor that initializes the flags to be set to no flags
|
||||
Qt::WindowFlags wf;
|
||||
#elif defined(Q_OS_MAC)
|
||||
Qt::WindowFlags wf = Qt::Sheet;
|
||||
#else
|
||||
// Before Qt 5.15 we have emulate the default constructor by assigning a literal zero
|
||||
Qt::WindowFlags wf = 0;
|
||||
#ifdef Q_OS_MAC
|
||||
wf = Qt::Sheet;
|
||||
#endif
|
||||
|
||||
bool matched = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user