Commit bb979d43 authored by Laurent Montel's avatar Laurent Montel 😁

Port some qt5.15 deprecated method

parent 250226c8
......@@ -53,8 +53,7 @@ public:
if (!name.isEmpty()) {
openDialogs.insert(name, q);
} else {
QString genericName;
genericName.sprintf("SettingsDialog-%p", static_cast<void *>(q));
const QString genericName = QString::asprintf("SettingsDialog-%p", static_cast<void *>(q));
openDialogs.insert(genericName, q);
q->setObjectName(genericName);
}
......
......@@ -309,9 +309,9 @@ namespace Konversation
void TransferRecv::prepareLocalKio(bool overwrite, bool resume, KIO::fileoffset_t startPosition)
{
qDebug()
<< "URL: " << m_fileURL << endl
<< "Overwrite: " << overwrite << endl
<< "Resume: " << resume << " (Position: " << startPosition << ")";
<< "URL: " << m_fileURL
<< "\nOverwrite: " << overwrite
<< "\nResume: " << resume << " (Position: " << startPosition << ")";
m_resumed = resume;
m_transferringPosition = startPosition;
......@@ -433,7 +433,7 @@ namespace Konversation
void TransferRecv::slotLocalCanResume(KIO::Job *job, KIO::filesize_t size)
{
qDebug() << "[BEGIN]" << endl
qDebug() << "[BEGIN]\n"
<< "size: " << size;
KIO::TransferJob* transferJob = dynamic_cast<KIO::TransferJob*>(job);
......@@ -638,9 +638,8 @@ namespace Konversation
if ((quint64)m_transferringPosition != position)
{
qDebug() << "remote responded with an unexpected position"<< endl
<< "expected: " << m_transferringPosition << endl
<< "remote response: " << position;
qDebug() << "remote responded with an unexpected position\n"
<< "expected: " << m_transferringPosition << "\nremote response: " << position;
failed(i18n("Unexpected response from remote host"));
return;
}
......
......@@ -1215,7 +1215,7 @@ void Channel::removeNick(ChannelNickPtr channelNick, const QString &reason, bool
}
else
{
qWarning() << "Nickname " << channelNick->getNickname() << " not found!"<< endl;
qWarning() << "Nickname " << channelNick->getNickname() << " not found!";
}
}
}
......@@ -1303,7 +1303,7 @@ void Channel::kickNick(ChannelNickPtr channelNick, const QString &kicker, const
if(nick == nullptr)
{
qWarning() << "Nickname " << channelNick->getNickname() << " not found!"<< endl;
qWarning() << "Nickname " << channelNick->getNickname() << " not found!";
}
else
{
......@@ -2651,7 +2651,7 @@ void Channel::repositionNick(Nick *nick)
nicknameList.removeAt(index);
fastAddNickname(nick->getChannelNick(), nick);
} else {
qWarning() << "Nickname " << nick->getChannelNick()->getNickname() << " not found!"<< endl;
qWarning() << "Nickname " << nick->getChannelNick()->getNickname() << " not found!";
}
}
......
......@@ -197,7 +197,7 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
Channel* channel = m_server->getChannelByName( parameterList.value(0) );
if (!channel) {
qCritical() << "Didn't find the channel " << parameterList.value(0) << endl;
qCritical() << "Didn't find the channel " << parameterList.value(0);
return;
}
......
......@@ -75,7 +75,7 @@ namespace Konversation
if (!ret)
{
qDebug() << "Error parsing XML" << endl;
qDebug() << "Error parsing XML";
return false;
}
return true;
......@@ -94,7 +94,7 @@ namespace Konversation
if (!ret)
{
qDebug() << "Error parsing XML" << endl;
qDebug() << "Error parsing XML";
return false;
}
return true;
......
......@@ -44,7 +44,7 @@ namespace Konversation
for (quint32 i = 0;i < 10;i++)
{
if (!bind(1900 + i,QUdpSocket::ShareAddress))
qDebug() << "Cannot bind to UDP port 1900 : " << errorString() << endl;
qDebug() << "Cannot bind to UDP port 1900 : " << errorString();
else
break;
}
......@@ -62,7 +62,7 @@ namespace Konversation
void UPnPMCastSocket::discover()
{
qDebug() << "Trying to find UPnP devices on the local network" << endl;
qDebug() << "Trying to find UPnP devices on the local network";
// send a HTTP M-SEARCH message to 239.255.255.250:1900
const char* data = "M-SEARCH * HTTP/1.1\r\n"
......@@ -148,7 +148,7 @@ namespace Konversation
}
if (!validDevice)
{
// qDebug() << "Not a valid Internet Gateway Device" << endl;
// qDebug() << "Not a valid Internet Gateway Device";
return nullptr;
}
......@@ -184,7 +184,7 @@ namespace Konversation
}
else
{
qDebug() << "Detected IGD " << server << "UUID" << uuid << endl;
qDebug() << "Detected IGD " << server << "UUID" << uuid;
// everything OK, make a new UPnPRouter
return new UPnPRouter(server,location,uuid);
}
......@@ -192,7 +192,7 @@ namespace Konversation
void UPnPMCastSocket::onError(QAbstractSocket::SocketError )
{
qDebug() << "UPnPMCastSocket Error : " << errorString() << endl;
qDebug() << "UPnPMCastSocket Error : " << errorString();
}
void UPnPMCastSocket::joinUPnPMCastGroup()
......
......@@ -2419,7 +2419,7 @@ QDebug operator<<(QDebug d, const QTextBlock &b)
dS << "userState" << b.userState();
dN << "userData " << (void*)b.userData();
//dS << "text" << b.text();
dS << endl;
dS << '\n';
if (b.userData())
d << b.userData();
......
......@@ -36,7 +36,7 @@ SearchBar::SearchBar(QWidget* parent)
parent->installEventFilter(this); // HACK See notes in SearchBar::eventFilter
m_flags = nullptr;
m_flags = {};
m_fromCursor = false;
setFocusProxy(m_searchEdit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment