Changed QOverload to qOverload.

This commit is contained in:
Mat Sutcliffe
2019-01-03 01:59:48 +00:00
parent 03e68de890
commit 80308b85d5
4 changed files with 6 additions and 6 deletions

View File

@@ -77,7 +77,7 @@ namespace BlackGui
readSettings(); readSettings();
// Connect them after settings are read. Otherwise they get called. // Connect them after settings are read. Otherwise they get called.
connect(ui->cb_FileWritingMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &CRawFsdMessagesComponent::changeFileWritingMode); connect(ui->cb_FileWritingMode, qOverload<int>(&QComboBox::currentIndexChanged), this, &CRawFsdMessagesComponent::changeFileWritingMode);
} }
void CRawFsdMessagesComponent::enableDisableRawFsdMessages() void CRawFsdMessagesComponent::enableDisableRawFsdMessages()

View File

@@ -367,7 +367,7 @@ namespace BlackGui
contextMenu->addAction(CIcons::tableSheet16(), frameless ? "Normal window" : "Frameless", this, &CDockWidget::toggleFrameless); contextMenu->addAction(CIcons::tableSheet16(), frameless ? "Normal window" : "Frameless", this, &CDockWidget::toggleFrameless);
contextMenu->addAction(CIcons::dockTop16(), "Always on top", this, &CDockWidget::windowAlwaysOnTop); contextMenu->addAction(CIcons::dockTop16(), "Always on top", this, &CDockWidget::windowAlwaysOnTop);
contextMenu->addAction(CIcons::dockTop16(), "Not on top", this, &CDockWidget::windowNotAlwaysOnTop); contextMenu->addAction(CIcons::dockTop16(), "Not on top", this, &CDockWidget::windowNotAlwaysOnTop);
contextMenu->addAction(CIcons::refresh16(), "Redraw", this, QOverload<>::of(&CDockWidget::update)); contextMenu->addAction(CIcons::refresh16(), "Redraw", this, qOverload<>(&CDockWidget::update));
} }
else else
{ {

View File

@@ -113,10 +113,10 @@ namespace BlackMisc
if (timeoutMs < 0) { timeoutMs = getTimeoutMs(); } // external functions might call with -1 if (timeoutMs < 0) { timeoutMs = getTimeoutMs(); } // external functions might call with -1
QTcpSocket socket; QTcpSocket socket;
QSignalMapper mapper; QSignalMapper mapper;
QObject::connect(&socket, &QTcpSocket::connected, &mapper, QOverload<>::of(&QSignalMapper::map)); QObject::connect(&socket, &QTcpSocket::connected, &mapper, qOverload<>(&QSignalMapper::map));
QObject::connect(&socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), &mapper, QOverload<>::of(&QSignalMapper::map)); QObject::connect(&socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error), &mapper, qOverload<>(&QSignalMapper::map));
mapper.setMapping(&socket, 0); mapper.setMapping(&socket, 0);
const bool timedOut = !CEventLoop::processEventsUntil(&mapper, QOverload<int>::of(&QSignalMapper::mapped), timeoutMs, [&] const bool timedOut = !CEventLoop::processEventsUntil(&mapper, qOverload<int>(&QSignalMapper::mapped), timeoutMs, [&]
{ {
socket.connectToHost(hostAddress, static_cast<quint16>(port)); socket.connectToHost(hostAddress, static_cast<quint16>(port));
}); });

View File

@@ -45,7 +45,7 @@ namespace BlackMisc
if (old->state() == QProcess::Running) if (old->state() == QProcess::Running)
{ {
// if still running, terminate and then delete // if still running, terminate and then delete
QObject::connect(old, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), old, &QObject::deleteLater); QObject::connect(old, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), old, &QObject::deleteLater);
old->terminate(); old->terminate();
} }
else else