mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
Changed QOverload to qOverload.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace BlackGui
|
||||
|
||||
readSettings();
|
||||
// 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()
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace BlackGui
|
||||
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(), "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
|
||||
{
|
||||
|
||||
@@ -113,10 +113,10 @@ namespace BlackMisc
|
||||
if (timeoutMs < 0) { timeoutMs = getTimeoutMs(); } // external functions might call with -1
|
||||
QTcpSocket socket;
|
||||
QSignalMapper mapper;
|
||||
QObject::connect(&socket, &QTcpSocket::connected, &mapper, QOverload<>::of(&QSignalMapper::map));
|
||||
QObject::connect(&socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), &mapper, QOverload<>::of(&QSignalMapper::map));
|
||||
QObject::connect(&socket, &QTcpSocket::connected, &mapper, qOverload<>(&QSignalMapper::map));
|
||||
QObject::connect(&socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error), &mapper, qOverload<>(&QSignalMapper::map));
|
||||
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));
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace BlackMisc
|
||||
if (old->state() == QProcess::Running)
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user