Commit ccffe969 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some deprecated methods

parent 4ed4ad5d
......@@ -181,7 +181,7 @@ TransferHandler * KGet::addTransfer(QUrl srcUrl, QString destDir, QString sugges
{
srcUrl = mostLocalUrl(srcUrl);
// Note: destDir may actually be a full path to a file :-(
qCDebug(KGET_DEBUG) << "Source:" << srcUrl.url() << ", dest: " << destDir << ", sugg file: " << suggestedFileName << endl;
qCDebug(KGET_DEBUG) << "Source:" << srcUrl.url() << ", dest: " << destDir << ", sugg file: " << suggestedFileName;
QUrl destUrl; // the final destination, including filename
......@@ -603,7 +603,7 @@ void KGet::save( QString filename, bool plain ) // krazy:exclude=passbyvalue
if (plain) {
QTextStream out(&file);
foreach(TransferHandler *handler, allTransfers()) {
out << handler->source().toString() << endl;
out << handler->source().toString() << '\n';
}
}
else {
......@@ -1163,9 +1163,9 @@ void KGet::loadPlugins()
for (const KPluginMetaData& md : offers)
{
sortedOffers[md.value("X-KDE-KGet-rank").toInt()] = md;
qCDebug(KGET_DEBUG) << " TransferFactory plugin found:" << endl <<
" rank = " << md.value("X-KDE-KGet-rank").toInt() << endl <<
" plugintype = " << md.value("X-KDE-KGet-plugintype") << endl;
qCDebug(KGET_DEBUG) << " TransferFactory plugin found:\n"<<
" rank = " << md.value("X-KDE-KGet-rank").toInt() << '\n' <<
" plugintype = " << md.value("X-KDE-KGet-plugintype");
}
//I must fill this pluginList before and my m_transferFactories list after.
......
......@@ -611,7 +611,7 @@ bool TransferTreeModel::dropMimeData(const QMimeData * mdata, Qt::DropAction act
if (parent.isValid())
qCDebug(KGET_DEBUG) << "TransferTreeModel::dropMimeData" << " " << row << " "
<< column << endl;
<< column;
QList<QPointer<TransferHandler> > transfers = itemData->transfers();
qCDebug(KGET_DEBUG) << "TransferTreeModel::dropMimeData:" << transfers.count() << "transfers.";
......
......@@ -390,7 +390,7 @@ void TransfersViewDelegate::paint(QPainter * painter, const QStyleOptionViewItem
int progress = transferHandler->percent();
if (progress >= 0 && progress <= 100) {
progressBarOption.progress = progress;
progressBarOption.text = QString().sprintf("%d%%", progressBarOption.progress);
progressBarOption.text = QStringLiteral("%1%%").arg(progressBarOption.progress);
} else {
progressBarOption.text = i18nc("not available", "n/a");
}
......
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