mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
Replace QRegExp with QRegularExpression
Revise `static` keyword usage, static is added to frequently used instances.
This commit is contained in:
parent
c22e6b4502
commit
09f759355f
14 changed files with 72 additions and 63 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue