diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index c343ee81b94..0d568585145 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -407,7 +407,7 @@ bool MainWindow::addTorrent(const QString &fileName, const QString &destinationF QString baseFileName = QFileInfo(fileName).fileName(); if (baseFileName.toLower().endsWith(".torrent")) - baseFileName.remove(baseFileName.size() - 8); + baseFileName.chop(8); item->setText(0, baseFileName); item->setToolTip(0, tr("Torrent: %1
Destination: %2")