mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Replace QRegExp with QRegularExpression
Revise `static` keyword usage, static is added to frequently used instances.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QShortcut>
|
||||
#include <QStylePainter>
|
||||
#include <QTableView>
|
||||
@@ -830,7 +831,7 @@ void TransferListWidget::renameSelectedTorrent()
|
||||
bool ok;
|
||||
QString name = AutoExpandableDialog::getText(this, tr("Rename"), tr("New name:"), QLineEdit::Normal, torrent->name(), &ok);
|
||||
if (ok && !name.isEmpty()) {
|
||||
name.replace(QRegExp("\r?\n|\r"), " ");
|
||||
name.replace(QRegularExpression("\r?\n|\r"), " ");
|
||||
// Rename the torrent
|
||||
m_listModel->setData(mi, name, Qt::DisplayRole);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user